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

Side by Side Diff: sky/engine/core/css/RuleSet.h

Issue 709203002: Remove more oilpan. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/css/MediaQueryList.h ('k') | sky/engine/core/css/StyleRule.h » ('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 * 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 unsigned m_containsAttributeSelector : 1; 70 unsigned m_containsAttributeSelector : 1;
71 }; 71 };
72 72
73 struct SameSizeAsRuleData { 73 struct SameSizeAsRuleData {
74 void* a; 74 void* a;
75 unsigned b; 75 unsigned b;
76 }; 76 };
77 77
78 COMPILE_ASSERT(sizeof(RuleData) == sizeof(SameSizeAsRuleData), RuleData_should_s tay_small); 78 COMPILE_ASSERT(sizeof(RuleData) == sizeof(SameSizeAsRuleData), RuleData_should_s tay_small);
79 79
80 class RuleSet : public DummyBase<RuleSet> { 80 class RuleSet {
81 WTF_MAKE_NONCOPYABLE(RuleSet); 81 WTF_MAKE_NONCOPYABLE(RuleSet);
82 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 82 WTF_MAKE_FAST_ALLOCATED;
83 public: 83 public:
84 static PassOwnPtr<RuleSet> create() { return adoptPtr(new RuleSet); } 84 static PassOwnPtr<RuleSet> create() { return adoptPtr(new RuleSet); }
85 85
86 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, AddR uleFlags = RuleHasNoSpecialState); 86 void addRulesFromSheet(StyleSheetContents*, const MediaQueryEvaluator&, AddR uleFlags = RuleHasNoSpecialState);
87 void addStyleRule(StyleRule*, AddRuleFlags); 87 void addStyleRule(StyleRule*, AddRuleFlags);
88 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags); 88 void addRule(StyleRule*, unsigned selectorIndex, AddRuleFlags);
89 89
90 const RuleFeatureSet& features() const { return m_features; } 90 const RuleFeatureSet& features() const { return m_features; }
91 91
92 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS SERT(!m_pendingRules); return m_idRules.get(key); } 92 const TerminatedArray<RuleData>* idRules(const AtomicString& key) const { AS SERT(!m_pendingRules); return m_idRules.get(key); }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void addToRuleSet(const AtomicString& key, PendingRuleMap&, const RuleData&) ; 125 void addToRuleSet(const AtomicString& key, PendingRuleMap&, const RuleData&) ;
126 void addFontFaceRule(StyleRuleFontFace*); 126 void addFontFaceRule(StyleRuleFontFace*);
127 void addKeyframesRule(StyleRuleKeyframes*); 127 void addKeyframesRule(StyleRuleKeyframes*);
128 128
129 void addChildRules(const Vector<RefPtr<StyleRuleBase> >&, const MediaQueryEv aluator& medium, AddRuleFlags); 129 void addChildRules(const Vector<RefPtr<StyleRuleBase> >&, const MediaQueryEv aluator& medium, AddRuleFlags);
130 bool findBestRuleSetAndAdd(const CSSSelector&, RuleData&); 130 bool findBestRuleSetAndAdd(const CSSSelector&, RuleData&);
131 131
132 void compactRules(); 132 void compactRules();
133 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&); 133 static void compactPendingRules(PendingRuleMap&, CompactRuleMap&);
134 134
135 class PendingRuleMaps : public DummyBase<PendingRuleMaps> { 135 class PendingRuleMaps {
136 public: 136 public:
137 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin gRuleMaps); } 137 static PassOwnPtr<PendingRuleMaps> create() { return adoptPtr(new Pendin gRuleMaps); }
138 138
139 PendingRuleMap idRules; 139 PendingRuleMap idRules;
140 PendingRuleMap classRules; 140 PendingRuleMap classRules;
141 PendingRuleMap tagRules; 141 PendingRuleMap tagRules;
142 PendingRuleMap shadowPseudoElementRules; 142 PendingRuleMap shadowPseudoElementRules;
143 143
144 void trace(Visitor*); 144 void trace(Visitor*);
145 145
(...skipping 25 matching lines...) Expand all
171 #ifndef NDEBUG 171 #ifndef NDEBUG
172 Vector<RuleData> m_allRules; 172 Vector<RuleData> m_allRules;
173 #endif 173 #endif
174 }; 174 };
175 175
176 } // namespace blink 176 } // namespace blink
177 177
178 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData); 178 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::RuleData);
179 179
180 #endif // RuleSet_h 180 #endif // RuleSet_h
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaQueryList.h ('k') | sky/engine/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698