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

Unified Diff: Source/core/dom/ViewportArguments.h

Issue 23742003: Use css-device-adapt constraining for legacy viewport tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased onto newer master. Created 7 years, 3 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/dom/ViewportArguments.h
diff --git a/Source/core/dom/ViewportArguments.h b/Source/core/dom/ViewportArguments.h
index 9eaf555e5f11781fda7cdec86be75e18f6bb4642..a8ee5466bfe3b3e1c87ffedb215477c18b7e145f 100644
--- a/Source/core/dom/ViewportArguments.h
+++ b/Source/core/dom/ViewportArguments.h
@@ -50,13 +50,11 @@ struct ViewportArguments {
enum Type {
// These are ordered in increasing importance.
- Implicit,
- XHTMLMobileProfile,
+ UserAgentStyleSheet,
HandheldFriendlyMeta,
MobileOptimizedMeta,
ViewportMeta,
- ViewportMetaLayoutSizeQuirk,
- CSSDeviceAdaptation
+ AuthorStyleSheet
kenneth.r.christiansen 2013/09/03 08:55:57 This one
rune 2013/09/03 09:25:00 Done.
} type;
enum {
@@ -72,10 +70,8 @@ struct ViewportArguments {
ValueExtendToZoom = -10
};
- ViewportArguments(Type type = Implicit)
+ ViewportArguments(Type type = UserAgentStyleSheet)
: type(type)
- , width(ValueAuto)
- , height(ValueAuto)
, zoom(ValueAuto)
, minZoom(ValueAuto)
, maxZoom(ValueAuto)
@@ -86,12 +82,10 @@ struct ViewportArguments {
}
// All arguments are in CSS units.
- PageScaleConstraints resolve(const FloatSize& initialViewportSize, int defaultWidth) const;
+ PageScaleConstraints resolve(const FloatSize& initialViewportSize) const;
- float width;
Length minWidth;
Length maxWidth;
- float height;
Length minHeight;
Length maxHeight;
float zoom;
@@ -105,10 +99,8 @@ struct ViewportArguments {
{
// Used for figuring out whether to reset the viewport or not,
// thus we are not taking type into account.
- return width == other.width
- && minWidth == other.minWidth
+ return minWidth == other.minWidth
&& maxWidth == other.maxWidth
- && height == other.height
&& minHeight == other.minHeight
&& maxHeight == other.maxHeight
&& zoom == other.zoom

Powered by Google App Engine
This is Rietveld 408576698