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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 654693004: Remove meta viewport and @viewport CSS rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 03191dc05eb0acdd070bb782f4ff0103ea4dae0c..fc9f7479ed5429bd8e8b0ad4a5e6c38bc3ccb8b7 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -1774,42 +1774,6 @@ void Document::maybeHandleHttpRefresh(const String& content, HttpRefreshType htt
// FIXME(sky): remove
}
-void Document::setViewportDescription(const ViewportDescription& viewportDescription)
-{
- // The UA-defined min-width is used by the processing of legacy meta tags.
- if (!viewportDescription.isSpecifiedByAuthor())
- m_viewportDefaultMinWidth = viewportDescription.minWidth;
-
- if (viewportDescription.isLegacyViewportType()) {
- if (settings() && !settings()->viewportMetaEnabled())
- return;
-
- m_legacyViewportDescription = viewportDescription;
-
- // When no author style for @viewport is present, and a meta tag for defining
- // the viewport is, apply the meta tag viewport instead of the UA styles.
- if (m_viewportDescription.type == ViewportDescription::AuthorStyleSheet)
- return;
- m_viewportDescription = viewportDescription;
- } else {
- // If the legacy viewport tag has higher priority than the cascaded @viewport
- // descriptors, use the values from the legacy tag.
- if (!shouldOverrideLegacyDescription(viewportDescription.type))
- m_viewportDescription = m_legacyViewportDescription;
- else
- m_viewportDescription = viewportDescription;
- }
-
- updateViewportDescription();
-}
-
-void Document::updateViewportDescription()
-{
- if (frame()) {
- frameHost()->chrome().dispatchViewportPropertiesDidChange(m_viewportDescription);
- }
-}
-
void Document::processReferrerPolicy(const String& policy)
{
ASSERT(!policy.isNull());

Powered by Google App Engine
This is Rietveld 408576698