Don't use video to trigger compositing for layout tests
authordanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 20:41:58 +0000 (20:41 +0000)
committerdanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2013 20:41:58 +0000 (20:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113228

Reviewed by Adrienne Walker.

These tests used <video> to trigger compositing because a 3d identity
transform would have affected the overlap map differently. This is
no longer the case, so use translateZ(0) to trigger compositing instead,
which makes these tests more reliable and faster.

* compositing/geometry/limit-layer-bounds-clipping-ancestor.html:
* compositing/geometry/limit-layer-bounds-fixed-positioned.html:
* compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt:
* compositing/geometry/limit-layer-bounds-opacity-transition.html:
* compositing/geometry/limit-layer-bounds-overflow-repaint.html:
* compositing/geometry/limit-layer-bounds-overflow-root.html:
* compositing/geometry/limit-layer-bounds-positioned-transition.html:
* compositing/geometry/limit-layer-bounds-positioned.html:
* compositing/geometry/limit-layer-bounds-transformed-overflow.html:
* compositing/geometry/limit-layer-bounds-transformed.html:
* compositing/layer-creation/scroll-partial-update-expected.txt:
* compositing/layer-creation/scroll-partial-update.html:
* platform/chromium-win/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt:
* platform/chromium-win/compositing/layer-creation/scroll-partial-update-expected.txt:
* platform/chromium/TestExpectations:
* platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt:

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

21 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor.html
LayoutTests/compositing/geometry/limit-layer-bounds-fixed-positioned.html
LayoutTests/compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt
LayoutTests/compositing/geometry/limit-layer-bounds-opacity-transition.html
LayoutTests/compositing/geometry/limit-layer-bounds-overflow-repaint.html
LayoutTests/compositing/geometry/limit-layer-bounds-overflow-root.html
LayoutTests/compositing/geometry/limit-layer-bounds-positioned-transition.html
LayoutTests/compositing/geometry/limit-layer-bounds-positioned.html
LayoutTests/compositing/geometry/limit-layer-bounds-transformed-overflow.html
LayoutTests/compositing/geometry/limit-layer-bounds-transformed.html
LayoutTests/compositing/layer-creation/scroll-partial-update-expected.txt
LayoutTests/compositing/layer-creation/scroll-partial-update.html
LayoutTests/platform/chromium-win/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt
LayoutTests/platform/chromium-win/compositing/layer-creation/scroll-partial-update-expected.txt
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/chromium/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt
LayoutTests/platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt
LayoutTests/platform/efl/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt
LayoutTests/platform/mac/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt
LayoutTests/platform/qt/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt

index a3072d0..d55af53 100644 (file)
@@ -1,3 +1,32 @@
+2013-03-25  Dana Jansens  <danakj@chromium.org>
+
+        Don't use video to trigger compositing for layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=113228
+
+        Reviewed by Adrienne Walker.
+
+        These tests used <video> to trigger compositing because a 3d identity
+        transform would have affected the overlap map differently. This is
+        no longer the case, so use translateZ(0) to trigger compositing instead,
+        which makes these tests more reliable and faster.
+
+        * compositing/geometry/limit-layer-bounds-clipping-ancestor.html:
+        * compositing/geometry/limit-layer-bounds-fixed-positioned.html:
+        * compositing/geometry/limit-layer-bounds-opacity-transition-expected.txt:
+        * compositing/geometry/limit-layer-bounds-opacity-transition.html:
+        * compositing/geometry/limit-layer-bounds-overflow-repaint.html:
+        * compositing/geometry/limit-layer-bounds-overflow-root.html:
+        * compositing/geometry/limit-layer-bounds-positioned-transition.html:
+        * compositing/geometry/limit-layer-bounds-positioned.html:
+        * compositing/geometry/limit-layer-bounds-transformed-overflow.html:
+        * compositing/geometry/limit-layer-bounds-transformed.html:
+        * compositing/layer-creation/scroll-partial-update-expected.txt:
+        * compositing/layer-creation/scroll-partial-update.html:
+        * platform/chromium-win/compositing/geometry/limit-layer-bounds-overflow-repaint-expected.txt:
+        * platform/chromium-win/compositing/layer-creation/scroll-partial-update-expected.txt:
+        * platform/chromium/TestExpectations:
+        * platform/chromium/compositing/layer-creation/scroll-partial-update-expected.txt:
+
 2013-03-25  Peter Kasting  <pkasting@google.com>
 
         [chromium] Sheriffing.
index 915b3ca..3e460dc 100644 (file)
       background-color: green;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 21px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
 
     p {
@@ -69,8 +70,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <!-- "middle" text should be visible -->
   <div class="container" style="position: relative; overflow: hidden;">
index dec15b1..5a64d33 100644 (file)
       border: 1px solid black;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 121px;
       left: 21px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .far-left {
@@ -63,8 +64,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index b450004..523f0b6 100644 (file)
@@ -9,11 +9,10 @@ Fader
       (children 2
         (GraphicsLayer
           (position 8.00 8.00)
-          (bounds 352.00 288.00)
+          (bounds 1.00 1.00)
         )
         (GraphicsLayer
-          (position 0.00 290.00)
-          (bounds 108.00 100.00)
+          (bounds 108.00 99.00)
           (drawsContent 1)
         )
       )
index 672bcd7..fbfd05d 100644 (file)
@@ -4,13 +4,19 @@
   <style type="text/css" media="screen">
     .test {
       position: relative;
-      top: -10px; /* overlap video */
+      top: -10px; /* overlap composited layer */
       width: 100px;
       height: 100px;
       background-color: white;
       text-indent: -10000px;
     }
-    
+
+    .compositing {
+      width: 1px;
+      height: 1px;
+      -webkit-transform: translateZ(0);
+    }
+
     #fading {
       opacity: 0;
       -webkit-transition: opacity 0.1s;
@@ -43,8 +49,8 @@
 </head>
 <body>
 
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="test">
     Test
@@ -56,9 +62,7 @@
 
   <pre id="layers">Layer tree goes here in DRT</pre>
   <script>
-    // Wait for video to load to get compositing before the fade.
-    var video = document.getElementsByTagName('video')[0];
-    video.addEventListener('canplaythrough', startFade, false);
+    window.onload = startFade;
   </script>
 </body>
 </html>
index c8bc79a..3eb4940 100644 (file)
       background-color: blue;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 20px;
       left: 20px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .top {
@@ -61,8 +62,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <!-- Test repainting when the graphicsLayer offsetFromRenderer changes -->
   <!-- You should see one green square, and no red -->
index 02e55c4..0441166 100644 (file)
       border: 1px solid black;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 21px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .test {
@@ -65,8 +66,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index 9d642b1..90ded07 100644 (file)
       border: 1px solid black;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 21px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     #far-left {
@@ -65,8 +66,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index 539b267..0ec8ceb 100644 (file)
       border: 1px solid black;
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 21px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .far-left {
@@ -60,8 +61,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index 7b52dac..5f4b82a 100644 (file)
       -webkit-transform: translate(100px, 0);
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 121px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .far-left {
@@ -68,8 +69,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index 765a9f4..58e82dd 100644 (file)
       -webkit-transform: translate(100px, 0);
     }
     
-    video {
+    .compositing {
       position: absolute;
       top: 21px;
       left: 121px;
       width: 100px;
       height: 100px;
+      -webkit-transform: translateZ(0);
     }
     
     .far-left {
@@ -61,8 +62,8 @@
 
 <body>
   
-  <!-- Go into compositing without transforms. -->
-  <video src="../resources/video.mp4"></video>
+  <!-- Go into compositing. -->
+  <div class="compositing"></div>
 
   <div class="indicator"></div>
 
index a386d5d..37d3527 100644 (file)
         border: 2px solid blue;
       }
 
+      #composited {
+        -webkit-transform: translateZ(0);
+        width: 20px;
+        height: 20px;
+      }
+
       #scroller {
         height: 200px;
         background-color: yellow;
@@ -56,7 +62,7 @@
   </head>
   <body>
 
-    <video src="../resources/video.mp4" height="20" width="20"></video>
+    <div id="composited"></div>
 
     <div id="overlay"></div>
 
index 4f568eb..525dd65 100644 (file)
@@ -5,7 +5,7 @@ layer at (0,0) size 800x243
     RenderBody {BODY} at (8,8) size 784x227
       RenderText {#text} at (0,0) size 0x0
 layer at (20,20) size 100x100
-  RenderVideo {VIDEO} at (20,20) size 100x100
+  RenderBlock (positioned) {DIV} at (20,20) size 100x100
 layer at (18,18) size 202x202 clip at (19,19) size 200x200 scrollY 500 scrollHeight 1000
   RenderBlock (relative positioned) {DIV} at (10,10) size 202x202 [border: (1px solid #000000)]
 layer at (19,-481) size 200x1000 backgroundClip at (19,19) size 200x200 clip at (19,19) size 200x200 outlineClip at (19,19) size 200x200
index 528efea..ccdd33b 100644 (file)
@@ -2175,10 +2175,6 @@ crbug.com/71783 [ Mac ] scrollbars/custom-scrollbar-with-incomplete-style.html [
 # GPU
 #///////////////////////////////////////////////////////////////////////////
 
-
-webkit.org/b/47923 [ Linux Mac Win ] compositing/geometry/limit-layer-bounds-opacity-transition.html [ Timeout ]
-webkit.org/b/47923 [ Linux Mac Win ] platform/chromium/virtual/softwarecompositing/geometry/limit-layer-bounds-opacity-transition.html [ Timeout ]
-
 # Chromium does not support PDF content in <img> tags.
 [ Win Linux ] compositing/images/direct-pdf-image.html [ WontFix ]
 [ Win Linux ] platform/chromium/virtual/softwarecompositing/images/direct-pdf-image.html [ WontFix ]
index e1dbce9..6eb9b05 100644 (file)
@@ -5,7 +5,7 @@ layer at (0,0) size 800x242
     RenderBody {BODY} at (8,8) size 784x226
       RenderText {#text} at (0,0) size 0x0
 layer at (20,20) size 100x100
-  RenderVideo {VIDEO} at (20,20) size 100x100
+  RenderBlock (positioned) {DIV} at (20,20) size 100x100
 layer at (18,18) size 202x202 clip at (19,19) size 200x200 scrollY 500 scrollHeight 1000
   RenderBlock (relative positioned) {DIV} at (10,10) size 202x202 [border: (1px solid #000000)]
 layer at (19,-481) size 200x1000 backgroundClip at (19,19) size 200x200 clip at (19,19) size 200x200 outlineClip at (19,19) size 200x200
index e1dbce9..6eb9b05 100644 (file)
@@ -5,7 +5,7 @@ layer at (0,0) size 800x242
     RenderBody {BODY} at (8,8) size 784x226
       RenderText {#text} at (0,0) size 0x0
 layer at (20,20) size 100x100
-  RenderVideo {VIDEO} at (20,20) size 100x100
+  RenderBlock (positioned) {DIV} at (20,20) size 100x100
 layer at (18,18) size 202x202 clip at (19,19) size 200x200 scrollY 500 scrollHeight 1000
   RenderBlock (relative positioned) {DIV} at (10,10) size 202x202 [border: (1px solid #000000)]
 layer at (19,-481) size 200x1000 backgroundClip at (19,19) size 200x200 clip at (19,19) size 200x200 outlineClip at (19,19) size 200x200
index e1dbce9..6eb9b05 100644 (file)
@@ -5,7 +5,7 @@ layer at (0,0) size 800x242
     RenderBody {BODY} at (8,8) size 784x226
       RenderText {#text} at (0,0) size 0x0
 layer at (20,20) size 100x100
-  RenderVideo {VIDEO} at (20,20) size 100x100
+  RenderBlock (positioned) {DIV} at (20,20) size 100x100
 layer at (18,18) size 202x202 clip at (19,19) size 200x200 scrollY 500 scrollHeight 1000
   RenderBlock (relative positioned) {DIV} at (10,10) size 202x202 [border: (1px solid #000000)]
 layer at (19,-481) size 200x1000 backgroundClip at (19,19) size 200x200 clip at (19,19) size 200x200 outlineClip at (19,19) size 200x200
index e1dbce9..6eb9b05 100644 (file)
@@ -5,7 +5,7 @@ layer at (0,0) size 800x242
     RenderBody {BODY} at (8,8) size 784x226
       RenderText {#text} at (0,0) size 0x0
 layer at (20,20) size 100x100
-  RenderVideo {VIDEO} at (20,20) size 100x100
+  RenderBlock (positioned) {DIV} at (20,20) size 100x100
 layer at (18,18) size 202x202 clip at (19,19) size 200x200 scrollY 500 scrollHeight 1000
   RenderBlock (relative positioned) {DIV} at (10,10) size 202x202 [border: (1px solid #000000)]
 layer at (19,-481) size 200x1000 backgroundClip at (19,19) size 200x200 clip at (19,19) size 200x200 outlineClip at (19,19) size 200x200