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:
Timothy Nikkel 2014-02-17 15:10:01 -06:00
Родитель dac8300bfe
Коммит 792b7ad8c2
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

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