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

Changeset 243145 in webkit


Ignore:
Timestamp:
Mar 19, 2019, 10:37:35 AM (8 years ago)
Author:
Simon Fraser
Message:

[Async overflow] Handle positioned nodes in a few more places
​https://bugs.webkit.org/show_bug.cgi?id=195946

Reviewed by Zalan Bujtas.

When I added support for positioned nodes in the scrolling tree I missed handling
the ScrollCoordinationRole::Positioning in a few places.

I wasn't able to come up with a test for this; when a positioned node toggles between
tiled and non-tiled, hitting the code in didChangePlatformLayerForLayer(), we already
update the node with the new layer.

  • rendering/RenderLayer.cpp:

(WebCore::outputPaintOrderTreeRecursive): Logging.

  • rendering/RenderLayerBacking.cpp:

(WebCore::operator<<): Logging.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): Update the node's layer.
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Handle detaching of this node type.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r243141 r243145  
     12019-03-19  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Async overflow] Handle positioned nodes in a few more places
     4        https://bugs.webkit.org/show_bug.cgi?id=195946
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        When I added support for positioned nodes in the scrolling tree I missed handling
     9        the ScrollCoordinationRole::Positioning in a few places.
     10
     11        I wasn't able to come up with a test for this; when a positioned node toggles between
     12        tiled and non-tiled, hitting the code in didChangePlatformLayerForLayer(), we already
     13        update the node with the new layer.
     14
     15        * rendering/RenderLayer.cpp:
     16        (WebCore::outputPaintOrderTreeRecursive): Logging.
     17        * rendering/RenderLayerBacking.cpp:
     18        (WebCore::operator<<): Logging.
     19        * rendering/RenderLayerCompositor.cpp:
     20        (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): Update the node's layer.
     21        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Handle detaching of this node type.
     22
    1232019-03-19  Alex Christensen  <achristensen@webkit.org>
    224
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r243134 r243145  
    67456745        auto frameHostingNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::FrameHosting);
    67466746        auto viewportConstrainedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::ViewportConstrained);
     6747        auto positionedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::Positioning);
    67476748
    67486749        if (scrollingNodeID || frameHostingNodeID || viewportConstrainedNodeID) {
    … …  
    67676768            }
    67686769
     6770            if (positionedNodeID) {
     6771                if (!first)
     6772                    stream << ", ";
     6773                stream << "pos " << positionedNodeID;
     6774            }
     6775
    67696776            stream << "}";
    67706777        }
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r243134 r243145  
    31363136    if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting))
    31373137        ts << " frame hosting node " << nodeID;
     3138    if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::Positioning))
     3139        ts << " positioning node " << nodeID;
    31383140    return ts;
    31393141}
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r243141 r243145  
    553553    if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting))
    554554        scrollingCoordinator->setNodeLayers(nodeID, { backing->graphicsLayer() });
     555
     556    if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Positioning))
     557        scrollingCoordinator->setNodeLayers(nodeID, { backing->graphicsLayer() });
    555558}
    556559
    … …  
    39603963        detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::ViewportConstrained);
    39613964
     3965    if (roles.contains(ScrollCoordinationRole::Positioning))
     3966        detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::Positioning);
     3967
    39623968    backing->detachFromScrollingCoordinator(roles);
    39633969}
Note: See TracChangeset for help on using the changeset viewer.