Bug 1013385 - Add some tests for checkerboarding. r=mattwoodrow,BenWa
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 15 Sep 2014 16:10:14 -0400
changeset 228692 3d4b867d6bc7270b48c55e05e42152ec05075d6b
parent 228691 0a53e55db53d0bf339c4298f6603328fbe739056
child 228693 938e9a34f204a7cb53eddef3eb45753703796a6a
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, BenWa
bugs1013385
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1013385 - Add some tests for checkerboarding. r=mattwoodrow,BenWa
layout/reftests/async-scrolling/checkerboard-1-ref.html
layout/reftests/async-scrolling/checkerboard-1.html
layout/reftests/async-scrolling/checkerboard-2-ref.html
layout/reftests/async-scrolling/checkerboard-2.html
layout/reftests/async-scrolling/checkerboard-3-ref.html
layout/reftests/async-scrolling/checkerboard-3.html
layout/reftests/async-scrolling/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-1-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background-color: green; overflow:hidden">
+  <div style="position:absolute; left: 0px; top: 0px; width: 100px; height: 200px; background-color: red"></div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll
+      reftest-displayport-x="0" reftest-displayport-y="0"
+      reftest-displayport-w="800" reftest-displayport-h="2000"
+      reftest-async-scroll-x="0" reftest-async-scroll-y="1800">
+<!-- This is a simple test where we set the async-scroll position so that it
+     extends outside the displayport, and ensure that the checkerboarded area
+     is filled with the expected background color. -->
+<body style="background-color: green; height: 5000px; overflow:hidden">
+  <div style="position:absolute; left: 0px; top: 1800px; width: 100px; height: 400px; background-color: red"></div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-2-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background-color: green; overflow:hidden">
+  <div style="position:absolute; left: 0px; top: 0px; background-color: yellow; width: 100px; height: 200px"></div>
+  <div style="position:fixed; left: 10px; top: 10px; width: 10px; height: 10px; background-color: blue"></div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-2.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll
+      reftest-displayport-x="0" reftest-displayport-y="0"
+      reftest-displayport-w="800" reftest-displayport-h="2000"
+      reftest-async-scroll-x="0" reftest-async-scroll-y="1800">
+<!-- This is a test where we set the async-scroll position so that it
+     extends outside the displayport, but also have some fixed-position
+     elements in the mix. In particular, the purple element is below
+     (in z-order) the main scrolling content and should not be made visible
+     while checkerboarding; the checkerboarding code should cover it up
+     with the appropriate background color. -->
+<body style="background-color: green; height: 5000px; overflow:hidden">
+  <div style="position:fixed; left: 0px; top: 0px; width: 100px; height: 500px; background-color: purple; z-index: -1"></div>
+  <div style="position:absolute; left: 0px; top: 500px; background-color: yellow; width: 100px; height: 4500px"></div>
+  <div style="position:fixed; left: 10px; top: 10px; width: 10px; height: 10px; background-color: blue"></div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-3-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML>
+<html>
+<body style="background-color: green; overflow:hidden">
+  <div style="position:fixed; left: 10px; top: 10px; width: 10px; height: 10px; background-color: blue"></div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/async-scrolling/checkerboard-3.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<html reftest-async-scroll
+      reftest-displayport-x="0" reftest-displayport-y="0"
+      reftest-displayport-w="800" reftest-displayport-h="2000"
+      reftest-async-scroll-x="0" reftest-async-scroll-y="2100">
+<!-- This is the exact same test as checkerboard-2.html, but we put
+     the scroll position entirely outside of the displayport. This ensures
+     that even we do the proper checkerboarding even if the layer would
+     otherwise be culled out in the compositor because it is not on-screen. -->
+<body style="background-color: green; height: 5000px; overflow:hidden">
+  <div style="position:fixed; left: 0px; top: 0px; width: 100px; height: 500px; background-color: purple; z-index: -1"></div>
+  <div style="position:absolute; left: 0px; top: 500px; background-color: yellow; width: 100px; height: 4500px"></div>
+  <div style="position:fixed; left: 10px; top: 10px; width: 10px; height: 10px; background-color: blue"></div>
+</body>
--- a/layout/reftests/async-scrolling/reftest.list
+++ b/layout/reftests/async-scrolling/reftest.list
@@ -22,8 +22,17 @@ pref(layout.async-containerless-scrollin
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html
 pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html
 
+# for the following tests, we want to disable the low-precision buffer
+# as it will expand the displayport beyond what the test specifies in
+# its reftest-displayport attributes, and interfere with where we expect
+# checkerboarding to occur
+default-preferences pref(layers.low-precision-buffer,false)
+skip-if(!asyncPanZoom) == checkerboard-1.html checkerboard-1-ref.html
+skip-if(!asyncPanZoom) == checkerboard-2.html checkerboard-2-ref.html
+skip-if(!asyncPanZoom) == checkerboard-3.html checkerboard-3-ref.html
+default-preferences