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

Issue 15029006: Make it possible for the scroll offset delegate to intercept fling. (Closed)

Created:
7 years, 7 months ago by mkosiba (inactive)
Modified:
7 years, 4 months ago
Reviewers:
jamesr
CC:
chromium-reviews, cc-bugs_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Make it possible for the scroll offset delegate to intercept fling. Related Blink CL: https://codereview.chromium.org/14678013 This adds functionality so that the LayerScrollOffsetDelegate can intercept the fling gesture. This is so that the android_webview layer can handle the root layer fling gestures on its own. BUG=b/5006389 TESTS=cc_unittests

Patch Set 1 #

Patch Set 2 : reactivate the patch! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -37 lines) Patch
M android_webview/browser/in_process_view_renderer.cc View 1 1 chunk +5 lines, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 10 chunks +35 lines, -6 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java View 1 5 chunks +74 lines, -2 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java View 1 11 chunks +32 lines, -7 lines 0 comments Download
M android_webview/lib/main/aw_main_delegate.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java View 1 1 chunk +5 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 1 chunk +10 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/web_contents/touch_editable_impl_aura_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 5 chunks +34 lines, -9 lines 0 comments Download
M content/public/common/content_switches.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
mkosiba (inactive)
Hey James! Could you take a quick look at this CL and the associated (http://crrev.com/14678013)? ...
7 years, 7 months ago (2013-05-10 16:40:10 UTC) #1
jamesr
Why don't you just handle the event yourself in android_webview? This doesn't seem good.
7 years, 7 months ago (2013-05-10 16:53:19 UTC) #2
mkosiba (inactive)
On 2013/05/10 16:53:19, jamesr wrote: > Why don't you just handle the event yourself in ...
7 years, 7 months ago (2013-05-10 17:02:16 UTC) #3
jamesr
On 2013/05/10 17:02:16, mkosiba wrote: > On 2013/05/10 16:53:19, jamesr wrote: > > Why don't ...
7 years, 7 months ago (2013-05-10 18:13:21 UTC) #4
mkosiba (inactive)
On 2013/05/10 18:13:21, jamesr wrote: > On 2013/05/10 17:02:16, mkosiba wrote: > > On 2013/05/10 ...
7 years, 7 months ago (2013-05-10 19:54:41 UTC) #5
jamesr
I think it's easier to think about this in terms of the browser<->renderer interface (even ...
7 years, 7 months ago (2013-05-10 20:12:37 UTC) #6
mkosiba (inactive)
On 2013/05/10 20:12:37, jamesr wrote: > I think it's easier to think about this in ...
7 years, 7 months ago (2013-05-10 20:44:29 UTC) #7
mkosiba (inactive)
James, I tried to implement the approach you've outlined and have two questions: On 2013/05/10 ...
7 years, 7 months ago (2013-05-14 17:59:29 UTC) #8
jamesr
> James, > I tried to implement the approach you've outlined and have two questions: ...
7 years, 7 months ago (2013-05-14 20:54:50 UTC) #9
mkosiba (inactive)
7 years, 7 months ago (2013-05-15 13:22:35 UTC) #10
On Tue, May 14, 2013 at 9:54 PM, <jamesr@chromium.org> wrote:

> James,
>>     I tried to implement the approach you've outlined and have two
>> questions:
>>
>
>  On 2013/05/10 20:12:37, jamesr wrote:
>> > In terms of the cc::InputHandler status, you should configure the
>> compositor
>> > such that a fling targetting at the root layer returns
>> ScrollOnMainThread
>>
> and
>
>> > then make sure that on the main thread the fling is returned without
>> being
>> > marked as processed.
>>
>
>  1) Doesn't this mean a latency increase for fling gestures processed this
>> way?
>> It looks like we already know whether we want to handle the gesture on
>> the UI
>> thread based on information we have available on the impl thread, so is
>> the
>>
> hop
>
>> to the renderer thread really necessary?
>>
>
> If the main frame is scrollable but can't be scrolled on the impl thread,
> the
> fling has to go to the main thread doesn't it?  If you know that the main
> thread
> doesn't need to process the event but it is valid to fling, you can return
> ScrollIgnored from the input handler which will map to
> INPUT_EVENT_ACK_STATE_NO_**CONSUMER_EXISTS sent directly from the impl
> thread.
>

I thought in this case I'd want the impl thread to send back a IEAS_NOT_**
CONSUMED. Doesn't IEAS_NO_**CONSUMER_EXISTS mean that there isn't anything
to fling/scroll ?


>
> What's the behavior you want for the case of forced main thread scrolling?
>  If
> you want to still handle the fling up in the android_webview code, then you
> could make the setting on the root layer always pass the fling back up
> without
> going through the main thread.
>

I think that for forced main thread scrolling we'd want to let the main
thread handle the fling, so making the impl thread return the ACK is the
way to go, right?

Powered by Google App Engine
This is Rietveld 408576698