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

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

Issue 23604037: Recompute percentage based @viewport on resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review issue 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
« no previous file with comments | « Source/core/css/resolver/ViewportStyleResolver.cpp ('k') | Source/core/dom/ViewportArguments.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ViewportArguments.h
diff --git a/Source/core/dom/ViewportArguments.h b/Source/core/dom/ViewportArguments.h
index ea9a44e60a3897fc7dea694aa2383cfdc953ff9b..9eaf555e5f11781fda7cdec86be75e18f6bb4642 100644
--- a/Source/core/dom/ViewportArguments.h
+++ b/Source/core/dom/ViewportArguments.h
@@ -29,6 +29,7 @@
#define ViewportArguments_h
#include "core/page/PageScaleConstraints.h"
+#include "core/platform/Length.h"
#include "core/platform/graphics/FloatSize.h"
#include "wtf/Forward.h"
@@ -74,11 +75,7 @@ struct ViewportArguments {
ViewportArguments(Type type = Implicit)
: type(type)
, width(ValueAuto)
- , minWidth(ValueAuto)
- , maxWidth(ValueAuto)
, height(ValueAuto)
- , minHeight(ValueAuto)
- , maxHeight(ValueAuto)
, zoom(ValueAuto)
, minZoom(ValueAuto)
, maxZoom(ValueAuto)
@@ -92,11 +89,11 @@ struct ViewportArguments {
PageScaleConstraints resolve(const FloatSize& initialViewportSize, int defaultWidth) const;
float width;
- float minWidth;
- float maxWidth;
+ Length minWidth;
+ Length maxWidth;
float height;
- float minHeight;
- float maxHeight;
+ Length minHeight;
+ Length maxHeight;
float zoom;
float minZoom;
float maxZoom;
@@ -126,6 +123,10 @@ struct ViewportArguments {
{
return !(*this == other);
}
+
+private:
+ enum Direction { Horizontal, Vertical };
+ static float resolveViewportLength(const Length&, const FloatSize& initialViewportSize, Direction);
};
void setViewportFeature(const String& keyString, const String& valueString, Document*, void* data);
« no previous file with comments | « Source/core/css/resolver/ViewportStyleResolver.cpp ('k') | Source/core/dom/ViewportArguments.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698