summaryrefslogtreecommitdiffstats
path: root/dom/base/nsStyledElement.cpp
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/base/nsStyledElement.cpp
parent9f6cb6874e537fd4f451e507b1832b94b04d9d97 (diff)
downloadUXP-f07f8aecb8a03d33d0b90d685d85960a29543c75.tar
UXP-f07f8aecb8a03d33d0b90d685d85960a29543c75.tar.gz
UXP-f07f8aecb8a03d33d0b90d685d85960a29543c75.tar.lz
UXP-f07f8aecb8a03d33d0b90d685d85960a29543c75.tar.xz
UXP-f07f8aecb8a03d33d0b90d685d85960a29543c75.zip
Bug 1352389 -Don't push extra script blocker on stack when setting attributes
Tag #1375
Diffstat (limited to 'dom/base/nsStyledElement.cpp')
-rw-r--r--dom/base/nsStyledElement.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/base/nsStyledElement.cpp b/dom/base/nsStyledElement.cpp
index 03d1187ab..cdfa56461 100644
--- a/dom/base/nsStyledElement.cpp
+++ b/dom/base/nsStyledElement.cpp
@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsStyledElement.h"
+#include "mozAutoDocUpdate.h"
#include "nsGkAtoms.h"
#include "nsAttrValue.h"
#include "nsAttrValueInlines.h"
@@ -88,9 +89,12 @@ nsStyledElement::SetInlineStyleDeclaration(DeclarationBlock* aDeclaration,
static_cast<uint8_t>(nsIDOMMutationEvent::MODIFICATION) :
static_cast<uint8_t>(nsIDOMMutationEvent::ADDITION);
+ nsIDocument* document = GetComposedDoc();
+ mozAutoDocUpdate updateBatch(document, UPDATE_CONTENT_MODEL, aNotify);
return SetAttrAndNotify(kNameSpaceID_None, nsGkAtoms::style, nullptr,
oldValue, attrValue, modType, hasListeners,
- aNotify, kDontCallAfterSetAttr);
+ aNotify, kDontCallAfterSetAttr, document,
+ updateBatch);
}
DeclarationBlock*