Index: Source/core/frame/PinchViewport.h |
diff --git a/Source/core/frame/PinchViewport.h b/Source/core/frame/PinchViewport.h |
index b934131c2f5a7c872596a5efa21e9a4168851200..f12b774e0ea49a603e99d93a90d920c0c52443b9 100644 |
--- a/Source/core/frame/PinchViewport.h |
+++ b/Source/core/frame/PinchViewport.h |
@@ -93,6 +93,10 @@ public: |
// rotation on Android or window resize elsewhere). |
void mainFrameDidChangeSize(); |
+ // Sets scale without ensuring the viewport is within its bounds. Useful for |
+ // situations when scale and offset are changing at the same time, e.g. during |
+ // a compositor commit. |
+ void setScaleWithoutClampingViewportOffset(float); |
void setScale(float); |
float scale() const { return m_scale; } |
@@ -110,6 +114,11 @@ public: |
// top-level document is centered in the viewport. This method will avoid |
// scrolling the pinch viewport unless necessary. |
void scrollIntoView(const FloatRect&); |
+ |
+ // Clamp the given point, in document coordinates, to the maximum/minimum |
+ // scroll extents of the viewport within the document. |
+ IntPoint clampDocumentOffsetAtScale(const IntPoint&, float); |
+ |
private: |
// ScrollableArea implementation |
virtual bool isActive() const OVERRIDE { return false; } |