Bug 387466 - Bug 309020 (SVG references breaks when used inside XBL) has regressed. r+sr=roc,a1.9=blocking1.9+

This commit is contained in:
longsonr@gmail.com 2007-11-26 02:23:19 -08:00
parent e04ae113c0
commit 8d9611f21d
2 changed files with 15 additions and 0 deletions

View File

@ -61,6 +61,7 @@ REQUIRES = xpcom \
necko \
xpconnect \
webshell \
xuldoc \
unicharutil \
imglib2 \
docshell \

View File

@ -44,6 +44,7 @@
#include "nsIDOMEventTarget.h"
#include "nsIDOMMutationEvent.h"
#include "nsMutationEvent.h"
#include "nsXBLPrototypeBinding.h"
#include "nsBindingManager.h"
#include "nsXBLBinding.h"
#include "nsStyleConsts.h"
@ -811,6 +812,19 @@ nsSVGElement::UpdateContentStyleRule()
nsCOMPtr<nsIURI> baseURI = GetBaseURI();
nsIURI *docURI = doc->GetDocumentURI();
nsIContent* bindingParent = GetBindingParent();
if (bindingParent) {
nsXBLBinding* binding = doc->BindingManager()->GetBinding(bindingParent);
if (binding) {
// XXX sXBL/XBL2 issue
// If this is an anonymous XBL element use the binding
// document for the base URI.
// XXX Will fail with xml:base
baseURI = binding->PrototypeBinding()->DocURI();
}
}
nsICSSLoader* cssLoader = doc->CSSLoader();
nsCSSDeclaration* declaration = nsnull;