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

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed)

Created:
4 years, 5 months ago by Ian Wen
Modified:
4 years, 3 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, James Su, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce bottom controls to CC and let it respond to scrolling This CL introduces bottom controls to compositor. Once the height of the bottom controls is specified, a resize signal will be sent to cc and renderer with a shortened view port height. Upon user scrolling, the height of the bottom bar is computed by applying the shown ratio of the top controls to the bottom controls. Since bottom control is less sensitive, it will react to scrolling even if top controls is constrained. Also please note that the shrinking and expanding of the bottom area do not need to be pixel perfect, as such perfection cannot be observed by human vision. TODOs: 1. Implement main thread scrolling, like what we did for top controls. 2. Investigate to conduct standalone scrolling animation if the top controls is totally absent. BUG=581227 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/e5fc57843cf8d21d9bf51e389821657f3f768317 Cr-Commit-Position: refs/heads/master@{#412738}

Patch Set 1 #

Total comments: 8

Patch Set 2 : content-offset -> top-controls-shown renaming and respond to bokan's comments #

Total comments: 6

Patch Set 3 : adjust documentations #

Total comments: 1

Patch Set 4 : change to height and ratio #

Total comments: 4

Patch Set 5 : Added tests, revert java renaming #

Patch Set 6 : vector->float in IPC #

Total comments: 2

Patch Set 7 : sievers@'s comment #

Patch Set 8 : rebase #

Total comments: 6

Patch Set 9 : rebase again #

Patch Set 10 : rebase v3 #

Patch Set 11 : rebase v3 #

Patch Set 12 : findbug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+318 lines, -75 lines) Patch
M cc/input/top_controls_manager.h View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M cc/input/top_controls_manager.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M cc/input/top_controls_manager_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/input/top_controls_manager_unittest.cc View 1 2 3 4 5 chunks +43 lines, -0 lines 0 comments Download
M cc/ipc/cc_param_traits_macros.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M cc/ipc/compositor_frame_metadata.mojom View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M cc/ipc/compositor_frame_metadata_struct_traits.h View 1 2 3 4 5 1 chunk +14 lines, -4 lines 0 comments Download
M cc/ipc/compositor_frame_metadata_struct_traits.cc View 1 2 3 4 5 1 chunk +4 lines, -5 lines 0 comments Download
M cc/ipc/struct_traits_unittest.cc View 1 2 3 4 5 3 chunks +12 lines, -7 lines 0 comments Download
M cc/output/compositor_frame_metadata.h View 1 2 3 4 5 1 chunk +7 lines, -2 lines 0 comments Download
M cc/trees/layer_tree.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -2 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 6 chunks +21 lines, -5 lines 0 comments Download
M content/browser/devtools/protocol/page_handler.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 3 chunks +15 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/resize_params.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/resize_params.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java View 1 2 3 4 1 chunk +11 lines, -5 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +36 lines, -13 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java View 1 2 3 4 5 chunks +15 lines, -6 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M ui/android/delegated_frame_host_android.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M ui/android/delegated_frame_host_android.cc View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -6 lines 0 comments Download

Messages

