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

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

Issue 2282303002: [test] lazily parse css style rules
Patch Set: use string pool 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool hasMediaQueries() const { return m_hasMediaQueries; } 152 bool hasMediaQueries() const { return m_hasMediaQueries; }
153 153
154 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; } 154 bool didLoadErrorOccur() const { return m_didLoadErrorOccur; }
155 155
156 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); } 156 RuleSet& ruleSet() { ASSERT(m_ruleSet); return *m_ruleSet.get(); }
157 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); 157 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags);
158 void clearRuleSet(); 158 void clearRuleSet();
159 159
160 String sourceMapURL() const { return m_sourceMapURL; } 160 String sourceMapURL() const { return m_sourceMapURL; }
161 161
162 void populateStringPool(const Vector<String> strings)
163 {
164 for (const auto& s : strings) {
165 m_stringPool.append(s);
166 }
167 }
168
162 DECLARE_TRACE(); 169 DECLARE_TRACE();
163 170
164 private: 171 private:
165 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co nst CSSParserContext&); 172 StyleSheetContents(StyleRuleImport* ownerRule, const String& originalURL, co nst CSSParserContext&);
166 StyleSheetContents(const StyleSheetContents&); 173 StyleSheetContents(const StyleSheetContents&);
167 StyleSheetContents() = delete; 174 StyleSheetContents() = delete;
168 StyleSheetContents& operator=(const StyleSheetContents&) = delete; 175 StyleSheetContents& operator=(const StyleSheetContents&) = delete;
169 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); 176 void notifyRemoveFontFaceRule(const StyleRuleFontFace*);
170 177
171 Document* clientSingleOwnerDocument() const; 178 Document* clientSingleOwnerDocument() const;
(...skipping 18 matching lines...) Expand all
190 bool m_hasSingleOwnerDocument : 1; 197 bool m_hasSingleOwnerDocument : 1;
191 bool m_isUsedFromTextCache : 1; 198 bool m_isUsedFromTextCache : 1;
192 199
193 CSSParserContext m_parserContext; 200 CSSParserContext m_parserContext;
194 201
195 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients; 202 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients;
196 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients; 203 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients;
197 204
198 Member<RuleSet> m_ruleSet; 205 Member<RuleSet> m_ruleSet;
199 String m_sourceMapURL; 206 String m_sourceMapURL;
207 Vector<String> m_stringPool;
200 }; 208 };
201 209
202 } // namespace blink 210 } // namespace blink
203 211
204 #endif 212 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRule.cpp ('k') | third_party/WebKit/Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698