Bug 1236283 - Don't mistake <embed> and <object> as having 1 child node when they don't contain anything. r=pbro

MozReview-Commit-ID: B7bEOP63yxT

--HG--
extra : source : 3468f546b0858d798b57d2bb020fcd309c154c48
This commit is contained in:
Joseph Yeh 2016-07-05 00:52:00 +02:00
parent 86d55a0b62
commit 2c7f0d073f

View File

@ -348,8 +348,9 @@ var NodeActor = exports.NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
let hasAnonChildren = rawNode.nodeType === Ci.nsIDOMNode.ELEMENT_NODE &&
rawNode.ownerDocument.getAnonymousNodes(rawNode);
if (numChildren === 0 &&
(rawNode.contentDocument || rawNode.getSVGDocument)) {
let hasContentDocument = rawNode.contentDocument;
let hasSVGDocument = rawNode.getSVGDocument && rawNode.getSVGDocument();
if (numChildren === 0 && (hasContentDocument || hasSVGDocument)) {
// This might be an iframe with virtual children.
numChildren = 1;
}