# HG changeset patch # User Brian Grinstead # Date 1516815234 28800 # Node ID 01a788f59707b3bc7bb47db542a12f1212d7bd6a # Parent 864af42c9c9355da0573d6bb78950055e54a1c80 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 diff --git a/devtools/server/actors/inspector.js b/devtools/server/actors/inspector.js --- a/devtools/server/actors/inspector.js +++ b/devtools/server/actors/inspector.js @@ -3228,23 +3228,21 @@ function standardTreeWalkerFilter(node) // Ignore empty whitespace text nodes that do not impact the layout. if (isWhitespaceTextNode(node)) { return nodeHasSize(node) ? nodeFilterConstants.FILTER_ACCEPT : 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; } return nodeFilterConstants.FILTER_ACCEPT; } /** * This DeepTreeWalker filter is like standardTreeWalkerFilter except that diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -724,39 +724,16 @@ IsInVideoControls(nsXULElement* aElement while (ancestor) { if (ancestor->NodeInfo()->Equals(nsGkAtoms::videocontrols, kNameSpaceID_XUL)) { return true; } ancestor = ancestor->GetParent(); } return false; } - -/** - * Returns true if aElement is an element created by the 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(); - } - nsIAtom* idAtom = bindingParent->GetID(); - if (idAtom && idAtom->Equals(NS_LITERAL_STRING("feedSubscribeLine"))) { - return true; - } - } - return false; -} #endif class XULInContentErrorReporter : public Runnable { public: explicit XULInContentErrorReporter(nsIDocument* aDocument) : mozilla::Runnable("XULInContentErrorReporter") , mDocument(aDocument) @@ -815,17 +792,17 @@ nsXULElement::BindToTree(nsIDocument* aD // for HTML we currently should only pull it in if the document contains // an