Bug 1432851 - Remove IsInFeedSubscribeLine assertion when loading xul.css in BindToTree;r=bz

The feedreaderUI binding was removed in Bug 1109714, so there's no need for this anymore.

MozReview-Commit-ID: G38fuS0zqOQ

--HG--
extra : rebase_source : f16b102fff01a5d61495687773d2c275f5007634
This commit is contained in:
Brian Grinstead 2018-01-24 09:33:54 -08:00
parent f2d5d9eace
commit 2b9ff4e762
2 changed files with 4 additions and 29 deletions

View File

@ -3234,13 +3234,11 @@ function standardTreeWalkerFilter(node) {
: nodeFilterConstants.FILTER_SKIP;
}
// Ignore all native and XBL anonymous content inside a non-XUL document
// Ignore all native and XBL anonymous content inside a non-XUL document.
// We need to do this to skip things like form controls, scrollbars,
// video controls, etc (see bug 1187482).
if (!isInXULDocument(node) && (isXBLAnonymous(node) ||
isNativeAnonymous(node))) {
// Note: this will skip inspecting the contents of feedSubscribeLine since
// that's XUL content injected in an HTML document, but we need to because
// this also skips many other elements that need to be skipped - like form
// controls, scrollbars, video controls, etc (see bug 1187482).
return nodeFilterConstants.FILTER_SKIP;
}

View File

@ -715,29 +715,6 @@ IsInVideoControls(nsXULElement* aElement)
}
return false;
}
/**
* Returns true if aElement is an element created by the <binding
* id="feedreaderUI"> binding or one of the bindings bound to such an element.
* element in one of the binding for such an element. Only
* subscribe.xhtml#feedSubscribeLine pulls in the feedreaderUI binding. This
* binding creates lots of different types of XUL elements.
*/
bool
IsInFeedSubscribeLine(nsXULElement* aElement)
{
nsIContent* bindingParent = aElement->GetBindingParent();
if (bindingParent) {
while (bindingParent->GetBindingParent()) {
bindingParent = bindingParent->GetBindingParent();
}
nsAtom* idAtom = bindingParent->GetID();
if (idAtom && idAtom->Equals(NS_LITERAL_STRING("feedSubscribeLine"))) {
return true;
}
}
return false;
}
#endif
class XULInContentErrorReporter : public Runnable
@ -806,7 +783,7 @@ nsXULElement::BindToTree(nsIDocument* aDocument,
// pulling in xul.css.
// Note that add-ons may introduce bindings that cause this assertion to
// fire.
NS_ASSERTION(IsInVideoControls(this) || IsInFeedSubscribeLine(this),
NS_ASSERTION(IsInVideoControls(this),
"Unexpected XUL element in non-XUL doc");
}
}