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

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

Issue 2303443003: CSS: Additional asserts for style invalidation (Closed)
Patch Set: Created 4 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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 bool isAlive() const { return m_isAlive; } 117 bool isAlive() const { return m_isAlive; }
118 118
119 protected: 119 protected:
120 InvalidationSet* invalidationSetForSelector(const CSSSelector&, Invalidation Type); 120 InvalidationSet* invalidationSetForSelector(const CSSSelector&, Invalidation Type);
121 121
122 private: 122 private:
123 // Each map entry is either a DescendantInvalidationSet or SiblingInvalidati onSet. 123 // Each map entry is either a DescendantInvalidationSet or SiblingInvalidati onSet.
124 // When both are needed, we store the SiblingInvalidationSet, and use it to hold the DescendantInvalidationSet. 124 // When both are needed, we store the SiblingInvalidationSet, and use it to hold the DescendantInvalidationSet.
125 using InvalidationSetMap = HashMap<AtomicString, RefPtr<InvalidationSet>>; 125 using InvalidationSetMap = HashMap<AtomicString, RefPtr<InvalidationSet>>;
126 using PseudoTypeInvalidationSetMap = HashMap<CSSSelector::PseudoType, RefPtr <InvalidationSet>, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits<un signed>>; 126 using PseudoTypeInvalidationSetMap = HashMap<int, RefPtr<InvalidationSet>>; // key values are CSSSelector::PseudoType
esprehn 2016/09/01 05:30:22 Does this need changing in this patch?
Eric Willigers 2016/09/01 14:56:31 No, we can focus on non-zero keys in this patch.
127 127
128 struct FeatureMetadata { 128 struct FeatureMetadata {
129 DISALLOW_NEW(); 129 DISALLOW_NEW();
130 void add(const FeatureMetadata& other); 130 void add(const FeatureMetadata& other);
131 void clear(); 131 void clear();
132 132
133 bool usesFirstLineRules = false; 133 bool usesFirstLineRules = false;
134 bool usesWindowInactiveSelector = false; 134 bool usesWindowInactiveSelector = false;
135 bool foundSiblingSelector = false; 135 bool foundSiblingSelector = false;
136 bool foundInsertionPointCrossing = false; 136 bool foundInsertionPointCrossing = false;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 // If true, the RuleFeatureSet is alive and can be used. 192 // If true, the RuleFeatureSet is alive and can be used.
193 unsigned m_isAlive : 1; 193 unsigned m_isAlive : 1;
194 194
195 friend class RuleFeatureSetTest; 195 friend class RuleFeatureSetTest;
196 }; 196 };
197 197
198 } // namespace blink 198 } // namespace blink
199 199
200 #endif // RuleFeature_h 200 #endif // RuleFeature_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698