2011-04-06 Xiaomei Ji <xji@chromium.org>
authorxji@chromium.org <xji@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 20:02:19 +0000 (20:02 +0000)
committerxji@chromium.org <xji@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 20:02:19 +0000 (20:02 +0000)
commit28bc49fde7f166c448b0bf7fb6b4133999927634
tree8e63adff3647ceb8ab7e8646d759cfa1e4c96b69
parentfc1ff23faac7317e86b56962fb9b56db44f140fb
2011-04-06  Xiaomei Ji  <xji@chromium.org>

        Reviewed by Ryosuke Niwa.

        Continue experiment with moving caret by word in visual order.
        https://bugs.webkit.org/show_bug.cgi?id=57806

        This is the 2nd patch, which adds implementation when caret is inside box
        (not at boundaries). If the word break is inside the same box and not at the boundaries
        either, the word break will be returned. If need to search the adjacent boxes for word
        breaks, then, only the cases implemented in bug 57336 work.

        * editing/visible_units.cpp:
        (WebCore::leftmostPositionInRTLBoxInLTRBlock):
        (WebCore::rightmostPositionInLTRBoxInRTLBlock):
        (WebCore::lastWordBreakInBox):
        (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality):
        (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
        (WebCore::WordBoundaryEntry::WordBoundaryEntry):
        (WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
        (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
        (WebCore::greatestValueUnder):
        (WebCore::smallestOffsetAbove):
        (WebCore::positionIsInsideBox):
        (WebCore::positionBeforeNextWord):
        (WebCore::positionAfterPreviousWord):
        (WebCore::leftWordPosition):
        (WebCore::rightWordPosition):
2011-04-06  Xiaomei Ji  <xji@chromium.org>

        Reviewed by Ryosuke Niwa.

        Continue experiment with moving caret by word in visual order.
        https://bugs.webkit.org/show_bug.cgi?id=57806

        Return correct result when caret and the word break are inside a box (not at boundaries).
        Added test case to test word break at a random start point
        (not start from a word break).

        * editing/selection/move-by-word-visually-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/move-by-word-visually-expected.txt
LayoutTests/editing/selection/move-by-word-visually.html
Source/WebCore/ChangeLog
Source/WebCore/editing/visible_units.cpp