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

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

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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, 2009, 2010, 2011, 2013 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All
6 * rights reserved.
6 * 7 *
7 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
11 * 12 *
12 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details. 16 * Library General Public License for more details.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 217
217 bool affectedByLastChildRules() const { 218 bool affectedByLastChildRules() const {
218 return hasRestyleFlag(AffectedByLastChildRules); 219 return hasRestyleFlag(AffectedByLastChildRules);
219 } 220 }
220 void setAffectedByLastChildRules() { 221 void setAffectedByLastChildRules() {
221 setRestyleFlag(AffectedByLastChildRules); 222 setRestyleFlag(AffectedByLastChildRules);
222 } 223 }
223 224
224 bool needsAdjacentStyleRecalc() const; 225 bool needsAdjacentStyleRecalc() const;
225 226
226 // FIXME: These methods should all be renamed to something better than "check" , 227 // FIXME: These methods should all be renamed to something better than
227 // since it's not clear that they alter the style bits of siblings and childre n. 228 // "check", since it's not clear that they alter the style bits of siblings
229 // and children.
228 enum SiblingCheckType { 230 enum SiblingCheckType {
229 FinishedParsingChildren, 231 FinishedParsingChildren,
230 SiblingElementInserted, 232 SiblingElementInserted,
231 SiblingElementRemoved 233 SiblingElementRemoved
232 }; 234 };
233 void checkForSiblingStyleChanges(SiblingCheckType, 235 void checkForSiblingStyleChanges(SiblingCheckType,
234 Element* changedElement, 236 Element* changedElement,
235 Node* nodeBeforeChange, 237 Node* nodeBeforeChange,
236 Node* nodeAfterChange); 238 Node* nodeAfterChange);
237 void recalcDescendantStyles(StyleRecalcChange); 239 void recalcDescendantStyles(StyleRecalcChange);
238 240
239 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } 241 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); }
240 242
241 // --------------------------------------------------------------------------- -- 243 // --------------------------------------------------------------------------- --
242 // Notification of document structure changes (see core/dom/Node.h for more no tification methods) 244 // Notification of document structure changes (see core/dom/Node.h for more
245 // notification methods)
243 246
244 enum ChildrenChangeType { 247 enum ChildrenChangeType {
245 ElementInserted, 248 ElementInserted,
246 NonElementInserted, 249 NonElementInserted,
247 ElementRemoved, 250 ElementRemoved,
248 NonElementRemoved, 251 NonElementRemoved,
249 AllChildrenRemoved, 252 AllChildrenRemoved,
250 TextChanged 253 TextChanged
251 }; 254 };
252 enum ChildrenChangeSource { 255 enum ChildrenChangeSource {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 return type == ElementInserted || type == ElementRemoved; 288 return type == ElementInserted || type == ElementRemoved;
286 } 289 }
287 290
288 ChildrenChangeType type; 291 ChildrenChangeType type;
289 Member<Node> siblingChanged; 292 Member<Node> siblingChanged;
290 Member<Node> siblingBeforeChange; 293 Member<Node> siblingBeforeChange;
291 Member<Node> siblingAfterChange; 294 Member<Node> siblingAfterChange;
292 ChildrenChangeSource byParser; 295 ChildrenChangeSource byParser;
293 }; 296 };
294 297
295 // Notifies the node that it's list of children have changed (either by adding or removing child nodes), or a child 298 // Notifies the node that it's list of children have changed (either by adding
296 // node that is of the type CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE has changed its value. 299 // or removing child nodes), or a child node that is of the type
300 // CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE has changed its value.
297 virtual void childrenChanged(const ChildrenChange&); 301 virtual void childrenChanged(const ChildrenChange&);
298 302
299 DECLARE_VIRTUAL_TRACE(); 303 DECLARE_VIRTUAL_TRACE();
300 304
301 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 305 DECLARE_VIRTUAL_TRACE_WRAPPERS();
302 306
303 protected: 307 protected:
304 ContainerNode(TreeScope*, ConstructionType = CreateContainer); 308 ContainerNode(TreeScope*, ConstructionType = CreateContainer);
305 309
306 void invalidateNodeListCachesInAncestors( 310 void invalidateNodeListCachesInAncestors(
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 450
447 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) { 451 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) {
448 DCHECK(!nodes.size()); 452 DCHECK(!nodes.size());
449 for (Node* child = node.firstChild(); child; child = child->nextSibling()) 453 for (Node* child = node.firstChild(); child; child = child->nextSibling())
450 nodes.append(child); 454 nodes.append(child);
451 } 455 }
452 456
453 } // namespace blink 457 } // namespace blink
454 458
455 #endif // ContainerNode_h 459 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/CompositorProxy.cpp ('k') | third_party/WebKit/Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698