Chromium Code Reviews| Index: Source/web/WebViewImpl.h |
| diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h |
| index 6af8ddff37139f603faabfabb587529e0126cdca..7741b2fd61252ecaecd5dda11a8bb077bc05fe5e 100644 |
| --- a/Source/web/WebViewImpl.h |
| +++ b/Source/web/WebViewImpl.h |
| @@ -127,10 +127,6 @@ class WebViewImpl : public WebView |
| , public WebCore::PagePopupDriver |
| , public PageWidgetEventHandler { |
| public: |
| - enum AutoZoomType { |
| - DoubleTap, |
| - FindInPage, |
| - }; |
| // WebWidget methods: |
| virtual void close(); |
| @@ -223,6 +219,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); |
| @@ -524,17 +521,40 @@ public: |
| // a plugin can update its own zoom, say because of its own UI. |
| void fullFramePluginZoomLevelChanged(double zoomLevel); |
| - void computeScaleAndScrollForHitRect(const WebRect& hitRect, AutoZoomType, float& scale, WebPoint& scroll, bool& isAnchor); |
| + void computeScaleAndScrollForBlockRect( |
|
jochen (gone - plz use gerrit)
2013/07/30 06:41:11
no need to wrap here
|
| + const WebRect& blockRect, |
| + float padding, |
| + float& scale, |
| + WebPoint& scroll, |
| + bool& doubleTapShouldZoomOut); |
| 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); |
| - void enableFakeDoubleTapAnimationForTesting(bool); |
| - bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoomPending; } |
| - WebCore::IntPoint fakeDoubleTapTargetPositionForTesting() const { return m_fakeDoubleTapTargetPosition; } |
| - float fakeDoubleTapPageScaleFactorForTesting() const { return m_fakeDoubleTapPageScaleFactor; } |
| - bool fakeDoubleTapUseAnchorForTesting() const { return m_fakeDoubleTapUseAnchor; } |
| + void animateDoubleTapZoom(const WebCore::IntPoint&); |
| + bool animateZoomToRect( |
|
jochen (gone - plz use gerrit)
2013/07/30 06:41:11
nor here
|
| + const WebCore::IntRect&, |
| + double durationInSeconds, |
| + bool& isAnimating, |
| + float& scale); |
| + |
| + void enableFakePageScaleAnimationForTesting(bool); |
| + bool fakeDoubleTapAnimationPendingForTesting() const |
|
jochen (gone - plz use gerrit)
2013/07/30 06:41:11
can also fit on one line (and below)
|
| + { |
| + return m_doubleTapZoomPending; |
| + } |
| + WebCore::IntPoint fakePageScaleAnimationTargetPositionForTesting() const |
| + { |
| + return m_fakePageScaleAnimationTargetPosition; |
| + } |
| + float fakePageScaleAnimationPageScaleForTesting() const |
| + { |
| + return m_fakePageScaleAnimationPageScaleFactor; |
| + } |
| + bool fakePageScaleAnimationUseAnchorForTesting() const |
| + { |
| + return m_fakePageScaleAnimationUseAnchor; |
| + } |
| void enterFullScreenForElement(WebCore::Element*); |
| void exitFullScreenForElement(WebCore::Element*); |
| @@ -561,11 +581,17 @@ public: |
| WebSettingsImpl* settingsImpl(); |
| + // Returns the bounding box of the block type node touched by the WebRect. |
| + WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
| + |
| + WebCore::IntPoint clampOffsetAtScale( |
| + const WebCore::IntPoint& offset, |
| + float scale); |
| + |
| private: |
| void refreshPageScaleFactorAfterLayout(); |
| void setUserAgentPageScaleConstraints(WebCore::PageScaleConstraints newConstraints); |
| float clampPageScaleFactorToLimits(float) const; |
| - WebCore::IntPoint clampOffsetAtScale(const WebCore::IntPoint& offset, float scale); |
| WebCore::IntSize contentsSize() const; |
| void resetSavedScrollAndScaleState(); |
| @@ -626,9 +652,6 @@ private: |
| void reallocateRenderer(); |
| void updateLayerTreeViewport(); |
| - // Returns the bounding box of the block type node touched by the WebRect. |
| - WebRect computeBlockBounds(const WebRect&, AutoZoomType); |
| - |
| // Helper function: Widens the width of |source| by the specified margins |
| // while keeping it smaller than page width. |
| WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, int minimumMargin); |
| @@ -715,10 +738,10 @@ private: |
| bool m_doubleTapZoomPending; |
| // Used for testing purposes. |
| - bool m_enableFakeDoubleTapAnimationForTesting; |
| - WebCore::IntPoint m_fakeDoubleTapTargetPosition; |
| - float m_fakeDoubleTapPageScaleFactor; |
| - bool m_fakeDoubleTapUseAnchor; |
| + bool m_enableFakePageScaleAnimationForTesting; |
| + WebCore::IntPoint m_fakePageScaleAnimationTargetPosition; |
| + float m_fakePageScaleAnimationPageScaleFactor; |
| + bool m_fakePageScaleAnimationUseAnchor; |
| bool m_contextMenuAllowed; |