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

Side by Side Diff: Source/core/css/RuleFeature.h

Issue 286903024: Skip child ShadowRoots when invalidation does not have boundary crossing rules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move checks per review Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl assName); 142 DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& cl assName);
143 DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString & attributeName); 143 DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString & attributeName);
144 DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attri buteName); 144 DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attri buteName);
145 DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoTy pe); 145 DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoTy pe);
146 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&); 146 DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&);
147 147
148 InvalidationSetMode updateInvalidationSets(const CSSSelector&); 148 InvalidationSetMode updateInvalidationSets(const CSSSelector&);
149 149
150 struct InvalidationSetFeatures { 150 struct InvalidationSetFeatures {
151 InvalidationSetFeatures() : customPseudoElement(false) { } 151 InvalidationSetFeatures()
152 : customPseudoElement(false)
153 , treeBoundaryCrossing(false)
154 , wholeSubtree(false)
155 { }
152 Vector<AtomicString> classes; 156 Vector<AtomicString> classes;
153 Vector<AtomicString> attributes; 157 Vector<AtomicString> attributes;
154 AtomicString id; 158 AtomicString id;
155 AtomicString tagName; 159 AtomicString tagName;
156 bool customPseudoElement; 160 bool customPseudoElement;
161 bool treeBoundaryCrossing;
162 bool wholeSubtree;
157 }; 163 };
158 164
159 static void extractInvalidationSetFeature(const CSSSelector&, InvalidationSe tFeatures&); 165 static void extractInvalidationSetFeature(const CSSSelector&, InvalidationSe tFeatures&);
160 const CSSSelector* extractInvalidationSetFeatures(const CSSSelector&, Invali dationSetFeatures&); 166 const CSSSelector* extractInvalidationSetFeatures(const CSSSelector&, Invali dationSetFeatures&);
161 void addFeaturesToInvalidationSets(const CSSSelector&, const InvalidationSet Features&, bool wholeSubtree); 167 void addFeaturesToInvalidationSets(const CSSSelector&, InvalidationSetFeatur es&);
162 168
163 void addClassToInvalidationSet(const AtomicString& className, Element&); 169 void addClassToInvalidationSet(const AtomicString& className, Element&);
164 170
165 FeatureMetadata m_metadata; 171 FeatureMetadata m_metadata;
166 InvalidationSetMap m_classInvalidationSets; 172 InvalidationSetMap m_classInvalidationSets;
167 InvalidationSetMap m_attributeInvalidationSets; 173 InvalidationSetMap m_attributeInvalidationSets;
168 InvalidationSetMap m_idInvalidationSets; 174 InvalidationSetMap m_idInvalidationSets;
169 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets; 175 PseudoTypeInvalidationSetMap m_pseudoInvalidationSets;
170 bool m_targetedStyleRecalcEnabled; 176 bool m_targetedStyleRecalcEnabled;
171 StyleInvalidator m_styleInvalidator; 177 StyleInvalidator m_styleInvalidator;
172 }; 178 };
173 179
174 180
175 } // namespace WebCore 181 } // namespace WebCore
176 182
177 namespace WTF { 183 namespace WTF {
178 184
179 template <> struct VectorTraits<WebCore::RuleFeature> : VectorTraitsBase<WebCore ::RuleFeature> { 185 template <> struct VectorTraits<WebCore::RuleFeature> : VectorTraitsBase<WebCore ::RuleFeature> {
180 static const bool needsDestruction = false; 186 static const bool needsDestruction = false;
181 static const bool canInitializeWithMemset = true; 187 static const bool canInitializeWithMemset = true;
182 static const bool canMoveWithMemcpy = true; 188 static const bool canMoveWithMemcpy = true;
183 }; 189 };
184 190
185 } // namespace WTF 191 } // namespace WTF
186 192
187 #endif // RuleFeature_h 193 #endif // RuleFeature_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698