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

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

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/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 6d642af4888d5b79bc5cac7c863150036f994e5a..b49e51c69c871df852e2c316dde0a8bd0b2b701c 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -86,7 +86,11 @@ StyleSheetContents::StyleSheetContents(const StyleSheetContents& o)
m_hasMediaQueries(o.m_hasMediaQueries),
m_hasSingleOwnerDocument(true),
m_isUsedFromTextCache(false),
- m_parserContext(o.m_parserContext) {
+ m_parserContext(o.m_parserContext),
+ m_escapedStrings(o.m_escapedStrings
+ ? new Vector<String>(*o.m_escapedStrings)
+ : nullptr),
+ m_sheetText(o.m_sheetText) {
// FIXME: Copy import rules.
ASSERT(o.m_importRules.isEmpty());
@@ -340,6 +344,8 @@ void StyleSheetContents::parseAuthorStyleSheet(
? CSSStyleSheetResource::MIMETypeCheck::Lax
: CSSStyleSheetResource::MIMETypeCheck::Strict;
String sheetText = cachedStyleSheet->sheetText(mimeTypeCheck);
+ if (true || RuntimeEnabledFeatures::lazyParseCSSEnabled())
+ m_sheetText = sheetText;
const ResourceResponse& response = cachedStyleSheet->response();
m_sourceMapURL = response.httpHeaderField(HTTPNames::SourceMap);
@@ -349,7 +355,8 @@ void StyleSheetContents::parseAuthorStyleSheet(
}
CSSParserContext context(parserContext(), UseCounter::getFrom(this));
- CSSParser::parseSheet(context, this, sheetText);
+ CSSParser::parseSheet(context, this, sheetText,
+ true || RuntimeEnabledFeatures::lazyParseCSSEnabled());
}
void StyleSheetContents::parseString(const String& sheetText) {
@@ -476,7 +483,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/StyleSheetContents.h ('k') | third_party/WebKit/Source/core/css/parser/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698