mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +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,
|
MappedAttrParser(css::Loader* aLoader,
|
||||||
nsIURI* aDocURI,
|
nsIURI* aDocURI,
|
||||||
already_AddRefed<nsIURI> aBaseURI,
|
already_AddRefed<nsIURI> aBaseURI,
|
||||||
nsSVGElement* aElement);
|
nsIPrincipal* aNodePrincipal);
|
||||||
~MappedAttrParser();
|
~MappedAttrParser();
|
||||||
|
|
||||||
// Parses a mapped attribute value.
|
// Parses a mapped attribute value.
|
||||||
|
|
@ -1170,20 +1170,18 @@ private:
|
||||||
// Arguments for nsCSSParser::ParseProperty
|
// Arguments for nsCSSParser::ParseProperty
|
||||||
nsIURI* mDocURI;
|
nsIURI* mDocURI;
|
||||||
nsCOMPtr<nsIURI> mBaseURI;
|
nsCOMPtr<nsIURI> mBaseURI;
|
||||||
|
nsIPrincipal* mNodePrincipal;
|
||||||
|
|
||||||
// Declaration for storing parsed values (lazily initialized)
|
// Declaration for storing parsed values (lazily initialized)
|
||||||
css::Declaration* mDecl;
|
css::Declaration* mDecl;
|
||||||
|
|
||||||
// For reporting use counters
|
|
||||||
nsSVGElement* mElement;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MappedAttrParser::MappedAttrParser(css::Loader* aLoader,
|
MappedAttrParser::MappedAttrParser(css::Loader* aLoader,
|
||||||
nsIURI* aDocURI,
|
nsIURI* aDocURI,
|
||||||
already_AddRefed<nsIURI> aBaseURI,
|
already_AddRefed<nsIURI> aBaseURI,
|
||||||
nsSVGElement* aElement)
|
nsIPrincipal* aNodePrincipal)
|
||||||
: mParser(aLoader), mDocURI(aDocURI), mBaseURI(aBaseURI),
|
: 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) {
|
if (propertyID != eCSSProperty_UNKNOWN) {
|
||||||
bool changed; // outparam for ParseProperty. (ignored)
|
bool changed; // outparam for ParseProperty. (ignored)
|
||||||
mParser.ParseProperty(propertyID, aMappedAttrValue, mDocURI, mBaseURI,
|
mParser.ParseProperty(propertyID, aMappedAttrValue, mDocURI, mBaseURI,
|
||||||
mElement->NodePrincipal(), mDecl, &changed, false, true);
|
mNodePrincipal, mDecl, &changed, false, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(aMappedAttrName == nsGkAtoms::lang,
|
MOZ_ASSERT(aMappedAttrName == nsGkAtoms::lang,
|
||||||
|
|
@ -1257,7 +1255,7 @@ nsSVGElement::UpdateContentStyleRule()
|
||||||
|
|
||||||
nsIDocument* doc = OwnerDoc();
|
nsIDocument* doc = OwnerDoc();
|
||||||
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
|
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
|
||||||
GetBaseURI(), this);
|
GetBaseURI(), NodePrincipal());
|
||||||
|
|
||||||
for (uint32_t i = 0; i < attrCount; ++i) {
|
for (uint32_t i = 0; i < attrCount; ++i) {
|
||||||
const nsAttrName* attrName = mAttrsAndChildren.AttrNameAt(i);
|
const nsAttrName* attrName = mAttrsAndChildren.AttrNameAt(i);
|
||||||
|
|
@ -1348,7 +1346,7 @@ nsSVGElement::UpdateAnimatedContentStyleRule()
|
||||||
}
|
}
|
||||||
|
|
||||||
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
|
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
|
||||||
GetBaseURI(), this);
|
GetBaseURI(), NodePrincipal());
|
||||||
doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)->
|
doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)->
|
||||||
Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser);
|
Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue