Bug 607417 - Reconcile position:fixed with async scrolling and displayport+meta-viewport. reftests r=jones.chris.g
authorOleg Romashin <romaxa@gmail.com>
Fri, 08 Apr 2011 09:35:21 -0700
changeset 67671 0f077c086750bdf13fadb05f1efd08a0d18cbdcf
parent 67670 288be41b247321bc01af7a584712f2eb5dcc91c9
child 67672 4f957dd3f9f79e175d7cb78faaf59a4e74fc10bd
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjones
bugs607417
milestone2.2a1pre
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 607417 - Reconcile position:fixed with async scrolling and displayport+meta-viewport. reftests r=jones.chris.g
layout/reftests/reftest-sanity/reftest.list
layout/reftests/reftest-sanity/test-pos-fixed-ref.html
layout/reftests/reftest-sanity/test-pos-fixed.html
layout/tools/reftest/reftest-content.js
--- a/layout/reftests/reftest-sanity/reftest.list
+++ b/layout/reftests/reftest-sanity/reftest.list
@@ -84,8 +84,11 @@ needs-focus load needs-focus.html
 
 # Bug 632636
 fails == data:text/plain,HELLO about:blank
 needs-focus == data:text/plain, about:blank
 
 # Sanity check of viewport+displayport overrides
 fails-if(!browserIsRemote) == test-displayport.html test-displayport-ref.html # bug 593168
 skip-if(!browserIsRemote) != test-displayport-2.html test-displayport-ref.html # bug 593168
+
+# IPC Position-fixed frames/layers test
+== test-pos-fixed.html test-pos-fixed-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/reftest-sanity/test-pos-fixed-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html reftest-viewport-w="200" reftest-viewport-h="100"
+      reftest-displayport-w="200" reftest-displayport-h="100"
+<body>
+<div style="position:fixed;top:0px;width:100%;height:10px;background-color:green;"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/reftest-sanity/test-pos-fixed.html
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML>
+<html reftest-viewport-w="200" reftest-viewport-h="100"
+      reftest-displayport-w="200" reftest-displayport-h="100"
+      reftest-displayport-x="0" reftest-displayport-y="10">
+<body>
+<div style="position:fixed;top:0px;width:100%;height:10px;background-color:green;">&nbsp;</div>
+</body>
+</html>
--- a/layout/tools/reftest/reftest-content.js
+++ b/layout/tools/reftest/reftest-content.js
@@ -246,19 +246,21 @@ function setupDisplayport(contentRootEle
     if (vw !== 0 || vh !== 0) {
         LogInfo("Setting viewport to <w="+ vw +", h="+ vh +">");
         windowUtils().setCSSViewport(vw, vh);
     }
 
     // XXX support displayPortX/Y when needed
     var dpw = attrOrDefault("reftest-displayport-w", 0);
     var dph = attrOrDefault("reftest-displayport-h", 0);
+    var dpx = attrOrDefault("reftest-displayport-x", 0);
+    var dpy = attrOrDefault("reftest-displayport-y", 0);
     if (dpw !== 0 || dph !== 0) {
         LogInfo("Setting displayport to <x=0, y=0, w="+ dpw +", h="+ dph +">");
-        windowUtils().setDisplayPortForElement(0, 0, dpw, dph, content.document.documentElement);
+        windowUtils().setDisplayPortForElement(dpx, dpy, dpw, dph, content.document.documentElement);
     }
 
     // XXX support resolution when needed
 
     // XXX support viewconfig when needed
 }
 
 function resetDisplayport() {