Bug 1465616 - Add reftests for fixed and sticky elements. r?botond
MozReview-Commit-ID: IzSUQqvjrUp
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/reftest/pinch-zoom-position-fixed-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.5">
+ <style>
+ body {
+ margin: 0;
+ height: 2000px;
+ overflow: hidden;
+ }
+ div {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ height: 500px;
+ background: linear-gradient(135deg, white, black);
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/reftest/pinch-zoom-position-fixed.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.5">
+ <style>
+ body {
+ margin: 0;
+ height: 2000px;
+ overflow: hidden;
+ }
+ div {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ height: 500px;
+ background: linear-gradient(135deg, white, black);
+ }
+ </style>
+</head>
+<body onload="scrollTo(0, 500); document.documentElement.classList.remove('reftest-wait');">
+ <div></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/reftest/pinch-zoom-position-sticky-ref.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.5">
+ <style>
+ body {
+ margin: 0;
+ height: 2000px;
+ overflow: hidden;
+ }
+ div {
+ position: absolute;
+ top: calc(100vh - 500px);
+ width: 100%;
+ height: 500px;
+ background: linear-gradient(135deg, white, black);
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/gfx/layers/apz/test/reftest/pinch-zoom-position-sticky.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.5">
+ <style>
+ body {
+ margin: 0;
+ height: 2000px;
+ overflow: hidden;
+ }
+ div {
+ position: sticky;
+ top: calc(100vh - 500px);
+ width: 100%;
+ height: 500px;
+ background: linear-gradient(135deg, white, black);
+ }
+ </style>
+</head>
+<body onload="scrollTo(0, 500); document.documentElement.classList.remove('reftest-wait');">
+ <div></div>
+</body>
+</html>
+
--- a/gfx/layers/apz/test/reftest/reftest.list
+++ b/gfx/layers/apz/test/reftest/reftest.list
@@ -17,8 +17,12 @@ fuzzy-if(Android,45,26) skip-if(!Android
# As above, the end of the scrollthumb won't match perfectly, but the bulk of the scrollbar should be present and identical.
fuzzy-if(Android,54,14) skip-if(!Android) pref(apz.allow_zooming,true) == scrollbar-zoom-resolution-1.html scrollbar-zoom-resolution-1-ref.html
fuzzy-if(Android,51,22) skip-if(!Android) pref(apz.allow_zooming,true) == scrollbar-zoom-resolution-2.html scrollbar-zoom-resolution-2-ref.html
# Meta-viewport tag support
skip-if(!Android) pref(apz.allow_zooming,true) == initial-scale-1.html initial-scale-1-ref.html
skip-if(!asyncPan) == frame-reconstruction-scroll-clamping.html frame-reconstruction-scroll-clamping-ref.html
+
+# Test that position:fixed and position:sticky elements are positioned according to the layout viewport.
+skip-if(!Android) pref(apz.allow_zooming,true) == pinch-zoom-position-fixed.html pinch-zoom-position-fixed-ref.html
+skip-if(!Android) pref(apz.allow_zooming,true) == pinch-zoom-position-sticky.html pinch-zoom-position-sticky-ref.html