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

Unified Diff: Source/core/frame/PinchViewport.h

Issue 584833003: Made double-tap zoom work in pinch virtual viewport mode. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « no previous file | Source/core/frame/PinchViewport.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
« no previous file with comments | « no previous file | Source/core/frame/PinchViewport.cpp » ('j') | Source/web/WebViewImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698