[ATK] Simplify implementation of atk_text_get_text
authormario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 10:15:13 +0000 (10:15 +0000)
committermario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 10:15:13 +0000 (10:15 +0000)
commitce5a341257c17be531bd11b6eed35fb6dbe0b285
tree8fae8aa513f1a5949cf8da0501c6610f7b2ef1ba
parent71984a92871abb889729a0aa1b248959b8ef27f5
[ATK] Simplify implementation of atk_text_get_text
https://bugs.webkit.org/show_bug.cgi?id=122644

Reviewed by Chris Fleizach.

Simplified code so we only call textUnderElement() directly once
and only when needed. Also, moved the specific code for ColorWell
objects up to the beginning of that function, so we don't do any
additional efforts like computing text ranges in those cases.

No new tests are needed, just to make sure that the current layout
and unit tests are still passing, which they are.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(textForObject): Fixed a issue that got detected while working on
this patch, which was causing a '\n' to be artificially appended
at the end of text controls all the time.
(webkitAccessibleTextGetText): Simplified function.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::doAXStringForRange): Removed
the check that prevents from pass ranges exceeding the limits of
the element's text, since those will be checked anyway when
calling String::substring().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp