Changeset 271508 in webkit


Ignore:
Timestamp:
Jan 14, 2021 9:12:47 PM (18 months ago)
Author:
Simon Fraser
Message:

[Async scrolling] Slow-scrolling reasons should not propagate across frame boundaries
https://bugs.webkit.org/show_bug.cgi?id=220635

Reviewed by Tim Horton.

Source/WebCore:

We should be able to do fast scrolling of the main frame when a subframe has background-attachment:fixed
content in it, but currently we propagate the "slow scrolling reasons" up to the root of
the scrolling tree, which crosses frame boundaries.

This is a partial fix for the problem; ThreadedScrollingTree::canUpdateLayersOnScrollingThread()
is still consulting tree-wide state.

Test: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe.html

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::propagateSynchronousScrollingReasons):
(WebCore::ThreadedScrollingTree::canUpdateLayersOnScrollingThread const):

  • page/scrolling/ThreadedScrollingTree.h:

LayoutTests:

  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271507 r271508  
     12021-01-14  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Async scrolling] Slow-scrolling reasons should not propagate across frame boundaries
     4        https://bugs.webkit.org/show_bug.cgi?id=220635
     5
     6        Reviewed by Tim Horton.
     7
     8        * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe-expected.txt: Added.
     9        * scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe.html: Added.
     10
    1112021-01-14  Aditya Keerthi  <akeerthi@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r271507 r271508  
     12021-01-14  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Async scrolling] Slow-scrolling reasons should not propagate across frame boundaries
     4        https://bugs.webkit.org/show_bug.cgi?id=220635
     5
     6        Reviewed by Tim Horton.
     7
     8        We should be able to do fast scrolling of the main frame when a subframe has background-attachment:fixed
     9        content in it, but currently we propagate the "slow scrolling reasons" up to the root of
     10        the scrolling tree, which crosses frame boundaries.
     11
     12        This is a partial fix for the problem; ThreadedScrollingTree::canUpdateLayersOnScrollingThread()
     13        is still consulting tree-wide state.
     14
     15        Test: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-in-iframe.html
     16
     17        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
     18        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
     19        * page/scrolling/ThreadedScrollingTree.cpp:
     20        (WebCore::ThreadedScrollingTree::propagateSynchronousScrollingReasons):
     21        (WebCore::ThreadedScrollingTree::canUpdateLayersOnScrollingThread const):
     22        * page/scrolling/ThreadedScrollingTree.h:
     23
    1242021-01-14  Aditya Keerthi  <akeerthi@apple.com>
    225
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp

    r270557 r271508  
    318318    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) {
    319319        ts.dumpProperty("root contents layer ID", m_rootContentsLayer.layerID());
    320         ts.dumpProperty("counter scrolling layer ID", m_counterScrollingLayer.layerID());
    321         ts.dumpProperty("inset clip layer ID", m_insetClipLayer.layerID());
    322         ts.dumpProperty("content shadow layer ID", m_contentShadowLayer.layerID());
    323         ts.dumpProperty("header layer ID", m_headerLayer.layerID());
    324         ts.dumpProperty("footer layer ID", m_footerLayer.layerID());
     320        if (m_counterScrollingLayer.layerID())
     321            ts.dumpProperty("counter scrolling layer ID", m_counterScrollingLayer.layerID());
     322        if (m_insetClipLayer.layerID())
     323            ts.dumpProperty("inset clip layer ID", m_insetClipLayer.layerID());
     324        if (m_contentShadowLayer.layerID())
     325            ts.dumpProperty("content shadow layer ID", m_contentShadowLayer.layerID());
     326        if (m_headerLayer.layerID())
     327            ts.dumpProperty("header layer ID", m_headerLayer.layerID());
     328        if (m_footerLayer.layerID())
     329            ts.dumpProperty("footer layer ID", m_footerLayer.layerID());
    325330    }
    326331
  • trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp

    r270425 r271508  
    169169                continue;
    170170            }
     171           
     172            if (is<ScrollingTreeFrameScrollingNode>(currNode))
     173                break;
    171174
    172175            currNode = currNode->parent();
     
    174177    };
    175178
     179    m_hasNodesWithSynchronousScrollingReasons = !synchronousScrollingNodes.isEmpty();
     180
    176181    for (auto nodeID : synchronousScrollingNodes) {
    177182        if (auto node = nodeForID(nodeID))
     
    182187bool ThreadedScrollingTree::canUpdateLayersOnScrollingThread() const
    183188{
    184     auto* rootNode = this->rootNode();
    185     return !(rootNode && rootNode->hasSynchronousScrollingReasons());
     189    return m_hasNodesWithSynchronousScrollingReasons;
    186190}
    187191
  • trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h

    r270425 r271508  
    114114
    115115    bool m_scrollAnimatorEnabled { false };
     116    bool m_hasNodesWithSynchronousScrollingReasons { false };
    116117};
    117118
Note: See TracChangeset for help on using the changeset viewer.