LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2007 03:11:34 +0000 (03:11 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2007 03:11:34 +0000 (03:11 +0000)
commit390c1765d23ff4ee2cd10bcf1670066bb7fa74ef
tree32bbdbbaa05b17564f64bc85a0814e4e1ea28c9a
parentbb1d7f402edbb648c6491c80adb759dc0bc6920e
LayoutTests:

        Reviewed by Harrison.

        <rdar://problem/4889598> Problems with moveDown: and moveUp: in Notes with ToDos

        * editing/selection/4889598-expected.checksum: Added.
        * editing/selection/4889598-expected.png: Added.
        * editing/selection/4889598-expected.txt: Added.
        * editing/selection/4889598.html: Added.

WebCore:

        Reviewed by Harrison.

        <rdar://problem/4889598> Problems with moveDown: and moveUp: in Notes with ToDos

        The caret would disappear when moving from content above or below
        a ToDo if that ToDo doesn't have any content in it with the same
        x position as the caret. That's because closestLeafChildForXPos
        would return non-editable leaves, and which turn into non-editable
        VisiblePositions, which are invisible.

        * editing/visible_units.cpp:
        (WebCore::previousLinePosition): Ask closestLeafForXPos to only
        return editable leaves.
        (WebCore::nextLinePosition): Ditto.
        * rendering/RootInlineBox.cpp:
        (WebCore::isEditableLeaf): Added.
        (WebCore::RootInlineBox::closestLeafChildForXPos): If requested,
        return the closest editable leaf. Removed an early return if the
        position is before the first leaf, it's not really much of an
        optimization.
        * rendering/RootInlineBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@22037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/4889598-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/4889598-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/4889598-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/4889598.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/visible_units.cpp
WebCore/rendering/RootInlineBox.cpp
WebCore/rendering/RootInlineBox.h