Skip to content
Snippets Groups Projects
Commit 7e972748 authored by Kyle Huey's avatar Kyle Huey
Browse files

Bug 745681: Prepare the reftest harness for Bug 695480. r=dbaron a=test-only

parent b0c91cce
No related branches found
No related tags found
No related merge requests found
......@@ -511,11 +511,16 @@ function OnDocumentLoad(event)
}
var contentRootElement = currentDoc ? currentDoc.documentElement : null;
currentDoc = null;
setupZoom(contentRootElement);
setupDisplayport(contentRootElement);
var inPrintMode = false;
function AfterOnLoadScripts() {
// Regrab the root element, because the document may have changed.
var contentRootElement =
content.document ? content.document.documentElement : null;
// Take a snapshot now. We need to do this before we check whether
// we should wait, since this might trigger dispatching of
// MozPaintWait events and make shouldWaitForExplicitPaintWaiters() true
......@@ -671,7 +676,6 @@ function LogInfo(str)
const SYNC_DEFAULT = 0x0;
const SYNC_ALLOW_DISABLE = 0x1;
var gDummyCanvas = null;
function SynchronizeForSnapshot(flags)
{
if (flags & SYNC_ALLOW_DISABLE) {
......@@ -682,13 +686,11 @@ function SynchronizeForSnapshot(flags)
}
}
if (gDummyCanvas == null) {
gDummyCanvas = content.document.createElementNS(XHTML_NS, "canvas");
gDummyCanvas.setAttribute("width", 1);
gDummyCanvas.setAttribute("height", 1);
}
var dummyCanvas = content.document.createElementNS(XHTML_NS, "canvas");
dummyCanvas.setAttribute("width", 1);
dummyCanvas.setAttribute("height", 1);
var ctx = gDummyCanvas.getContext("2d");
var ctx = dummyCanvas.getContext("2d");
var flags = ctx.DRAWWINDOW_DRAW_CARET | ctx.DRAWWINDOW_DRAW_VIEW | ctx.DRAWWINDOW_USE_WIDGET_LAYERS;
ctx.drawWindow(content, 0, 0, 1, 1, "rgb(255,255,255)", flags);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment