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

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: 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 ea9a44e60a3897fc7dea694aa2383cfdc953ff9b..43b2a8e80942694890751b54f995624a5344ba67 100644
--- a/Source/core/dom/ViewportArguments.h
+++ b/Source/core/dom/ViewportArguments.h
@@ -49,12 +49,10 @@ struct ViewportArguments {
enum Type {
// These are ordered in increasing importance.
- Implicit,
- XHTMLMobileProfile,
+ UserAgent,
HandheldFriendlyMeta,
MobileOptimizedMeta,
ViewportMeta,
- ViewportMetaLayoutSizeQuirk,
CSSDeviceAdaptation
kenneth.r.christiansen 2013/09/02 09:10:49 Maybe rename to StyleSheet ?
rune 2013/09/02 11:29:30 Yes. Perhaps: UserAgent => UserAgentStyleSheet (o
rune 2013/09/02 11:53:39 Done.
} type;
@@ -71,12 +69,10 @@ struct ViewportArguments {
ValueExtendToZoom = -10
};
- ViewportArguments(Type type = Implicit)
+ ViewportArguments(Type type = UserAgent)
: type(type)
- , width(ValueAuto)
, minWidth(ValueAuto)
, maxWidth(ValueAuto)
- , height(ValueAuto)
, minHeight(ValueAuto)
, maxHeight(ValueAuto)
, zoom(ValueAuto)
@@ -89,12 +85,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;
float minWidth;
float maxWidth;
- float height;
float minHeight;
float maxHeight;
float zoom;
@@ -106,12 +100,9 @@ struct ViewportArguments {
bool operator==(const ViewportArguments& other) const
{
- // 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
+ // Used for figuring out whether to reset the viewport or not.
+ 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