Chromium Code Reviews| Index: Source/web/ViewportAnchor.h |
| diff --git a/Source/web/ViewportAnchor.h b/Source/web/ViewportAnchor.h |
| index 8bd0a7b92b1ef0c77917e4b37fc754c2e69e768d..d3331481e65a32557726237fc7d0909b3f55db5e 100644 |
| --- a/Source/web/ViewportAnchor.h |
| +++ b/Source/web/ViewportAnchor.h |
| @@ -43,6 +43,7 @@ namespace blink { |
| class EventHandler; |
| class IntSize; |
| class Node; |
| +class ScrollView; |
| // ViewportAnchor provides a way to anchor a viewport origin to a DOM node. |
| // In particular, the user supplies the current viewport (in CSS coordinates) |
| @@ -56,19 +57,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); |
| - IntPoint computeOrigin(const IntSize& currentViewSize) const; |
| + void computeOrigins(const ScrollView& frameView, const FloatSize& innerSize, |
|
leviw_travelin_and_unemployed
2014/09/18 18:49:54
ScrollView& frameView? Really you should leave tha
timav
2014/09/19 17:38:43
Done.
|
| + IntPoint* mainFrameOffset, FloatPoint* pinchViewportOffset) const; |
|
leviw_travelin_and_unemployed
2014/09/18 18:49:54
These appear to never be null. Why are you passing
timav
2014/09/19 17:38:43
I'm passing pointers because I think it would bett
|
| + |
| +private: |
| + FloatPoint getInnerOrigin(const FloatSize& 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; |
| }; |