Title: [126173] branches/safari-536.26-branch

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (126172 => 126173)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-08-21 17:51:22 UTC (rev 126173)
@@ -1,3 +1,20 @@
+2012-08-20  Mark Rowe  <[email protected]>
+
+        Merge r122354.
+
+    2012-07-11  Dean Jackson  <[email protected]>
+
+        TileCache layers have wrong border debug color
+        https://bugs.webkit.org/show_bug.cgi?id=90922
+
+        Reviewed by Simon Fraser.
+
+        Make sure that the document background color is updated
+        when using a Tile Cache.
+
+        * compositing/document-background-color-expected.html: Added.
+        * compositing/document-background-color.html: Added.
+
 2012-08-13  Andy Estes  <[email protected]>
 
         <rdar://problem/12050793> Brahms: REGRESSION (r113584): Apple reseller website does not display correctly. (91452)

Added: branches/safari-536.26-branch/LayoutTests/compositing/document-background-color-expected.html (0 => 126173)


--- branches/safari-536.26-branch/LayoutTests/compositing/document-background-color-expected.html	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/compositing/document-background-color-expected.html	2012-08-21 17:51:22 UTC (rev 126173)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+  html {
+    background-color: green;
+  }
+</style>
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file

Added: branches/safari-536.26-branch/LayoutTests/compositing/document-background-color.html (0 => 126173)


--- branches/safari-536.26-branch/LayoutTests/compositing/document-background-color.html	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/compositing/document-background-color.html	2012-08-21 17:51:22 UTC (rev 126173)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+  html {
+    background-color: red;
+  }
+</style>
+<script>
+window.addEventListener("load", function () {
+  document.querySelector("html").style.backgroundColor = "green";
+}, false);
+</script>
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-08-21 17:51:22 UTC (rev 126173)
@@ -1,3 +1,46 @@
+2012-08-20  Mark Rowe  <[email protected]>
+
+        Merge r122354.
+
+    2012-07-11  Dean Jackson  <[email protected]>
+
+        TileCache layers have wrong border debug color
+        https://bugs.webkit.org/show_bug.cgi?id=90922
+
+        Reviewed by Simon Fraser.
+
+        Commit r122152 updated the layer hierarchy when a tile
+        cache is being used by the view. As part of that, GraphicsLayerClient::shouldUseTileCache()
+        was changed to return false in some situations (the idea was that it
+        should only be called from the createGraphicsLayer method). However
+        there were two other call points: one that sets the debug colors on
+        borders, the other was a call that keeps the document background in sync.
+
+        Add a new method usingTileCache() that returns the current state. Also fix
+        a FIXME where the debug code always called into the client rather than
+        caching the value on the GraphicsLayer.
+
+        Test: compositing/document-background-color.html
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::GraphicsLayer):
+        (WebCore::GraphicsLayer::updateDebugIndicators): check the local variable when
+        setting the debug colors.
+        * platform/graphics/GraphicsLayer.h:
+        (GraphicsLayer): new bool member variable m_usingTileCache.
+        * platform/graphics/GraphicsLayerClient.h:
+        (WebCore::GraphicsLayerClient::usingTileCache): new virtual method to query if
+        this client is actually using the tile cache.
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA): set the member variable m_usingTileCache
+        if the GraphicsLayerClient says we are.
+        * rendering/RenderLayerBacking.h:
+        (WebCore::RenderLayerBacking::usingTileCache):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): call usingTileCache()
+        rather than shouldUseTileCache(), because the latter's value might not always reflect
+        the existence of a cache.
+
 2012-08-14  Lucas Forschler  <[email protected]>
 
     Merge r124268.

Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2012-08-21 17:51:22 UTC (rev 126173)
@@ -79,6 +79,7 @@
     , m_acceleratesDrawing(false)
     , m_maintainsPixelAlignment(false)
     , m_appliesPageScale(false)
+    , m_usingTileCache(false)
     , m_paintingPhase(GraphicsLayerPaintAll)
     , m_contentsOrientation(CompositingCoordinatesTopDown)
     , m_parent(0)
@@ -340,9 +341,7 @@
 {
     if (GraphicsLayer::showDebugBorders()) {
         if (drawsContent()) {
-            // FIXME: It's weird to ask the client if this layer is a tile cache layer.
-            // Maybe we should just cache that information inside GraphicsLayer?
-            if (m_client->shouldUseTileCache(this)) // tile cache layer: dark blue
+            if (m_usingTileCache) // tile cache layer: dark blue
                 setDebugBorder(Color(0, 0, 128, 128), 0.5);
             else if (m_usingTiledLayer)
                 setDebugBorder(Color(255, 128, 0, 128), 2); // tiled layer: orange

Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.h (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.h	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayer.h	2012-08-21 17:51:22 UTC (rev 126173)
@@ -505,6 +505,7 @@
     bool m_acceleratesDrawing : 1;
     bool m_maintainsPixelAlignment : 1;
     bool m_appliesPageScale : 1; // Set for the layer which has the page scale applied to it.
+    bool m_usingTileCache : 1;
 
     GraphicsLayerPaintingPhase m_paintingPhase;
     CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents

Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h	2012-08-21 17:51:22 UTC (rev 126173)
@@ -56,6 +56,7 @@
     virtual ~GraphicsLayerClient() {}
 
     virtual bool shouldUseTileCache(const GraphicsLayer*) const { return false; }
+    virtual bool usingTileCache(const GraphicsLayer*) const { return false; }
     
     // Callback for when hardware-accelerated animation started.
     virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0;

Modified: branches/safari-536.26-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2012-08-21 17:51:22 UTC (rev 126173)
@@ -268,8 +268,10 @@
     , m_uncommittedChanges(0)
 {
     PlatformCALayer::LayerType layerType = PlatformCALayer::LayerTypeWebLayer;
-    if (client && client->shouldUseTileCache(this))
+    if (client && client->shouldUseTileCache(this)) {
         layerType = PlatformCALayer::LayerTypeTileCacheLayer;
+        m_usingTileCache = true;
+    }
 
     m_layer = PlatformCALayer::create(layerType, this);
 

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerBacking.h (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerBacking.h	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerBacking.h	2012-08-21 17:51:22 UTC (rev 126173)
@@ -124,6 +124,7 @@
 
     // GraphicsLayerClient interface
     virtual bool shouldUseTileCache(const GraphicsLayer*) const;
+    virtual bool usingTileCache(const GraphicsLayer*) const { return m_usingTiledCacheLayer; }
     virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime);
     virtual void notifySyncRequired(const GraphicsLayer*);
 

Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (126172 => 126173)


--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-21 17:47:23 UTC (rev 126172)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-08-21 17:51:22 UTC (rev 126173)
@@ -1777,7 +1777,7 @@
         return;
 
     GraphicsLayer* graphicsLayer = backing->graphicsLayer();
-    if (!graphicsLayer->client()->shouldUseTileCache(graphicsLayer))
+    if (!graphicsLayer->client()->usingTileCache(graphicsLayer))
         return;
 
     Color backgroundColor = m_renderView->frameView()->documentBackgroundColor();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to