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

Unified Diff: Source/web/WebViewImpl.h

Issue 19281007: Allow zoom-in to a target rect when tapping multiple targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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
Index: Source/web/WebViewImpl.h
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index 6af8ddff37139f603faabfabb587529e0126cdca..acbf9dcd6df7cdd8a33a5b016dbc59e952bf645c 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -130,6 +130,7 @@ public:
enum AutoZoomType {
DoubleTap,
FindInPage,
+ MultipleTargets,
};
// WebWidget methods:
@@ -223,6 +224,7 @@ public:
virtual void zoomLimitsChanged(double minimumZoomLevel,
double maximumZoomLevel);
virtual void setInitialPageScaleOverride(float);
+ virtual bool zoomToMultipleTargetsRect(const WebRect&);
virtual float pageScaleFactor() const;
virtual void setPageScaleFactorPreservingScrollOffset(float);
virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin);
@@ -528,7 +530,15 @@ public:
WebCore::Node* bestTapNode(const WebCore::PlatformGestureEvent& tapEvent);
void enableTapHighlight(const WebCore::PlatformGestureEvent& tapEvent);
void computeScaleAndScrollForFocusedNode(WebCore::Node* focusedNode, float& scale, WebCore::IntPoint& scroll, bool& needAnimation);
- void animateZoomAroundPoint(const WebCore::IntPoint&, AutoZoomType);
+
+ // The rect has different meanings depending on zoom type:
+ // - DoubleTap
+ // Point where a double tap occured, will zoom to fit an element.
+ // - FindInPage
+ // Enclosing rect of the element we would like to zoom to.
+ // - MultipleTargets
+ // Window we would like to zoom into.
+ bool animateZoomToRect(const WebCore::IntRect&, AutoZoomType);
void enableFakeDoubleTapAnimationForTesting(bool);
bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoomPending; }

Powered by Google App Engine
This is Rietveld 408576698