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

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed)

Created:
7 years, 8 months ago by Michael van Ouwerkerk
Modified:
5 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, apatrick_chromium, trchen, Miguel Garcia, mkosiba (inactive)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Hide location bar on Javascript-initiated scroll. Many sites use window.scrollTo(0,1) and other offsets as a means of hiding the location bar on mobile. In fact, Android Browser and iOS support hiding the location bar on any Javascript-initiated scroll. See also corresponding WebKit bugs: https://bugs.webkit.org/show_bug.cgi?id=107027 This is a patch based on on jknottten's work: https://chromiumcodereview.appspot.com/11967015/ TEST=Test that URL bar is hidden when pressing on the various test buttons in http://jsbin.com/eruxon/5 BUG=165317 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201303

Patch Set 1 #

Total comments: 7

Patch Set 2 : Address minor issues found in review. #

Patch Set 3 : Upload again after sync. #

Total comments: 3

Patch Set 4 : Merge after sync. #

Total comments: 11

Patch Set 5 : Address cleanup issues raised in review. #

Patch Set 6 : Merge ShowTopControls into UpdateTopControlsState, use new TopControlsState enum in plumbing, gener… #

Total comments: 10

Patch Set 7 : Move some plumbing to the chrome layer. #

Patch Set 8 : Restore handling of ViewMsg_UpdateTopControlsState in RenderViewImpl. #

Total comments: 4

Patch Set 9 : Define content::TopControlsState for public content API. #

Patch Set 10 : Sync and merge. #

Patch Set 11 : Sync and merge. #

Total comments: 5

Patch Set 12 : Move TopControlsState.java generation to content/common. #

Patch Set 13 : Sync, merge, address review comments. #

Patch Set 14 : Sync and merge. #

Patch Set 15 : Sync and merge. #

Total comments: 6

Patch Set 16 : Sync, merge, address style nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -56 lines) Patch
M cc/input/top_controls_manager.h View 1 2 3 4 5 4 chunks +4 lines, -9 lines 0 comments Download
M cc/input/top_controls_manager.cc View 1 2 3 4 5 6 6 chunks +43 lines, -26 lines 0 comments Download
A cc/input/top_controls_state.h View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -0 lines 0 comments Download
M components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.h View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M content/content.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
A + content/public/android/java/src/org/chromium/content/common/TopControlsState.template View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -5 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
A content/public/common/top_controls_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +19 lines, -0 lines 0 comments Download
A content/public/common/top_controls_state_list.h View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -0 lines 0 comments Download
M content/public/renderer/render_view.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -5 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +29 lines, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 69 (0 generated)
Michael van Ouwerkerk
Hi guys, could you please review this change? Thanks!
7 years, 8 months ago (2013-04-15 16:56:41 UTC) #1
Ted C
lgtm w/ a few style nits for the androidy side of things https://codereview.chromium.org/14139013/diff/1/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc ...
7 years, 8 months ago (2013-04-16 02:05:58 UTC) #2
Michael van Ouwerkerk
Thanks for the quick review Ted! https://codereview.chromium.org/14139013/diff/1/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/14139013/diff/1/cc/input/top_controls_manager.cc#newcode94 cc/input/top_controls_manager.cc:94: On 2013/04/16 02:05:58, ...
7 years, 8 months ago (2013-04-16 15:02:47 UTC) #3
palmer
https://codereview.chromium.org/14139013/diff/18001/cc/input/top_controls_manager.h File cc/input/top_controls_manager.h (right): https://codereview.chromium.org/14139013/diff/18001/cc/input/top_controls_manager.h#newcode59 cc/input/top_controls_manager.h:59: void ShowTopControls(bool show); Should this (and its implementation) be ...
7 years, 8 months ago (2013-04-16 17:12:42 UTC) #4
aelias_OOO_until_Jul13
We want to avoid #ifdef at least within cc/ so that Linux-based unit tests can ...
7 years, 8 months ago (2013-04-16 22:16:17 UTC) #5
palmer
IPC security LGTM.
7 years, 8 months ago (2013-04-16 22:22:34 UTC) #6
Michael van Ouwerkerk
joth/joi: could you please check for OWNERS approval in content and components? aelias: OWNERS for ...
7 years, 8 months ago (2013-04-17 13:52:09 UTC) #7
Jói
LGTM for content/public/browser. joth@ is a better reviewer for the Java bits.
7 years, 8 months ago (2013-04-17 13:56:23 UTC) #8
jam
https://codereview.chromium.org/14139013/diff/23001/components/web_contents_delegate_android/web_contents_delegate_android.h File components/web_contents_delegate_android/web_contents_delegate_android.h (right): https://codereview.chromium.org/14139013/diff/23001/components/web_contents_delegate_android/web_contents_delegate_android.h#newcode95 components/web_contents_delegate_android/web_contents_delegate_android.h:95: nit: here and above, do not add blank spaces ...
7 years, 8 months ago (2013-04-17 16:24:58 UTC) #9
aelias_OOO_until_Jul13
The new ViewMsg and TopControlsManager method looks redundant with UpdateTopControlsState. Why do you need a ...
7 years, 8 months ago (2013-04-17 18:58:17 UTC) #10
Ted C
On 2013/04/17 18:58:17, aelias wrote: > The new ViewMsg and TopControlsManager method looks redundant with ...
7 years, 8 months ago (2013-04-17 20:18:00 UTC) #11
joth
cc: mkosiba FYI - new didProgrammaticalllyScroll call from JS -> WebContentsDelegate. java files lgtm. You ...
7 years, 8 months ago (2013-04-17 20:34:30 UTC) #12
Michael van Ouwerkerk
Thanks for the review! Please take another look. https://codereview.chromium.org/14139013/diff/23001/components/web_contents_delegate_android/web_contents_delegate_android.h File components/web_contents_delegate_android/web_contents_delegate_android.h (right): https://codereview.chromium.org/14139013/diff/23001/components/web_contents_delegate_android/web_contents_delegate_android.h#newcode95 components/web_contents_delegate_android/web_contents_delegate_android.h:95: On ...
7 years, 8 months ago (2013-04-18 18:11:38 UTC) #13
Michael van Ouwerkerk
James, Alexandre seems to be too busy / on vacation. Would you mind taking a ...
7 years, 8 months ago (2013-04-19 13:21:34 UTC) #14
Michael van Ouwerkerk
John, I think I have addressed your comments. Could you please take another look for ...
7 years, 8 months ago (2013-04-19 13:25:47 UTC) #15
jam
https://codereview.chromium.org/14139013/diff/23001/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/14139013/diff/23001/content/common/view_messages.h#newcode1370 content/common/view_messages.h:1370: IPC_MESSAGE_ROUTED1(ViewMsg_ShowTopControls, bool /* show */) On 2013/04/18 18:11:38, Michael ...
7 years, 8 months ago (2013-04-19 18:30:21 UTC) #16
jamesr
cc/ and content/renderer lgtm. Where's the logic that shows the URL bar after it's been ...
7 years, 8 months ago (2013-04-19 19:28:31 UTC) #17
palmer
> Where's the logic that shows the URL bar after it's been hidden and the ...
7 years, 8 months ago (2013-04-19 20:50:02 UTC) #18
Ted C
On 2013/04/19 19:28:31, jamesr wrote: > cc/ and content/renderer lgtm. > > Where's the logic ...
7 years, 8 months ago (2013-04-19 21:04:01 UTC) #19
jamesr
On 2013/04/19 21:04:01, Ted C wrote: > On 2013/04/19 19:28:31, jamesr wrote: > > cc/ ...
7 years, 8 months ago (2013-04-19 21:05:10 UTC) #20
Ted C
On 2013/04/19 21:05:10, jamesr wrote: > On 2013/04/19 21:04:01, Ted C wrote: > > On ...
7 years, 8 months ago (2013-04-19 21:34:48 UTC) #21
jamesr
That's not what the security team agreed to and would be a serious regression from ...
7 years, 8 months ago (2013-04-19 22:03:31 UTC) #22
Ted C
On 2013/04/19 22:03:31, jamesr wrote: > That's not what the security team agreed to and ...
7 years, 8 months ago (2013-04-19 22:07:50 UTC) #23
palmer
> This is why we have the escape hatch that we always show the top ...
7 years, 8 months ago (2013-04-19 22:09:05 UTC) #24
jamesr
On this page: http://webstuff.nfshost.com/scrollto/scrollcapture.html in android browser the URL bar is available when swiping down ...
7 years, 8 months ago (2013-04-19 22:42:43 UTC) #25
aelias_OOO_until_Jul13
On 2013/04/19 18:30:21, jam wrote: > I see. it seems like a layering violation that ...
7 years, 8 months ago (2013-04-20 04:23:34 UTC) #26
jamesr
On 2013/04/20 04:23:34, aelias wrote: > On 2013/04/19 18:30:21, jam wrote: > > I see. ...
7 years, 8 months ago (2013-04-22 21:45:29 UTC) #27
aelias_OOO_until_Jul13
Sounds good, let's move the ViewMsg_ShowTopControls and ViewMsg_UpdateTopControlsState to chrome/. chrome/common/render_messages.h looks appropriate. I also ...
7 years, 8 months ago (2013-04-22 21:58:11 UTC) #28
Michael van Ouwerkerk
Agreed on merging ShowTopControls into UpdateTopControlsState and using an enum for its arguments. Done. Moving ...
7 years, 7 months ago (2013-05-02 13:46:32 UTC) #29
jamesr1
On May 2, 2013 6:46 AM, <mvanouwerkerk@chromium.org> wrote: > > Agreed on merging ShowTopControls into ...
7 years, 7 months ago (2013-05-02 17:10:33 UTC) #30
aelias_OOO_until_Jul13
https://codereview.chromium.org/14139013/diff/71001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/14139013/diff/71001/cc/input/top_controls_manager.cc#newcode62 cc/input/top_controls_manager.cc:62: DCHECK(current != HIDDEN); Nit, formulate it as: DCHECK(!(constraints == ...
7 years, 7 months ago (2013-05-02 18:44:22 UTC) #31
Michael van Ouwerkerk
Thanks for the quick reviews! I have a plan for moving the IPC message to ...
7 years, 7 months ago (2013-05-03 16:10:17 UTC) #32
palmer
That sounds fine to me, but I'll defer to other people who know more. Putting ...
7 years, 7 months ago (2013-05-03 17:55:53 UTC) #33
jamesr
On 2013/05/03 16:10:17, Michael van Ouwerkerk wrote: > Thanks for the quick reviews! > > ...
7 years, 7 months ago (2013-05-03 17:57:34 UTC) #34
Michael van Ouwerkerk
Thanks for the reviews! Please take another look. ChromeViewMsg_UpdateTopControlsState is now sent from a class ...
7 years, 7 months ago (2013-05-08 16:21:15 UTC) #35
Michael van Ouwerkerk
I noticed I should leave some version of the old code path that uses ViewMsg_UpdateTopControlsState. ...
7 years, 7 months ago (2013-05-08 16:46:24 UTC) #36
Michael van Ouwerkerk
On 2013/05/08 16:46:24, Michael van Ouwerkerk wrote: > I noticed I should leave some version ...
7 years, 7 months ago (2013-05-08 17:26:43 UTC) #37
jamesr
https://codereview.chromium.org/14139013/diff/85001/content/public/renderer/render_view.h File content/public/renderer/render_view.h (right): https://codereview.chromium.org/14139013/diff/85001/content/public/renderer/render_view.h#newcode10 content/public/renderer/render_view.h:10: #include "cc/input/top_controls_state.h" NAK, don't include cc types or headers ...
7 years, 7 months ago (2013-05-08 17:31:15 UTC) #38
jam
I thought the top controls stuff was going to move out of content?
7 years, 7 months ago (2013-05-09 21:08:57 UTC) #39
Michael van Ouwerkerk
https://codereview.chromium.org/14139013/diff/85001/content/public/renderer/render_view.h File content/public/renderer/render_view.h (right): https://codereview.chromium.org/14139013/diff/85001/content/public/renderer/render_view.h#newcode10 content/public/renderer/render_view.h:10: #include "cc/input/top_controls_state.h" On 2013/05/08 17:31:16, jamesr wrote: > NAK, ...
7 years, 7 months ago (2013-05-13 13:27:18 UTC) #40
Michael van Ouwerkerk
On 2013/05/09 21:08:57, jam wrote: > I thought the top controls stuff was going to ...
7 years, 7 months ago (2013-05-13 13:43:21 UTC) #41
Michael van Ouwerkerk
James, Alexandre, John, could you please take another look? I think I have addressed all ...
7 years, 7 months ago (2013-05-14 09:47:20 UTC) #42
aelias_OOO_until_Jul13
lgtm functionality-wise. (Though it looks like non-Android trybots are red, you probably need to fix ...
7 years, 7 months ago (2013-05-14 20:57:52 UTC) #43
jamesr
lgtm https://codereview.chromium.org/14139013/diff/107001/content/renderer/render_view_impl.h File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/14139013/diff/107001/content/renderer/render_view_impl.h#newcode733 content/renderer/render_view_impl.h:733: virtual cc::TopControlsState ContentToCcTopControlsState( this definitely doesn't need to ...
7 years, 7 months ago (2013-05-15 18:14:17 UTC) #44
Michael van Ouwerkerk
Hi joi, could you please take one more look for content/public/ ? There have been ...
7 years, 7 months ago (2013-05-15 18:52:11 UTC) #45
Jói
LGTM for //content/public.
7 years, 7 months ago (2013-05-15 19:24:44 UTC) #46
Nico
https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi#newcode2270 chrome/chrome_browser.gypi:2270: '../content/public/common/top_controls_state_list.h', Why is a file from content in the ...
7 years, 7 months ago (2013-05-15 19:47:45 UTC) #47
Michael van Ouwerkerk
https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi#newcode2270 chrome/chrome_browser.gypi:2270: '../content/public/common/top_controls_state_list.h', On 2013/05/15 19:47:46, Nico wrote: > Why is ...
7 years, 7 months ago (2013-05-15 20:23:50 UTC) #48
Nico
https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): https://codereview.chromium.org/14139013/diff/107001/chrome/chrome_browser.gypi#newcode2270 chrome/chrome_browser.gypi:2270: '../content/public/common/top_controls_state_list.h', On 2013/05/15 20:23:50, Michael van Ouwerkerk wrote: > ...
7 years, 7 months ago (2013-05-15 21:02:06 UTC) #49
Michael van Ouwerkerk
Nico: You're right it was odd. Seems like a leftover from previous revisions. I've moved ...
7 years, 7 months ago (2013-05-16 16:25:59 UTC) #50
Nico
chrome/ lgtm
7 years, 7 months ago (2013-05-16 17:33:33 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/119001
7 years, 7 months ago (2013-05-16 18:06:47 UTC) #52
Nico
On 2013/05/16 18:06:47, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 7 months ago (2013-05-16 18:15:28 UTC) #53
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3364
7 years, 7 months ago (2013-05-16 19:20:25 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/119001
7 years, 7 months ago (2013-05-17 09:21:18 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/133001
7 years, 7 months ago (2013-05-17 10:00:16 UTC) #56
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3518
7 years, 7 months ago (2013-05-17 11:10:05 UTC) #57
Jói
Patch set #14 LGTM
7 years, 7 months ago (2013-05-17 18:06:47 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/133001
7 years, 7 months ago (2013-05-17 18:30:40 UTC) #59
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3596
7 years, 7 months ago (2013-05-17 19:41:58 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/145001
7 years, 7 months ago (2013-05-20 11:20:37 UTC) #61
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3739
7 years, 7 months ago (2013-05-20 12:27:37 UTC) #62
Michael van Ouwerkerk
This issue has been marked private, does anyone know why? I think that's why the ...
7 years, 7 months ago (2013-05-20 13:46:32 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/145001
7 years, 7 months ago (2013-05-20 14:53:10 UTC) #64
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3743
7 years, 7 months ago (2013-05-20 15:01:58 UTC) #65
brettw
just some random style nits, lgtm https://codereview.chromium.org/14139013/diff/145001/content/public/common/top_controls_state.h File content/public/common/top_controls_state.h (right): https://codereview.chromium.org/14139013/diff/145001/content/public/common/top_controls_state.h#newcode8 content/public/common/top_controls_state.h:8: namespace content { ...
7 years, 7 months ago (2013-05-20 23:19:38 UTC) #66
Michael van Ouwerkerk
Thanks Brett! https://codereview.chromium.org/14139013/diff/145001/content/public/common/top_controls_state.h File content/public/common/top_controls_state.h (right): https://codereview.chromium.org/14139013/diff/145001/content/public/common/top_controls_state.h#newcode8 content/public/common/top_controls_state.h:8: namespace content { On 2013/05/20 23:19:38, brettw ...
7 years, 7 months ago (2013-05-21 10:02:13 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvanouwerkerk@chromium.org/14139013/137002
7 years, 7 months ago (2013-05-21 10:26:10 UTC) #68
commit-bot: I haz the power
7 years, 7 months ago (2013-05-21 14:00:21 UTC) #69
Message was sent while issue was closed.
Change committed as 201303

Powered by Google App Engine
This is Rietveld 408576698