mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 12:03:08 +00:00
Bug 970250. Add the ability to set a display port on scroll frames that aren't the root scroll frame to reftests. r=dbaron
This commit is contained in:
parent
dac8300bfe
commit
792b7ad8c2
@ -204,9 +204,13 @@ function setupDisplayport(contentRootElement) {
|
||||
var dph = attrOrDefault("reftest-displayport-h", 0);
|
||||
var dpx = attrOrDefault("reftest-displayport-x", 0);
|
||||
var dpy = attrOrDefault("reftest-displayport-y", 0);
|
||||
var elementID = attrOrDefault("reftest-displayport-element", null);
|
||||
if (dpw !== 0 || dph !== 0) {
|
||||
LogInfo("Setting displayport to <x="+ dpx +", y="+ dpy +", w="+ dpw +", h="+ dph +">");
|
||||
windowUtils().setDisplayPortForElement(dpx, dpy, dpw, dph, content.document.documentElement);
|
||||
var element = elementID ? content.document.getElementById(elementID) : null;
|
||||
LogInfo("Setting displayport to <x="+ dpx +", y="+ dpy +", w="+ dpw +", h="+ dph +">" +
|
||||
(element ? (" on element with id " + elementID) : " on document element"));
|
||||
windowUtils().setDisplayPortForElement(dpx, dpy, dpw, dph,
|
||||
element ? element : content.document.documentElement);
|
||||
}
|
||||
var asyncScroll = attrOrDefault("reftest-async-scroll", false);
|
||||
if (asyncScroll) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user