Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / web / PageScaleConstraintsSet.h
index b31d4e4..fa143f9 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "core/dom/ViewportDescription.h"
 #include "core/page/PageScaleConstraints.h"
+#include "platform/Length.h"
 #include "platform/geometry/IntSize.h"
 
 namespace blink {
@@ -48,8 +49,8 @@ public:
     // Settings defined in the website's viewport tag, if viewport tag support
     // is enabled.
     const WebCore::PageScaleConstraints& pageDefinedConstraints() const { return m_pageDefinedConstraints; }
-    void updatePageDefinedConstraints(const WebCore::ViewportDescription&, WebCore::IntSize viewSize);
-    void adjustForAndroidWebViewQuirks(const WebCore::ViewportDescription&, WebCore::IntSize viewSize, int layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool wideViewportQuirkEnabled, bool useWideViewport, bool loadWithOverviewMode, bool nonUserScalableQuirkEnabled);
+    void updatePageDefinedConstraints(const WebCore::ViewportDescription&, WebCore::Length legacyFallbackWidth);
+    void adjustForAndroidWebViewQuirks(const WebCore::ViewportDescription&, int layoutFallbackWidth, float deviceScaleFactor, bool supportTargetDensityDPI, bool wideViewportQuirkEnabled, bool useWideViewport, bool loadWithOverviewMode, bool nonUserScalableQuirkEnabled);
 
     // Constraints may also be set from Chromium -- this overrides any
     // page-defined values.
@@ -60,7 +61,7 @@ public:
     // viewport size and document width.
     const WebCore::PageScaleConstraints& finalConstraints() const { return m_finalConstraints; }
     void computeFinalConstraints();
-    void adjustFinalConstraintsToContentsSize(WebCore::IntSize viewSize, WebCore::IntSize contentsSize, int nonOverlayScrollbarWidth);
+    void adjustFinalConstraintsToContentsSize(WebCore::IntSize contentsSize, int nonOverlayScrollbarWidth);
 
     void didChangeContentsSize(WebCore::IntSize contentsSize, float pageScaleFactor);
 
@@ -72,6 +73,10 @@ public:
     // This is set when one of the inputs to finalConstraints changes.
     bool constraintsDirty() const { return m_constraintsDirty; }
 
+    void didChangeViewSize(const WebCore::IntSize&);
+
+    WebCore::IntSize mainFrameSize(const WebCore::IntSize& contentsSize) const;
+
 private:
     WebCore::PageScaleConstraints computeConstraintsStack() const;
 
@@ -80,6 +85,7 @@ private:
     WebCore::PageScaleConstraints m_finalConstraints;
 
     int m_lastContentsWidth;
+    WebCore::IntSize m_viewSize;
 
     bool m_needsReset;
     bool m_constraintsDirty;