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

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

Issue 1738613002: Rename enums/functions that collide in chromium style in core/dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-3
Patch Set: get-names-4: Created 4 years, 10 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ASSERT(needsAttach()); 97 ASSERT(needsAttach());
98 #if !ENABLE(OILPAN) 98 #if !ENABLE(OILPAN)
99 willBeDeletedFromDocument(); 99 willBeDeletedFromDocument();
100 removeDetachedChildren(); 100 removeDetachedChildren();
101 #endif 101 #endif
102 } 102 }
103 103
104 bool ContainerNode::isChildTypeAllowed(const Node& child) const 104 bool ContainerNode::isChildTypeAllowed(const Node& child) const
105 { 105 {
106 if (!child.isDocumentFragment()) 106 if (!child.isDocumentFragment())
107 return childTypeAllowed(child.nodeType()); 107 return childTypeAllowed(child.getNodeType());
108 108
109 for (Node* node = toDocumentFragment(child).firstChild(); node; node = node- >nextSibling()) { 109 for (Node* node = toDocumentFragment(child).firstChild(); node; node = node- >nextSibling()) {
110 if (!childTypeAllowed(node->nodeType())) 110 if (!childTypeAllowed(node->getNodeType()))
111 return false; 111 return false;
112 } 112 }
113 return true; 113 return true;
114 } 114 }
115 115
116 bool ContainerNode::containsConsideringHostElements(const Node& newChild) const 116 bool ContainerNode::containsConsideringHostElements(const Node& newChild) const
117 { 117 {
118 if (isInShadowTree() || document().isTemplateDocument()) 118 if (isInShadowTree() || document().isTemplateDocument())
119 return newChild.containsIncludingHostElements(*this); 119 return newChild.containsIncludingHostElements(*this);
120 return newChild.contains(this); 120 return newChild.contains(this);
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 else if (element->supportsStyleSharing()) 1334 else if (element->supportsStyleSharing())
1335 styleResolver.addToStyleSharingList(*element); 1335 styleResolver.addToStyleSharingList(*element);
1336 if (element->layoutObject()) 1336 if (element->layoutObject())
1337 lastTextNode = nullptr; 1337 lastTextNode = nullptr;
1338 } 1338 }
1339 } 1339 }
1340 } 1340 }
1341 1341
1342 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod e* nodeBeforeChange, Node* nodeAfterChange) 1342 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Nod e* nodeBeforeChange, Node* nodeAfterChange)
1343 { 1343 {
1344 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || style ChangeType() >= SubtreeStyleChange) 1344 if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || getSt yleChangeType() >= SubtreeStyleChange)
1345 return; 1345 return;
1346 1346
1347 // Forward positional selectors include nth-child, nth-of-type, first-of-typ e and only-of-type. 1347 // Forward positional selectors include nth-child, nth-of-type, first-of-typ e and only-of-type.
1348 // The indirect adjacent selector is the ~ selector. 1348 // The indirect adjacent selector is the ~ selector.
1349 // Backward positional selectors include nth-last-child, nth-last-of-type, l ast-of-type and only-of-type. 1349 // Backward positional selectors include nth-last-child, nth-last-of-type, l ast-of-type and only-of-type.
1350 // We have to invalidate everything following the insertion point in the for ward and indirect adjacent case, 1350 // We have to invalidate everything following the insertion point in the for ward and indirect adjacent case,
1351 // and everything before the insertion point in the backward case. 1351 // and everything before the insertion point in the backward case.
1352 // |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. 1352 // |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.
1353 // 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 1353 // 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
1354 // here. recalcStyle will then force a walk of the children when it sees tha t this has happened. 1354 // here. recalcStyle will then force a walk of the children when it sees tha t this has happened.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 return true; 1508 return true;
1509 1509
1510 if (node->isElementNode() && toElement(node)->shadow()) 1510 if (node->isElementNode() && toElement(node)->shadow())
1511 return true; 1511 return true;
1512 1512
1513 return false; 1513 return false;
1514 } 1514 }
1515 #endif 1515 #endif
1516 1516
1517 } // namespace blink 1517 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698