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

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

Issue 548693002: Share recalcChildStyle between Element and ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back parent scope for ShadowRoot. 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.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 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 r ights 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void setChildrenAffectedByForwardPositionalRules() { setRestyleFlag(Children AffectedByForwardPositionalRules); } 141 void setChildrenAffectedByForwardPositionalRules() { setRestyleFlag(Children AffectedByForwardPositionalRules); }
142 142
143 bool childrenAffectedByBackwardPositionalRules() const { return hasRestyleFl ag(ChildrenAffectedByBackwardPositionalRules); } 143 bool childrenAffectedByBackwardPositionalRules() const { return hasRestyleFl ag(ChildrenAffectedByBackwardPositionalRules); }
144 void setChildrenAffectedByBackwardPositionalRules() { setRestyleFlag(Childre nAffectedByBackwardPositionalRules); } 144 void setChildrenAffectedByBackwardPositionalRules() { setRestyleFlag(Childre nAffectedByBackwardPositionalRules); }
145 145
146 // FIXME: These methods should all be renamed to something better than "chec k", 146 // FIXME: These methods should all be renamed to something better than "chec k",
147 // since it's not clear that they alter the style bits of siblings and child ren. 147 // since it's not clear that they alter the style bits of siblings and child ren.
148 void checkForChildrenAdjacentRuleChanges(); 148 void checkForChildrenAdjacentRuleChanges();
149 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib lingElementRemoved }; 149 enum SiblingCheckType { FinishedParsingChildren, SiblingElementInserted, Sib lingElementRemoved };
150 void checkForSiblingStyleChanges(SiblingCheckType, Node* nodeBeforeChange, N ode* nodeAfterChange); 150 void checkForSiblingStyleChanges(SiblingCheckType, Node* nodeBeforeChange, N ode* nodeAfterChange);
151 void recalcChildStyle(StyleRecalcChange);
151 152
152 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } 153 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); }
153 154
154 // ------------------------------------------------------------------------- ---- 155 // ------------------------------------------------------------------------- ----
155 // Notification of document structure changes (see core/dom/Node.h for more notification methods) 156 // Notification of document structure changes (see core/dom/Node.h for more notification methods)
156 157
157 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove d, NonElementRemoved, AllChildrenRemoved, TextChanged }; 158 enum ChildrenChangeType { ElementInserted, NonElementInserted, ElementRemove d, NonElementRemoved, AllChildrenRemoved, TextChanged };
158 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar ser }; 159 enum ChildrenChangeSource { ChildrenChangeSourceAPI, ChildrenChangeSourcePar ser };
159 struct ChildrenChange { 160 struct ChildrenChange {
160 STACK_ALLOCATED(); 161 STACK_ALLOCATED();
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) 342 inline void getChildNodes(ContainerNode& node, NodeVector& nodes)
342 { 343 {
343 ASSERT(!nodes.size()); 344 ASSERT(!nodes.size());
344 for (Node* child = node.firstChild(); child; child = child->nextSibling()) 345 for (Node* child = node.firstChild(); child; child = child->nextSibling())
345 nodes.append(child); 346 nodes.append(child);
346 } 347 }
347 348
348 } // namespace blink 349 } // namespace blink
349 350
350 #endif // ContainerNode_h 351 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698