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

Unified Diff: Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 1148653012: Fix a double download issue on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.h ('k') | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp
index c23d9483c2ddb4a2e8522eb8880b8bb0696c86fb..ce827eea14930617ef8a4b290dead20664eee27b 100644
--- a/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -436,6 +436,8 @@ void TokenPreloadScanner::scan(const CompactHTMLToken& token, const SegmentedStr
static void handleMetaViewport(const String& attributeValue, CachedDocumentParameters* documentParameters)
{
+ if (!documentParameters->viewportMetaEnabled)
+ return;
ViewportDescription description(ViewportDescription::ViewportMeta);
HTMLMetaElement::getViewportDescriptionFromContentAttribute(attributeValue, description, nullptr, documentParameters->viewportMetaZeroValuesQuirk);
FloatSize initialViewport(documentParameters->mediaValues->viewportHeight(), documentParameters->mediaValues->viewportWidth());
@@ -601,6 +603,7 @@ CachedDocumentParameters::CachedDocumentParameters(Document* document, PassRefPt
ASSERT(mediaValues->isSafeToSendToAnotherThread());
defaultViewportMinWidth = document->viewportDefaultMinWidth();
viewportMetaZeroValuesQuirk = document->settings() && document->settings()->viewportMetaZeroValuesQuirk();
+ viewportMetaEnabled = document->settings() && document->settings()->viewportMetaEnabled();
}
}
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.h ('k') | Source/core/html/parser/HTMLPreloadScannerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698