Changeset 254497 in webkit


Ignore:
Timestamp:
Jan 13, 2020 11:18:15 PM (4 years ago)
Author:
Simon Fraser
Message:

REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
https://bugs.webkit.org/show_bug.cgi?id=202687

Reviewed by Tim Horton.

Source/WebCore:

Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
a scrollable frame to not scroll. This affected ads and twitch.tv.

Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.

Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html

  • page/mac/EventHandlerMac.mm:

(WebCore::scrolledToEdgeInDominantDirection):

  • platform/ScrollView.h:

(WebCore::ScrollView::canHaveScrollbars const): Deleted.

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::canHaveScrollbars const):

LayoutTests:

  • tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
  • tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r254492 r254497  
     12020-01-13  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=202687
     5
     6        Reviewed by Tim Horton.
     7
     8        * tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
     9        * tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
     10
    1112020-01-13  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r254492 r254497  
     12020-01-13  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=202687
     5
     6        Reviewed by Tim Horton.
     7
     8        Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
     9        candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
     10        a scrollable frame to not scroll. This affected ads and twitch.tv.
     11
     12        Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.
     13
     14        Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html
     15
     16        * page/mac/EventHandlerMac.mm:
     17        (WebCore::scrolledToEdgeInDominantDirection):
     18        * platform/ScrollView.h:
     19        (WebCore::ScrollView::canHaveScrollbars const): Deleted.
     20        * platform/ScrollableArea.h:
     21        (WebCore::ScrollableArea::canHaveScrollbars const):
     22
    1232020-01-13  Simon Fraser  <simon.fraser@apple.com>
    224
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r254087 r254497  
    818818        return true;
    819819
     820    if (!area.canHaveScrollbars())
     821        return true;
     822
    820823    const RenderStyle& style = container.renderer()->style();
    821824
  • trunk/Source/WebCore/platform/ScrollView.h

    r253689 r254497  
    121121
    122122    WEBCORE_EXPORT virtual void setCanHaveScrollbars(bool);
    123     bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
    124123
    125124    virtual bool avoidScrollbarCreation() const { return false; }
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r246488 r254497  
    121121    virtual ScrollbarMode horizontalScrollbarMode() const { return ScrollbarAuto; }
    122122    virtual ScrollbarMode verticalScrollbarMode() const { return ScrollbarAuto; }
     123    bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
    123124
    124125    virtual bool horizontalScrollbarHiddenByStyle() const { return false; }
Note: See TracChangeset for help on using the changeset viewer.