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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 2315923002: Lazy Parse CSS (Closed)
Patch Set: esprehn review 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/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 6740a6bb11b80df48d1284216d91c6f00fef7b11..2198b0e64eedd96e86ce50a4e6e4fb4f73a4916e 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -92,6 +92,8 @@ StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
// FIXME: Copy import rules.
ASSERT(o.m_importRules.isEmpty());
+ // LazyParseCSS: Copying child rules is a strict point for lazy parsing, so
+ // there is no need to copy lazy parsing state here.
for (unsigned i = 0; i < m_childRules.size(); ++i)
m_childRules[i] = o.m_childRules[i]->copy();
}
@@ -351,7 +353,8 @@ void StyleSheetContents::parseAuthorStyleSheet(
}
CSSParserContext context(parserContext(), UseCounter::getFrom(this));
- CSSParser::parseSheet(context, this, sheetText);
+ CSSParser::parseSheet(context, this, sheetText,
+ RuntimeEnabledFeatures::lazyParseCSSEnabled());
}
void StyleSheetContents::parseString(const String& sheetText) {
@@ -478,7 +481,7 @@ static bool childRulesHaveFailedOrCanceledSubresources(
const StyleRuleBase* rule = rules[i].get();
switch (rule->type()) {
case StyleRuleBase::Style:
- if (toStyleRule(rule)->properties().hasFailedOrCanceledSubresources())
+ if (toStyleRule(rule)->propertiesHaveFailedOrCanceledSubresources())
return true;
break;
case StyleRuleBase::FontFace:
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRule.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698