Changeset 149949 in webkit
- Timestamp:
- May 11, 2013, 9:54:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r149939 r149949 1 2013-05-10 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION: Fixed background on ColterReed.com scrolls 4 https://bugs.webkit.org/show_bug.cgi?id=115951 5 6 Reviewed by Beth Dakin. 7 8 Tests with a fixed background and two different ways of making the <html> composited. 9 10 * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html-expected.html: Added. 11 * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html: Added. 12 * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed-expected.html: Added. 13 * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html: Added. 14 1 15 2013-05-11 Xan Lopez <xlopez@igalia.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r149948 r149949 1 2013-05-10 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION: Fixed background on ColterReed.com scrolls 4 https://bugs.webkit.org/show_bug.cgi?id=115951 5 6 Reviewed by Beth Dakin. 7 8 The logic for painting the fixed root background into its own layer was 9 broken when the document element's layer was composited. This could be caused 10 by a negative z-index child of the body, or by an explicit compositing-causing 11 style on the <html>. 12 13 There were two issues. First, when painting the layer for the fixed root 14 background, we would simply short-circuit the fixed background paint in 15 RenderLayer::paintLayer(), when checking for a composited layer. We have 16 to continue to paint through the composited <html> layer to get the root 17 background in this case. 18 19 Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground 20 flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is 21 composited, we need to skip painting the root layer for both the RenderView's backing, 22 and for the <html>'s backing. Checking whether there is *any* layer that paints 23 the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer()) 24 is a simple way to fix this test. 25 26 Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html 27 platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html 28 29 * rendering/RenderLayer.cpp: 30 (WebCore::paintForFixedRootBackground): 31 (WebCore::RenderLayer::paintLayer): 32 * rendering/RenderLayerBacking.cpp: 33 (WebCore::RenderLayerBacking::paintIntoLayer): 34 1 35 2013-05-11 Simon Fraser <simon.fraser@apple.com> 2 36 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r149915 r149949 3586 3586 } 3587 3587 3588 static bool paintForFixedRootBackground(const RenderLayer* layer, RenderLayer::PaintLayerFlags paintFlags) 3589 { 3590 return layer->renderer()->isRoot() && (paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly); 3591 } 3592 3588 3593 void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) 3589 3594 { … … 3596 3601 else if (!backing()->paintsIntoWindow() 3597 3602 && !backing()->paintsIntoCompositedAncestor() 3598 && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)) { 3603 && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) 3604 && !paintForFixedRootBackground(this, paintFlags)) { 3599 3605 // If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer(). 3600 3606 return; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r149694 r149949 1960 1960 if (graphicsLayer == m_backgroundLayer) 1961 1961 paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | RenderLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers. 1962 else if ( m_backgroundLayer)1962 else if (compositor()->fixedRootBackgroundLayer()) 1963 1963 paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground; 1964 1964
Note:
See TracChangeset
for help on using the changeset viewer.