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

Issue 11967015: Hide location bar on WebKit programmatic scroll. (Closed)

Created:
7 years, 11 months ago by John Knottenbelt
Modified:
7 years, 6 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, darin-cc_chromium.org
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 TEST=Test that URL bar is hidden when pressing on the various test buttons in http://jsbin.com/eruxon/5 BUG=165317

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Don't plumb through WebLayerTreeView #

Total comments: 4

Patch Set 4 : Rebase #

Patch Set 5 : Remove unnecessary delta to LayerTreeHost::setViewportSize #

Patch Set 6 : Plumbing update. Call the API hideTopControls #

Patch Set 7 : Remove some plumbing. #

Total comments: 7

Patch Set 8 : Add in plumbing for fullscreen bubble (WIP) #

Patch Set 9 : Route requestHideTopControls through browser. #

Total comments: 5

Patch Set 10 : Address comments. #

Total comments: 1

Patch Set 11 : Fix nit. #

Total comments: 7

Patch Set 12 : Rename message requestShowTopControls -> didProgrammaticallyScroll #

Patch Set 13 : Simplify calling TopControlsManager::SetupAnimation #

Total comments: 4

Patch Set 14 : nits (whitespace changes). #

Patch Set 15 : Add scroll offset to didProgrammaticallyScroll message. #

