⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 130226 in webkit


Ignore:
Timestamp:
Oct 2, 2012, 4:14:56 PM (14 years ago)
Author:
Nate Chapin
Message:

Source/WebCore: iframes with scrolling=no can't scroll to anchors
​https://bugs.webkit.org/show_bug.cgi?id=96539

Reviewed by Antonio Gomes.

This appears to have regressed in r106730. This patch matches Firefox's behavior.

Test: fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe.html

  • page/EventHandler.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible): Currently scrolls are always forbidden

if scrollbars are explicitly disabled. This adds an exception for scrolls that
are not user-initiated and are not autoscrolls.

LayoutTests: Test for ​https://bugs.webkit.org/show_bug.cgi?id=96539.

Reviewed by Antonio Gomes.

  • fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe.html: Added.
  • fast/dom/HTMLAnchorElement/resources: Added.
  • fast/dom/HTMLAnchorElement/resources/iframe-with-anchor.html: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r130213 r130226  
     12012-10-02  Nate Chapin  <japhet@chromium.org>
     2
     3        Test for https://bugs.webkit.org/show_bug.cgi?id=96539.
     4
     5        Reviewed by Antonio Gomes.
     6
     7        * fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-expected.txt: Added.
     8        * fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe.html: Added.
     9        * fast/dom/HTMLAnchorElement/resources: Added.
     10        * fast/dom/HTMLAnchorElement/resources/iframe-with-anchor.html: Added.
     11
    1122012-10-02  Ojan Vafai  <ojan@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r130224 r130226  
     12012-10-02  Nate Chapin  <japhet@chromium.org>
     2
     3        iframes with scrolling=no can't scroll to anchors
     4        https://bugs.webkit.org/show_bug.cgi?id=96539
     5
     6        Reviewed by Antonio Gomes.
     7
     8        This appears to have regressed in r106730. This patch matches Firefox's behavior.
     9
     10        Test: fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe.html
     11
     12        * page/EventHandler.h:
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::scrollRectToVisible): Currently scrolls are always forbidden
     15           if scrollbars are explicitly disabled. This adds an exception for scrolls that
     16           are not user-initiated and are not autoscrolls.
     17
    1182012-10-02  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/page/EventHandler.h

    r129750 r130226  
    112112    RenderObject* autoscrollRenderer() const;
    113113    void updateAutoscrollRenderer();
     114    bool autoscrollInProgress() const { return m_autoscrollInProgress; }
    114115
    115116    void dispatchFakeMouseMoveEventSoon();
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r130081 r130226  
    18071807                    frameElement = static_cast<HTMLFrameElement*>(ownerElement);
    18081808
    1809                 if (frameElement && frameElement->scrollingMode() != ScrollbarAlwaysOff) {
     1809                if ((frameElement && frameElement->scrollingMode() != ScrollbarAlwaysOff)
     1810                    || (!frameView->frame()->eventHandler()->autoscrollInProgress() && !frameView->wasScrolledByUser())) {
    18101811                    LayoutRect viewRect = frameView->visibleContentRect();
    18111812                    LayoutRect exposeRect = getRectToExpose(viewRect, rect, alignX, alignY);
Note: See TracChangeset for help on using the changeset viewer.