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

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: Created 7 years, 2 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 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2939 } 2939 }
2940 2940
2941 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin ) 2941 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin )
2942 { 2942 {
2943 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin; 2943 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin;
2944 } 2944 }
2945 2945
2946 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion) 2946 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion)
2947 { 2947 {
2948 if (viewportDescription.isLegacyViewportType()) { 2948 if (viewportDescription.isLegacyViewportType()) {
2949 if (settings() && !settings()->viewportMetaEnabled())
2950 return;
2951
2949 m_legacyViewportDescription = viewportDescription; 2952 m_legacyViewportDescription = viewportDescription;
2950 2953
2951 // When no author style for @viewport is present, and a meta tag for def ining 2954 // When no author style for @viewport is present, and a meta tag for def ining
2952 // the viewport is, apply the meta tag viewport instead of the UA styles . 2955 // the viewport is, apply the meta tag viewport instead of the UA styles .
2953 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) 2956 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet)
2954 return; 2957 return;
2955 m_viewportDescription = viewportDescription; 2958 m_viewportDescription = viewportDescription;
2956 } else { 2959 } else {
2957 // If the legacy viewport tag has higher priority than the cascaded @vie wport 2960 // If the legacy viewport tag has higher priority than the cascaded @vie wport
2958 // descriptors, use the values from the legacy tag. 2961 // descriptors, use the values from the legacy tag.
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) 5352 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode)
5350 { 5353 {
5351 if (!isActive()) 5354 if (!isActive())
5352 return; 5355 return;
5353 5356
5354 styleEngine()->modifiedStyleSheet(sheet); 5357 styleEngine()->modifiedStyleSheet(sheet);
5355 styleResolverChanged(when, updateMode); 5358 styleResolverChanged(when, updateMode);
5356 } 5359 }
5357 5360
5358 } // namespace WebCore 5361 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698