Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2630293003: Do not allocate SlotAssignment unless a shadowroot has a slot (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index d5ea539ee3527b4a3f90bb8e3b32abb76b499bdf..d78a75009fae620a8ef444605150842a712ead6e 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1290,10 +1290,8 @@ void Element::attributeChanged(const AttributeModificationParams& params) {
parentElementShadow->setNeedsDistributionRecalc();
}
if (name == HTMLNames::slotAttr && params.oldValue != params.newValue) {
- if (ShadowRoot* root = v1ShadowRootOfParent()) {
- root->ensureSlotAssignment().hostChildSlotNameChanged(params.oldValue,
- params.newValue);
- }
+ if (ShadowRoot* root = v1ShadowRootOfParent())
+ root->hostChildSlotNameChanged(params.oldValue, params.newValue);
}
parseAttribute(params);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698