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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2630293003: Do not allocate SlotAssignment unless a shadowroot has a slot (Closed)
Patch Set: renamed 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 DISABLE_CFI_PERF 1283 DISABLE_CFI_PERF
1284 void Element::attributeChanged(const AttributeModificationParams& params) { 1284 void Element::attributeChanged(const AttributeModificationParams& params) {
1285 const QualifiedName& name = params.name; 1285 const QualifiedName& name = params.name;
1286 if (ElementShadow* parentElementShadow = 1286 if (ElementShadow* parentElementShadow =
1287 shadowWhereNodeCanBeDistributedForV0(*this)) { 1287 shadowWhereNodeCanBeDistributedForV0(*this)) {
1288 if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow, 1288 if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow,
1289 name, params.newValue)) 1289 name, params.newValue))
1290 parentElementShadow->setNeedsDistributionRecalc(); 1290 parentElementShadow->setNeedsDistributionRecalc();
1291 } 1291 }
1292 if (name == HTMLNames::slotAttr && params.oldValue != params.newValue) { 1292 if (name == HTMLNames::slotAttr && params.oldValue != params.newValue) {
1293 if (ShadowRoot* root = v1ShadowRootOfParent()) { 1293 if (ShadowRoot* root = v1ShadowRootOfParent())
1294 root->ensureSlotAssignment().hostChildSlotNameChanged(params.oldValue, 1294 root->didChangeHostChildSlotName(params.oldValue, params.newValue);
1295 params.newValue);
1296 }
1297 } 1295 }
1298 1296
1299 parseAttribute(params); 1297 parseAttribute(params);
1300 1298
1301 document().incDOMTreeVersion(); 1299 document().incDOMTreeVersion();
1302 1300
1303 if (name == HTMLNames::idAttr) { 1301 if (name == HTMLNames::idAttr) {
1304 AtomicString oldId = elementData()->idForStyleResolution(); 1302 AtomicString oldId = elementData()->idForStyleResolution();
1305 AtomicString newId = 1303 AtomicString newId =
1306 makeIdForStyleResolution(params.newValue, document().inQuirksMode()); 1304 makeIdForStyleResolution(params.newValue, document().inQuirksMode());
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after
4130 } 4128 }
4131 4129
4132 DEFINE_TRACE_WRAPPERS(Element) { 4130 DEFINE_TRACE_WRAPPERS(Element) {
4133 if (hasRareData()) { 4131 if (hasRareData()) {
4134 visitor->traceWrappers(elementRareData()); 4132 visitor->traceWrappers(elementRareData());
4135 } 4133 }
4136 ContainerNode::traceWrappers(visitor); 4134 ContainerNode::traceWrappers(visitor);
4137 } 4135 }
4138 4136
4139 } // namespace blink 4137 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698