2008-08-08 Maxime Britto <britto@apple.com>
authorbritto@apple.com <britto@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Aug 2008 00:15:05 +0000 (00:15 +0000)
committerbritto@apple.com <britto@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Aug 2008 00:15:05 +0000 (00:15 +0000)
commit83eb75df90d1ee3810bdf2da9bb3e4066ba5fbc7
treeacfa3d7a85055b2875ae1e739ad60d4cf16d11eb
parentf9a5fcf1d709c980efa1869ab8f1e20c32201945
2008-08-08  Maxime Britto  <britto@apple.com>

        Reviewed by Adele.

        Test: fast/events/scroll-to-anchor-in-overflow-hidden.html
        https://bugs.webkit.org/show_bug.cgi?id=20270
        Jump to an anchor wasn't working when the overflow:hidden CSS attribute was set on the page.

        * WebCore.base.exp:
        * dom/Element.cpp:
        (WebCore::Element::scrollIntoView):
        (WebCore::Element::scrollIntoViewIfNeeded):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::gotoAnchor):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseDraggedEvent):
        * page/Frame.cpp:
        (WebCore::Frame::revealSelection):
        (WebCore::Frame::revealCaret):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollRectToVisible): Takes a new parameter "scrollToAnchor" since it's a special case of scroll. It passes this new bool to canBeProgrammaticallyScrolled.
        (WebCore::RenderLayer::autoscroll):
        * rendering/RenderLayer.h:
        * rendering/RenderListBox.h:
        (WebCore::RenderListBox::canBeProgramaticallyScrolled):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::canBeProgramaticallyScrolled): If the call is coming from a scrollToAnchor we don't need scrollBars to accept.
        * rendering/RenderObject.h:
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::canBeProgramaticallyScrolled):

2008-08-08  Maxime Britto  <britto@apple.com>

        Reviewed by Adele.

        * WebView/WebFrame.mm:
        (-[WebFrame _scrollDOMRangeToVisible:]):

2008-08-08  Maxime Britto  <britto@apple.com>

        Reviewed by Adele.
        https://bugs.webkit.org/show_bug.cgi?id=20270
        This test is automatic and can also be run manually.

        * fast/events/scroll-to-anchor-in-overflow-hidden-expected.txt: Added.
        * fast/events/scroll-to-anchor-in-overflow-hidden.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/dom/Element.cpp
WebCore/loader/FrameLoader.cpp
WebCore/page/EventHandler.cpp
WebCore/page/Frame.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderListBox.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTextControl.h
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebFrame.mm