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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParserImpl.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
index 13d99b03f8a4ae5796bd928193bed069250137ea..cfa2673f4f0f7823365c8d6d97a5692b3ac77c46 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
@@ -41,7 +41,9 @@ class CSSParserImpl {
WTF_MAKE_NONCOPYABLE(CSSParserImpl);
public:
- CSSParserImpl(const CSSParserContext&, StyleSheetContents* = nullptr);
+ CSSParserImpl(const CSSParserContext&,
+ StyleSheetContents* = nullptr,
+ bool deferPropertyParsing = false);
enum AllowedRulesType {
// As per css-syntax, css-cascade and css-namespaces, @charset rules
@@ -80,7 +82,8 @@ class CSSParserImpl {
AllowedRulesType);
static void parseStyleSheet(const String&,
const CSSParserContext&,
- StyleSheetContents*);
+ StyleSheetContents*,
+ bool deferPropertyParsing = false);
static CSSSelectorList parsePageSelector(CSSParserTokenRange,
StyleSheetContents*);
@@ -147,6 +150,18 @@ class CSSParserImpl {
static std::unique_ptr<Vector<double>> consumeKeyframeKeyList(
CSSParserTokenRange);
+ static std::unique_ptr<DeferredPropertiesClosure>
+ createDeferredPropertiesClosure(CSSParserTokenRange,
+ const CSSParserContext&,
+ UseCounter*);
+
+ static StylePropertySet* parseDeclarationListForLazyStyle(
+ CSSParserTokenRange,
+ const CSSParserContext*,
+ UseCounter*);
+
+ static bool shouldLazilyParseProperties(const CSSSelectorList& selectors);
+
// FIXME: Can we build StylePropertySets directly?
// FIXME: Investigate using a smaller inline buffer
HeapVector<CSSProperty, 256> m_parsedProperties;
@@ -156,6 +171,8 @@ class CSSParserImpl {
// For the inspector
CSSParserObserverWrapper* m_observerWrapper;
+
+ bool m_deferPropertyParsing;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParser.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698