Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| index 8884bdda02babbf08b12cce11402e8f9fc123491..1f44cd5c50a5d364c85fe3455c0473e5367d7858 100644 |
| --- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp |
| @@ -807,7 +807,11 @@ void TokenPreloadScanner::scanCommon(const Token& token, |
| StartTagScanner scanner(tagImpl, m_mediaValues); |
| scanner.processAttributes(token.attributes()); |
| - if (m_inPicture) |
| + // TODO(yoav): ViewportWidth is currently racy and might be zero in some |
| + // cases, at least in tests. |
|
Charlie Harrison
2016/10/10 19:23:12
nit: Fix comment reflow by removing line breaks.
|
| + // That problem will go away once ParseHTMLOnMainThread lands and |
| + // MediaValuesCached is eliminated. |
| + if (m_inPicture && m_mediaValues->viewportWidth()) |
| scanner.handlePictureSourceURL(m_pictureData); |
| std::unique_ptr<PreloadRequest> request = scanner.createPreloadRequest( |
| m_predictedBaseElementURL, source, m_clientHintsPreferences, |