WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Mar 2009 00:50:58 +0000 (00:50 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Mar 2009 00:50:58 +0000 (00:50 +0000)
commitaadd9c4fef9b9005ed8c5997b08c202ac1249332
tree147e100ca28e6c9be93f5eca13cd3e3be32ebccc
parentf10703c54454397ead0b9e70dde821f0bfffef5c
WebCore:

2009-03-23  Darin Adler  <darin@apple.com>

        Reviewed by Adele Peterson.

        Bug 24726: hit testing doesn't work right when the click is on anonymous content
        https://bugs.webkit.org/show_bug.cgi?id=24726
        rdar://problem/6696992

        Test: editing/selection/hit-test-anonymous.html

        * rendering/RenderBR.cpp:
        (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
        creating a VisiblePosition directly. It will handle finding non-anonymous
        content nearby if node() is 0.
        * rendering/RenderBlock.cpp:
        (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
        (WebCore::positionForPointWithInlineChildren): Ditto.
        (WebCore::RenderBlock::positionForPoint): Ditto.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::positionForPoint): Ditto.
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::positionForPoint): Ditto.
        (WebCore::RenderObject::createVisiblePosition): Added.
        * rendering/RenderObject.h: Added createVisiblePosition.
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
        * rendering/RenderText.cpp:
        (WebCore::RenderText::positionForPoint): Ditto.

LayoutTests:

2009-03-23  Darin Adler  <darin@apple.com>

        Reviewed by Adele Peterson.

        Bug 24726: hit testing doesn't work right when the click is on anonymous content
        https://bugs.webkit.org/show_bug.cgi?id=24726
        rdar://problem/6696992

        * editing/selection/hit-test-anonymous-expected.txt: Added.
        * editing/selection/hit-test-anonymous.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/hit-test-anonymous-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/hit-test-anonymous.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBR.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderSVGInlineText.cpp
WebCore/rendering/RenderText.cpp