mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 857262 - Inspector DocumentWalker: Reparent walker to SVGDocument only if a node contains a document; not if it just implements getSVGDocument. r=miker
This commit is contained in:
parent
7383806f8a
commit
05c399936e
@ -3012,7 +3012,7 @@ DocumentWalker.prototype = {
|
||||
return null;
|
||||
if (node.contentDocument) {
|
||||
return this._reparentWalker(node.contentDocument);
|
||||
} else if (node.getSVGDocument) {
|
||||
} else if (node.getSVGDocument && node.getSVGDocument()) {
|
||||
return this._reparentWalker(node.getSVGDocument());
|
||||
}
|
||||
return this.walker.firstChild();
|
||||
@ -3024,7 +3024,7 @@ DocumentWalker.prototype = {
|
||||
return null;
|
||||
if (node.contentDocument) {
|
||||
return this._reparentWalker(node.contentDocument);
|
||||
} else if (node.getSVGDocument) {
|
||||
} else if (node.getSVGDocument && node.getSVGDocument()) {
|
||||
return this._reparentWalker(node.getSVGDocument());
|
||||
}
|
||||
return this.walker.lastChild();
|
||||
|
@ -51,5 +51,8 @@
|
||||
<div id="longlist-sibling-firstchild"></div>
|
||||
</div>
|
||||
<p id="edit-html"></p>
|
||||
<object>
|
||||
<div id="1"></div>
|
||||
</object>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -214,6 +214,14 @@ addTest(function testLongListTraversal() {
|
||||
}).then(runNextTest));
|
||||
});
|
||||
|
||||
addTest(function testObjectNodeChildren() {
|
||||
promiseDone(
|
||||
gWalker.querySelector(gWalker.rootNode, "object")
|
||||
.then(object => gWalker.children(object))
|
||||
.then(nodeArrayChecker(true, true, "1"))
|
||||
.then(runNextTest));
|
||||
});
|
||||
|
||||
addTest(function testSiblings() {
|
||||
promiseDone(gWalker.querySelector(gWalker.rootNode, "#a").then(a => {
|
||||
return gWalker.siblings(a, { maxNodes: 5, center: a }).then(nodeArrayChecker(true, false, "abcde"));
|
||||
|
Loading…
Reference in New Issue
Block a user