Index: Source/core/frame/PinchViewport.h |
diff --git a/Source/core/frame/PinchViewport.h b/Source/core/frame/PinchViewport.h |
index fc6ae2fea5e582366b6278a0d639e34e3e1fac69..fef9759a2964c259a023c371f5ff6d339b0ec612 100644 |
--- a/Source/core/frame/PinchViewport.h |
+++ b/Source/core/frame/PinchViewport.h |
@@ -94,6 +94,8 @@ public: |
// rotation on Android or window resize elsewhere). |
void mainFrameDidChangeSize(); |
+ // Sets scale and location in one operation, preventing intermediate clamping. |
+ void setScaleAndLocation(float, const FloatPoint&); |
esprehn
2014/09/23 00:53:12
add argument names.
bokan
2014/09/23 12:42:23
Done.
|
void setScale(float); |
float scale() const { return m_scale; } |
@@ -111,6 +113,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); |
esprehn
2014/09/23 00:53:12
ditto
bokan
2014/09/23 12:42:23
Done.
|
+ |
private: |
// ScrollableArea implementation |
virtual bool isActive() const OVERRIDE { return false; } |
@@ -142,6 +149,7 @@ private: |
void setupScrollbar(blink::WebScrollbar::Orientation); |
FloatPoint clampOffsetToBoundaries(const FloatPoint&); |
+ void clampToBoundaries(); |
LocalFrame* mainFrame() const; |