Patch Set 16 : Remove semicolon from end of message declaration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -10 lines) Patch
M cc/input/top_controls_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M cc/input/top_controls_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +24 lines, -8 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 1 chunk +1 line, -0 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 1 chunk +9 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 6 7 8 9 10 11 12 13 14 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 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M components/web_contents_delegate_android/web_contents_delegate_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 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 13 14 1 chunk +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 13 14 1 chunk +6 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 15 2 chunks +8 lines, -0 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 12 13 14 2 chunks +9 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +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 1 chunk +1 line, -0 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 +4 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -2 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 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 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
John Knottenbelt
Ted, please could you take a look. If you think that this CL is ready ...
7 years, 11 months ago (2013-01-16 18:05:36 UTC) #1
enne (OOO)
Whoa, plumbing. Can't you determine via a change during commit in LayerImpl::scrollOffset that a scroll ...
7 years, 11 months ago (2013-01-16 18:12:08 UTC) #2
John Knottenbelt
Hi enne, thanks for taking a look. I'm new to this code, so, please, any ...
7 years, 11 months ago (2013-01-17 18:39:17 UTC) #3
John Knottenbelt
In https://bugs.webkit.org/show_bug.cgi?id=107027, JamesR that I should plumb the scroll event through to WebWidgetClient or WebViewClient ...
7 years, 11 months ago (2013-01-22 18:36:48 UTC) #4
enne (OOO)
I'm not exactly sure what jamesr was suggesting. At the very least, http://code.google.com/p/chromium/issues/detail?id=156175 should help ...
7 years, 11 months ago (2013-01-22 19:01:27 UTC) #5
John Knottenbelt
Ted, is this the correct way of hiding the top controls? Should I be plumbing ...
7 years, 11 months ago (2013-01-24 18:18:28 UTC) #6
Ted C
It seems like the right place to have it hide the top controls (i.e. in ...
7 years, 11 months ago (2013-01-24 22:01:00 UTC) #7
John Knottenbelt
https://codereview.chromium.org/11967015/diff/13001/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11967015/diff/13001/cc/top_controls_manager.cc#newcode55 cc/top_controls_manager.cc:55: ScrollBy(gfx::Vector2dF(0, top_controls_height_)); We can restrict it here to just ...
7 years, 10 months ago (2013-01-30 16:08:45 UTC) #8
John Knottenbelt
7 years, 10 months ago (2013-01-30 16:51:50 UTC) #9
John Knottenbelt
7 years, 9 months ago (2013-03-04 19:34:56 UTC) #10
jamesr
Out of curiosity, where's the code to show the URL bar when the user does ...
7 years, 9 months ago (2013-03-04 21:44:03 UTC) #11
John Knottenbelt
On 2013/03/04 21:44:03, jamesr wrote: > Out of curiosity, where's the code to show the ...
7 years, 9 months ago (2013-03-05 16:41:37 UTC) #12
John Knottenbelt
https://codereview.chromium.org/11967015/diff/27001/cc/top_controls_manager.cc File cc/top_controls_manager.cc (right): https://codereview.chromium.org/11967015/diff/27001/cc/top_controls_manager.cc#newcode65 cc/top_controls_manager.cc:65: // We're in a user scroll. The ultimate authority ...
7 years, 9 months ago (2013-03-05 16:41:47 UTC) #13
jamesr
On 2013/03/05 16:41:37, John Knottenbelt wrote: > On 2013/03/04 21:44:03, jamesr wrote: > > Out ...
7 years, 9 months ago (2013-03-05 18:38:16 UTC) #14
John Knottenbelt
https://codereview.chromium.org/11967015/diff/27001/cc/layer_tree_host.cc File cc/layer_tree_host.cc (right): https://codereview.chromium.org/11967015/diff/27001/cc/layer_tree_host.cc#newcode518 cc/layer_tree_host.cc:518: m_proxy->implThread()->postTask( Posting the task to the TopControlsManager in this ...
7 years, 9 months ago (2013-03-11 17:23:06 UTC) #15
palmer
With this change, the Java FullscreenManager will get invoked, thus explaining to the user how ...
7 years, 9 months ago (2013-03-11 21:57:52 UTC) #16
John Knottenbelt
On 2013/03/11 21:57:52, Chris P. wrote: > With this change, the Java FullscreenManager will get ...
7 years, 9 months ago (2013-03-12 11:13:40 UTC) #17
palmer
> Yes, that plumbing isn't here yet, but that is the intention. We will need ...
7 years, 9 months ago (2013-03-12 19:44:57 UTC) #18
jamesr
https://codereview.chromium.org/11967015/diff/27001/cc/layer_tree_host.cc File cc/layer_tree_host.cc (right): https://codereview.chromium.org/11967015/diff/27001/cc/layer_tree_host.cc#newcode518 cc/layer_tree_host.cc:518: m_proxy->implThread()->postTask( On 2013/03/11 17:23:06, John Knottenbelt wrote: > Posting ...
7 years, 9 months ago (2013-03-14 19:38:34 UTC) #19
John Knottenbelt
In-person code review from Ted and Michael. https://codereview.chromium.org/11967015/diff/46001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/11967015/diff/46001/cc/input/top_controls_manager.cc#newcode70 cc/input/top_controls_manager.cc:70: void TopControlsManager::ShowTopControls(bool ...
7 years, 9 months ago (2013-03-25 15:29:47 UTC) #20
Ted C
lgtm w/ small nit -- thanks for fixing my bracing shame :-D https://chromiumcodereview.appspot.com/11967015/diff/49002/content/public/browser/web_contents_delegate.h File content/public/browser/web_contents_delegate.h ...
7 years, 9 months ago (2013-03-25 16:57:35 UTC) #21
palmer
IPC security LGTM. My comments about renaming the messages might be off-base; feel free to ...
7 years, 9 months ago (2013-03-25 21:16:12 UTC) #22
aelias_OOO_until_Jul13
I'm told that we got approval from security team to not show the warning bubble ...
7 years, 9 months ago (2013-03-25 22:35:35 UTC) #23
aelias_OOO_until_Jul13
https://codereview.chromium.org/11967015/diff/55001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/11967015/diff/55001/cc/input/top_controls_manager.cc#newcode72 cc/input/top_controls_manager.cc:72: if (controls_top_offset_ == 0) Please add these two early ...
7 years, 9 months ago (2013-03-25 22:35:44 UTC) #24
Ted C
The plumbing exists because the browser manages whether the top controls can hide due to ...
7 years, 9 months ago (2013-03-25 22:44:33 UTC) #25
aelias_OOO_until_Jul13
OK, that seems reasonable. We can leave the message and just change the name: https://codereview.chromium.org/11967015/diff/55001/content/common/view_messages.h ...
7 years, 9 months ago (2013-03-25 22:51:09 UTC) #26
John Knottenbelt
https://codereview.chromium.org/11967015/diff/55001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/11967015/diff/55001/cc/input/top_controls_manager.cc#newcode72 cc/input/top_controls_manager.cc:72: if (controls_top_offset_ == 0) On 2013/03/25 22:35:44, aelias wrote: ...
7 years, 9 months ago (2013-03-26 14:49:17 UTC) #27
Ted C
lgtm (again) w/ a couple nits. As for the asymmetric messages (didProgrammaticallyScroll from renderer and ...
7 years, 9 months ago (2013-03-26 16:19:09 UTC) #28
palmer
On 2013/03/25 22:44:33, Ted C wrote: > The plumbing exists because the browser manages whether ...
7 years, 9 months ago (2013-03-26 16:25:41 UTC) #29
John Knottenbelt
https://chromiumcodereview.appspot.com/11967015/diff/65001/components/web_contents_delegate_android/web_contents_delegate_android.cc File components/web_contents_delegate_android/web_contents_delegate_android.cc (right): https://chromiumcodereview.appspot.com/11967015/diff/65001/components/web_contents_delegate_android/web_contents_delegate_android.cc#newcode312 components/web_contents_delegate_android/web_contents_delegate_android.cc:312: On 2013/03/26 16:19:10, Ted C wrote: > one too ...
7 years, 9 months ago (2013-03-26 16:43:16 UTC) #30
Ted C
On 2013/03/26 16:25:41, Chris P. wrote: > On 2013/03/25 22:44:33, Ted C wrote: > > ...
7 years, 9 months ago (2013-03-26 16:47:08 UTC) #31
palmer
7 years, 9 months ago (2013-03-26 17:40:39 UTC) #32
> Currently, this more about correctness (but does cover security as well).  By
> sending this back through the browser process, we can disregard the request if
> we are disabling hiding of the top controls for security reasons (i.e. broken
> https certificate).
> 
> But also allows us to delay and honor the hide request if forcing the top
> controls to be visible  for other reasons (page is loading, ime is showing). 
> Once either/both of these states are done, we can honor a pages request to
hide
> the top controls.

Right, so we agree that the browser process is setting hide/show policy. Thanks!

Powered by Google App Engine
This is Rietveld 408576698