5959
6060#include " mozilla/dom/Attr.h"
6161#include " mozilla/dom/BindingDeclarations.h"
62- #include " nsIDOMDocumentXBL.h"
6362#include " mozilla/dom/Element.h"
6463#include " mozilla/dom/FramingChecker.h"
6564#include " nsGenericHTMLElement.h"
@@ -1802,7 +1801,6 @@ NS_INTERFACE_TABLE_HEAD(nsDocument)
18021801 NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDocument)
18031802 NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocument)
18041803 NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMNode)
1805- NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMDocumentXBL)
18061804 NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIScriptObjectPrincipal)
18071805 NS_INTERFACE_TABLE_ENTRY(nsDocument, nsIDOMEventTarget)
18081806 NS_INTERFACE_TABLE_ENTRY(nsDocument, mozilla::dom::EventTarget)
@@ -6214,55 +6212,18 @@ nsIDocument::ImportNode(nsINode& aNode, bool aDeep, ErrorResult& rv) const
62146212 return nullptr ;
62156213}
62166214
6217- NS_IMETHODIMP
6218- nsDocument::LoadBindingDocument (const nsAString& aURI)
6219- {
6220- ErrorResult rv;
6221- nsIDocument::LoadBindingDocument (aURI,
6222- nsContentUtils::GetCurrentJSContext ()
6223- ? Some (nsContentUtils::SubjectPrincipal ())
6224- : Nothing (),
6225- rv);
6226- return rv.StealNSResult ();
6227- }
6228-
62296215void
62306216nsIDocument::LoadBindingDocument (const nsAString& aURI,
62316217 nsIPrincipal& aSubjectPrincipal,
62326218 ErrorResult& rv)
6233- {
6234- LoadBindingDocument (aURI, Some (&aSubjectPrincipal), rv);
6235- }
6236-
6237- void
6238- nsIDocument::LoadBindingDocument (const nsAString& aURI,
6239- const Maybe<nsIPrincipal*>& aSubjectPrincipal,
6240- ErrorResult& rv)
62416219{
62426220 nsCOMPtr<nsIURI> uri;
62436221 rv = NS_NewURI(getter_AddRefs (uri), aURI, mCharacterSet , GetDocBaseURI ());
62446222 if (rv.Failed ()) {
62456223 return ;
62466224 }
62476225
6248- // Note - This computation of subjectPrincipal isn't necessarily sensical.
6249- // It's just designed to preserve the old semantics during a mass-conversion
6250- // patch.
6251- nsCOMPtr<nsIPrincipal> subjectPrincipal =
6252- aSubjectPrincipal.isSome () ? aSubjectPrincipal.value () : NodePrincipal ();
6253- BindingManager ()->LoadBindingDocument (this , uri, subjectPrincipal);
6254- }
6255-
6256- NS_IMETHODIMP
6257- nsDocument::GetBindingParent (nsIDOMNode* aNode, nsIDOMElement** aResult)
6258- {
6259- nsCOMPtr<nsINode> node = do_QueryInterface (aNode);
6260- NS_ENSURE_ARG_POINTER (node);
6261-
6262- Element* bindingParent = nsIDocument::GetBindingParent (*node);
6263- nsCOMPtr<nsIDOMElement> retval = do_QueryInterface (bindingParent);
6264- retval.forget (aResult);
6265- return NS_OK ;
6226+ BindingManager ()->LoadBindingDocument (this , uri, &aSubjectPrincipal);
62666227}
62676228
62686229Element*
@@ -6333,23 +6294,6 @@ nsDocument::GetAnonymousElementByAttribute(nsIContent* aElement,
63336294 return nullptr ;
63346295}
63356296
6336- NS_IMETHODIMP
6337- nsDocument::GetAnonymousElementByAttribute (nsIDOMElement* aElement,
6338- const nsAString& aAttrName,
6339- const nsAString& aAttrValue,
6340- nsIDOMElement** aResult)
6341- {
6342- nsCOMPtr<Element> element = do_QueryInterface (aElement);
6343- NS_ENSURE_ARG_POINTER (element);
6344-
6345- Element* anonEl =
6346- nsIDocument::GetAnonymousElementByAttribute (*element, aAttrName,
6347- aAttrValue);
6348- nsCOMPtr<nsIDOMElement> retval = do_QueryInterface (anonEl);
6349- retval.forget (aResult);
6350- return NS_OK ;
6351- }
6352-
63536297Element*
63546298nsIDocument::GetAnonymousElementByAttribute (Element& aElement,
63556299 const nsAString& aAttrName,
@@ -6360,17 +6304,6 @@ nsIDocument::GetAnonymousElementByAttribute(Element& aElement,
63606304 return GetAnonymousElementByAttribute (&aElement, attribute, aAttrValue);
63616305}
63626306
6363-
6364- NS_IMETHODIMP
6365- nsDocument::GetAnonymousNodes (nsIDOMElement* aElement,
6366- nsIDOMNodeList** aResult)
6367- {
6368- *aResult = nullptr ;
6369-
6370- nsCOMPtr<nsIContent> content (do_QueryInterface (aElement));
6371- return BindingManager ()->GetAnonymousNodesFor (content, aResult);
6372- }
6373-
63746307nsINodeList*
63756308nsIDocument::GetAnonymousNodes (Element& aElement)
63766309{
0 commit comments