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

Side by Side Diff: Source/core/dom/ContainerNode.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
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 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 // independent of the focused element changing. 995 // independent of the focused element changing.
996 void ContainerNode::focusStateChanged() 996 void ContainerNode::focusStateChanged()
997 { 997 {
998 // If we're just changing the window's active state and the focused node has no 998 // If we're just changing the window's active state and the focused node has no
999 // renderer we can just ignore the state change. 999 // renderer we can just ignore the state change.
1000 if (!renderer()) 1000 if (!renderer())
1001 return; 1001 return;
1002 1002
1003 if (styleChangeType() < SubtreeStyleChange) { 1003 if (styleChangeType() < SubtreeStyleChange) {
1004 if (renderStyle()->affectedByFocus() && renderStyle()->hasPseudoStyle(FI RST_LETTER)) 1004 if (renderStyle()->affectedByFocus() && renderStyle()->hasPseudoStyle(FI RST_LETTER))
1005 setNeedsStyleRecalc(SubtreeStyleChange); 1005 setNeedsStyleRecalc(StyleRecalcDueToFocusPseudoClass, SubtreeStyleCh ange);
1006 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedB yFocus()) 1006 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedB yFocus())
1007 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoFocus, *toElement(this)); 1007 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoFocus, *toElement(this));
1008 else if (renderStyle()->affectedByFocus()) 1008 else if (renderStyle()->affectedByFocus())
1009 setNeedsStyleRecalc(LocalStyleChange); 1009 setNeedsStyleRecalc(StyleRecalcDueToFocusPseudoClass, LocalStyleChan ge);
1010 } 1010 }
1011 1011
1012 if (renderer() && renderer()->style()->hasAppearance()) 1012 if (renderer() && renderer()->style()->hasAppearance())
1013 RenderTheme::theme().stateChanged(renderer(), FocusControlState); 1013 RenderTheme::theme().stateChanged(renderer(), FocusControlState);
1014 } 1014 }
1015 1015
1016 void ContainerNode::setFocus(bool received) 1016 void ContainerNode::setFocus(bool received)
1017 { 1017 {
1018 if (focused() == received) 1018 if (focused() == received)
1019 return; 1019 return;
1020 1020
1021 Node::setFocus(received); 1021 Node::setFocus(received);
1022 1022
1023 focusStateChanged(); 1023 focusStateChanged();
1024 1024
1025 if (renderer() || received) 1025 if (renderer() || received)
1026 return; 1026 return;
1027 1027
1028 // If :focus sets display: none, we lose focus but still need to recalc our style. 1028 // If :focus sets display: none, we lose focus but still need to recalc our style.
1029 if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByFocus() && styleChangeType() < SubtreeStyleChange) 1029 if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByFocus() && styleChangeType() < SubtreeStyleChange)
1030 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().scheduleS tyleInvalidationForPseudoChange(CSSSelector::PseudoFocus, *toElement(this)); 1030 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().scheduleS tyleInvalidationForPseudoChange(CSSSelector::PseudoFocus, *toElement(this));
1031 else 1031 else
1032 setNeedsStyleRecalc(LocalStyleChange); 1032 setNeedsStyleRecalc(StyleRecalcDueToFocusPseudoClass, LocalStyleChange);
1033 } 1033 }
1034 1034
1035 void ContainerNode::setActive(bool down) 1035 void ContainerNode::setActive(bool down)
1036 { 1036 {
1037 if (down == active()) 1037 if (down == active())
1038 return; 1038 return;
1039 1039
1040 Node::setActive(down); 1040 Node::setActive(down);
1041 1041
1042 // FIXME: Why does this not need to handle the display: none transition like :hover does? 1042 // FIXME: Why does this not need to handle the display: none transition like :hover does?
1043 if (renderer()) { 1043 if (renderer()) {
1044 if (styleChangeType() < SubtreeStyleChange) { 1044 if (styleChangeType() < SubtreeStyleChange) {
1045 if (renderStyle()->affectedByActive() && renderStyle()->hasPseudoSty le(FIRST_LETTER)) 1045 if (renderStyle()->affectedByActive() && renderStyle()->hasPseudoSty le(FIRST_LETTER))
1046 setNeedsStyleRecalc(SubtreeStyleChange); 1046 setNeedsStyleRecalc(StyleRecalcDueToActivePseudoClass, SubtreeSt yleChange);
pdr. 2014/09/06 22:36:27 We may want to call this StyleRecalcDueToActiveAnd
kouhei (in TOK) 2014/09/08 23:29:12 I think the existing names are correct here. We ge
1047 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffec tedByActive()) 1047 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffec tedByActive())
1048 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().s cheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoActive, *toElement(th is)); 1048 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().s cheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoActive, *toElement(th is));
1049 else if (renderStyle()->affectedByActive()) 1049 else if (renderStyle()->affectedByActive())
1050 setNeedsStyleRecalc(LocalStyleChange); 1050 setNeedsStyleRecalc(StyleRecalcDueToActivePseudoClass, LocalStyl eChange);
1051 } 1051 }
1052 1052
1053 if (renderStyle()->hasAppearance()) 1053 if (renderStyle()->hasAppearance())
1054 RenderTheme::theme().stateChanged(renderer(), PressedControlState); 1054 RenderTheme::theme().stateChanged(renderer(), PressedControlState);
1055 } 1055 }
1056 } 1056 }
1057 1057
1058 void ContainerNode::setHovered(bool over) 1058 void ContainerNode::setHovered(bool over)
1059 { 1059 {
1060 if (over == hovered()) 1060 if (over == hovered())
1061 return; 1061 return;
1062 1062
1063 Node::setHovered(over); 1063 Node::setHovered(over);
1064 1064
1065 // If :hover sets display: none we lose our hover but still need to recalc o ur style. 1065 // If :hover sets display: none we lose our hover but still need to recalc o ur style.
1066 if (!renderer()) { 1066 if (!renderer()) {
1067 if (over) 1067 if (over)
1068 return; 1068 return;
1069 if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByHove r() && styleChangeType() < SubtreeStyleChange) 1069 if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByHove r() && styleChangeType() < SubtreeStyleChange)
1070 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoHover, *toElement(this)); 1070 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoHover, *toElement(this));
1071 else 1071 else
1072 setNeedsStyleRecalc(LocalStyleChange); 1072 setNeedsStyleRecalc(StyleRecalcDueToHoverPseudoClass, LocalStyleChan ge);
1073 return; 1073 return;
1074 } 1074 }
1075 1075
1076 if (styleChangeType() < SubtreeStyleChange) { 1076 if (styleChangeType() < SubtreeStyleChange) {
1077 if (renderStyle()->affectedByHover() && renderStyle()->hasPseudoStyle(FI RST_LETTER)) 1077 if (renderStyle()->affectedByHover() && renderStyle()->hasPseudoStyle(FI RST_LETTER))
1078 setNeedsStyleRecalc(SubtreeStyleChange); 1078 setNeedsStyleRecalc(StyleRecalcDueToHoverPseudoClass, SubtreeStyleCh ange);
1079 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedB yHover()) 1079 else if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedB yHover())
1080 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoHover, *toElement(this)); 1080 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched uleStyleInvalidationForPseudoChange(CSSSelector::PseudoHover, *toElement(this));
1081 else if (renderStyle()->affectedByHover()) 1081 else if (renderStyle()->affectedByHover())
1082 setNeedsStyleRecalc(LocalStyleChange); 1082 setNeedsStyleRecalc(StyleRecalcDueToHoverPseudoClass, LocalStyleChan ge);
1083 } 1083 }
1084 1084
1085 if (renderer()->style()->hasAppearance()) 1085 if (renderer()->style()->hasAppearance())
1086 RenderTheme::theme().stateChanged(renderer(), HoverControlState); 1086 RenderTheme::theme().stateChanged(renderer(), HoverControlState);
1087 } 1087 }
1088 1088
1089 PassRefPtrWillBeRawPtr<HTMLCollection> ContainerNode::children() 1089 PassRefPtrWillBeRawPtr<HTMLCollection> ContainerNode::children()
1090 { 1090 {
1091 return ensureCachedCollection<HTMLCollection>(NodeChildren); 1091 return ensureCachedCollection<HTMLCollection>(NodeChildren);
1092 } 1092 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 return; 1214 return;
1215 1215
1216 unsigned forceCheckOfNextElementCount = 0; 1216 unsigned forceCheckOfNextElementCount = 0;
1217 bool forceCheckOfAnyElementSibling = false; 1217 bool forceCheckOfAnyElementSibling = false;
1218 Document& document = this->document(); 1218 Document& document = this->document();
1219 1219
1220 for (Element* child = ElementTraversal::firstChild(*this); child; child = El ementTraversal::nextSibling(*child)) { 1220 for (Element* child = ElementTraversal::firstChild(*this); child; child = El ementTraversal::nextSibling(*child)) {
1221 bool childRulesChanged = child->needsStyleRecalc() && child->styleChange Type() >= SubtreeStyleChange; 1221 bool childRulesChanged = child->needsStyleRecalc() && child->styleChange Type() >= SubtreeStyleChange;
1222 1222
1223 if (forceCheckOfNextElementCount || forceCheckOfAnyElementSibling) 1223 if (forceCheckOfNextElementCount || forceCheckOfAnyElementSibling)
1224 child->setNeedsStyleRecalc(SubtreeStyleChange); 1224 child->setNeedsStyleRecalc(StyleRecalcDueToSiblingSelector, SubtreeS tyleChange);
1225 1225
1226 if (childRulesChanged && hasDirectAdjacentRules) 1226 if (childRulesChanged && hasDirectAdjacentRules)
1227 forceCheckOfNextElementCount = document.styleEngine()->maxDirectAdja centSelectors(); 1227 forceCheckOfNextElementCount = document.styleEngine()->maxDirectAdja centSelectors();
1228 else if (forceCheckOfNextElementCount) 1228 else if (forceCheckOfNextElementCount)
1229 --forceCheckOfNextElementCount; 1229 --forceCheckOfNextElementCount;
1230 1230
1231 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (childR ulesChanged && hasIndirectAdjacentRules); 1231 forceCheckOfAnyElementSibling = forceCheckOfAnyElementSibling || (childR ulesChanged && hasIndirectAdjacentRules);
1232 } 1232 }
1233 } 1233 }
1234 1234
1235 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod e* nodeBeforeChange, Node* nodeAfterChange) 1235 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod e* nodeBeforeChange, Node* nodeAfterChange)
1236 { 1236 {
1237 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || style ChangeType() >= SubtreeStyleChange) 1237 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || style ChangeType() >= SubtreeStyleChange)
1238 return; 1238 return;
1239 1239
1240 if (needsStyleRecalc() && childrenAffectedByPositionalRules()) 1240 if (needsStyleRecalc() && childrenAffectedByPositionalRules())
1241 return; 1241 return;
1242 1242
1243 // Forward positional selectors include nth-child, nth-of-type, first-of-typ e and only-of-type. 1243 // Forward positional selectors include nth-child, nth-of-type, first-of-typ e and only-of-type.
1244 // The indirect adjacent selector is the ~ selector. 1244 // The indirect adjacent selector is the ~ selector.
1245 // Backward positional selectors include nth-last-child, nth-last-of-type, l ast-of-type and only-of-type. 1245 // Backward positional selectors include nth-last-child, nth-last-of-type, l ast-of-type and only-of-type.
1246 // We have to invalidate everything following the insertion point in the for ward and indirect adjacent case, 1246 // We have to invalidate everything following the insertion point in the for ward and indirect adjacent case,
1247 // and everything before the insertion point in the backward case. 1247 // and everything before the insertion point in the backward case.
1248 // |afterChange| is 0 in the parser callback case, so we won't do any work f or the forward case if we don't have to. 1248 // |afterChange| is 0 in the parser callback case, so we won't do any work f or the forward case if we don't have to.
1249 // For performance reasons we just mark the parent node as changed, since we don't want to make childrenChanged O(n^2) by crawling all our kids 1249 // For performance reasons we just mark the parent node as changed, since we don't want to make childrenChanged O(n^2) by crawling all our kids
1250 // here. recalcStyle will then force a walk of the children when it sees tha t this has happened. 1250 // here. recalcStyle will then force a walk of the children when it sees tha t this has happened.
1251 if (((childrenAffectedByForwardPositionalRules() || childrenAffectedByIndire ctAdjacentRules()) && nodeAfterChange) 1251 if (((childrenAffectedByForwardPositionalRules() || childrenAffectedByIndire ctAdjacentRules()) && nodeAfterChange)
1252 || (childrenAffectedByBackwardPositionalRules() && nodeBeforeChange)) { 1252 || (childrenAffectedByBackwardPositionalRules() && nodeBeforeChange)) {
1253 setNeedsStyleRecalc(SubtreeStyleChange); 1253 setNeedsStyleRecalc(StyleRecalcDueToSiblingSelector, SubtreeStyleChange) ;
1254 return; 1254 return;
1255 } 1255 }
1256 1256
1257 // :first-child. In the parser callback case, we don't have to check anythin g, since we were right the first time. 1257 // :first-child. In the parser callback case, we don't have to check anythin g, since we were right the first time.
1258 // In the DOM case, we only need to do something if |afterChange| is not 0. 1258 // In the DOM case, we only need to do something if |afterChange| is not 0.
1259 // |afterChange| is 0 in the parser case, so it works out that we'll skip th is block. 1259 // |afterChange| is 0 in the parser case, so it works out that we'll skip th is block.
1260 if (childrenAffectedByFirstChildRules() && nodeAfterChange) { 1260 if (childrenAffectedByFirstChildRules() && nodeAfterChange) {
1261 ASSERT(changeType != FinishedParsingChildren); 1261 ASSERT(changeType != FinishedParsingChildren);
1262 // Find our new first child element. 1262 // Find our new first child element.
1263 Element* firstChildElement = ElementTraversal::firstChild(*this); 1263 Element* firstChildElement = ElementTraversal::firstChild(*this);
1264 RenderStyle* firstChildElementStyle = firstChildElement ? firstChildElem ent->renderStyle() : 0; 1264 RenderStyle* firstChildElementStyle = firstChildElement ? firstChildElem ent->renderStyle() : 0;
1265 1265
1266 // Find the first element after the change. 1266 // Find the first element after the change.
1267 Element* elementAfterChange = nodeAfterChange->isElementNode() ? toEleme nt(nodeAfterChange) : ElementTraversal::nextSibling(*nodeAfterChange); 1267 Element* elementAfterChange = nodeAfterChange->isElementNode() ? toEleme nt(nodeAfterChange) : ElementTraversal::nextSibling(*nodeAfterChange);
1268 RenderStyle* elementAfterChangeStyle = elementAfterChange ? elementAfter Change->renderStyle() : 0; 1268 RenderStyle* elementAfterChangeStyle = elementAfterChange ? elementAfter Change->renderStyle() : 0;
1269 1269
1270 // This is the element insertion as first child element case. 1270 // This is the element insertion as first child element case.
1271 if (firstChildElement != elementAfterChange && elementAfterChangeStyle & & elementAfterChangeStyle->firstChildState()) { 1271 if (firstChildElement != elementAfterChange && elementAfterChangeStyle & & elementAfterChangeStyle->firstChildState()) {
1272 ASSERT(changeType == SiblingElementInserted); 1272 ASSERT(changeType == SiblingElementInserted);
1273 elementAfterChange->setNeedsStyleRecalc(SubtreeStyleChange); 1273 elementAfterChange->setNeedsStyleRecalc(StyleRecalcDueToSiblingSelec tor, SubtreeStyleChange);
1274 } 1274 }
1275 1275
1276 // This is the first child element removal case. 1276 // This is the first child element removal case.
1277 if (changeType == SiblingElementRemoved && firstChildElement == elementA fterChange && firstChildElement && (!firstChildElementStyle || !firstChildElemen tStyle->firstChildState())) 1277 if (changeType == SiblingElementRemoved && firstChildElement == elementA fterChange && firstChildElement && (!firstChildElementStyle || !firstChildElemen tStyle->firstChildState()))
1278 firstChildElement->setNeedsStyleRecalc(SubtreeStyleChange); 1278 firstChildElement->setNeedsStyleRecalc(StyleRecalcDueToSiblingSelect or, SubtreeStyleChange);
1279 } 1279 }
1280 1280
1281 // :last-child. In the parser callback case, we don't have to check anything , since we were right the first time. 1281 // :last-child. In the parser callback case, we don't have to check anything , since we were right the first time.
1282 // In the DOM case, we only need to do something if |afterChange| is not 0. 1282 // In the DOM case, we only need to do something if |afterChange| is not 0.
1283 if (childrenAffectedByLastChildRules() && nodeBeforeChange) { 1283 if (childrenAffectedByLastChildRules() && nodeBeforeChange) {
1284 // Find our new last child element. 1284 // Find our new last child element.
1285 Element* lastChildElement = ElementTraversal::lastChild(*this); 1285 Element* lastChildElement = ElementTraversal::lastChild(*this);
1286 RenderStyle* lastChildElementStyle = lastChildElement ? lastChildElement ->renderStyle() : 0; 1286 RenderStyle* lastChildElementStyle = lastChildElement ? lastChildElement ->renderStyle() : 0;
1287 1287
1288 // Find the last element before the change. 1288 // Find the last element before the change.
1289 Element* elementBeforeChange = nodeBeforeChange->isElementNode() ? toEle ment(nodeBeforeChange) : ElementTraversal::previousSibling(*nodeBeforeChange); 1289 Element* elementBeforeChange = nodeBeforeChange->isElementNode() ? toEle ment(nodeBeforeChange) : ElementTraversal::previousSibling(*nodeBeforeChange);
1290 RenderStyle* elementBeforeChangeStyle = elementBeforeChange ? elementBef oreChange->renderStyle() : 0; 1290 RenderStyle* elementBeforeChangeStyle = elementBeforeChange ? elementBef oreChange->renderStyle() : 0;
1291 1291
1292 // This is the element insertion as last child element case. 1292 // This is the element insertion as last child element case.
1293 if (lastChildElement != elementBeforeChange && elementBeforeChangeStyle && elementBeforeChangeStyle->lastChildState()) { 1293 if (lastChildElement != elementBeforeChange && elementBeforeChangeStyle && elementBeforeChangeStyle->lastChildState()) {
1294 ASSERT(SiblingElementInserted); 1294 ASSERT(SiblingElementInserted);
1295 elementBeforeChange->setNeedsStyleRecalc(SubtreeStyleChange); 1295 elementBeforeChange->setNeedsStyleRecalc(StyleRecalcDueToSiblingSele ctor, SubtreeStyleChange);
1296 } 1296 }
1297 1297
1298 // This is the last child element removal case. The parser callback case is similar to node removal as well in that we need to change the last child 1298 // This is the last child element removal case. The parser callback case is similar to node removal as well in that we need to change the last child
1299 // to match now. 1299 // to match now.
1300 if ((changeType == SiblingElementRemoved || changeType == FinishedParsin gChildren) && lastChildElement == elementBeforeChange && lastChildElement && (!l astChildElementStyle || !lastChildElementStyle->lastChildState())) 1300 if ((changeType == SiblingElementRemoved || changeType == FinishedParsin gChildren) && lastChildElement == elementBeforeChange && lastChildElement && (!l astChildElementStyle || !lastChildElementStyle->lastChildState()))
1301 lastChildElement->setNeedsStyleRecalc(SubtreeStyleChange); 1301 lastChildElement->setNeedsStyleRecalc(StyleRecalcDueToSiblingSelecto r, SubtreeStyleChange);
1302 } 1302 }
1303 1303
1304 // The + selector. We need to invalidate the first element following the cha nge. It is the only possible element 1304 // The + selector. We need to invalidate the first element following the cha nge. It is the only possible element
1305 // that could be affected by this DOM change. 1305 // that could be affected by this DOM change.
1306 if (childrenAffectedByDirectAdjacentRules() && nodeAfterChange) { 1306 if (childrenAffectedByDirectAdjacentRules() && nodeAfterChange) {
1307 if (Element* elementAfterChange = nodeAfterChange->isElementNode() ? toE lement(nodeAfterChange) : ElementTraversal::nextSibling(*nodeAfterChange)) 1307 if (Element* elementAfterChange = nodeAfterChange->isElementNode() ? toE lement(nodeAfterChange) : ElementTraversal::nextSibling(*nodeAfterChange))
1308 elementAfterChange->setNeedsStyleRecalc(SubtreeStyleChange); 1308 elementAfterChange->setNeedsStyleRecalc(StyleRecalcDueToSiblingSelec tor, SubtreeStyleChange);
1309 } 1309 }
1310 } 1310 }
1311 1311
1312 void ContainerNode::invalidateNodeListCachesInAncestors(const QualifiedName* att rName, Element* attributeOwnerElement) 1312 void ContainerNode::invalidateNodeListCachesInAncestors(const QualifiedName* att rName, Element* attributeOwnerElement)
1313 { 1313 {
1314 if (hasRareData() && (!attrName || isAttributeNode())) { 1314 if (hasRareData() && (!attrName || isAttributeNode())) {
1315 if (NodeListsNodeData* lists = rareData()->nodeLists()) { 1315 if (NodeListsNodeData* lists = rareData()->nodeLists()) {
1316 if (ChildNodeList* childNodeList = lists->childNodeList(*this)) 1316 if (ChildNodeList* childNodeList = lists->childNodeList(*this))
1317 childNodeList->invalidateCache(); 1317 childNodeList->invalidateCache();
1318 } 1318 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 return true; 1410 return true;
1411 1411
1412 if (node->isElementNode() && toElement(node)->shadow()) 1412 if (node->isElementNode() && toElement(node)->shadow())
1413 return true; 1413 return true;
1414 1414
1415 return false; 1415 return false;
1416 } 1416 }
1417 #endif 1417 #endif
1418 1418
1419 } // namespace blink 1419 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698