AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2014 17:32:21 +0000 (17:32 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2014 17:32:21 +0000 (17:32 +0000)
commit51bcb6ba2c1a9d18f55a2fb55163745f0bac3d3d
tree9456a0effb31f9ae8d7884946e7caa5c87e3fb6a
parent62dbfb60bdf73e0ce1891c19db596c08174c6c7e
AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
https://bugs.webkit.org/show_bug.cgi?id=135547

Reviewed by Mario Sanchez Prada.

Source/WebCore:
Allow text search to specify that it wants to match end of words as well as start of words.
This allows select text criteria to match on whole words only.

Test: platform/mac/accessibility/select-text-should-match-whole-words.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
* editing/FindOptions.h:
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isWordEndMatch):
(WebCore::SearchBuffer::search):

LayoutTests:
* platform/mac/accessibility/select-text-should-match-whole-words-expected.txt: Added.
* platform/mac/accessibility/select-text-should-match-whole-words.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/select-text-should-match-whole-words-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/select-text-should-match-whole-words.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/editing/FindOptions.h
Source/WebCore/editing/TextIterator.cpp