Attach bindings via addBinding even to nodes not in a document. Bug 380990, r+sr=sicking
authorbzbarsky@mit.edu
Thu, 17 May 2007 11:31:31 -0700
changeset 1567 9149dfa9b249302d807fcf802351dfcf34b034db
parent 1566 c0db0f885b22a378a1cf93fb984c782f3abc97c3
child 1568 0c8a191fa865c4c9678e66c6bc06ead53616c09f
push idunknown
push userunknown
push dateunknown
bugs380990
milestone1.9a5pre
Attach bindings via addBinding even to nodes not in a document. Bug 380990, r+sr=sicking
content/xbl/src/nsXBLService.cpp
--- a/content/xbl/src/nsXBLService.cpp
+++ b/content/xbl/src/nsXBLService.cpp
@@ -489,23 +489,17 @@ NS_IMETHODIMP
 nsXBLService::LoadBindings(nsIContent* aContent, nsIURI* aURL, PRBool aAugmentFlag,
                            nsXBLBinding** aBinding, PRBool* aResolveStyle) 
 { 
   *aBinding = nsnull;
   *aResolveStyle = PR_FALSE;
 
   nsresult rv;
 
-  nsCOMPtr<nsIDocument> document;
-  if (aContent->HasFlag(NODE_FORCE_XBL_BINDINGS)) {
-    document = aContent->GetOwnerDoc();
-  }
-  else {
-    document = aContent->GetCurrentDoc();
-  }
+  nsCOMPtr<nsIDocument> document = aContent->GetOwnerDoc();
 
   // XXX document may be null if we're in the midst of paint suppression
   if (!document)
     return NS_OK;
 
   nsBindingManager *bindingManager = document->BindingManager();
   
   nsXBLBinding *binding = bindingManager->GetBinding(aContent);