Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
| index 80f5c230a6944b5491b1c1372e8246f6ea88a9bc..eb7792f2c7c69f605775427e9224eb63bfa1596d 100644 |
| --- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp |
| @@ -778,6 +778,9 @@ void HTMLDocumentParser::startBackgroundParser() |
| ASSERT(document()); |
| m_haveBackgroundParser = true; |
| + // Make sure that a resolver is set up, so that the correct viewport dimensions will be fed to the background parser and preload scanner. |
| + document()->ensureStyleResolver(); |
| + |
| RefPtr<WeakReference<BackgroundHTMLParser>> reference = WeakReference<BackgroundHTMLParser>::createUnbound(); |
| m_backgroundParser = WeakPtr<BackgroundHTMLParser>(reference); |
| @@ -792,6 +795,7 @@ void HTMLDocumentParser::startBackgroundParser() |
| config->parser = m_weakFactory.createWeakPtr(); |
| config->xssAuditor = adoptPtr(new XSSAuditor); |
| config->xssAuditor->init(document(), &m_xssAuditorDelegate); |
| + |
|
bokan
2015/10/22 16:56:46
Nit: Remove extra space?
|
| config->preloadScanner = adoptPtr(new TokenPreloadScanner(document()->url().copy(), CachedDocumentParameters::create(document()))); |
| config->decoder = takeDecoder(); |
| if (document()->settings()) { |