Changeset 279748 in webkit
- Timestamp:
- Jul 8, 2021 1:29:32 PM (13 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt (modified) (2 diffs)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar-expected.html (added)
-
LayoutTests/compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r279742 r279748 1 2021-07-08 Simon Fraser <simon.fraser@apple.com> 2 3 Scrollbar hidden when scroller has a negative z-index child 4 https://bugs.webkit.org/show_bug.cgi?id=227545 5 6 Reviewed by Alan Bujtas. 7 8 * compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt: Rebaseline 9 * compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar-expected.html: Added. 10 * compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar.html: Added. 11 1 12 2021-07-08 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> 2 13 -
trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt
r278883 r279748 20 20 (bounds 200.00 200.00) 21 21 (contentsOpaque 1) 22 )23 )24 )25 (GraphicsLayer26 (position 9.00 9.00)27 (bounds 300.00 300.00)28 (clips 1)29 (children 130 (GraphicsLayer31 (position 285.00 0.00)32 (bounds 15.00 300.00)33 (drawsContent 1)34 22 ) 35 23 ) … … 59 47 ) 60 48 ) 49 (GraphicsLayer 50 (position 9.00 9.00) 51 (bounds 300.00 300.00) 52 (clips 1) 53 (children 1 54 (GraphicsLayer 55 (position 285.00 0.00) 56 (bounds 15.00 300.00) 57 (drawsContent 1) 58 ) 59 ) 60 ) 61 61 ) 62 62 ) -
trunk/Source/WebCore/ChangeLog
r279742 r279748 1 2021-07-08 Simon Fraser <simon.fraser@apple.com> 2 3 Scrollbar hidden when scroller has a negative z-index child 4 https://bugs.webkit.org/show_bug.cgi?id=227545 5 6 Reviewed by Alan Bujtas. 7 8 The code to ensure that overflow:scroll scrollbars appeared on top of composited descendant 9 layers had incorrect behavior if the only descendant had negative z-index; it would move the 10 overflow controls container layer to be after that descendant, and thus behind foreground 11 content. 12 13 Fix by inserting the overflow controls container layer in front of the frontmost of the 14 descendant and the scroller itself. 15 16 Test: compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller-hidden-scrollbar.html 17 18 * rendering/RenderLayerCompositor.cpp: 19 (WebCore::RenderLayerCompositor::adjustOverflowScrollbarContainerLayers): 20 1 21 2021-07-08 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> 2 22 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r279636 r279748 1485 1485 continue; 1486 1486 1487 LOG_WITH_STREAM(Compositing, stream << "Moving overflow controls layer for " << overflowScrollingLayer << " to appear after " << lastContainedDescendant);1488 1489 1487 overflowContainerLayer->removeFromParent(); 1490 1488 … … 1500 1498 1501 1499 auto* lastDescendantGraphicsLayer = lastContainedDescendantBacking->childForSuperlayers(); 1502 auto lastDescendantIndex = layerChildren.findMatching([&](auto& item) { 1503 return item.ptr() == lastDescendantGraphicsLayer; 1504 }); 1505 1506 if (lastDescendantIndex != notFound) 1507 layerChildren.insert(lastDescendantIndex + 1, *overflowContainerLayer); 1500 auto* overflowScrollerGraphicsLayer = overflowBacking->childForSuperlayers(); 1501 1502 std::optional<size_t> lastDescendantLayerIndex; 1503 std::optional<size_t> scrollerLayerIndex; 1504 for (size_t i = 0; i < layerChildren.size(); ++i) { 1505 const auto* graphicsLayer = layerChildren[i].ptr(); 1506 if (graphicsLayer == lastDescendantGraphicsLayer) 1507 lastDescendantLayerIndex = i; 1508 else if (graphicsLayer == overflowScrollerGraphicsLayer) 1509 scrollerLayerIndex = i; 1510 } 1511 1512 if (lastDescendantLayerIndex && scrollerLayerIndex) { 1513 auto insertionIndex = std::max(lastDescendantLayerIndex.value() + 1, scrollerLayerIndex.value() + 1); 1514 LOG_WITH_STREAM(Compositing, stream << "Moving overflow controls layer for " << overflowScrollingLayer << " to appear after " << lastContainedDescendant); 1515 layerChildren.insert(insertionIndex, *overflowContainerLayer); 1516 } 1508 1517 1509 1518 overflowBacking->adjustOverflowControlsPositionRelativeToAncestor(stackingContextLayer);
Note: See TracChangeset
for help on using the changeset viewer.