Title: [109334] trunk/LayoutTests
Revision
109334
Author
[email protected]
Date
2012-03-01 04:28:40 -0800 (Thu, 01 Mar 2012)

Log Message

2012-03-01  Florin Malita  <[email protected]>

        Percent width/height SVG not always scaled on window resize
        https://bugs.webkit.org/show_bug.cgi?id=79490

        Reviewed by Nikolas Zimmermann.

        Update tests to avoid the use of window.resize{To,By}.

        * fast/repaint/percent-minheight-resize-expected.html:
        * fast/repaint/percent-minheight-resize.html:
        * svg/custom/svg-percent-scale-expected.html:
        * svg/custom/svg-percent-scale-vonly-expected.html:
        * svg/custom/svg-percent-scale-vonly.html:
        * svg/custom/svg-percent-scale.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (109333 => 109334)


--- trunk/LayoutTests/ChangeLog	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/ChangeLog	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,3 +1,19 @@
+2012-03-01  Florin Malita  <[email protected]>
+
+        Percent width/height SVG not always scaled on window resize
+        https://bugs.webkit.org/show_bug.cgi?id=79490
+
+        Reviewed by Nikolas Zimmermann.
+
+        Update tests to avoid the use of window.resize{To,By}.
+
+        * fast/repaint/percent-minheight-resize-expected.html:
+        * fast/repaint/percent-minheight-resize.html:
+        * svg/custom/svg-percent-scale-expected.html:
+        * svg/custom/svg-percent-scale-vonly-expected.html:
+        * svg/custom/svg-percent-scale-vonly.html:
+        * svg/custom/svg-percent-scale.html:
+
 2012-02-29  Pavel Podivilov  <[email protected]>
 
         Web Inspector: abstract out the common pattern of creating auto-updated locations.

Modified: trunk/LayoutTests/fast/repaint/percent-minheight-resize-expected.html (109333 => 109334)


--- trunk/LayoutTests/fast/repaint/percent-minheight-resize-expected.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/fast/repaint/percent-minheight-resize-expected.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,16 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.height = '200px'; 
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
-<div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>
 
-<script>
-  function repaintTest() {
-    window.resizeBy(0, -window.innerHeight / 2);
-  }
-</script>
+  <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
 </body>
 </html>

Modified: trunk/LayoutTests/fast/repaint/percent-minheight-resize.html (109333 => 109334)


--- trunk/LayoutTests/fast/repaint/percent-minheight-resize.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/fast/repaint/percent-minheight-resize.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,21 +1,22 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <title>Test for http://bugs.webkit.org/show_bug.cgi?id=79490</title>
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.height = '200px';
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
-<div style="width: 100%; height: 100%; position: absolute;">
-  <!-- After window resizing, this DIV element should not be visible -->
-  <div style="width: 100px; min-height: 33%; background-color: red; display: inline-block;"></div>
-</div>
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
+    <!-- After window resizing, this DIV element should not be visible -->
+    <div style="width: 100px; min-height: 50%; background-color: red; display: inline-block;"></div>
+  </div>
 
-<div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
-
-<script>
-  function repaintTest() {
-    window.resizeBy(0, -window.innerHeight / 2);
-  }
-</script>
+  <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
 </body>
 </html>

Modified: trunk/LayoutTests/svg/custom/svg-percent-scale-expected.html (109333 => 109334)


--- trunk/LayoutTests/svg/custom/svg-percent-scale-expected.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/svg/custom/svg-percent-scale-expected.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,20 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.width = '200px';
+      document.getElementById('resize-target').style.height = '200px'; 
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
-<div style="width: 100%; height: 100%; position: absolute;">
-<svg width="200" height="150" xmlns="http://www.w3.org/2000/svg">
-  <rect fill="green" width="100%" height="100%"/>
-</svg>
-</div>
-
-<script>
-  function repaintTest() {
-    window.resizeTo(window.innerWidth / 2, window.innerHeight / 2);
-  }
-</script>
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>
+  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
 </body>
 </html>

Modified: trunk/LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html (109333 => 109334)


--- trunk/LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,16 +1,17 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.height = '200px';
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
-<div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
-
-<script>
-  function repaintTest() {
-    window.resizeBy(0, -window.innerHeight / 2);
-  }
-</script>
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>  
+  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
 </body>
 </html>

Modified: trunk/LayoutTests/svg/custom/svg-percent-scale-vonly.html (109333 => 109334)


--- trunk/LayoutTests/svg/custom/svg-percent-scale-vonly.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/svg/custom/svg-percent-scale-vonly.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,27 +1,27 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title>
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.height = '200px';
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
+    <!-- After vertical window resizing, this SVG element should not be visible -->
+    <svg width="25%" height="50%" xmlns="http://www.w3.org/2000/svg">
+      <rect fill="red" width="100%" height="100%"></rect>
+    </svg>
 
-<div style="width: 100%; height: 100%; position: absolute; align: left;">
-<!-- After vertical window resizing, this SVG element should not be visible -->
-<svg width="50%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
-  <rect fill="red" width="200" height="200"></rect>
-</svg>
+    <!-- force an anonymous block creation to exercise the percent-height descendants map -->
+    <div></div>
+  </div>
 
-<!-- force an anonymous block creation to exercise the percent-height descendants map -->
-<div></div>
-</div>
-
-<div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
-
-<script>
-  function repaintTest() {
-    window.resizeBy(0, -window.innerHeight / 2);
-  }
-</script>
+  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
 </body>
 </html>

Modified: trunk/LayoutTests/svg/custom/svg-percent-scale.html (109333 => 109334)


--- trunk/LayoutTests/svg/custom/svg-percent-scale.html	2012-03-01 12:21:26 UTC (rev 109333)
+++ trunk/LayoutTests/svg/custom/svg-percent-scale.html	2012-03-01 12:28:40 UTC (rev 109334)
@@ -1,28 +1,25 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src=""
+  <title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title>
+  <script src=""
+  <script>
+    function repaintTest()
+    {
+      document.getElementById('resize-target').style.width = '200px';
+      document.getElementById('resize-target').style.height = '200px';
+    }
+  </script>
 </head>
 
 <body style="margin: 0; padding: 0; overflow: hidden;" _onload_="runRepaintTest()">
+  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
+    <!-- After window resizing, this SVG element should not be visible -->
+    <svg width="50%" height="50%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
+      <rect fill="red" width="100" height="100"></rect>
+    </svg>
+  </div>
 
-<div style="width: 100%; height: 100%; position: absolute;">
-<!-- After window resizing, this SVG element should not be visible -->
-<svg width="50%" height="50%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
-  <rect fill="red" width="800" height="600"></rect>
-</svg>
-</div>
-
-<div style="width: 100%; height: 100%; position: absolute;">
-<svg width="200" height="150" xmlns="http://www.w3.org/2000/svg">
-  <rect fill="green" width="100%" height="100%"/>
-</svg>
-</div>
-
-<script>
-  function repaintTest() {
-    window.resizeTo(window.innerWidth / 2, window.innerHeight / 2);
-  }
-</script>
+  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to