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

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

Issue 40423003: Experimental viewport meta tag support for desktop, Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again Created 7 years, 1 month 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
« no previous file with comments | « Source/core/css/viewportAndroid.css ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 } 2921 }
2922 2922
2923 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin ) 2923 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin )
2924 { 2924 {
2925 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin; 2925 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin;
2926 } 2926 }
2927 2927
2928 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion) 2928 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion)
2929 { 2929 {
2930 if (viewportDescription.isLegacyViewportType()) { 2930 if (viewportDescription.isLegacyViewportType()) {
2931 if (settings() && !settings()->viewportMetaEnabled())
2932 return;
2933
2931 m_legacyViewportDescription = viewportDescription; 2934 m_legacyViewportDescription = viewportDescription;
2932 2935
2933 // When no author style for @viewport is present, and a meta tag for def ining 2936 // When no author style for @viewport is present, and a meta tag for def ining
2934 // the viewport is, apply the meta tag viewport instead of the UA styles . 2937 // the viewport is, apply the meta tag viewport instead of the UA styles .
2935 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) 2938 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet)
2936 return; 2939 return;
2937 m_viewportDescription = viewportDescription; 2940 m_viewportDescription = viewportDescription;
2938 } else { 2941 } else {
2939 // If the legacy viewport tag has higher priority than the cascaded @vie wport 2942 // If the legacy viewport tag has higher priority than the cascaded @vie wport
2940 // descriptors, use the values from the legacy tag. 2943 // descriptors, use the values from the legacy tag.
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after
5222 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) 5225 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode)
5223 { 5226 {
5224 if (!isActive()) 5227 if (!isActive())
5225 return; 5228 return;
5226 5229
5227 styleEngine()->modifiedStyleSheet(sheet); 5230 styleEngine()->modifiedStyleSheet(sheet);
5228 styleResolverChanged(when, updateMode); 5231 styleResolverChanged(when, updateMode);
5229 } 5232 }
5230 5233
5231 } // namespace WebCore 5234 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/viewportAndroid.css ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698