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

Unified Diff: Source/web/WebViewImpl.h

Issue 882683003: Normalize top controls offset to (0, 1), Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.h
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index 747446549bab51b1d4336607941acf1e19488385..b1e606435cd5034d5c78702ba560a4c2ea412b94 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -515,6 +515,7 @@ public:
bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_matchesHeuristicsForGpuRasterization; }
virtual void setTopControlsLayoutHeight(float) override;
+ virtual void setTopControlsHeight(float height, bool topControlsShrinkLayoutSize) override;
virtual void forceNextWebGLContextCreationToFail() override;
@@ -759,9 +760,15 @@ private:
// The top controls offset since the last compositor commit.
float m_topControlsContentOffset;
- // The top controls offset at the time of the last Resize event. This is the
- // amount that the viewport was shrunk by to accomodate the top controls.
- float m_topControlsLayoutHeight;
+ float m_topControlsHeight;
+ // If this is true, then the viewport was shrunk by the top controls height
+ // as of the last Resize event.
bokan 2015/02/06 08:25:23 It'd be more clear to say here (and in WebView.h)
aelias_OOO_until_Jul13 2015/02/06 20:32:37 Done.
+ bool m_topControlsShrinkLayoutSize;
+
+ // If true, then top controls is normalized between 0 and 1; if false,
+ // then it's an absolute value.
+ // TODO(aelias): Delete this after Blink roll.
+ bool m_topControlsOffsetIsNormalized;
};
DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.isWebView());
« no previous file with comments | « no previous file | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698