Chromium Code Reviews| Index: Source/web/ViewportAnchor.h |
| diff --git a/Source/web/ViewportAnchor.h b/Source/web/ViewportAnchor.h |
| index 8bd0a7b92b1ef0c77917e4b37fc754c2e69e768d..c248c4497a18487406fb78db6035da57d252d32a 100644 |
| --- a/Source/web/ViewportAnchor.h |
| +++ b/Source/web/ViewportAnchor.h |
| @@ -56,19 +56,28 @@ class ViewportAnchor { |
| public: |
| explicit ViewportAnchor(EventHandler*); |
| - void setAnchor(const IntRect& viewRect, const FloatSize& anchorInViewCoords); |
| + void setAnchor(const IntRect& outerViewRect, const IntRect& innerViewRect, const FloatSize& anchorInViewCoords); |
|
bokan
2014/09/12 20:53:07
The inner rect has scale applied to it so it shoul
timav
2014/09/12 23:33:35
Acknowledged.
|
| - IntPoint computeOrigin(const IntSize& currentViewSize) const; |
| + void computeOrigins(const IntSize& outerSize, const IntSize& innerSize, |
| + IntPoint* mainFrameOffset, FloatPoint* pinchViewportOffset) const; |
| + |
| +private: |
| + FloatPoint getInnerOrigin(const IntSize& innerSize) const; |
| private: |
| RawPtrWillBeMember<EventHandler> m_eventHandler; |
| - IntRect m_viewRect; |
| + // Inner viewport origin in the reference frame of the document in CSS pixels |
| + FloatPoint m_pinchViewportInDocument; |
| + |
| + // Inner viewport origin in the reference frame of the outer viewport |
| + // normalized to the outer viewport size. |
| + FloatSize m_normalizedPinchViewportOffset; |
| RefPtrWillBeMember<Node> m_anchorNode; |
| LayoutRect m_anchorNodeBounds; |
| - FloatSize m_anchorInViewCoords; |
| + FloatSize m_anchorInInnerViewCoords; |
| FloatSize m_anchorInNodeCoords; |
| }; |