summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dom/svg/nsSVGElement.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp
index 97578b81c7..39998c1541 100644
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -1150,7 +1150,7 @@ public:
MappedAttrParser(css::Loader* aLoader,
nsIURI* aDocURI,
already_AddRefed<nsIURI> aBaseURI,
- nsSVGElement* aElement);
+ nsIPrincipal* aNodePrincipal);
~MappedAttrParser();
// Parses a mapped attribute value.
@@ -1170,20 +1170,18 @@ private:
// Arguments for nsCSSParser::ParseProperty
nsIURI* mDocURI;
nsCOMPtr<nsIURI> mBaseURI;
+ nsIPrincipal* mNodePrincipal;
// Declaration for storing parsed values (lazily initialized)
css::Declaration* mDecl;
-
- // For reporting use counters
- nsSVGElement* mElement;
};
MappedAttrParser::MappedAttrParser(css::Loader* aLoader,
nsIURI* aDocURI,
already_AddRefed<nsIURI> aBaseURI,
- nsSVGElement* aElement)
+ nsIPrincipal* aNodePrincipal)
: mParser(aLoader), mDocURI(aDocURI), mBaseURI(aBaseURI),
- mDecl(nullptr), mElement(aElement)
+ mNodePrincipal(aNodePrincipal), mDecl(nullptr)
{
}
@@ -1210,7 +1208,7 @@ MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName,
if (propertyID != eCSSProperty_UNKNOWN) {
bool changed; // outparam for ParseProperty. (ignored)
mParser.ParseProperty(propertyID, aMappedAttrValue, mDocURI, mBaseURI,
- mElement->NodePrincipal(), mDecl, &changed, false, true);
+ mNodePrincipal, mDecl, &changed, false, true);
return;
}
MOZ_ASSERT(aMappedAttrName == nsGkAtoms::lang,
@@ -1257,7 +1255,7 @@ nsSVGElement::UpdateContentStyleRule()
nsIDocument* doc = OwnerDoc();
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
- GetBaseURI(), this);
+ GetBaseURI(), NodePrincipal());
for (uint32_t i = 0; i < attrCount; ++i) {
const nsAttrName* attrName = mAttrsAndChildren.AttrNameAt(i);
@@ -1330,7 +1328,7 @@ nsSVGElement::UpdateAnimatedContentStyleRule()
}
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
- GetBaseURI(), this);
+ GetBaseURI(), NodePrincipal());
doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)->
Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser);