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

Issue 11552009: Add support for calculating the position of the top controls in the cc layer. (Closed)

Created:
8 years ago by Ted C
Modified:
7 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, John Knottenbelt
Visibility:
Public.

Description

Add support for calculating the position of the top controls in the cc layer. Provides a means for keeping the top controls in sync with the currently renderered frame, which will allow us to move the top controls around the screen. BUG=161303 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=177081

Patch Set 1 #

Patch Set 2 : Converted to chromium style for new cc files. #

Patch Set 3 : Remove compositor_frame_metadata.h from change. #

Patch Set 4 : Fix style issue in top_controls_manager #

Patch Set 5 : Convert animation to use base Time entities. #

Patch Set 6 : Add top controls metadata to the frame data and send to android. #

Patch Set 7 : Forgot to add the changes to cc_messages.h #

Total comments: 27

Patch Set 8 : Rebased #

Patch Set 9 : Addressed Alex's review comments. #

Patch Set 10 : Remove some unnecessary bits after addressing comments. #

Total comments: 12

Patch Set 11 : Addressing comments part deux. #

Patch Set 12 : Removing redundant static from const. #

Patch Set 13 : Disable fullscreen for ContentShell and TestShell and fix test render_view_host #

Patch Set 14 : Rebase #

Total comments: 16

Patch Set 15 : Initial round of review comments. #

Patch Set 16 : Move UpdateDrawPositions before updating the active tree. #

Patch Set 17 : Move command line flag calculation to web_layer_tree_view_impl. #

Patch Set 18 : Remove custom animation class and switch to KeyframedFloatAnimationCurve. #

Patch Set 19 : Prevent half visible toolbar at the top of the page. #

Patch Set 20 : Remove auto-hide per UX decision. #

Total comments: 6

Patch Set 21 : Switch to a layer specific to top controls. #

Total comments: 3

Patch Set 22 : Add debug string for the new content layer for top controls. #

Patch Set 23 : Rebased #

Total comments: 2

Patch Set 24 : Renaming message field. #

Total comments: 2

Patch Set 25 : Rebased and moved copyrights to 2013 #

Patch Set 26 : Rebased #

Patch Set 27 : Fix clang warning #

Patch Set 28 : Fix build breakage. #

Patch Set 29 : Add missing CC_EXPORT...learn to run try jobs manually #

