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

Unified Diff: Source/core/frame/PinchViewport.h

Issue 643473002: Made top controls work with virtual viewport pinch-to-zoom. (Blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed mac breakage (UseMockScrollbars) Created 6 years, 2 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 | « Source/core/frame/FrameView.cpp ('k') | 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 6ab9b65a16a32d419cfd42fddd04225dd148e964..7eb31e9734e616c223b2aa69e97526902baae76a 100644
--- a/Source/core/frame/PinchViewport.h
+++ b/Source/core/frame/PinchViewport.h
@@ -87,7 +87,6 @@ public:
FloatPoint location() const { return m_offset; }
// Sets the size of the inner viewport when unscaled in CSS pixels.
- // This will be clamped to the size of the outer viewport (the main frame).
void setSize(const IntSize&);
IntSize size() const { return m_size; }
@@ -122,6 +121,14 @@ public:
// scroll extents of the viewport within the document.
IntPoint clampDocumentOffsetAtScale(const IntPoint& offset, float scale);
+ // FIXME: This is kind of a hack. Ideally, we would just resize the
+ // viewports to account for top controls. However, FrameView includes much
+ // more than just scrolling so we can't simply resize it without incurring
+ // all sorts of side-effects. Until we can seperate out the scrollability
+ // aspect from FrameView, we use this method to let PinchViewport make the
+ // necessary adjustments so that we don't incorrectly clamp scroll offsets
+ // coming from the compositor. crbug.com/422328
+ void setTopControlsAdjustment(float);
private:
explicit PinchViewport(FrameHost&);
@@ -179,6 +186,7 @@ private:
FloatPoint m_offset;
float m_scale;
IntSize m_size;
+ float m_topControlsAdjustment;
};
} // namespace blink
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698