Total messages: 72 (36 generated)
Ian Wen
PTAL
4 years, 5 months ago (2016-06-29 18:08:30 UTC) #3
aelias_OOO_until_Jul13
Seems reasonable enough, adding bokan@ for primary review since he maintains this code now.
4 years, 5 months ago (2016-06-29 18:52:50 UTC) #5
bokan
Code looks mostly fine. If we do go this route, we should rename top controls ...
4 years, 5 months ago (2016-06-30 12:31:21 UTC) #6
aelias_OOO_until_Jul13
On 2016/06/30 at 12:31:21, bokan wrote: > My suggestion would be to have bottom UI ...
4 years, 5 months ago (2016-06-30 19:17:12 UTC) #7
Ian Wen
Thanks for the review! :) I agree what aelias@ said previously... Bottom controls need to ...
4 years, 5 months ago (2016-07-01 02:51:44 UTC) #8
bokan
On 2016/06/30 19:17:12, aelias wrote: > On 2016/06/30 at 12:31:21, bokan wrote: > > My ...
4 years, 5 months ago (2016-07-01 17:17:50 UTC) #9
bokan
A few more nits but code is lgtm from me (non-OWNER though). I've stated my ...
4 years, 5 months ago (2016-07-01 17:19:14 UTC) #10
aelias_OOO_until_Jul13
Currently, this is only intended for use with the CCT bottom bar which is more ...
4 years, 5 months ago (2016-07-01 19:14:43 UTC) #11
bokan
On 2016/07/01 19:14:43, aelias wrote: > Currently, this is only intended for use with the ...
4 years, 5 months ago (2016-07-01 19:16:18 UTC) #12
aelias_OOO_until_Jul13
Still looks mostly alright, but ianwen@ mentioned offline that he was planning to get rid ...
4 years, 5 months ago (2016-07-01 22:23:59 UTC) #13
Ian Wen
PTAL. I talked to tedchoc@ offline about the necessity of having two values (offset and ...
4 years, 5 months ago (2016-07-06 20:53:44 UTC) #14
aelias_OOO_until_Jul13
https://codereview.chromium.org/2106753004/diff/40001/cc/output/compositor_frame_metadata.h File cc/output/compositor_frame_metadata.h (right): https://codereview.chromium.org/2106753004/diff/40001/cc/output/compositor_frame_metadata.h#newcode52 cc/output/compositor_frame_metadata.h:52: gfx::Vector2dF top_bar_translate; I agree we need two values, but ...
4 years, 5 months ago (2016-07-06 22:36:59 UTC) #15
Ian Wen
Hi alieas@, I refactored the plumbing code so that it now passes height and ratio. ...
4 years, 5 months ago (2016-07-08 18:24:00 UTC) #16
aelias_OOO_until_Jul13
Could you add one or two tests to top_controls_manager_unittest as part of this patch? Usually, ...
4 years, 5 months ago (2016-07-08 23:46:33 UTC) #17
Ian Wen
Hi aelias@, All comments are addressed. PTAL. :) https://codereview.chromium.org/2106753004/diff/60001/cc/output/compositor_frame_metadata.h File cc/output/compositor_frame_metadata.h (right): https://codereview.chromium.org/2106753004/diff/60001/cc/output/compositor_frame_metadata.h#newcode52 cc/output/compositor_frame_metadata.h:52: gfx::Vector2dF ...
4 years, 4 months ago (2016-08-13 00:05:27 UTC) #18
aelias_OOO_until_Jul13
lgtm, feel free to add remaining OWNERS.
4 years, 4 months ago (2016-08-13 01:05:25 UTC) #20
Ian Wen
tedchoc@chromium.org: Please review changes in everything? ;) If you feel lazy today, Tab.java it is. ...
4 years, 4 months ago (2016-08-15 17:48:35 UTC) #22
Will Harris
cc/ipc/* and content/common/view_messages.h lgtm
4 years, 4 months ago (2016-08-15 17:56:44 UTC) #27
no sievers
content lgtm w/1 comment https://chromiumcodereview.appspot.com/2106753004/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://chromiumcodereview.appspot.com/2106753004/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1004 content/browser/renderer_host/render_widget_host_view_android.cc:1004: bottom_bar_shown_ratio_ != frame.metadata.bottom_controls_shown_ratio || This ...
4 years, 4 months ago (2016-08-16 20:29:16 UTC) #32
Ian Wen
dfalcantara@ PTAL the changes in tab.java. :) https://codereview.chromium.org/2106753004/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/2106753004/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1004 content/browser/renderer_host/render_widget_host_view_android.cc:1004: bottom_bar_shown_ratio_ != ...
4 years, 4 months ago (2016-08-17 00:20:46 UTC) #34
gone
Tab.java lgtm
4 years, 4 months ago (2016-08-17 00:22:15 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/120001
4 years, 4 months ago (2016-08-17 00:23:18 UTC) #38
commit-bot: I haz the power
Your CL was about to rely on recently removed CQ feature(s): * Specifying master names ...
4 years, 4 months ago (2016-08-17 00:23:20 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/120001
4 years, 4 months ago (2016-08-17 00:25:05 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/53256) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-17 00:28:06 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/140001
4 years, 4 months ago (2016-08-17 03:25:57 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/53228) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-17 03:27:48 UTC) #51
Khushal
https://codereview.chromium.org/2106753004/diff/140001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2106753004/diff/140001/cc/trees/layer_tree_host.cc#newcode519 cc/trees/layer_tree_host.cc:519: sync_tree->set_bottom_controls_height(bottom_controls_height_); The commit step now happens in LayerTree::PushPropertiesTo. https://codereview.chromium.org/2106753004/diff/140001/cc/trees/layer_tree_host.h ...
4 years, 4 months ago (2016-08-17 04:45:35 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/160001
4 years, 4 months ago (2016-08-17 05:45:15 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/239614)
4 years, 4 months ago (2016-08-17 05:51:49 UTC) #57
Ted C
On 2016/08/17 05:51:49, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 4 months ago (2016-08-17 20:54:47 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/220001
4 years, 4 months ago (2016-08-17 23:56:25 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/220314)
4 years, 4 months ago (2016-08-18 01:16:27 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2106753004/220001
4 years, 4 months ago (2016-08-18 03:41:38 UTC) #69
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 4 months ago (2016-08-18 04:05:33 UTC) #70
commit-bot: I haz the power
4 years, 4 months ago (2016-08-18 04:08:36 UTC) #72
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/e5fc57843cf8d21d9bf51e389821657f3f768317
Cr-Commit-Position: refs/heads/master@{#412738}

Powered by Google App Engine
This is Rietveld 408576698