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

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

Issue 29633003: Avoid style sharing with mis-matched descendant selectors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 inline bool hasSelectorForId(const AtomicString& idValue) const 73 inline bool hasSelectorForId(const AtomicString& idValue) const
74 { 74 {
75 ASSERT(!idValue.isEmpty()); 75 ASSERT(!idValue.isEmpty());
76 return idsInRules.contains(idValue); 76 return idsInRules.contains(idValue);
77 } 77 }
78 78
79 HashSet<AtomicString> idsInRules; 79 HashSet<AtomicString> idsInRules;
80 HashSet<AtomicString> classesInRules; 80 HashSet<AtomicString> classesInRules;
81 HashSet<AtomicString> attrsInRules; 81 HashSet<AtomicString> attrsInRules;
82 Vector<RuleFeature> siblingRules; 82 Vector<RuleFeature> siblingRules;
83 Vector<RuleFeature> descendantRules;
esprehn 2013/10/21 19:19:08 Most rules are descendant rules, this Vector is go
83 Vector<RuleFeature> uncommonAttributeRules; 84 Vector<RuleFeature> uncommonAttributeRules;
84 private: 85 private:
85 void collectFeaturesFromSelectorList(const CSSSelectorList*); 86 void collectFeaturesFromSelectorList(const CSSSelectorList*);
86 87
87 bool m_usesFirstLineRules; 88 bool m_usesFirstLineRules;
88 }; 89 };
89 90
90 } // namespace WebCore 91 } // namespace WebCore
91 92
92 #endif // RuleFeature_h 93 #endif // RuleFeature_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698