Index: Source/core/dom/ViewportArguments.h |
diff --git a/Source/core/dom/ViewportArguments.h b/Source/core/dom/ViewportArguments.h |
index 925604ac01b48265b6f205a228bc237d7eff458f..0c21064a620f67f457bcdc6ee7afae55c2f89d42 100644 |
--- a/Source/core/dom/ViewportArguments.h |
+++ b/Source/core/dom/ViewportArguments.h |
@@ -6,7 +6,7 @@ |
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) |
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
- * Copyright (C) 2012 Intel Corporation. All rights reserved. |
+ * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
@@ -36,44 +36,22 @@ namespace WebCore { |
class Document; |
-enum ViewportErrorCode { |
- UnrecognizedViewportArgumentKeyError, |
- UnrecognizedViewportArgumentValueError, |
- TruncatedViewportArgumentValueError, |
- MaximumScaleTooLargeError, |
- TargetDensityDpiUnsupported |
-}; |
- |
struct ViewportArguments { |
- enum Type { |
- // These are ordered in increasing importance. |
- Implicit, |
- XHTMLMobileProfile, |
- HandheldFriendlyMeta, |
- MobileOptimizedMeta, |
- ViewportMeta, |
- CSSDeviceAdaptation |
- } type; |
- |
enum { |
ValueAuto = -1, |
- ValueDeviceWidth = -2, |
- ValueDeviceHeight = -3, |
ValuePortrait = -4, |
ValueLandscape = -5, |
ValueDeviceDPI = -6, |
ValueLowDPI = -7, |
ValueMediumDPI = -8, |
- ValueHighDPI = -9 |
+ ValueHighDPI = -9, |
+ ValueExtendToZoom = -10 |
}; |
- ViewportArguments(Type type = Implicit) |
- : type(type) |
- , width(ValueAuto) |
- , minWidth(ValueAuto) |
+ ViewportArguments() |
+ : minWidth(ValueAuto) |
, maxWidth(ValueAuto) |
- , height(ValueAuto) |
, minHeight(ValueAuto) |
, maxHeight(ValueAuto) |
, zoom(ValueAuto) |
@@ -85,13 +63,10 @@ struct ViewportArguments { |
{ |
} |
- // All arguments are in CSS units. |
- PageScaleConstraints resolve(const FloatSize& initialViewportSize, const FloatSize& deviceSize, int defaultWidth) const; |
+ PageScaleConstraints resolve(const FloatSize& initialViewportSizeInCSSUnits) const; |
- float width; |
float minWidth; |
float maxWidth; |
- float height; |
float minHeight; |
float maxHeight; |
float zoom; |
@@ -103,12 +78,8 @@ 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 |
+ return minWidth == other.minWidth |
&& maxWidth == other.maxWidth |
- && height == other.height |
&& minHeight == other.minHeight |
&& maxHeight == other.maxHeight |
&& zoom == other.zoom |
@@ -125,9 +96,6 @@ struct ViewportArguments { |
} |
}; |
-void setViewportFeature(const String& keyString, const String& valueString, Document*, void* data); |
-void reportViewportWarning(Document*, ViewportErrorCode, const String& replacement1, const String& replacement2); |
- |
} // namespace WebCore |
#endif // ViewportArguments_h |