Diff
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-after-scroll-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-after-scroll-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-after-scroll-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -5,6 +5,7 @@
(GraphicsLayer
(bounds 785.00 5021.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(visible rect 0.00, 3000.00 785.00 x 600.00)
(tile cache coverage 0, 2048 785 x 2560)
(tile size 512 x 512)
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -5,6 +5,7 @@
(GraphicsLayer
(bounds 785.00 5021.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(visible rect 0.00, 5000.00 785.00 x 21.00)
(tile cache coverage 0, 4608 785 x 413)
(tile size 512 x 512)
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-slow-scrolling-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-slow-scrolling-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/tile-coverage-slow-scrolling-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -5,6 +5,7 @@
(GraphicsLayer
(bounds 800.00 600.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(visible rect 0.00, 0.00 800.00 x 600.00)
(tile cache coverage 0, 0 800 x 600)
(tile size 800 x 600)
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -6,6 +6,7 @@
(anchor 0.00 0.00)
(bounds 785.00 585.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
(visible rect 0.87, 0.00 341.30 x 254.35)
(tile cache coverage 0, 0 784 x 584)
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -6,6 +6,7 @@
(anchor 0.00 0.00)
(bounds 1208.00 2021.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(transform [2.30 0.00 0.00 0.00] [0.00 2.30 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
(visible rect 800.00, 1000.00 341.30 x 254.35)
(tile cache coverage 445, 667 762 x 890)
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/use-tiled-drawing-expected.txt (137799 => 137800)
--- trunk/LayoutTests/platform/mac/tiled-drawing/use-tiled-drawing-expected.txt 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/use-tiled-drawing-expected.txt 2012-12-15 19:37:49 UTC (rev 137800)
@@ -5,6 +5,7 @@
(GraphicsLayer
(bounds 1208.00 2021.00)
(drawsContent 1)
+ (backgroundColor #FFFFFF)
(visible rect 0.00, 0.00 785.00 x 585.00)
(tile cache coverage 0, 0 1208 x 2021)
(tile size 512 x 512)
Modified: trunk/Source/WebCore/ChangeLog (137799 => 137800)
--- trunk/Source/WebCore/ChangeLog 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/Source/WebCore/ChangeLog 2012-12-15 19:37:49 UTC (rev 137800)
@@ -1,3 +1,27 @@
+2012-12-15 Simon Fraser <[email protected]>
+
+ REGRESSION (r137006): TileCache flashes to linen, rather than the background color, when scrolling fast
+ https://bugs.webkit.org/show_bug.cgi?id=104746
+
+ Reviewed by Darin Adler.
+
+ Make RenderLayerBacking::updateBackgroundColor() responsible for setting the background
+ color of the main frame's root layer to the document background color (rather than doing
+ it in code related to overlay scrollbars, which was crazy). This is only done for platforms
+ that use a TiledBacking (currently, just Mac).
+
+ Also fix updateBackgroundColor() to not call m_graphicsLayer->setContentsToBackgroundColor()
+ and then call clearBackgroundColor() right away if the color was transparent.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::recalculateScrollbarOverlayStyle): Remove code that calls documentBackgroundColorDidChange().
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::clipBox): Remove blank linke.
+ (WebCore::RenderLayerBacking::updateBackgroundColor):
+ * rendering/RenderLayerCompositor.cpp:
+ * rendering/RenderLayerCompositor.h:
+ (RenderLayerCompositor):
+
2012-12-15 No'am Rosenthal <[email protected]>
Disambiguate "background color" and "contents as solid color" on GraphicsLayer
Modified: trunk/Source/WebCore/page/FrameView.cpp (137799 => 137800)
--- trunk/Source/WebCore/page/FrameView.cpp 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/Source/WebCore/page/FrameView.cpp 2012-12-15 19:37:49 UTC (rev 137800)
@@ -386,13 +386,6 @@
ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault;
Color backgroundColor = documentBackgroundColor();
-#if USE(ACCELERATED_COMPOSITING)
- if (RenderView* root = rootRenderer(this)) {
- RenderLayerCompositor* compositor = root->compositor();
- compositor->documentBackgroundColorDidChange();
- }
-#endif
-
if (backgroundColor.isValid()) {
// Reduce the background color from RGB to a lightness value
// and determine which scrollbar style to use based on a lightness
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (137799 => 137800)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-12-15 19:37:49 UTC (rev 137800)
@@ -521,7 +521,6 @@
result.intersect(renderer->clipRect(LayoutPoint(), 0)); // FIXME: Incorrect for CSS regions.
return pixelSnappedIntRect(result);
-
}
void RenderLayerBacking::updateGraphicsLayerGeometry()
@@ -1152,6 +1151,19 @@
void RenderLayerBacking::updateBackgroundColor(bool isSimpleContainer)
{
Color backgroundColor;
+
+ if (m_usingTiledCacheLayer) {
+ FrameView* frameView = toRenderView(renderer())->frameView();
+ if (!frameView->isTransparent()) {
+ backgroundColor = frameView->documentBackgroundColor();
+ if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
+ backgroundColor = Color::white;
+ }
+
+ m_graphicsLayer->setBackgroundColor(backgroundColor);
+ return;
+ }
+
if (isSimpleContainer)
backgroundColor = rendererBackgroundColor();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (137799 => 137800)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-12-15 19:37:49 UTC (rev 137800)
@@ -2080,20 +2080,6 @@
}
}
-void RenderLayerCompositor::documentBackgroundColorDidChange()
-{
- RenderLayerBacking* backing = rootRenderLayer()->backing();
- if (!backing || !backing->usingTileCache())
- return;
-
- GraphicsLayer* graphicsLayer = backing->graphicsLayer();
- Color backgroundColor = m_renderView->frameView()->documentBackgroundColor();
- if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
- backgroundColor = Color::white;
-
- graphicsLayer->setBackgroundColor(backgroundColor);
-}
-
static void resetTrackedRepaintRectsRecursive(GraphicsLayer* graphicsLayer)
{
if (!graphicsLayer)
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (137799 => 137800)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2012-12-15 19:36:19 UTC (rev 137799)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2012-12-15 19:37:49 UTC (rev 137800)
@@ -220,8 +220,6 @@
GraphicsLayer* layerForOverhangAreas() const { return m_layerForOverhangAreas.get(); }
#endif
- void documentBackgroundColorDidChange();
-
void updateViewportConstraintStatus(RenderLayer*);
void removeViewportConstrainedLayer(RenderLayer*);