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

Unified Diff: Source/core/html/HTMLMetaElement-in.cpp

Issue 219123002: Read the default min-width value from the UA style sheets (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLMetaElement-in.cpp
diff --git a/Source/core/html/HTMLMetaElement-in.cpp b/Source/core/html/HTMLMetaElement-in.cpp
index d63713d0ee7dffdbb1dfc52cb83bfdb52c03fc16..b89781c3aa1d199e22ae0d29241e8b9aecf53fc3 100644
--- a/Source/core/html/HTMLMetaElement-in.cpp
+++ b/Source/core/html/HTMLMetaElement-in.cpp
@@ -388,9 +388,6 @@ void HTMLMetaElement::processViewportContentAttribute(const String& content, Vie
{
ASSERT(!content.isNull());
- if (!document().settings())
- return;
-
if (!document().shouldOverrideLegacyDescription(origin))
return;
@@ -408,12 +405,13 @@ void HTMLMetaElement::processViewportContentAttribute(const String& content, Vie
descriptionFromLegacyTag.minZoom = std::min(descriptionFromLegacyTag.minZoom, float(5));
}
- const Settings* settings = document().settings();
-
if (descriptionFromLegacyTag.maxWidth.isAuto()) {
if (descriptionFromLegacyTag.zoom == ViewportDescription::ValueAuto) {
descriptionFromLegacyTag.minWidth = Length(ExtendToZoom);
- descriptionFromLegacyTag.maxWidth = Length(settings->layoutFallbackWidth(), Fixed);
+ if (!document().viewportDefaultMinWidth().isAuto())
+ descriptionFromLegacyTag.maxWidth = document().viewportDefaultMinWidth();
apavlov 2014/03/31 16:47:19 This is slightly confusing (foo.maxWidth = bar.min
kenneth.r.christiansen 2014/03/31 20:37:09 Done.
+ else
+ descriptionFromLegacyTag.maxWidth = Length(ExtendToZoom);
} else if (descriptionFromLegacyTag.maxHeight.isAuto()) {
descriptionFromLegacyTag.minWidth = Length(ExtendToZoom);
descriptionFromLegacyTag.maxWidth = Length(ExtendToZoom);

Powered by Google App Engine
This is Rietveld 408576698