Unified diffs Side-by-side diffs Delta from patch set Stats (+635 lines, -18 lines) Patch
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M cc/compositor_frame_metadata.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -2 lines 0 comments Download
M cc/layer_tree_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 4 chunks +22 lines, -0 lines 0 comments Download
M cc/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +12 lines, -5 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 10 chunks +30 lines, -0 lines 0 comments Download
M cc/layer_tree_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M cc/switches.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M cc/switches.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
A cc/top_controls_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +77 lines, -0 lines 0 comments Download
A cc/top_controls_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +194 lines, -0 lines 0 comments Download
A cc/top_controls_manager_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +24 lines, -0 lines 0 comments Download
A cc/top_controls_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +203 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_guest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/test_render_view_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download
M content/common/cc_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/common/CommandLine.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -2 lines 0 comments Download
M webkit/compositor_bindings/web_layer_tree_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +15 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (0 generated)
Ted C
@jamesr - Very much in progress, but I wanted to get your thoughts on the ...
8 years ago (2012-12-12 05:03:16 UTC) #1
Ted C
8 years ago (2012-12-13 18:06:03 UTC) #2
jamesr
One thing I realized belatedly is that our fixpos logic currently doesn't have any way ...
8 years ago (2012-12-16 03:01:10 UTC) #3
Ted C
On 2012/12/16 03:01:10, jamesr wrote: > One thing I realized belatedly is that our fixpos ...
8 years ago (2012-12-17 18:16:42 UTC) #4
Ted C
On 2012/12/17 18:16:42, Ted C wrote: > On 2012/12/16 03:01:10, jamesr wrote: > > One ...
8 years ago (2012-12-18 19:57:44 UTC) #5
Ted C
Turned out to be really straight forward to add the plumbing through the metadata, so ...
8 years ago (2012-12-18 22:14:48 UTC) #6
aelias_OOO_until_Jul13
I went ahead and reviewed the whole patch. Looks pretty well-structured in general, I have ...
8 years ago (2012-12-19 08:31:18 UTC) #7
Ted C
A few follow up questions, but I think I addressed most/all of the issues. https://codereview.chromium.org/11552009/diff/22001/cc/compositor_frame_metadata.h ...
8 years ago (2012-12-19 21:34:17 UTC) #8
jamesr
https://chromiumcodereview.appspot.com/11552009/diff/19002/cc/layer_tree_host_impl.h File cc/layer_tree_host_impl.h (right): https://chromiumcodereview.appspot.com/11552009/diff/19002/cc/layer_tree_host_impl.h#newcode210 cc/layer_tree_host_impl.h:210: virtual LayerTreeImpl* activeTree() OVERRIDE; document what interface this is ...
8 years ago (2012-12-19 22:56:29 UTC) #9
aelias_OOO_until_Jul13
https://codereview.chromium.org/11552009/diff/22001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/11552009/diff/22001/content/browser/renderer_host/render_process_host_impl.cc#newcode863 content/browser/renderer_host/render_process_host_impl.cc:863: #if defined(OS_ANDROID) You can set it explicitly to false ...
8 years ago (2012-12-19 23:08:36 UTC) #10
jamesr1
On Wed, Dec 19, 2012 at 3:08 PM, <aelias@chromium.org> wrote: > > https://codereview.chromium.**org/11552009/diff/22001/** > content/browser/renderer_host/**render_process_host_impl.cc<https://codereview.chromium.org/11552009/diff/22001/content/browser/renderer_host/render_process_host_impl.cc> ...
8 years ago (2012-12-19 23:10:00 UTC) #11
Ted C
https://codereview.chromium.org/11552009/diff/22001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/11552009/diff/22001/content/browser/renderer_host/render_process_host_impl.cc#newcode863 content/browser/renderer_host/render_process_host_impl.cc:863: #if defined(OS_ANDROID) On 2012/12/19 23:08:36, aelias wrote: > You ...
8 years ago (2012-12-20 00:42:38 UTC) #12
Ted C
https://codereview.chromium.org/11552009/diff/19002/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/19002/cc/top_controls_manager.cc#newcode22 cc/top_controls_manager.cc:22: static const int64 kAutoHideDelayMs = 1500; On 2012/12/19 22:56:29, ...
8 years ago (2012-12-20 00:54:50 UTC) #13
Ted C
Ping. I'd like to get some semblance of this checked in so I can avoid ...
7 years, 11 months ago (2013-01-07 22:19:33 UTC) #14
jamesr
enne - are the scrolling interactions with the active tree here valid? Left some comments. ...
7 years, 11 months ago (2013-01-08 02:26:48 UTC) #15
enne (OOO)
Whoa there. Does cc need a second animation system? https://codereview.chromium.org/11552009/diff/30001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://codereview.chromium.org/11552009/diff/30001/cc/layer_tree_host_impl.cc#newcode428 cc/layer_tree_host_impl.cc:428: ...
7 years, 11 months ago (2013-01-08 06:23:04 UTC) #16
aelias_OOO_until_Jul13
On 2013/01/08 06:23:04, enne wrote: > Whoa there. > > Does cc need a second ...
7 years, 11 months ago (2013-01-08 07:29:46 UTC) #17
enne (OOO)
On 2013/01/08 07:29:46, aelias wrote: > On 2013/01/08 06:23:04, enne wrote: > > Whoa there. ...
7 years, 11 months ago (2013-01-08 16:03:55 UTC) #18
Ted C
My thoughts on the [active_]animation usage versus what I ended up with. These are biased ...
7 years, 11 months ago (2013-01-08 18:17:32 UTC) #19
enne (OOO)
https://chromiumcodereview.appspot.com/11552009/diff/30001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://chromiumcodereview.appspot.com/11552009/diff/30001/cc/layer_tree_host_impl.cc#newcode428 cc/layer_tree_host_impl.cc:428: m_topControlsManager->UpdateDrawPositions(); On 2013/01/08 18:17:33, Ted C wrote: > On ...
7 years, 11 months ago (2013-01-08 18:23:50 UTC) #20
danakj
On Tue, Jan 8, 2013 at 1:17 PM, <tedchoc@chromium.org> wrote: > I'm animating the position ...
7 years, 11 months ago (2013-01-08 18:26:39 UTC) #21
Ted C
https://chromiumcodereview.appspot.com/11552009/diff/30001/cc/layer_tree_host_impl.cc File cc/layer_tree_host_impl.cc (right): https://chromiumcodereview.appspot.com/11552009/diff/30001/cc/layer_tree_host_impl.cc#newcode428 cc/layer_tree_host_impl.cc:428: m_topControlsManager->UpdateDrawPositions(); On 2013/01/08 18:23:50, enne wrote: > On 2013/01/08 ...
7 years, 11 months ago (2013-01-08 18:32:41 UTC) #22
Ted C
On 2013/01/08 18:26:39, danakj wrote: > On Tue, Jan 8, 2013 at 1:17 PM, <mailto:tedchoc@chromium.org> ...
7 years, 11 months ago (2013-01-08 23:47:17 UTC) #23
Ted C
https://codereview.chromium.org/11552009/diff/30001/cc/layer_tree_settings.cc File cc/layer_tree_settings.cc (right): https://codereview.chromium.org/11552009/diff/30001/cc/layer_tree_settings.cc#newcode46 cc/layer_tree_settings.cc:46: calculateTopControlsPosition = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableTopControlsPositionCalculation); On 2013/01/08 18:17:33, Ted C wrote: ...
7 years, 11 months ago (2013-01-09 23:36:01 UTC) #24
enne (OOO)
On 2013/01/08 23:47:17, Ted C wrote: > Would it be something like creating an Animation ...
7 years, 11 months ago (2013-01-10 04:09:20 UTC) #25
Ted C
On 2013/01/10 04:09:20, enne wrote: > On 2013/01/08 23:47:17, Ted C wrote: > > > ...
7 years, 11 months ago (2013-01-10 18:46:43 UTC) #26
Ian Vollick
On 2013/01/10 18:46:43, Ted C wrote: > On 2013/01/10 04:09:20, enne wrote: > > On ...
7 years, 11 months ago (2013-01-10 19:08:51 UTC) #27
Ted C
On 2013/01/10 19:08:51, vollick wrote: > On 2013/01/10 18:46:43, Ted C wrote: > > On ...
7 years, 11 months ago (2013-01-10 19:34:14 UTC) #28
Ian Vollick
On 2013/01/10 19:34:14, Ted C wrote: > On 2013/01/10 19:08:51, vollick wrote: > > On ...
7 years, 11 months ago (2013-01-10 20:34:22 UTC) #29
Ted C
On 2013/01/10 20:34:22, vollick wrote: > On 2013/01/10 19:34:14, Ted C wrote: > > On ...
7 years, 11 months ago (2013-01-10 20:55:39 UTC) #30
Ian Vollick
On 2013/01/10 20:55:39, Ted C wrote: > On 2013/01/10 20:34:22, vollick wrote: > > On ...
7 years, 11 months ago (2013-01-11 02:53:05 UTC) #31
Ted C
On 2013/01/11 02:53:05, vollick wrote: > On 2013/01/10 20:55:39, Ted C wrote: > > On ...
7 years, 11 months ago (2013-01-11 03:35:44 UTC) #32
wjmaclean
https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc#newcode71 cc/top_controls_manager.cc:71: child_layer->setImplTransform(transform); Why are you using the implTransform for this? ...
7 years, 11 months ago (2013-01-11 14:45:24 UTC) #33
enne (OOO)
If the animation system isn't a good match for what you're trying to do here, ...
7 years, 11 months ago (2013-01-11 17:20:29 UTC) #34
Ted C
https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc#newcode71 cc/top_controls_manager.cc:71: child_layer->setImplTransform(transform); On 2013/01/11 14:45:24, wjmaclean wrote: > Why are ...
7 years, 11 months ago (2013-01-11 17:50:54 UTC) #35
enne (OOO)
https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc#newcode71 cc/top_controls_manager.cc:71: child_layer->setImplTransform(transform); Why does it need to move the content/clip ...
7 years, 11 months ago (2013-01-11 17:57:01 UTC) #36
Ted C
https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/53002/cc/top_controls_manager.cc#newcode71 cc/top_controls_manager.cc:71: child_layer->setImplTransform(transform); On 2013/01/11 17:57:01, enne wrote: > Why does ...
7 years, 11 months ago (2013-01-11 18:10:23 UTC) #37
enne (OOO)
https://codereview.chromium.org/11552009/diff/62001/cc/layer_tree_host.cc File cc/layer_tree_host.cc (right): https://codereview.chromium.org/11552009/diff/62001/cc/layer_tree_host.cc#newcode581 cc/layer_tree_host.cc:581: m_topControlsContentLayer->setIsDrawable(false); Can you add a setDebugName("Top Controls Content") or ...
7 years, 11 months ago (2013-01-12 00:14:59 UTC) #38
Ted C
Sadly my fixed position woes rely on me getting an increased root layer clip size ...
7 years, 11 months ago (2013-01-12 01:23:05 UTC) #39
aelias_OOO_until_Jul13
lgtm for content/browser/renderer_host except for naming nit: https://codereview.chromium.org/11552009/diff/69001/cc/compositor_frame_metadata.h File cc/compositor_frame_metadata.h (right): https://codereview.chromium.org/11552009/diff/69001/cc/compositor_frame_metadata.h#newcode35 cc/compositor_frame_metadata.h:35: gfx::Vector2dF content_offset; ...
7 years, 11 months ago (2013-01-14 21:52:50 UTC) #40
Ted C
+avi - content/port/browser/render_widget_host_view_port.h +jschuh - (IPC security review) - content/common/cc_messages.h @enne - I think you're ...
7 years, 11 months ago (2013-01-14 22:10:42 UTC) #41
Avi (use Gerrit)
content/port lgtm
7 years, 11 months ago (2013-01-14 22:50:39 UTC) #42
jschuh
ipc security lgtm.
7 years, 11 months ago (2013-01-15 15:10:33 UTC) #43
enne (OOO)
cc lgtm
7 years, 11 months ago (2013-01-15 17:32:47 UTC) #44
danakj
I'm just wondering here.. What prevents us from implementing this outside of cc/ in the ...
7 years, 11 months ago (2013-01-15 18:02:43 UTC) #45
Ted C
On 2013/01/15 18:02:43, danakj wrote: > I'm just wondering here.. > > What prevents us ...
7 years, 11 months ago (2013-01-15 18:13:59 UTC) #46
Ted C
https://codereview.chromium.org/11552009/diff/72001/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11552009/diff/72001/cc/top_controls_manager.cc#newcode1 cc/top_controls_manager.cc:1: // Copyright 2012 The Chromium Authors. All rights reserved. ...
7 years, 11 months ago (2013-01-15 19:12:10 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedchoc@chromium.org/11552009/78001
7 years, 11 months ago (2013-01-15 20:08:28 UTC) #48
commit-bot: I haz the power
Failed to apply patch for cc/cc_tests.gyp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 11 months ago (2013-01-15 20:08:40 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedchoc@chromium.org/11552009/83001
7 years, 11 months ago (2013-01-15 21:23:42 UTC) #50
commit-bot: I haz the power
Failed to trigger a try job on android_clang_dbg HTTP Error 400: Bad Request
7 years, 11 months ago (2013-01-15 21:59:42 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedchoc@chromium.org/11552009/85002
7 years, 11 months ago (2013-01-15 21:59:46 UTC) #52
commit-bot: I haz the power
Failed to trigger a try job on linux_chromeos HTTP Error 400: Bad Request
7 years, 11 months ago (2013-01-15 22:26:28 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedchoc@chromium.org/11552009/86003
7 years, 11 months ago (2013-01-15 22:26:39 UTC) #54
commit-bot: I haz the power
Retried try job too often on linux_clang for step(s) compile
7 years, 11 months ago (2013-01-15 23:24:16 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedchoc@chromium.org/11552009/109001
7 years, 11 months ago (2013-01-16 00:11:29 UTC) #56
commit-bot: I haz the power
7 years, 11 months ago (2013-01-16 03:58:40 UTC) #57
Message was sent while issue was closed.
Change committed as 177081

Powered by Google App Engine
This is Rietveld 408576698