| 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:
|
|
|