mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d
This commit is contained in:
parent
85fa6409bb
commit
c227604a2c
997 changed files with 45660 additions and 14650 deletions
|
@ -2258,12 +2258,29 @@ policies and contribution forms [3].
|
|||
}
|
||||
var node = output_document.getElementById("log");
|
||||
if (!node) {
|
||||
if (!document.body || document.readyState == "loading") {
|
||||
if (!document.readyState == "loading") {
|
||||
return;
|
||||
}
|
||||
node = output_document.createElement("div");
|
||||
node = output_document.createElementNS("http://www.w3.org/1999/xhtml", "div");
|
||||
node.id = "log";
|
||||
output_document.body.appendChild(node);
|
||||
if (output_document.body) {
|
||||
output_document.body.appendChild(node);
|
||||
} else {
|
||||
var is_svg = false;
|
||||
var output_window = output_document.defaultView;
|
||||
if (output_window && "SVGSVGElement" in output_window) {
|
||||
is_svg = output_document.documentElement instanceof output_window.SVGSVGElement;
|
||||
}
|
||||
if (is_svg) {
|
||||
var foreignObject = output_document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
||||
foreignObject.setAttribute("width", "100%");
|
||||
foreignObject.setAttribute("height", "100%");
|
||||
output_document.documentElement.appendChild(foreignObject);
|
||||
foreignObject.appendChild(node);
|
||||
} else {
|
||||
output_document.documentElement.appendChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.output_document = output_document;
|
||||
this.output_node = node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue