[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 11:09:43 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 60e4cc4d77a6f5c7f13c94c8a3d713bc3f0b6ea1
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 14 05:02:09 2010 +0000

    2010-07-13  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Page flashes to mostly white towards the end of loading
            https://bugs.webkit.org/show_bug.cgi?id=42230
    
            We constrain the size of huge composited layers. When doing so, we
            need to use the constained size to set the position as well
            as the dimensions, to ensure the layer appears in the correct place.
    
            Test: compositing/tiling/constrained-layer-size.html
    
            * platform/graphics/mac/GraphicsLayerCA.mm:
            (WebCore::GraphicsLayerCA::updateLayerPosition):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5e5f6f6..7d5af52 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-13  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Page flashes to mostly white towards the end of loading
+        https://bugs.webkit.org/show_bug.cgi?id=42230
+        
+        Pixel test with a tiled layer whose size gets constrained.
+        Has to be a pixel test because the layer dump does not expose the bug fix.
+
+        * compositing/tiling/constrained-layer-size-expected.checksum: Added.
+        * compositing/tiling/constrained-layer-size-expected.png: Added.
+        * compositing/tiling/constrained-layer-size-expected.txt: Added.
+        * compositing/tiling/constrained-layer-size.html: Added.
+
 2010-07-13  Dumitru Daniliuc  <dumi at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/LayoutTests/compositing/tiling/constrained-layer-size-expected.checksum b/LayoutTests/compositing/tiling/constrained-layer-size-expected.checksum
new file mode 100644
index 0000000..fb05caf
--- /dev/null
+++ b/LayoutTests/compositing/tiling/constrained-layer-size-expected.checksum
@@ -0,0 +1 @@
+a921635ee9bb37d9bb369c9314a44255
\ No newline at end of file
diff --git a/LayoutTests/compositing/tiling/constrained-layer-size-expected.png b/LayoutTests/compositing/tiling/constrained-layer-size-expected.png
new file mode 100644
index 0000000..be1eabc
Binary files /dev/null and b/LayoutTests/compositing/tiling/constrained-layer-size-expected.png differ
diff --git a/LayoutTests/compositing/tiling/constrained-layer-size-expected.txt b/LayoutTests/compositing/tiling/constrained-layer-size-expected.txt
new file mode 100644
index 0000000..ff42838
--- /dev/null
+++ b/LayoutTests/compositing/tiling/constrained-layer-size-expected.txt
@@ -0,0 +1,7 @@
+layer at (0,0) size 5000x27000
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x27000
+  RenderBlock {HTML} at (0,0) size 800x27000
+    RenderBody {BODY} at (0,0) size 800x27000 [bgcolor=#FF0000]
+layer at (0,0) size 5000x27000
+  RenderBlock {DIV} at (0,0) size 5000x27000 [bgcolor=#008000]
diff --git a/LayoutTests/compositing/tiling/constrained-layer-size.html b/LayoutTests/compositing/tiling/constrained-layer-size.html
new file mode 100644
index 0000000..0564acd
--- /dev/null
+++ b/LayoutTests/compositing/tiling/constrained-layer-size.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <style type="text/css" media="screen">
+        body {
+            margin: 0;
+            background-color: red;
+            overflow: hidden;
+        }
+        #container {
+          width: 5000px;
+          height: 27000px;
+          background-color: green;
+          -webkit-transform:translateZ(0);
+        }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+        if (window.layoutTestController)
+            layoutTestController.waitUntilDone();
+
+        function testOnLoad()
+        {
+            // Wait for a layer update and the tiled layer to fill in.
+            window.setTimeout(function() {
+                window.setTimeout(function() {
+                    layoutTestController.notifyDone();
+                }, 0);
+            }, 0);
+        }
+      
+        window.addEventListener('load', testOnLoad, false);
+    </script>
+  </head>
+  <body>
+    <!-- The green div should be top-left in the viewport. No red should be visible. -->
+    <div id="container"></div>
+  </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f452226..c0ce7ca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-13  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Page flashes to mostly white towards the end of loading
+        https://bugs.webkit.org/show_bug.cgi?id=42230
+        
+        We constrain the size of huge composited layers. When doing so, we
+        need to use the constained size to set the position as well
+        as the dimensions, to ensure the layer appears in the correct place.
+
+        Test: compositing/tiling/constrained-layer-size.html
+
+        * platform/graphics/mac/GraphicsLayerCA.mm:
+        (WebCore::GraphicsLayerCA::updateLayerPosition):
+
 2010-07-13  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index 43b3f3e..fedd8c1 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -1057,11 +1057,11 @@ void GraphicsLayerCA::updateSublayerList()
 
 void GraphicsLayerCA::updateLayerPosition()
 {
-    // FIXME: if constrained the size, the position will be wrong. Fixing this is not trivial.
+    FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : m_size;
 
     // Position is offset on the layer by the layer anchor point.
-    CGPoint posPoint = CGPointMake(m_position.x() + m_anchorPoint.x() * m_size.width(),
-                                   m_position.y() + m_anchorPoint.y() * m_size.height());
+    CGPoint posPoint = CGPointMake(m_position.x() + m_anchorPoint.x() * usedSize.width(),
+                                   m_position.y() + m_anchorPoint.y() * usedSize.height());
     
     [primaryLayer() setPosition:posPoint];
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list