⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 109334 in webkit


Ignore:
Timestamp:
Mar 1, 2012, 4:28:40 AM (15 years ago)
Author:
Nikolas Zimmermann
Message:

2012-03-01 Florin Malita <​fmalita@google.com>

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:
Location:
trunk/LayoutTests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r109328 r109334  
     12012-03-01  Florin Malita  <fmalita@google.com>
     2
     3        Percent width/height SVG not always scaled on window resize
     4        https://bugs.webkit.org/show_bug.cgi?id=79490
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        Update tests to avoid the use of window.resize{To,By}.
     9
     10        * fast/repaint/percent-minheight-resize-expected.html:
     11        * fast/repaint/percent-minheight-resize.html:
     12        * svg/custom/svg-percent-scale-expected.html:
     13        * svg/custom/svg-percent-scale-vonly-expected.html:
     14        * svg/custom/svg-percent-scale-vonly.html:
     15        * svg/custom/svg-percent-scale.html:
     16
    1172012-02-29  Pavel Podivilov  <podivilov@chromium.org>
    218
  • trunk/LayoutTests/fast/repaint/percent-minheight-resize-expected.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="resources/repaint.js"></script>
     4  <script src="resources/repaint.js"></script>
     5  <script>
     6    function repaintTest()
     7    {
     8      document.getElementById('resize-target').style.height = '200px';
     9    }
     10  </script>
    511</head>
    612
    713<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
    8 <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
     14  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>
    915
    10 <script>
    11   function repaintTest() {
    12     window.resizeBy(0, -window.innerHeight / 2);
    13   }
    14 </script>
     16  <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
    1517</body>
    1618</html>
  • trunk/LayoutTests/fast/repaint/percent-minheight-resize.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="resources/repaint.js"></script>
     4  <title>Test for http://bugs.webkit.org/show_bug.cgi?id=79490</title>
     5  <script src="resources/repaint.js"></script>
     6  <script>
     7    function repaintTest()
     8    {
     9      document.getElementById('resize-target').style.height = '200px';
     10    }
     11  </script>
    512</head>
    613
    714<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
    8 <div style="width: 100%; height: 100%; position: absolute;">
    9   <!-- After window resizing, this DIV element should not be visible -->
    10   <div style="width: 100px; min-height: 33%; background-color: red; display: inline-block;"></div>
    11 </div>
     15  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
     16    <!-- After window resizing, this DIV element should not be visible -->
     17    <div style="width: 100px; min-height: 50%; background-color: red; display: inline-block;"></div>
     18  </div>
    1219
    13 <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
    14 
    15 <script>
    16   function repaintTest() {
    17     window.resizeBy(0, -window.innerHeight / 2);
    18   }
    19 </script>
     20  <div style="width: 100px; height: 100px; background-color: green; position: absolute;"></div>
    2021</body>
    2122</html>
  • trunk/LayoutTests/svg/custom/svg-percent-scale-expected.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="../../fast/repaint/resources/repaint.js"></script>
     4  <script src="../../fast/repaint/resources/repaint.js"></script>
     5  <script>
     6    function repaintTest()
     7    {
     8      document.getElementById('resize-target').style.width = '200px';
     9      document.getElementById('resize-target').style.height = '200px';
     10    }
     11  </script>
    512</head>
    613
    714<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
    8 <div style="width: 100%; height: 100%; position: absolute;">
    9 <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg">
    10   <rect fill="green" width="100%" height="100%"/>
    11 </svg>
    12 </div>
    13 
    14 <script>
    15   function repaintTest() {
    16     window.resizeTo(window.innerWidth / 2, window.innerHeight / 2);
    17   }
    18 </script>
     15  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div>
     16  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    1917</body>
    2018</html>
  • trunk/LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="../../fast/repaint/resources/repaint.js"></script>
     4  <script src="../../fast/repaint/resources/repaint.js"></script>
     5  <script>
     6    function repaintTest()
     7    {
     8      document.getElementById('resize-target').style.height = '200px';
     9    }
     10  </script>
    511</head>
    612
    713<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
    8 <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    9 
    10 <script>
    11   function repaintTest() {
    12     window.resizeBy(0, -window.innerHeight / 2);
    13   }
    14 </script>
     14  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;"></div> 
     15  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    1516</body>
    1617</html>
  • trunk/LayoutTests/svg/custom/svg-percent-scale-vonly.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="../../fast/repaint/resources/repaint.js"></script>
     4  <title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title>
     5  <script src="../../fast/repaint/resources/repaint.js"></script>
     6  <script>
     7    function repaintTest()
     8    {
     9      document.getElementById('resize-target').style.height = '200px';
     10    }
     11  </script>
    512</head>
    613
    714<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
     15  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
     16    <!-- After vertical window resizing, this SVG element should not be visible -->
     17    <svg width="25%" height="50%" xmlns="http://www.w3.org/2000/svg">
     18      <rect fill="red" width="100%" height="100%"></rect>
     19    </svg>
    820
    9 <div style="width: 100%; height: 100%; position: absolute; align: left;">
    10 <!-- After vertical window resizing, this SVG element should not be visible -->
    11 <svg width="50%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
    12   <rect fill="red" width="200" height="200"></rect>
    13 </svg>
     21    <!-- force an anonymous block creation to exercise the percent-height descendants map -->
     22    <div></div>
     23  </div>
    1424
    15 <!-- force an anonymous block creation to exercise the percent-height descendants map -->
    16 <div></div>
    17 </div>
    18 
    19 <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    20 
    21 <script>
    22   function repaintTest() {
    23     window.resizeBy(0, -window.innerHeight / 2);
    24   }
    25 </script>
     25  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    2626</body>
    2727</html>
  • trunk/LayoutTests/svg/custom/svg-percent-scale.html

    r109104 r109334  
    22<html>
    33<head>
    4 <script src="../../fast/repaint/resources/repaint.js"></script>
     4  <title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title>
     5  <script src="../../fast/repaint/resources/repaint.js"></script>
     6  <script>
     7    function repaintTest()
     8    {
     9      document.getElementById('resize-target').style.width = '200px';
     10      document.getElementById('resize-target').style.height = '200px';
     11    }
     12  </script>
    513</head>
    614
    715<body style="margin: 0; padding: 0; overflow: hidden;" onload="runRepaintTest()">
     16  <div id="resize-target" style="width: 400px; height: 400px; position: absolute;">
     17    <!-- After window resizing, this SVG element should not be visible -->
     18    <svg width="50%" height="50%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
     19      <rect fill="red" width="100" height="100"></rect>
     20    </svg>
     21  </div>
    822
    9 <div style="width: 100%; height: 100%; position: absolute;">
    10 <!-- After window resizing, this SVG element should not be visible -->
    11 <svg width="50%" height="50%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
    12   <rect fill="red" width="800" height="600"></rect>
    13 </svg>
    14 </div>
    15 
    16 <div style="width: 100%; height: 100%; position: absolute;">
    17 <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg">
    18   <rect fill="green" width="100%" height="100%"/>
    19 </svg>
    20 </div>
    21 
    22 <script>
    23   function repaintTest() {
    24     window.resizeTo(window.innerWidth / 2, window.innerHeight / 2);
    25   }
    26 </script>
     23  <div style="width: 100px; height: 100px; position: absolute; background-color: green;"></div>
    2724</body>
    2825</html>
Note: See TracChangeset for help on using the changeset viewer.