2009-07-01 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2009 06:30:05 +0000 (06:30 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jul 2009 06:30:05 +0000 (06:30 +0000)
        Reviewed by Dan Bernstein.

        <video> fails to show on http://camendesign.com/code/video_for_everybody
        <rdar://problem/7026010>
        https://bugs.webkit.org/show_bug.cgi?id=26919

        Fix an issue introduced in r44961. In that revision we changed to only update
        compositing layer geometry when all siblings had been laid out (i.e. we pushed
        the updates one level down). However, that left out the root layer, so this
        fix ensures that the root layer geometry gets updated at the end.

        Test: compositing/geometry/root-layer-update.html

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateAfterLayout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@45468 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/compositing/geometry/root-layer-update.html [new file with mode: 0644]
LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayerBacking.cpp

index 77872c1..5266938 100644 (file)
@@ -7,6 +7,22 @@
 
 2009-07-01  Simon Fraser  <simon.fraser@apple.com>
 
 
 2009-07-01  Simon Fraser  <simon.fraser@apple.com>
 
+        Reviewed by Dan Bernstein.
+
+        <video> fails to show on http://camendesign.com/code/video_for_everybody
+        <rdar://problem/7026010> 
+        https://bugs.webkit.org/show_bug.cgi?id=26919
+        
+        Testcase for changing the root layer size, and ensuring that all
+        the compositing layers are correctly repositioned.
+
+        * compositing/geometry/root-layer-update.html: Added.
+        * platform/mac/compositing/geometry/root-layer-update-expected.checksum: Added.
+        * platform/mac/compositing/geometry/root-layer-update-expected.png: Added.
+        * platform/mac/compositing/geometry/root-layer-update-expected.txt: Added.
+
+2009-07-01  Simon Fraser  <simon.fraser@apple.com>
+
         Reviewed by Dan Bernstein
         
         <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
         Reviewed by Dan Bernstein
         
         <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
diff --git a/LayoutTests/compositing/geometry/root-layer-update.html b/LayoutTests/compositing/geometry/root-layer-update.html
new file mode 100644 (file)
index 0000000..fc61f41
--- /dev/null
@@ -0,0 +1,71 @@
+<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
+<!-- =========================================== kroc camen of camen design ============================================= -->
+<head>
+  <title>camen design - Video for Everybody!</title>
+  <style type="text/css" media="screen">
+    body {
+      width: 600px;
+      margin: 0 auto;
+    }
+
+    #sidebar {
+      position: absolute;
+      height: 100px;
+      width: 100px; 
+      margin-left: -200px;
+      padding-left: 200px;
+      background: gray;
+    }
+
+    #article {
+      position: relative;
+      border: 1px solid black;
+    }
+
+    #compositing {
+      height: 100px;
+      width: 100px;
+      background-color: green;
+      margin: 0 auto;
+      -webkit-transform: translateZ(0);
+    }
+    
+    #tester {
+      position: absolute;
+      top: 1px;
+      left: 350px;
+      height: 100px;
+      width: 100px;
+      background-color: red;
+    }
+  </style>
+  <script type="text/javascript" charset="utf-8">
+  if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+  function startTest()
+  {
+    window.setTimeout(function() {
+      document.documentElement.style.width = '800px'
+      window.setTimeout(function() {
+        if (window.layoutTestController)
+          layoutTestController.notifyDone();
+      }, 0);
+    }, 0);
+  }
+
+  window.addEventListener('load', startTest, false);
+  </script>
+</head>
+<body>
+
+  <div id="tester"></div>
+  <div id="sidebar"></div>
+
+  <div id="article">
+    <div id="compositing"></div>
+  </div>
+  <p><a href="rdar://problem/7026010">rdar://problem/7026010</a><br>
+    Test for the root layer getting correctly positioned. You should see no red.</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.checksum b/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.checksum
new file mode 100644 (file)
index 0000000..7e388e5
--- /dev/null
@@ -0,0 +1 @@
+55f112a681ed84f66d9a3d51c68744df
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.png b/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.png
new file mode 100644 (file)
index 0000000..470f766
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.txt b/LayoutTests/platform/mac/compositing/geometry/root-layer-update-expected.txt
new file mode 100644 (file)
index 0000000..cc9384b
--- /dev/null
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x170
+  RenderBlock {HTML} at (0,0) size 800x170
+    RenderBody {BODY} at (100,0) size 600x154
+      RenderBlock {P} at (0,118) size 600x36
+        RenderInline {A} at (0,0) size 149x18 [color=#0000EE]
+          RenderText {#text} at (0,0) size 149x18
+            text run at (0,0) width 149: "rdar://problem/7026010"
+        RenderBR {BR} at (149,0) size 0x18
+        RenderText {#text} at (0,18) size 465x18
+          text run at (0,18) width 465: "Test for the root layer getting correctly positioned. You should see no red."
+layer at (350,1) size 100x100
+  RenderBlock (positioned) {DIV} at (350,1) size 100x100 [bgcolor=#FF0000]
+layer at (-100,0) size 300x100 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
+  RenderBlock (positioned) {DIV} at (-100,0) size 300x100 [bgcolor=#808080]
+layer at (100,0) size 600x102
+  RenderBlock (relative positioned) {DIV} at (0,0) size 600x102 [border: (1px solid #000000)]
+layer at (350,1) size 100x100
+  RenderBlock {DIV} at (250,1) size 100x100 [bgcolor=#008000]
index 7d706bb..cad4981 100644 (file)
 
 2009-07-01  Simon Fraser  <simon.fraser@apple.com>
 
 
 2009-07-01  Simon Fraser  <simon.fraser@apple.com>
 
+        Reviewed by Dan Bernstein.
+
+        <video> fails to show on http://camendesign.com/code/video_for_everybody
+        <rdar://problem/7026010>
+        https://bugs.webkit.org/show_bug.cgi?id=26919
+
+        Fix an issue introduced in r44961. In that revision we changed to only update
+        compositing layer geometry when all siblings had been laid out (i.e. we pushed
+        the updates one level down). However, that left out the root layer, so this
+        fix ensures that the root layer geometry gets updated at the end.
+
+        Test: compositing/geometry/root-layer-update.html
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateAfterLayout):
+
+2009-07-01  Simon Fraser  <simon.fraser@apple.com>
+
         Reviewed by Dan Bernstein
         
         <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
         Reviewed by Dan Bernstein
         
         <rdar://problem/7026010> <video> fails to show on http://camendesign.com/code/video_for_everybody
index 9189f64..ac73459 100644 (file)
@@ -140,8 +140,10 @@ void RenderLayerBacking::updateAfterLayout(UpdateDepth updateDepth)
         setCompositedBounds(layerCompositor->calculateCompositedBounds(m_owningLayer, m_owningLayer));
         layerCompositor->updateCompositingDescendantGeometry(m_owningLayer, m_owningLayer, updateDepth);
         
         setCompositedBounds(layerCompositor->calculateCompositedBounds(m_owningLayer, m_owningLayer));
         layerCompositor->updateCompositingDescendantGeometry(m_owningLayer, m_owningLayer, updateDepth);
         
-        if (!m_owningLayer->parent())
+        if (!m_owningLayer->parent()) {
+            updateGraphicsLayerGeometry();
             layerCompositor->updateRootLayerPosition();
             layerCompositor->updateRootLayerPosition();
+        }
     }
 }
 
     }
 }