Changeset 212153 in webkit
- Timestamp:
- Feb 10, 2017, 3:02:36 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 10 added
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/tiling/tiled-mask-inwindow-expected.txt (added)
-
LayoutTests/compositing/tiling/tiled-mask-inwindow.html (added)
-
LayoutTests/compositing/tiling/tiled-reflection-inwindow-expected.txt (added)
-
LayoutTests/compositing/tiling/tiled-reflection-inwindow.html (added)
-
LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (added)
-
LayoutTests/platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (added)
-
LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt (added)
-
LayoutTests/platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt (added)
-
LayoutTests/platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt (added)
-
LayoutTests/platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/PageOverlayController.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/GraphicsLayer.cpp (modified) (3 diffs)
-
Source/WebCore/platform/graphics/GraphicsLayer.h (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/DumpRenderTree/mac/DumpRenderTree.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212152 r212153 1 2017-02-10 Simon Fraser <simon.fraser@apple.com> 2 3 Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections 4 https://bugs.webkit.org/show_bug.cgi?id=168127 5 rdar://problem/30467120 6 7 Reviewed by Tim Horton. 8 9 * compositing/tiling/tiled-mask-inwindow-expected.txt: Added. 10 * compositing/tiling/tiled-mask-inwindow.html: Added. 11 * compositing/tiling/tiled-reflection-inwindow-expected.txt: Added. 12 * compositing/tiling/tiled-reflection-inwindow.html: Added. 13 * platform/ios-simulator-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added. 14 * platform/ios-simulator-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added. 15 * platform/ios-simulator-wk2/compositing/tiling/tiled-mask-inwindow-expected.txt: Added. 16 * platform/ios-simulator-wk2/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added. 17 * platform/mac-wk1/compositing/tiling/tiled-mask-inwindow-expected.txt: Added. 18 * platform/mac-wk1/compositing/tiling/tiled-reflection-inwindow-expected.txt: Added. 19 1 20 2017-02-09 Simon Fraser <simon.fraser@apple.com> 2 21 -
trunk/Source/WebCore/ChangeLog
r212152 r212153 1 2017-02-10 Simon Fraser <simon.fraser@apple.com> 2 3 Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections 4 https://bugs.webkit.org/show_bug.cgi?id=168127 5 rdar://problem/30467120 6 7 Reviewed by Tim Horton. 8 9 Replace the special-case, but wrong, GraphicsLayer traversal in setIsInWindowIncludingDescendants() 10 which forgot to hit masks and replica layers with a generic traverse() function, which 11 is then used for setting 'inWindow' as well as resetting tracked repaints. 12 13 Tests: compositing/tiling/tiled-mask-inwindow.html 14 compositing/tiling/tiled-reflection-inwindow.html 15 16 * page/PageOverlayController.cpp: 17 (WebCore::PageOverlayController::layerWithDocumentOverlays): 18 (WebCore::PageOverlayController::layerWithViewOverlays): 19 * platform/graphics/GraphicsLayer.cpp: 20 (WebCore::GraphicsLayer::setIsInWindow): 21 (WebCore::GraphicsLayer::setReplicatedByLayer): 22 (WebCore::GraphicsLayer::traverse): 23 (WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): Deleted. 24 * platform/graphics/GraphicsLayer.h: 25 * rendering/RenderLayerCompositor.cpp: 26 (WebCore::RenderLayerCompositor::setIsInWindow): 27 (WebCore::RenderLayerCompositor::resetTrackedRepaintRects): 28 (WebCore::resetTrackedRepaintRectsRecursive): Deleted. 29 1 30 2017-02-09 Simon Fraser <simon.fraser@apple.com> 2 31 -
trunk/Source/WebCore/page/PageOverlayController.cpp
r211929 r212153 104 104 105 105 GraphicsLayer& layer = *overlayAndLayer.value; 106 layer.setIsInWindowIncludingDescendants(inWindow); 106 GraphicsLayer::traverse(layer, [inWindow](GraphicsLayer& layer) { 107 layer.setIsInWindow(inWindow); 108 }); 107 109 updateOverlayGeometry(overlay, layer); 108 110 … … 126 128 127 129 GraphicsLayer& layer = *overlayAndLayer.value; 128 layer.setIsInWindowIncludingDescendants(inWindow); 130 GraphicsLayer::traverse(layer, [inWindow](GraphicsLayer& layer) { 131 layer.setIsInWindow(inWindow); 132 }); 129 133 updateOverlayGeometry(overlay, layer); 130 134 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r211949 r212153 364 364 } 365 365 366 void GraphicsLayer::setIsInWindow IncludingDescendants(bool inWindow)366 void GraphicsLayer::setIsInWindow(bool inWindow) 367 367 { 368 368 if (TiledBacking* tiledBacking = this->tiledBacking()) 369 369 tiledBacking->setIsInWindow(inWindow); 370 371 for (auto* childLayer : children())372 childLayer->setIsInWindowIncludingDescendants(inWindow);373 370 } 374 371 … … 379 376 380 377 if (m_replicaLayer) 381 m_replicaLayer->setReplicatedLayer( 0);378 m_replicaLayer->setReplicatedLayer(nullptr); 382 379 383 380 if (layer) … … 669 666 } 670 667 668 void GraphicsLayer::traverse(GraphicsLayer& layer, std::function<void (GraphicsLayer&)> traversalFunc) 669 { 670 traversalFunc(layer); 671 672 for (auto* childLayer : layer.children()) 673 traverse(*childLayer, traversalFunc); 674 675 if (auto* replicaLayer = layer.replicaLayer()) 676 traverse(*replicaLayer, traversalFunc); 677 678 if (auto* maskLayer = layer.maskLayer()) 679 traverse(*maskLayer, traversalFunc); 680 } 681 671 682 void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const 672 683 { -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r211750 r212153 518 518 WEBCORE_EXPORT void noteDeviceOrPageScaleFactorChangedIncludingDescendants(); 519 519 520 void setIsInWindow IncludingDescendants(bool);520 void setIsInWindow(bool); 521 521 522 522 // Some compositing systems may do internal batching to synchronize compositing updates … … 561 561 virtual bool isGraphicsLayerTextureMapper() const { return false; } 562 562 virtual bool isCoordinatedGraphicsLayer() const { return false; } 563 564 static void traverse(GraphicsLayer&, std::function<void (GraphicsLayer&)>); 563 565 564 566 protected: -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r211949 r212153 2035 2035 return; 2036 2036 2037 if (GraphicsLayer* rootLayer = rootGraphicsLayer()) 2038 rootLayer->setIsInWindowIncludingDescendants(isInWindow); 2037 if (GraphicsLayer* rootLayer = rootGraphicsLayer()) { 2038 GraphicsLayer::traverse(*rootLayer, [isInWindow](GraphicsLayer& layer) { 2039 layer.setIsInWindow(isInWindow); 2040 }); 2041 } 2039 2042 2040 2043 if (isInWindow) { … … 2863 2866 } 2864 2867 2865 static void resetTrackedRepaintRectsRecursive(GraphicsLayer& graphicsLayer)2866 {2867 graphicsLayer.resetTrackedRepaints();2868 2869 for (auto* childLayer : graphicsLayer.children())2870 resetTrackedRepaintRectsRecursive(*childLayer);2871 2872 if (GraphicsLayer* replicaLayer = graphicsLayer.replicaLayer())2873 resetTrackedRepaintRectsRecursive(*replicaLayer);2874 2875 if (GraphicsLayer* maskLayer = graphicsLayer.maskLayer())2876 resetTrackedRepaintRectsRecursive(*maskLayer);2877 }2878 2879 2868 void RenderLayerCompositor::resetTrackedRepaintRects() 2880 2869 { 2881 if (GraphicsLayer* rootLayer = rootGraphicsLayer()) 2882 resetTrackedRepaintRectsRecursive(*rootLayer); 2870 if (GraphicsLayer* rootLayer = rootGraphicsLayer()) { 2871 GraphicsLayer::traverse(*rootLayer, [](GraphicsLayer& layer) { 2872 layer.resetTrackedRepaints(); 2873 }); 2874 } 2883 2875 } 2884 2876 -
trunk/Tools/ChangeLog
r212150 r212153 1 2017-02-10 Simon Fraser <simon.fraser@apple.com> 2 3 Make sure the "inwindow" flag propagates to TiledBackings for masks and reflections 4 https://bugs.webkit.org/show_bug.cgi?id=168127 5 rdar://problem/30467120 6 7 Reviewed by Tim Horton. 8 9 Reparent the web view before we try to fetch it via: 10 [[[window contentView] subviews] objectAtIndex:0]; 11 which would throw an exception if the test unparented it. 12 13 * DumpRenderTree/mac/DumpRenderTree.mm: 14 (resetWebViewToConsistentStateBeforeTesting): 15 (runTest): 16 1 17 2017-02-10 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r212150 r212153 1849 1849 WebView *webView = [mainFrame webView]; 1850 1850 1851 #if PLATFORM(MAC)1852 if (![webView superview])1853 [[mainWindow contentView] addSubview:webView];1854 #endif1855 1856 1851 #if PLATFORM(IOS) 1857 1852 adjustWebDocumentForStandardViewport(gWebBrowserView, gWebScrollView); … … 2112 2107 } 2113 2108 2109 #if PLATFORM(MAC) 2110 // Make sure the WebView is parented, since the test may have unparented it. 2111 WebView *webView = [mainFrame webView]; 2112 if (![webView superview]) 2113 [[mainWindow contentView] addSubview:webView]; 2114 #endif 2115 2114 2116 if (gTestRunner->closeRemainingWindowsWhenComplete()) { 2115 2117 NSArray* array = [DumpRenderTreeWindow openWindows];
Note:
See TracChangeset
for help on using the changeset viewer.