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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1785953002: Ignore viewport meta tags when Request Desktop Site is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable HandheldFriendlyMeta and MobileOptimizedMeta as well Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin ) 3156 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin )
3157 { 3157 {
3158 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin; 3158 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin;
3159 } 3159 }
3160 3160
3161 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion) 3161 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion)
3162 { 3162 {
3163 if (viewportDescription == m_viewportDescription) 3163 if (viewportDescription == m_viewportDescription)
3164 return; 3164 return;
3165 3165
3166 if (settings() && !settings()->viewportMetaEnabled() && viewportDescription. isLegacyViewportType())
3167 return;
3168
3166 // The UA-defined min-width is used by the processing of legacy meta tags. 3169 // The UA-defined min-width is used by the processing of legacy meta tags.
3167 if (!viewportDescription.isSpecifiedByAuthor()) 3170 if (!viewportDescription.isSpecifiedByAuthor())
3168 m_viewportDefaultMinWidth = viewportDescription.minWidth; 3171 m_viewportDefaultMinWidth = viewportDescription.minWidth;
3169 3172
3170 if (viewportDescription.isLegacyViewportType()) { 3173 if (viewportDescription.isLegacyViewportType()) {
3171 m_legacyViewportDescription = viewportDescription; 3174 m_legacyViewportDescription = viewportDescription;
3172 3175
3173 // When no author style for @viewport is present, and a meta tag for def ining 3176 // When no author style for @viewport is present, and a meta tag for def ining
3174 // the viewport is, apply the meta tag viewport instead of the UA styles . 3177 // the viewport is, apply the meta tag viewport instead of the UA styles .
3175 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) 3178 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet)
(...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after
6034 #ifndef NDEBUG 6037 #ifndef NDEBUG
6035 using namespace blink; 6038 using namespace blink;
6036 void showLiveDocumentInstances() 6039 void showLiveDocumentInstances()
6037 { 6040 {
6038 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6041 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6039 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6042 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6040 for (Document* document : set) 6043 for (Document* document : set)
6041 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6044 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6042 } 6045 }
6043 #endif 6046 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698