Changeset 246017 in webkit
- Timestamp:
- Jun 1, 2019, 2:40:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt (modified) (2 diffs)
-
LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html (modified) (3 diffs)
-
LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/geometry/bounds-ignores-hidden.html (modified) (2 diffs)
-
LayoutTests/compositing/layer-creation/composited-negative-z-subtree-expected.txt (added)
-
LayoutTests/compositing/layer-creation/composited-negative-z-subtree.html (added)
-
LayoutTests/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt (modified) (1 diff)
-
LayoutTests/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246016 r246017 1 2019-06-01 Simon Fraser <simon.fraser@apple.com> 2 3 Non-composited negative z-order children should not trigger creation of a foreground layer 4 https://bugs.webkit.org/show_bug.cgi?id=198455 5 6 Reviewed by Sam Weinig. 7 8 Change existing tests that use negative z-order layers to trigger foreground layer 9 creation to use compositing on those negative z-order layers. 10 11 * compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: 12 * compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html: 13 * compositing/geometry/bounds-ignores-hidden-expected.txt: 14 * compositing/geometry/bounds-ignores-hidden.html: 15 * compositing/layer-creation/composited-negative-z-subtree-expected.txt: Added. 16 * compositing/layer-creation/composited-negative-z-subtree.html: Added. 17 * compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: 18 * compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html: 19 * platform/ios-wk2/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: 20 * platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: 21 * platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt: 22 1 23 2019-06-01 Devin Rousso <drousso@apple.com> 2 24 -
trunk/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
r168244 r246017 13 13 (bounds 500.00 250.00) 14 14 (drawsContent 1) 15 (children 1 15 (children 2 16 (GraphicsLayer 17 (position 50.00 50.00) 18 (bounds 100.00 100.00) 19 (contentsOpaque 1) 20 (drawsContent 1) 21 ) 16 22 (GraphicsLayer 17 23 (bounds 500.00 250.00) … … 22 28 (GraphicsLayer 23 29 (position 0.00 250.00) 24 (anchor 0.33 0.33) 25 (bounds 150.00 150.00) 30 (bounds 100.00 100.00) 26 31 (drawsContent 1) 27 (children 132 (children 2 28 33 (GraphicsLayer 29 (bounds 150.00 150.00) 34 (position 50.00 50.00) 35 (bounds 100.00 100.00) 36 (contentsOpaque 1) 37 (drawsContent 1) 38 ) 39 (GraphicsLayer 40 (bounds 100.00 100.00) 30 41 (drawsContent 1) 31 42 ) -
trunk/LayoutTests/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html
r130689 r246017 4 4 } 5 5 .composited { 6 -webkit-transform: translateZ(0);6 transform: translateZ(0); 7 7 } 8 8 … … 80 80 <div style="position: absolute; left: 0px; top: 0px; z-index: 0; " class="composited"> 81 81 <div class="inline"></div> 82 <img style="position: absolute; left: 50px; top: 50px; z-index: -1;">82 <img class="composited" style="position: absolute; left: 50px; top: 50px; z-index: -1;"> 83 83 <img style="position: absolute; left: 400px; top: 150px; z-index: 0;" class="to-visible"> 84 84 </div> … … 86 86 <div style="position: absolute; left: 0px; top: 250px; z-index: 0; " class="composited"> 87 87 <div class="inline"></div> 88 <img style="position: absolute; left: 50px; top: 50px; z-index: -1;">88 <img class="composited" style="position: absolute; left: 50px; top: 50px; z-index: -1;"> 89 89 <img style="position: absolute; left: 400px; top: 150px; z-index: 0;" class="to-hidden"> 90 90 </div> -
trunk/LayoutTests/compositing/geometry/bounds-ignores-hidden-expected.txt
r225897 r246017 9 9 (children 1 10 10 (GraphicsLayer 11 (offsetFromRenderer width=10 height=10) 12 (position 10.00 10.00) 13 (anchor -0.20 -0.20) 14 (bounds 50.00 50.00) 15 (contentsOpaque 1) 16 (drawsContent 1) 17 (children 1 11 (children 2 18 12 (GraphicsLayer 19 ( offsetFromRenderer width=10 height=10)13 (position 10.00 10.00) 20 14 (bounds 50.00 50.00) 15 (contentsOpaque 1) 21 16 (drawsContent 1) 17 ) 18 (GraphicsLayer 22 19 ) 23 20 ) -
trunk/LayoutTests/compositing/geometry/bounds-ignores-hidden.html
r130689 r246017 1 1 <style> 2 2 .composited { 3 -webkit-transform: translateZ(0);3 transform: translateZ(0); 4 4 } 5 5 … … 24 24 <body> 25 25 <div style="position: absolute; left: 0px; top: 0px; z-index: 106; " class="composited"> 26 <img style="position: absolute; left: 10px; top: 10px; z-index: -2;">26 <img class="composited" style="position: absolute; left: 10px; top: 10px; z-index: -2;"> 27 27 <img style="position: absolute; left: 44940px; top: 15013px; z-index: 0; visibility: hidden;"> 28 28 </div> -
trunk/LayoutTests/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt
r245977 r246017 39 39 GraphicsLayerPaintCompositedScroll 40 40 ) 41 (children 1 41 (children 2 42 (GraphicsLayer 43 (position 30.00 50.00) 44 (bounds 100.00 100.00) 45 (contentsOpaque 1) 46 (paintingPhases 47 GraphicsLayerPaintBackground 48 GraphicsLayerPaintForeground 49 ) 50 ) 42 51 (GraphicsLayer 43 52 (offsetFromRenderer width=1 height=1) -
trunk/LayoutTests/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases.html
r245977 r246017 24 24 height: 100px; 25 25 background-color: blue; 26 transform: translateZ(0); 26 27 } 27 28 </style> -
trunk/LayoutTests/platform/ios-wk2/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt
r177052 r246017 13 13 (bounds 500.00 250.00) 14 14 (drawsContent 1) 15 (children 1 15 (children 2 16 (GraphicsLayer 17 (position 50.00 50.00) 18 (bounds 100.00 100.00) 19 (contentsOpaque 1) 20 (drawsContent 1) 21 ) 16 22 (GraphicsLayer 17 23 (bounds 500.00 250.00) … … 22 28 (GraphicsLayer 23 29 (position 0.00 250.00) 24 (anchor 0.33 0.33) 25 (bounds 150.00 150.00) 30 (bounds 100.00 100.00) 26 31 (drawsContent 1) 27 (children 132 (children 2 28 33 (GraphicsLayer 29 (bounds 150.00 150.00) 34 (position 50.00 50.00) 35 (bounds 100.00 100.00) 36 (contentsOpaque 1) 37 (drawsContent 1) 38 ) 39 (GraphicsLayer 40 (bounds 100.00 100.00) 30 41 (drawsContent 1) 31 42 ) -
trunk/LayoutTests/platform/ios-wk2/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt
r245977 r246017 39 39 GraphicsLayerPaintCompositedScroll 40 40 ) 41 (children 1 41 (children 2 42 (GraphicsLayer 43 (position 30.00 50.00) 44 (bounds 100.00 100.00) 45 (contentsOpaque 1) 46 (paintingPhases 47 GraphicsLayerPaintBackground 48 GraphicsLayerPaintForeground 49 ) 50 ) 42 51 (GraphicsLayer 43 52 (offsetFromRenderer width=1 height=1) -
trunk/LayoutTests/platform/mac-wk1/compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt
r245977 r246017 1 1 Scrolled contents 2 (GraphicsLayer 3 (anchor 0.00 0.00) 4 (bounds 800.00 600.00) 5 (paintingPhases 6 GraphicsLayerPaintBackground 7 GraphicsLayerPaintForeground 8 ) 9 (children 1 10 (GraphicsLayer 11 (bounds 800.00 600.00) 12 (contentsOpaque 1) 13 (paintingPhases 14 GraphicsLayerPaintBackground 15 GraphicsLayerPaintForeground 16 ) 17 (children 1 18 (GraphicsLayer 19 (position 8.00 8.00) 20 (bounds 322.00 322.00) 21 (drawsContent 1) 22 (paintingPhases 23 GraphicsLayerPaintBackground 24 ) 25 (children 1 26 (GraphicsLayer 27 (offsetFromRenderer width=1 height=1) 28 (position 1.00 1.00) 29 (bounds 305.00 305.00) 30 (paintingPhases 31 GraphicsLayerPaintBackground 32 GraphicsLayerPaintForeground 33 ) 34 (children 2 35 (GraphicsLayer 36 (position 30.00 50.00) 37 (bounds 100.00 100.00) 38 (contentsOpaque 1) 39 (paintingPhases 40 GraphicsLayerPaintBackground 41 GraphicsLayerPaintForeground 42 ) 43 ) 44 (GraphicsLayer 45 (offsetFromRenderer width=1 height=1) 46 (bounds 305.00 305.00) 47 (drawsContent 1) 48 (paintingPhases 49 GraphicsLayerPaintForeground 50 ) 51 ) 52 ) 53 ) 54 ) 55 ) 56 ) 57 ) 58 ) 59 ) 2 60 -
trunk/Source/WebCore/ChangeLog
r246014 r246017 1 2019-06-01 Simon Fraser <simon.fraser@apple.com> 2 3 Non-composited negative z-order children should not trigger creation of a foreground layer 4 https://bugs.webkit.org/show_bug.cgi?id=198455 5 6 Reviewed by Sam Weinig. 7 8 The existing code triggered creation of a foreground layer on RenderLayerBacking when 9 the negative z-order list was non-empty. This isn't necessary; we can paint the negative 10 z-order children just fine. 11 12 We only need a foreground layer when the negative z-order layers are composited or 13 have composited descendants. 14 15 This will reduce backing store memory use in some cases. 16 17 Test: compositing/layer-creation/composited-negative-z-subtree.html 18 19 * rendering/RenderLayerCompositor.cpp: 20 (WebCore::RenderLayerCompositor::computeCompositingRequirements): 21 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): 22 (WebCore::RenderLayerCompositor::needsContentsCompositingLayer const): 23 1 24 2019-06-01 Andy Estes <aestes@apple.com> 2 25 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r245950 r246017 979 979 // (since we need to ensure that the -ve z-order child renders underneath our contents). 980 980 if (!willBeComposited && currentState.subtreeIsCompositing) { 981 // make layer compositing982 981 layer.setIndirectCompositingReason(IndirectCompositingReason::BackgroundLayer); 983 982 layerWillComposite(); … … 1251 1250 LayerListMutationDetector mutationChecker(layer); 1252 1251 #endif 1253 1252 1254 1253 auto appendForegroundLayerIfNecessary = [&] { 1255 1254 // If a negative z-order child is compositing, we get a foreground layer which needs to get parented. … … 3241 3240 } 3242 3241 3243 // If an element has negative z-index children, those children render in front of the3242 // If an element has composited negative z-index children, those children render in front of the 3244 3243 // layer background, so we need an extra 'contents' layer for the foreground of the layer object. 3245 3244 bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer& layer) const 3246 3245 { 3247 return layer.hasNegativeZOrderLayers(); 3246 for (auto* layer : layer.negativeZOrderLayers()) { 3247 if (layer->isComposited() || layer->hasCompositingDescendant()) 3248 return true; 3249 } 3250 3251 return false; 3248 3252 } 3249 3253
Note:
See TracChangeset
for help on using the changeset viewer.