Changeset 232543 in webkit
- Timestamp:
- Jun 6, 2018, 9:13:31 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r232538 r232543 1 2018-06-06 Jer Noble <jer.noble@apple.com> 2 3 Regions outside of the fullscreen window are exposed during zoom operations 4 https://bugs.webkit.org/show_bug.cgi?id=186330 5 <rdar://problem/34698009> 6 7 Reviewed by Simon Fraser. 8 9 * fullscreen/full-screen-layer-dump-expected.txt: Added. 10 * fullscreen/full-screen-layer-dump.html: Added. 11 1 12 2018-06-06 Alicia Boya García <aboya@igalia.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r232542 r232543 1 2018-06-06 Jer Noble <jer.noble@apple.com> 2 3 Regions outside of the fullscreen window are exposed during zoom operations 4 https://bugs.webkit.org/show_bug.cgi?id=186330 5 <rdar://problem/34698009> 6 7 Reviewed by Simon Fraser. 8 9 Test: fullscreen/full-screen-layer-dump.html 10 11 Introduce the concept of "requiresBackgroundLayer" to RenderLayerBacking, for use by 12 RenderFullScreen. Previously, the backgroundLayer in RenderLayerBacking was only used 13 by the root renderer with fixed backgrounds. Give the RenderFullScreen a background layer 14 that's approximately 3x as tall and wide as the renderer itself, so nothing is exposed 15 during pinch operations. 16 17 * rendering/RenderLayerBacking.cpp: 18 (WebCore::RenderLayerBacking::RenderLayerBacking): 19 (WebCore::RenderLayerBacking::updateConfiguration): 20 (WebCore::RenderLayerBacking::updateGeometry): 21 (WebCore::RenderLayerBacking::updateDrawsContent): 22 (WebCore::RenderLayerBacking::setRequiresBackgroundLayer): 23 (WebCore::RenderLayerBacking::updateBackgroundLayer): 24 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): 25 (WebCore::RenderLayerBacking::paintIntoLayer): 26 * rendering/RenderLayerBacking.h: 27 1 28 2018-06-06 Jer Noble <jer.noble@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r232178 r232543 218 218 219 219 createPrimaryGraphicsLayer(); 220 #if ENABLE(FULLSCREEN_API) 221 setRequiresBackgroundLayer(layer.renderer().isRenderFullScreen()); 222 #endif 220 223 221 224 if (auto* tiledBacking = this->tiledBacking()) { … … 671 674 672 675 // The background layer is currently only used for fixed root backgrounds. 673 if (updateBackgroundLayer(m_backgroundLayerPaintsFixedRootBackground ))676 if (updateBackgroundLayer(m_backgroundLayerPaintsFixedRootBackground || m_requiresBackgroundLayer)) 674 677 layerConfigChanged = true; 675 678 … … 1032 1035 } 1033 1036 1034 if (!m_isMainFrameRenderViewLayer && !m_isFrameLayerWithTiledBacking ) {1037 if (!m_isMainFrameRenderViewLayer && !m_isFrameLayerWithTiledBacking && !m_requiresBackgroundLayer) { 1035 1038 // For non-root layers, background is always painted by the primary graphics layer. 1036 1039 ASSERT(!m_backgroundLayer); … … 1121 1124 backgroundPosition = frameView.scrollPositionForFixedPosition(); 1122 1125 backgroundSize = frameView.layoutSize(); 1126 } else { 1127 auto boundingBox = renderer().objectBoundingBox(); 1128 backgroundPosition = boundingBox.location(); 1129 backgroundSize = boundingBox.size(); 1123 1130 } 1124 1131 m_backgroundLayer->setPosition(backgroundPosition); … … 1387 1394 1388 1395 if (m_backgroundLayer) 1389 m_backgroundLayer->setDrawsContent( hasPaintedContent);1396 m_backgroundLayer->setDrawsContent(m_backgroundLayerPaintsFixedRootBackground ? hasPaintedContent : contentsInfo.paintsBoxDecorations()); 1390 1397 } 1391 1398 … … 1443 1450 renderer().view().frameView().removeSlowRepaintObject(*renderer().view().rendererForRootBackground()); 1444 1451 } 1452 } 1453 1454 void RenderLayerBacking::setRequiresBackgroundLayer(bool requiresBackgroundLayer) 1455 { 1456 m_requiresBackgroundLayer = requiresBackgroundLayer; 1445 1457 } 1446 1458 … … 1641 1653 if (layerChanged) { 1642 1654 m_graphicsLayer->setNeedsDisplay(); 1643 // This assumes that the background layer is only used for fixed backgrounds, which is currently a correct assumption. 1644 compositor().fixedRootBackgroundLayerChanged(); 1655 1656 if (m_backgroundLayerPaintsFixedRootBackground) 1657 compositor().fixedRootBackgroundLayerChanged(); 1645 1658 } 1646 1659 … … 1891 1904 void RenderLayerBacking::updateDirectlyCompositedBackgroundColor(PaintedContentsInfo& contentsInfo, bool& didUpdateContentsRect) 1892 1905 { 1906 if (m_backgroundLayer && !m_backgroundLayerPaintsFixedRootBackground && !contentsInfo.paintsBoxDecorations()) { 1907 m_graphicsLayer->setContentsToSolidColor(Color()); 1908 m_backgroundLayer->setContentsToSolidColor(rendererBackgroundColor()); 1909 1910 FloatRect contentsRect = backgroundBoxForSimpleContainerPainting(); 1911 // NOTE: This is currently only used by RenderFullScreen, which we want to be 1912 // big enough to hide overflow areas of the root. 1913 contentsRect.inflate(contentsRect.size()); 1914 m_backgroundLayer->setContentsRect(contentsRect); 1915 m_backgroundLayer->setContentsClippingRect(FloatRoundedRect(contentsRect)); 1916 return; 1917 } 1918 1893 1919 if (!contentsInfo.isSimpleContainer() || (is<RenderBox>(renderer()) && !downcast<RenderBox>(renderer()).paintsOwnBackground())) { 1894 1920 m_graphicsLayer->setContentsToSolidColor(Color()); … … 2520 2546 paintFlags |= RenderLayer::PaintLayerPaintingCompositingScrollingPhase; 2521 2547 2522 if (graphicsLayer == m_backgroundLayer.get() )2548 if (graphicsLayer == m_backgroundLayer.get() && m_backgroundLayerPaintsFixedRootBackground) 2523 2549 paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | RenderLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers. 2524 2550 else if (compositor().fixedRootBackgroundLayer()) -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r230574 r232543 99 99 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } 100 100 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundLayerPaintsFixedRootBackground; } 101 102 bool requiresBackgroundLayer() const { return m_requiresBackgroundLayer; } 103 void setRequiresBackgroundLayer(bool); 101 104 102 105 bool hasScrollingLayer() const { return m_scrollingLayer != nullptr; } … … 385 388 #endif 386 389 bool m_backgroundLayerPaintsFixedRootBackground { false }; 390 bool m_requiresBackgroundLayer { false }; 387 391 bool m_paintsSubpixelAntialiasedText { false }; // This is for logging only. 388 392 };
Note:
See TracChangeset
for help on using the changeset viewer.