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

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

Issue 2289333003: CSS Lazy Parsing perf jobs (Closed)
Patch Set: CL for src perf tryjob to run blink_style.top_25 benchmark on all-android platform(s) Created 4 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
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 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/CoreExport.h" 25 #include "core/CoreExport.h"
26 #include "core/css/RuleSet.h" 26 #include "core/css/RuleSet.h"
27 #include "platform/heap/Handle.h" 27 #include "platform/heap/Handle.h"
28 #include "platform/weborigin/KURL.h" 28 #include "platform/weborigin/KURL.h"
29 #include "wtf/HashMap.h" 29 #include "wtf/HashMap.h"
30 #include "wtf/Vector.h" 30 #include "wtf/Vector.h"
31 #include "wtf/text/AtomicStringHash.h" 31 #include "wtf/text/AtomicStringHash.h"
32 #include "wtf/text/StringHash.h" 32 #include "wtf/text/StringHash.h"
33 #include "wtf/text/TextPosition.h" 33 #include "wtf/text/TextPosition.h"
34 #include "core/css/parser/CSSTokenizer.h"
34 35
35 namespace blink { 36 namespace blink {
36 37
37 class CSSStyleSheet; 38 class CSSStyleSheet;
38 class CSSStyleSheetResource; 39 class CSSStyleSheetResource;
39 class Document; 40 class Document;
40 class Node; 41 class Node;
41 class SecurityOrigin; 42 class SecurityOrigin;
42 class StyleRuleBase; 43 class StyleRuleBase;
43 class StyleRuleFontFace; 44 class StyleRuleFontFace;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 166
166 RuleSet& ruleSet() { 167 RuleSet& ruleSet() {
167 ASSERT(m_ruleSet); 168 ASSERT(m_ruleSet);
168 return *m_ruleSet.get(); 169 return *m_ruleSet.get();
169 } 170 }
170 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags); 171 RuleSet& ensureRuleSet(const MediaQueryEvaluator&, AddRuleFlags);
171 void clearRuleSet(); 172 void clearRuleSet();
172 173
173 String sourceMapURL() const { return m_sourceMapURL; } 174 String sourceMapURL() const { return m_sourceMapURL; }
174 175
176 void takeEscapedStrings(std::unique_ptr<Vector<String>> strings) {
177 m_escapedStrings.reset(strings.release());
178 }
179
180 CSSTokenizer::Scope m_scope;
181
175 DECLARE_TRACE(); 182 DECLARE_TRACE();
176 183
177 private: 184 private:
178 StyleSheetContents(StyleRuleImport* ownerRule, 185 StyleSheetContents(StyleRuleImport* ownerRule,
179 const String& originalURL, 186 const String& originalURL,
180 const CSSParserContext&); 187 const CSSParserContext&);
181 StyleSheetContents(const StyleSheetContents&); 188 StyleSheetContents(const StyleSheetContents&);
182 StyleSheetContents() = delete; 189 StyleSheetContents() = delete;
183 StyleSheetContents& operator=(const StyleSheetContents&) = delete; 190 StyleSheetContents& operator=(const StyleSheetContents&) = delete;
184 void notifyRemoveFontFaceRule(const StyleRuleFontFace*); 191 void notifyRemoveFontFaceRule(const StyleRuleFontFace*);
(...skipping 20 matching lines...) Expand all
205 bool m_hasSingleOwnerDocument : 1; 212 bool m_hasSingleOwnerDocument : 1;
206 bool m_isUsedFromTextCache : 1; 213 bool m_isUsedFromTextCache : 1;
207 214
208 CSSParserContext m_parserContext; 215 CSSParserContext m_parserContext;
209 216
210 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients; 217 HeapHashSet<WeakMember<CSSStyleSheet>> m_loadingClients;
211 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients; 218 HeapHashSet<WeakMember<CSSStyleSheet>> m_completedClients;
212 219
213 Member<RuleSet> m_ruleSet; 220 Member<RuleSet> m_ruleSet;
214 String m_sourceMapURL; 221 String m_sourceMapURL;
222
223 // Used for retaining references to escaped strings for lazy parsing. For
224 // non-lazy parsing these are only retained in the CSSTokenizer::Scope.
225 std::unique_ptr<Vector<String>> m_escapedStrings;
226
227 // Only initialized if using lazy parsing. Also referenced on the css
228 // resource.
229 String m_sheetText;
215 }; 230 };
216 231
217 } // namespace blink 232 } // namespace blink
218 233
219 #endif 234 #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