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

Unified Diff: third_party/WebKit/public/web/WebWidget.h

Issue 1844013002: Fix main thread top controls scrolling to mirror CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertyTreesBoundsDelta
Patch Set: Override top controls resize() in classes that override resize() Created 4 years, 8 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
Index: third_party/WebKit/public/web/WebWidget.h
diff --git a/third_party/WebKit/public/web/WebWidget.h b/third_party/WebKit/public/web/WebWidget.h
index 04ba9c0d6474e112e6d6f5a684e5750c3a291575..c58b7f7731d999332a57887eb1fe93a6a213388a 100644
--- a/third_party/WebKit/public/web/WebWidget.h
+++ b/third_party/WebKit/public/web/WebWidget.h
@@ -66,6 +66,14 @@ public:
// Called to resize the WebWidget.
virtual void resize(const WebSize&) { }
+ // Called to resize the WebWidget and top controls at the same time. Change
+ // both the widget size and top controls layout affecting height at the same
+ // time to prevent changing the viewport scroll offset due to clamping.
+ virtual void resize(
+ const WebSize&,
+ float topControlsHeight,
+ bool topControlsShrinkLayoutSize) { }
+
// Resizes the unscaled visual viewport. Normally the unscaled visual
// viewport is the same size as the main frame. The passed size becomes the
// size of the viewport when unscaled (i.e. scale = 1). This is used to
@@ -246,10 +254,6 @@ public:
// but not the select popup.
virtual WebPagePopup* pagePopup() const { return 0; }
- // Notification about the top controls height. If the boolean is true, then
- // the embedder shrunk the WebView size by the top controls height.
- virtual void setTopControlsHeight(float height, bool topControlsShrinkLayoutSize) { }
-
// Updates top controls constraints and current state. Allows embedder to
// control what are valid states for top controls and if it should animate.
virtual void updateTopControlsState(WebTopControlsState constraints, WebTopControlsState current, bool animate) { }

Powered by Google App Engine
This is Rietveld 408576698