| Summary: | When using the scrolling thread, push ScrollingNodeIDs onto PlatformCALayers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | Scrolling | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cmarcelo, esprehn+autocc, ews-watchlist, fred.wang, glenn, jamesr, koivisto, kondapallykalyan, luiz, pdr, sergio, simon.fraser, tonikitoo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2020-03-05 10:39:29 PST
Created attachment 392597 [details]
Patch
Comment on attachment 392597 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=392597&action=review Still r+ to keep things moving. > Source/WebCore/ChangeLog:12 > + We only need one ScrollingNodeID per platform layer, since a given platform layer only > + ever has one scrolling role. I don't think this is true. Specifically a single layer can meaningfully have both ViewportConstrained and Positioning roles and the scrolling tree code deals with this. We create a ScrollingTreePositionedNode with a ScrollingTreeFixedNode as its child in this case, both pointing to the same layer.
See this code in ScrollingTreeFixedNode::applyLayerPositions() dealing with it:
if (is<ScrollingTreePositionedNode>(*ancestor)) {
auto& positioningAncestor = downcast<ScrollingTreePositionedNode>(*ancestor);
// See if sticky node already handled this positioning node.
// FIXME: Include positioning node information to sticky/fixed node to avoid these tests.
if (lastStickyNode && lastStickyNode->layer() == positioningAncestor.layer())
continue;
if (positioningAncestor.layer() != m_layer)
overflowScrollDelta -= positioningAncestor.scrollDeltaSinceLastCommit();
continue;
}
(In reply to Antti Koivisto from comment #4) > We create a ScrollingTreePositionedNode with a ScrollingTreeFixedNode as its > child in this case, both pointing to the same layer. > > See this code in ScrollingTreeFixedNode::applyLayerPositions() dealing with > it: > > if (is<ScrollingTreePositionedNode>(*ancestor)) { > auto& positioningAncestor = > downcast<ScrollingTreePositionedNode>(*ancestor); > // See if sticky node already handled this positioning node. > // FIXME: Include positioning node information to > sticky/fixed node to avoid these tests. > if (lastStickyNode && lastStickyNode->layer() == > positioningAncestor.layer()) > continue; > if (positioningAncestor.layer() != m_layer) > overflowScrollDelta -= > positioningAncestor.scrollDeltaSinceLastCommit(); > continue; > } True, but for the purposes of overflow scroll hit-testing I don't care about fixed and positioned nodes. |