LayoutTests:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2007 00:26:12 +0000 (00:26 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2007 00:26:12 +0000 (00:26 +0000)
commiteec95df6ec48606a9e558c28e547d9f42da61279
treeaf18462100db7a6d749a8a167288ba82f478e56f
parentcbd5a4565d33091e167b7cfdeeac0bccf239d4bb
LayoutTests:

        Reviewed by Hyatt.

        Test for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result

        * fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.checksum: Added.
        * fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.png: Added.
        * fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt: Added.
        * fast/overflow/scroll-nested-positioned-layer-in-overflow.html: Added.

WebCore:

        Reviewed by Hyatt.

        WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result

        Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html

        Merged visibleSelectionRect into selectionRect.  selectionRect() now takes an argument to determine
        whether or not to return a rect that clips to the visible content.  This change makes all of the implementations of selectionRect
        consistent by having them all consider the repaint rect when clipping to visible content.

        * page/Frame.cpp:
        (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
        (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
        (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
        * page/Frame.h:
        * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image.  Use selectionRect instead of visibleSelectionRect.
        * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.

        * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
        * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
        * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
        * rendering/RenderSVGInlineText.h: ditto.
        * rendering/RenderObject.h:
        (WebCore::RenderObject::selectionRect): ditto.
        (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
        * rendering/RenderView.cpp:
        (WebCore::RenderView::selectionRect): ditto.
        (WebCore::RenderView::setSelection): ditto.
        * rendering/RenderView.h:

        * rendering/RenderText.h:
        * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
        Otherwise, just adjust the rect to the correct position.
        * rendering/RenderListMarker.h:
        * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
          To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
        * rendering/RenderReplaced.h:
        * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.

        * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): Check for a parent layer at the beginning, so we can try to scroll all of our parent layers
          first, before trying to scroll the top level view.  Also, don't try to scroll overflow layers that have -webkit-line-clamp restricting the height.
          This will prevent us from revealing text hidden by the slider in Safari RSS.

        * WebCore.exp: Update symbols for WebKit.

WebKit:

        Reviewed by Hyatt.

        WebKit part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result

        Updated to use selectionRect instead of visibleSelectionRect.  selectionRect() now returns the visible rect by default.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
        (-[WebHTMLView selectionImageRect]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.png [new file with mode: 0644]
LayoutTests/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/overflow/scroll-nested-positioned-layer-in-overflow.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/page/DragController.cpp
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/mac/FrameMac.mm
WebCore/rendering/RenderBR.h
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderListMarker.cpp
WebCore/rendering/RenderListMarker.h
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderReplaced.h
WebCore/rendering/RenderSVGInlineText.cpp
WebCore/rendering/RenderSVGInlineText.h
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderText.h
WebCore/rendering/RenderView.cpp
WebCore/rendering/RenderView.h
WebKit/ChangeLog
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebHTMLView.mm