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

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: Android stylesheet and fixes 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
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 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 } 2934 }
2935 2935
2936 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin ) 2936 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin )
2937 { 2937 {
2938 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin; 2938 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type == origin;
2939 } 2939 }
2940 2940
2941 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion) 2941 void Document::setViewportDescription(const ViewportDescription& viewportDescrip tion)
2942 { 2942 {
2943 if (viewportDescription.isLegacyViewportType()) { 2943 if (viewportDescription.isLegacyViewportType()) {
2944 if (settings() && !settings()->viewportMetaEnabled())
2945 return;
2946
2944 m_legacyViewportDescription = viewportDescription; 2947 m_legacyViewportDescription = viewportDescription;
2945 2948
2946 // When no author style for @viewport is present, and a meta tag for def ining 2949 // When no author style for @viewport is present, and a meta tag for def ining
2947 // the viewport is, apply the meta tag viewport instead of the UA styles . 2950 // the viewport is, apply the meta tag viewport instead of the UA styles .
2948 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet) 2951 if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet)
2949 return; 2952 return;
2950 m_viewportDescription = viewportDescription; 2953 m_viewportDescription = viewportDescription;
2951 } else { 2954 } else {
2952 // If the legacy viewport tag has higher priority than the cascaded @vie wport 2955 // If the legacy viewport tag has higher priority than the cascaded @vie wport
2953 // descriptors, use the values from the legacy tag. 2956 // descriptors, use the values from the legacy tag.
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
5342 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode) 5345 void Document::modifiedStyleSheet(StyleSheet* sheet, RecalcStyleTime when, Style ResolverUpdateMode updateMode)
5343 { 5346 {
5344 if (!isActive()) 5347 if (!isActive())
5345 return; 5348 return;
5346 5349
5347 styleEngine()->modifiedStyleSheet(sheet); 5350 styleEngine()->modifiedStyleSheet(sheet);
5348 styleResolverChanged(when, updateMode); 5351 styleResolverChanged(when, updateMode);
5349 } 5352 }
5350 5353
5351 } // namespace WebCore 5354 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698