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

Side by Side Diff: Source/core/dom/shadow/ElementShadow.h

Issue 77863002: Update styleRecalc so that it traverses shadow insertion points in 2 pass algorithms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make styleRecalc traverse shadow trees in 2 pass algorithm Created 7 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void detach(const Node::AttachContext&); 60 void detach(const Node::AttachContext&);
61 61
62 void removeAllEventListeners(); 62 void removeAllEventListeners();
63 63
64 void didAffectSelector(AffectedSelectorMask); 64 void didAffectSelector(AffectedSelectorMask);
65 void willAffectSelector(); 65 void willAffectSelector();
66 const SelectRuleFeatureSet& ensureSelectFeatureSet(); 66 const SelectRuleFeatureSet& ensureSelectFeatureSet();
67 67
68 void distributeIfNeeded(); 68 void distributeIfNeeded();
69 void setNeedsDistributionRecalc(); 69 void setNeedsDistributionRecalc();
70 bool needsDistributionRecalc() const { return m_needsDistributionRecalc; }
70 71
71 const InsertionPoint* finalDestinationInsertionPointFor(const Node*) const; 72 const InsertionPoint* finalDestinationInsertionPointFor(const Node*) const;
72 const DestinationInsertionPoints* destinationInsertionPointsFor(const Node*) const; 73 const DestinationInsertionPoints* destinationInsertionPointsFor(const Node*) const;
73 74
74 void didDistributeNode(const Node*, InsertionPoint*); 75 void didDistributeNode(const Node*, InsertionPoint*);
75 76
76 private: 77 private:
77 ElementShadow(); 78 ElementShadow();
78 79
79 void removeAllShadowRoots(); 80 void removeAllShadowRoots();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return toElement(this)->youngestShadowRoot(); 112 return toElement(this)->youngestShadowRoot();
112 } 113 }
113 114
114 inline ShadowRoot* Element::youngestShadowRoot() const 115 inline ShadowRoot* Element::youngestShadowRoot() const
115 { 116 {
116 if (ElementShadow* shadow = this->shadow()) 117 if (ElementShadow* shadow = this->shadow())
117 return shadow->youngestShadowRoot(); 118 return shadow->youngestShadowRoot();
118 return 0; 119 return 0;
119 } 120 }
120 121
122 inline ShadowRoot* Element::oldestShadowRoot() const
123 {
124 if (ElementShadow* shadow = this->shadow())
125 return shadow->oldestShadowRoot();
126 return 0;
127 }
128
121 inline ElementShadow* ElementShadow::containingShadow() const 129 inline ElementShadow* ElementShadow::containingShadow() const
122 { 130 {
123 if (ShadowRoot* parentRoot = host()->containingShadowRoot()) 131 if (ShadowRoot* parentRoot = host()->containingShadowRoot())
124 return parentRoot->owner(); 132 return parentRoot->owner();
125 return 0; 133 return 0;
126 } 134 }
127 135
128 inline void ElementShadow::distributeIfNeeded() 136 inline void ElementShadow::distributeIfNeeded()
129 { 137 {
130 if (m_needsDistributionRecalc) 138 if (m_needsDistributionRecalc)
131 distribute(); 139 distribute();
132 m_needsDistributionRecalc = false; 140 m_needsDistributionRecalc = false;
133 } 141 }
134 142
135 } // namespace 143 } // namespace
136 144
137 #endif 145 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698