mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr
Tag #1375
This commit is contained in:
parent
658bd351a0
commit
1f233fa14b
65 changed files with 352 additions and 161 deletions
|
|
@ -85,15 +85,16 @@ NS_IMPL_ISUPPORTS(nsMappedAttributes,
|
|||
nsIStyleRule)
|
||||
|
||||
void
|
||||
nsMappedAttributes::SetAndTakeAttr(nsIAtom* aAttrName, nsAttrValue& aValue)
|
||||
nsMappedAttributes::SetAndSwapAttr(nsIAtom* aAttrName, nsAttrValue& aValue,
|
||||
bool* aValueWasSet)
|
||||
{
|
||||
NS_PRECONDITION(aAttrName, "null name");
|
||||
|
||||
*aValueWasSet = false;
|
||||
uint32_t i;
|
||||
for (i = 0; i < mAttrCount && !Attrs()[i].mName.IsSmaller(aAttrName); ++i) {
|
||||
if (Attrs()[i].mName.Equals(aAttrName)) {
|
||||
Attrs()[i].mValue.Reset();
|
||||
Attrs()[i].mValue.SwapValueWith(aValue);
|
||||
*aValueWasSet = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue