summaryrefslogtreecommitdiff
path: root/dom/svg
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 05:05:28 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 05:05:28 -0400
commitf07f8aecb8a03d33d0b90d685d85960a29543c75 (patch)
tree27046a4abd20e458e1cdb80ff1651729c8c6f781 /dom/svg
parent9f6cb6874e537fd4f451e507b1832b94b04d9d97 (diff)
downloaduxp-f07f8aecb8a03d33d0b90d685d85960a29543c75.tar.gz
Bug 1352389 -Don't push extra script blocker on stack when setting attributes
Tag #1375
Diffstat (limited to 'dom/svg')
-rw-r--r--dom/svg/nsSVGElement.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp
index 9099caaaa0..df646fe7d7 100644
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -18,6 +18,7 @@
#include "nsIDOMMutationEvent.h"
#include "nsSVGPathGeometryElement.h"
#include "mozilla/InternalMutationEvent.h"
+#include "mozAutoDocUpdate.h"
#include "nsError.h"
#include "nsIPresShell.h"
#include "nsGkAtoms.h"
@@ -1509,9 +1510,13 @@ nsSVGElement::DidChangeValue(nsIAtom* aName,
uint8_t modType = HasAttr(kNameSpaceID_None, aName)
? static_cast<uint8_t>(nsIDOMMutationEvent::MODIFICATION)
: static_cast<uint8_t>(nsIDOMMutationEvent::ADDITION);
+
+ nsIDocument* document = GetComposedDoc();
+ mozAutoDocUpdate updateBatch(document, UPDATE_CONTENT_MODEL,
+ kNotifyDocumentObservers);
SetAttrAndNotify(kNameSpaceID_None, aName, nullptr, aEmptyOrOldValue,
aNewValue, modType, hasListeners, kNotifyDocumentObservers,
- kCallAfterSetAttr);
+ kCallAfterSetAttr, document, updateBatch);
}
void