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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParser.h

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: plug leaks 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/parser/CSSParser.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParser.h b/third_party/WebKit/Source/core/css/parser/CSSParser.h
index e15b17a482abaa4c6c969540c070b723bfbdbb84..f64bfb50c54ab26ca4eeef3889edcb02d6546e24 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParser.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParser.h
@@ -8,8 +8,10 @@
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
#include "core/css/CSSValue.h"
+#include "core/css/StylePropertySet.h"
#include "core/css/parser/CSSParserMode.h"
#include "platform/graphics/Color.h"
+#include "wtf/Functional.h"
#include <memory>
namespace blink {
@@ -29,9 +31,11 @@ class StyleSheetContents;
class CORE_EXPORT CSSParser {
STATIC_ONLY(CSSParser);
public:
+ typedef Function<StylePropertySet*(), WTF::SameThreadAffinity> DeferredPropertiesClosure;
+
// As well as regular rules, allows @import and @namespace but not @charset
static StyleRuleBase* parseRule(const CSSParserContext&, StyleSheetContents*, const String&);
- static void parseSheet(const CSSParserContext&, StyleSheetContents*, const String&);
+ static void parseSheet(const CSSParserContext&, StyleSheetContents*, const String&, bool deferPropertyParsing = false);
static CSSSelectorList parseSelector(const CSSParserContext&, StyleSheetContents*, const String&);
static CSSSelectorList parsePageSelector(const CSSParserContext&, StyleSheetContents*, const String&);
static bool parseDeclarationList(const CSSParserContext&, MutableStylePropertySet*, const String&);

Powered by Google App Engine
This is Rietveld 408576698