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

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: Fix assert 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') | no next file with comments »
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 2a738a74e2fc1c976fa0661dcdbcbb1b578d54b6..4a1c889c77b7416b7c755c7efa78a2bec287a452 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 scale, const FloatPoint& location);
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& offset, float scale);
+
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;
« no previous file with comments | « no previous file | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698