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

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

Issue 14813025: Refactor viewport initialization logic out of WebViewImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another RTL test fix Created 7 years, 7 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 e6c61e6293e29abb4bb2fae7af86c7d4973957c6..05d8b1c4b0db1de9bee318368f83d3023f8ac19e 100644
--- a/Source/core/dom/ViewportArguments.h
+++ b/Source/core/dom/ViewportArguments.h
@@ -28,6 +28,7 @@
#ifndef ViewportArguments_h
#define ViewportArguments_h
+#include "core/dom/ViewportAttributes.h"
#include "core/platform/graphics/FloatSize.h"
#include <wtf/Forward.h>
@@ -43,17 +44,6 @@ enum ViewportErrorCode {
TargetDensityDpiUnsupported
};
-struct ViewportAttributes {
- FloatSize layoutSize;
-
- float initialScale;
- float minimumScale;
- float maximumScale;
-
- float userScalable;
- float orientation;
-};
-
struct ViewportArguments {
enum Type {
@@ -90,7 +80,6 @@ struct ViewportArguments {
, minZoom(ValueAuto)
, maxZoom(ValueAuto)
, userZoom(ValueAuto)
- , orientation(ValueAuto)
, deprecatedTargetDensityDPI(ValueAuto)
{
}
@@ -108,7 +97,6 @@ struct ViewportArguments {
float minZoom;
float maxZoom;
float userZoom;
- float orientation;
float deprecatedTargetDensityDPI; // Only used for Android WebView
bool operator==(const ViewportArguments& other) const
@@ -125,7 +113,6 @@ struct ViewportArguments {
&& minZoom == other.minZoom
&& maxZoom == other.maxZoom
&& userZoom == other.userZoom
- && orientation == other.orientation
&& deprecatedTargetDensityDPI == other.deprecatedTargetDensityDPI;
}
@@ -133,18 +120,8 @@ struct ViewportArguments {
{
return !(*this == other);
}
-
- // FIXME: We're going to keep this constant around until all embedders
- // refactor their code to no longer need it.
- static const float deprecatedTargetDPI;
};
-ViewportAttributes computeViewportAttributes(ViewportArguments args, int desktopWidth, int deviceWidth, int deviceHeight, float devicePixelRatio, IntSize visibleViewport);
-
-void restrictMinimumScaleFactorToViewportSize(ViewportAttributes& result, IntSize visibleViewport, float devicePixelRatio);
-void restrictScaleFactorToInitialScaleIfNotUserScalable(ViewportAttributes& result);
-float computeMinimumScaleFactorForContentContained(const ViewportAttributes& result, const IntSize& viewportSize, const IntSize& contentSize);
-
void setViewportFeature(const String& keyString, const String& valueString, Document*, void* data);
void reportViewportWarning(Document*, ViewportErrorCode, const String& replacement1, const String& replacement2);

Powered by Google App Engine
This is Rietveld 408576698