Bug 607417 - Reconcile position:fixed with async scrolling and displayport+meta-viewport. reftests r=jones.chris.g

--HG--
extra : rebase_source : 74649055179f4612dce53928f75bea55359eeeb4
This commit is contained in:
Oleg Romashin 2011-04-08 09:35:21 -07:00
parent d918fac3c5
commit c155d35cf1
4 changed files with 21 additions and 1 deletions

View File

@ -89,3 +89,6 @@ 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

View File

@ -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>

View File

@ -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>

View File

@ -251,9 +251,11 @@ function setupDisplayport(contentRootElement) {
// 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