LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 19:47:55 +0000 (19:47 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 19:47:55 +0000 (19:47 +0000)
commitc358532b3259b48e16fc199b9562e8c49e619898
treeec4aa5e54225fd4354f3ef513e3ea0996d73aa5b
parentd1e2ba20b7e24fc848b6c93b13ca97ca355a2b65
LayoutTests:

        Reviewed by sullivan

        <rdar://problem/4776765>
        REGRESSION: Caret's ghost left behind after inserting a paragraph separator (11237)

        * fast/repaint/4776765-expected.checksum: Added.
        * fast/repaint/4776765-expected.png: Added.
        * fast/repaint/4776765-expected.txt: Added.
        * fast/repaint/4776765.html: Added.

WebCore:

        Reviewed by sullivan

        <rdar://problem/4776765>
        REGRESSION: Caret's ghost left behind after inserting a paragraph separator (11237)

        We set m_needsLayout to false and call caretRect() in the hopes that it will give us
        the old caret rect.  It in fact corrects the caret rect for an offset that it
        believes is due to scrolling but which is actually due to a change in selection
        without an accompanying layout.  So it returns the new caret rect regardless of
        what m_needsLayout is set to.

        * editing/SelectionController.cpp:
        (WebCore::repaintRectForCaret): Moved the code from caretRepaintRect that
        adds a one pixel slop to this new function.
        (WebCore::SelectionController::caretRepaintRect): Moved this code to
        repaintRectForCaret.
        (WebCore::SelectionController::recomputeCaretRect): Compare the old
        caret rect to the new one that's computed with a fresh layout.  If
        they are different, invalidate both repaint rects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/repaint/4776765-expected.checksum [new file with mode: 0644]
LayoutTests/fast/repaint/4776765-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/4776765-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/4776765.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp