Chromium Code Reviews| 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..8efbdbb15a1dffc0b069af4b59212a5d10146a10 100644 |
| --- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| +++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| @@ -90,6 +90,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(); |
| } |
| @@ -349,7 +351,8 @@ void StyleSheetContents::parseAuthorStyleSheet( |
| } |
| CSSParserContext context(parserContext(), UseCounter::getFrom(this)); |
| - CSSParser::parseSheet(context, this, sheetText); |
| + CSSParser::parseSheet(context, this, sheetText, |
| + RuntimeEnabledFeatures::lazyParseCSSEnabled()); |
|
esprehn
2016/10/24 21:20:20
Can we check this flag from inside parseSheet inst
Charlie Harrison
2016/10/25 15:56:55
It's a bit tricky and involves tradeoffs. Passing
|
| } |
| void StyleSheetContents::parseString(const String& sheetText) { |
| @@ -476,7 +479,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: |