Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 05:26:58 -04:00 committed by Roy Tam
commit 1f233fa14b
65 changed files with 352 additions and 161 deletions

View file

@ -15,17 +15,19 @@ nsMappedAttributeElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
}
bool
nsMappedAttributeElement::SetMappedAttribute(nsIDocument* aDocument,
nsIAtom* aName,
nsAttrValue& aValue,
nsresult* aRetval)
nsMappedAttributeElement::SetAndSwapMappedAttribute(nsIDocument* aDocument,
nsIAtom* aName,
nsAttrValue& aValue,
bool* aValueWasSet,
nsresult* aRetval)
{
NS_PRECONDITION(aDocument == GetComposedDoc(), "Unexpected document");
nsHTMLStyleSheet* sheet = aDocument ?
aDocument->GetAttributeStyleSheet() : nullptr;
*aRetval = mAttrsAndChildren.SetAndTakeMappedAttr(aName, aValue,
this, sheet);
*aRetval = mAttrsAndChildren.SetAndSwapMappedAttr(aName, aValue,
this, sheet, aValueWasSet);
return true;
}