Changeset 243309 in webkit
- Timestamp:
- Mar 21, 2019, 11:58:09 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/overflow/absolute-in-overflow-expected.html (added)
-
LayoutTests/compositing/overflow/absolute-in-overflow.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243307 r243309 1 2019-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 Absolute in stacking-context scroller jiggles when scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=196010 5 6 Reviewed by Zalan Bujtas. 7 8 * compositing/overflow/absolute-in-overflow-expected.html: Added. 9 * compositing/overflow/absolute-in-overflow.html: Added. 10 1 11 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r243307 r243309 1 2019-03-21 Simon Fraser <simon.fraser@apple.com> 2 3 Absolute in stacking-context scroller jiggles when scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=196010 5 6 Reviewed by Zalan Bujtas. 7 8 Updating compositing layers after a scroll (in a compositing update on the main thread) 9 failed to traverse to an absolute layer inside a stacking-context overflow:scroll, 10 because the overflow's layer didn't have the "hasCompositingAncestor" bit set on it. 11 12 This happened because childState.subtreeIsCompositing wasn't being set when indirect 13 reasons trigger compositing. So clean up RenderLayerCompositor::computeCompositingRequirements() 14 to set childState.subtreeIsCompositing for "late" compositing decisions, and move the 15 "Subsequent layers in the parent stacking context also need to composite" chunk 16 down to after the last compositing decision has been made. 17 18 Test: compositing/overflow/absolute-in-overflow.html 19 20 * page/scrolling/ScrollingTreeScrollingNode.cpp: 21 (WebCore::ScrollingTreeScrollingNode::scrollTo): 22 * page/scrolling/cocoa/ScrollingTreePositionedNode.mm: 23 (WebCore::ScrollingTreePositionedNode::applyLayerPositions): 24 * rendering/RenderLayerCompositor.cpp: 25 (WebCore::RenderLayerCompositor::computeCompositingRequirements): 26 1 27 2019-03-21 Zalan Bujtas <zalan@apple.com> 2 28 -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
r242687 r243309 162 162 163 163 m_currentScrollPosition = adjustedScrollPosition(position, clamp); 164 165 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeScrollingNode " << scrollingNodeID() << " scrollTo " << position << " (delta from last committed position " << (m_lastCommittedScrollPosition - m_currentScrollPosition) << ")"); 166 164 167 updateViewportForCurrentScrollPosition(); 165 168 currentScrollPositionChanged(); -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm
r242997 r243309 88 88 } 89 89 } 90 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreePositionedNode " << scrollingNodeID() << " applyLayerPositions: overflow delta " << scrollOffsetSinceLastCommit);91 92 90 auto layerOffset = -scrollOffsetSinceLastCommit; 93 91 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Stationary) { … … 97 95 98 96 FloatPoint layerPosition = m_constraints.layerPositionAtLastLayout() - layerOffset; 97 98 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreePositionedNode " << scrollingNodeID() << " applyLayerPositions: overflow delta " << scrollOffsetSinceLastCommit << " moving layer to " << layerPosition); 99 99 100 [m_layer _web_setLayerTopLeftPosition:layerPosition - m_constraints.alignmentOffset()]; 100 101 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r243211 r243309 959 959 layer.setIndirectCompositingReason(indirectCompositingReason); 960 960 childState.compositingAncestor = &layer; 961 childState.subtreeIsCompositing = true; 961 962 overlapMap.pushCompositingContainer(); 962 963 addToOverlapMapRecursive(overlapMap, layer); … … 968 969 layer.reflectionLayer()->setIndirectCompositingReason(willBeComposited ? RenderLayer::IndirectCompositingReason::Stacking : RenderLayer::IndirectCompositingReason::None); 969 970 } 970 971 // Subsequent layers in the parent stacking context also need to composite.972 compositingState.subtreeIsCompositing |= childState.subtreeIsCompositing;973 compositingState.fullPaintOrderTraversalRequired |= childState.fullPaintOrderTraversalRequired;974 971 975 972 // Set the flag to say that this layer has compositing children. … … 988 985 if (!willBeComposited) { 989 986 childState.compositingAncestor = &layer; 987 childState.subtreeIsCompositing = true; 990 988 overlapMap.pushCompositingContainer(); 991 989 addToOverlapMapRecursive(overlapMap, layer); … … 995 993 996 994 #if ENABLE(CSS_COMPOSITING) 997 if ((willBeComposited && layer.hasBlendMode()) 998 || (layer.hasNotIsolatedCompositedBlendingDescendants() && !layer.isolatesCompositedBlending())) 995 if ((willBeComposited && layer.hasBlendMode()) || (layer.hasNotIsolatedCompositedBlendingDescendants() && !layer.isolatesCompositedBlending())) 999 996 compositingState.hasNotIsolatedCompositedBlendingDescendants = true; 1000 997 #endif … … 1014 1011 #endif 1015 1012 } 1016 1013 1014 // Subsequent layers in the parent stacking context also need to composite. 1015 compositingState.subtreeIsCompositing |= childState.subtreeIsCompositing; 1016 compositingState.fullPaintOrderTraversalRequired |= childState.fullPaintOrderTraversalRequired; 1017 1017 1018 ASSERT(willBeComposited == needsToBeComposited(layer, queryData)); 1018 1019
Note:
See TracChangeset
for help on using the changeset viewer.