diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:26:58 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:26:58 -0400 |
commit | 091d06b43b294390a96106e57a7462f6303107a3 (patch) | |
tree | 831e71266ad1a623bc0d0db5e423132cf672314e /dom/base/nsMappedAttributes.cpp | |
parent | 0f5dcf963a2479a61e370b6b6ffac41be1d5e120 (diff) | |
download | UXP-091d06b43b294390a96106e57a7462f6303107a3.tar UXP-091d06b43b294390a96106e57a7462f6303107a3.tar.gz UXP-091d06b43b294390a96106e57a7462f6303107a3.tar.lz UXP-091d06b43b294390a96106e57a7462f6303107a3.tar.xz UXP-091d06b43b294390a96106e57a7462f6303107a3.zip |
Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr
Tag #1375
Diffstat (limited to 'dom/base/nsMappedAttributes.cpp')
-rw-r--r-- | dom/base/nsMappedAttributes.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/base/nsMappedAttributes.cpp b/dom/base/nsMappedAttributes.cpp index 9e80c94df..05ad42310 100644 --- a/dom/base/nsMappedAttributes.cpp +++ b/dom/base/nsMappedAttributes.cpp @@ -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; } } |