Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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: Canonical link: https://commits.webkit.org/97085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Nikolas Zimmermann
committed
Mar 1, 2012
1 parent
c5ed8dd
commit 1407b2f
Showing
7 changed files
with
90 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
LayoutTests/fast/repaint/percent-minheight-resize-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="resources/repaint.js"></script> | ||
<script src="resources/repaint.js"></script> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="resources/repaint.js"></script> | ||
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=79490</title> | ||
<script src="resources/repaint.js"></script> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<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> |
17 changes: 9 additions & 8 deletions
17
LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<title>Test for https://bugs.webkit.org/show_bug.cgi?id=79490</title> | ||
<script src="../../fast/repaint/resources/repaint.js"></script> | ||
<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> |