mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #21 - Change MappedAttrParser to store its nsIPrincipal instead of nsSVGElement
This reverts part 2 of Bug 968923 since this was only modified to accommodate use counters.
This commit is contained in:
parent
8ca9db6b65
commit
e5962d9f4c
1 changed files with 7 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
@ -1348,7 +1346,7 @@ nsSVGElement::UpdateAnimatedContentStyleRule()
|
|||
}
|
||||
|
||||
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
|
||||
GetBaseURI(), this);
|
||||
GetBaseURI(), NodePrincipal());
|
||||
doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)->
|
||||
Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue