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

Issue 513053003: Made Blink aware of top controls offset (Blink-side) (Closed)

Created:
6 years, 3 months ago by bokan
Modified:
6 years, 3 months ago
CC:
abarth-chromium, blink-reviews, dglazkov+blink, jamesr
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Made Blink aware of top controls offset (Blink-side) Added all the plumbing to make Blink aware of the top controls position and how its viewport has been resized as a result. This CL adds all the machinery and plumbing but does not yet connect main-thread scrolls to the top controls. This is needed to support scrolling the top controls during slow-scrolls as well as correct viewport behavior in the virtual viewport pinch-to-zoom. The machinery for top controls now includes two values: top_controls_layout_height: The amount that the viewport was shrunk to accommodate the top controls. This is updated only during a layout that causes a viewport resize (i.e. RenderWidget::OnResize). The compositor needs this to know how much the viewport layer has already been resized by Blink. top_controls_content_offset: The amount that the top controls are showing. This will be the same as top_controls_layout_height right after a viewport resize, but will diverge since the top controls will move without immediately causing a RenderWidget resize. Blink now keeps track of the top controls "content offset", which is the distance the content is offset from the top of the screen due to top controls. It receives updates to this value from the Impl thread during a commit and echos them back to the compositor. On the compositor side, the top controls layout height is moved into the LayerTreeImpl. This is necessary since a commit will change the viewport layer's size on the pending tree. Keeping it in LayerTreeHostImpl meant that, until the pending tree was activated, the top controls layout height corresponded to the viewport bounds in the pending tree. This was causing flickering as the viewport container was the incorrect size for a short time. The compositor also keeps track of the top controls content offset value. The top controls offset uses the same model as page scale, keeping an offset (the value as known by the main thread), a delta from the main thread's value, and a sent_delta to keep track of what has been sent to the main thread. See: https://codereview.chromium.org/511253003 for Chromium-side patch. BUG=333143 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181527

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Added top_controls_content_offset #

Total comments: 6

Patch Set 4 : Review Feedback #

Total comments: 2

Patch Set 5 : Prepared patch to land cleanly before Chromium side #

Patch Set 6 : Rebased #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -20 lines) Patch
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 3 chunks +7 lines, -1 line 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 3 chunks +10 lines, -1 line 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 10 chunks +13 lines, -13 lines 0 comments Download
M public/platform/WebLayerTreeView.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M public/web/WebWidget.h View 1 2 3 4 5 1 chunk +12 lines, -5 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
bokan
bokan@chromium.org changed reviewers: + aelias@chromium.org
6 years, 3 months ago (2014-08-28 18:42:58 UTC) #1
aelias_OOO_until_Jul13
https://codereview.chromium.org/513053003/diff/40001/Source/web/WebViewImpl.h File Source/web/WebViewImpl.h (right): https://codereview.chromium.org/513053003/diff/40001/Source/web/WebViewImpl.h#newcode114 Source/web/WebViewImpl.h:114: virtual void applyViewportProperties(const WebSize&, float, float) OVERRIDE; Please provide ...
6 years, 3 months ago (2014-09-03 19:28:43 UTC) #2
bokan
https://codereview.chromium.org/513053003/diff/40001/Source/web/WebViewImpl.h File Source/web/WebViewImpl.h (right): https://codereview.chromium.org/513053003/diff/40001/Source/web/WebViewImpl.h#newcode114 Source/web/WebViewImpl.h:114: virtual void applyViewportProperties(const WebSize&, float, float) OVERRIDE; On 2014/09/03 ...
6 years, 3 months ago (2014-09-04 23:10:02 UTC) #3
aelias_OOO_until_Jul13
lgtm modulo Blink roll tactical concern. Please add a public/web reviewer once you've addressed it. ...
6 years, 3 months ago (2014-09-05 00:22:07 UTC) #4
bokan
+abarth@ for public/ OWNER https://codereview.chromium.org/513053003/diff/60001/public/web/WebWidget.h File public/web/WebWidget.h (left): https://codereview.chromium.org/513053003/diff/60001/public/web/WebWidget.h#oldcode145 public/web/WebWidget.h:145: virtual void applyScrollAndScale(const WebSize& scrollDelta, ...
6 years, 3 months ago (2014-09-05 01:05:40 UTC) #6
bokan
+jamesr@ for public/ OWNER
6 years, 3 months ago (2014-09-05 18:05:18 UTC) #10
jamesr
lgtm
6 years, 3 months ago (2014-09-05 18:08:56 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bokan@chromium.org/513053003/80001
6 years, 3 months ago (2014-09-05 18:12:36 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/23673) linux_chromium_gn_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_chromium_gn_rel/builds/9664) mac_blink_compile_dbg ...
6 years, 3 months ago (2014-09-05 18:17:27 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bokan@chromium.org/513053003/120001
6 years, 3 months ago (2014-09-05 18:21:46 UTC) #17
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-06 00:22:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bokan@chromium.org/513053003/120001
6 years, 3 months ago (2014-09-07 17:42:04 UTC) #21
commit-bot: I haz the power
6 years, 3 months ago (2014-09-07 17:42:35 UTC) #22
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as 181527

Powered by Google App Engine
This is Rietveld 408576698