Bug 1068881 (Part 2) - Add reftests for rounding image dest rects to zero size. r=roc

This commit is contained in:
Seth Fowler 2015-04-21 19:23:07 -07:00
parent d12ca71815
commit e0dd09b209
5 changed files with 125 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.3">
<head>
<style type="text/css">
#container {
height: 100px;
overflow: auto;
}
#container-background {
background-color: white;
}
#container-background > div {
line-height: 20px;
}
</style>
</head>
<body>
<div id="container">
<div id="container-background">
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.3">
<head>
<style type="text/css">
#container {
height: 100px;
overflow: auto;
}
#container-background {
background: url(one-pixel-wide-background.png);
}
#container-background > div {
line-height: 20px;
}
</style>
</head>
<body>
<div id="container">
<div id="container-background">
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,51 @@
<!DOCTYPE HTML>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html class="reftest-wait" reftest-zoom="0.3">
<head>
<style type="text/css">
#container {
height: 100px;
overflow: auto;
}
#container-background {
background: url(one-pixel-wide-background.png);
}
#container-background > div {
line-height: 20px;
}
</style>
</head>
<body>
<div id="container">
<div id="container-background">
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
</div>
</div>
</body>
<script>
var container = document.getElementById('container');
// Start scrolled all the way to the bottom.
container.scrollTop = container.scrollHeight;
// When we get MozReftestInvalidate, scroll to the top. This puts us at the
// same scroll position as the reference.
function doTest() {
container.scrollTop = 0;
document.documentElement.removeAttribute('class');
}
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -64,3 +64,5 @@ pref(layout.animated-image-layers.enabled,true) random-if(Android||gtk2Widget) =
skip-if(asyncPanZoom&&winWidget) != layer-splitting-5.html about:blank
skip-if(asyncPanZoom&&winWidget) != layer-splitting-6.html about:blank
!= layer-splitting-7.html about:blank
fuzzy-if(gtk2Widget,2,4) == image-scrolling-zoom-1.html image-scrolling-zoom-1-ref.html
!= image-scrolling-zoom-1-ref.html image-scrolling-zoom-1-notref.html