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

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView

Created:
4 years, 4 months ago by tapted
Modified:
4 years, 2 months ago
Reviewers:
CC:
chromium-reviews, tdresser+watch_chromium.org, Ian Vollick, tfarina, dtapuska+chromiumwatch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Old CL: https://codereview.chromium.org/1680613002/ - accumulated too many patchsets Current split looks like: [landed] http://crrev.com/2192443003 MacViews: Fix scrolling when clicking on the views::ScrollView scroll track [landed] http://crrev.com/2188133002 Scroll with Layers in views::ScrollView [landed] http://crrev.com/2193153002 MacViews: Send scrollWheel events as ui::ET_SCROLL http://crrev.com/2197503002 Route Scroll events through a cc::InputHandler http://crrev.com/2194833002 Overscroll and Elasticity for views::ScrollView BUG=615948, 594907, 605131, 355659, 546520, 585766 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : compile #

Patch Set 4 : Combined rebase #

Patch Set 5 : Combined rebase #

Total comments: 4

Patch Set 6 : Combined rebase #

Patch Set 7 : Combined rebase #

Patch Set 8 : Combined rebase at r422996 #

Patch Set 9 : Rebase at r423796 #

Patch Set 10 : working at r423796 #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1094 lines, -245 lines) Patch
M cc/blink/web_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M cc/input/input_handler.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download
M cc/input/scroll_elasticity_helper.h View 3 chunks +8 lines, -0 lines 0 comments Download
M cc/input/scroll_elasticity_helper.cc View 1 2 3 4 5 6 7 3 chunks +105 lines, -2 lines 0 comments Download
M cc/input/scroll_state.h View 1 chunk +3 lines, -1 line 0 comments Download
M cc/layers/layer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +12 lines, -2 lines 0 comments Download
M cc/layers/layer.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +34 lines, -12 lines 0 comments Download
M cc/layers/layer_impl.h View 1 2 3 4 5 6 7 3 chunks +10 lines, -1 line 0 comments Download
M cc/layers/layer_impl.cc View 1 2 3 4 5 6 7 5 chunks +24 lines, -8 lines 0 comments Download
M cc/layers/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -0 lines 0 comments Download
M cc/proto/begin_main_frame_and_commit_state.proto View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/proto/layer.proto View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M cc/proto/property_tree.proto View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/layer_tree_json_parser.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -4 lines 0 comments Download
M cc/test/test_layer_tree_host_base.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/draw_property_utils.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_common.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 4 chunks +12 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +75 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_in_process.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -1 line 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 7 chunks +31 lines, -4 lines 0 comments Download
M cc/trees/property_tree.h View 1 2 3 4 5 6 7 4 chunks +41 lines, -10 lines 0 comments Download
M cc/trees/property_tree.cc View 1 2 3 4 5 6 7 11 chunks +109 lines, -63 lines 0 comments Download
M cc/trees/property_tree_builder.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M cc/trees/property_tree_unittest.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M cc/trees/transform_node.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/transform_node.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -4 lines 0 comments Download
M cc/trees/tree_synchronizer_unittest.cc View 1 2 3 4 5 6 7 3 chunks +29 lines, -25 lines 0 comments Download
M ui/base/resource/resource_bundle.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M ui/compositor/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
A + ui/compositor/overscroll/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
A ui/compositor/overscroll/ui_input_handler.h View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A ui/compositor/overscroll/ui_input_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +150 lines, -0 lines 0 comments Download
A ui/compositor/overscroll/ui_scroll_input_manager.h View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A ui/compositor/overscroll/ui_scroll_input_manager.cc View 1 2 3 4 5 6 7 1 chunk +39 lines, -0 lines 0 comments Download
M ui/events/blink/input_handler_proxy.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M ui/events/blink/input_handler_proxy_unittest.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -2 lines 0 comments Download
M ui/events/blink/input_scroll_elasticity_controller.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -2 lines 0 comments Download
M ui/events/blink/input_scroll_elasticity_controller.cc View 4 chunks +74 lines, -46 lines 0 comments Download
M ui/events/blink/input_scroll_elasticity_controller_unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M ui/views/controls/scroll_view.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/scroll_view.cc View 1 2 3 4 5 6 7 8 3 chunks +21 lines, -3 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/controls/scrollbar/base_scroll_bar.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/scrollbar/cocoa_scroll_bar.h View 1 2 3 4 5 6 2 chunks +7 lines, -2 lines 0 comments Download
M ui/views/controls/scrollbar/cocoa_scroll_bar.mm View 1 2 3 4 5 6 2 chunks +18 lines, -3 lines 0 comments Download
M ui/views/controls/scrollbar/scroll_bar.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ui/views/controls/scrollbar/scrollbar_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/examples/scroll_view_example.h View 3 chunks +6 lines, -0 lines 0 comments Download
M ui/views/examples/scroll_view_example.cc View 4 chunks +49 lines, -4 lines 0 comments Download

Messages

Total messages: 35 (32 generated)
sky
https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constants.h File ui/events/event_constants.h (right): https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constants.h#newcode169 ui/events/event_constants.h:169: EM_PHASE_MAY_BEGIN = 0x1, Use 1 << 0, 1 << ...
4 years, 4 months ago (2016-08-02 17:29:45 UTC) #23
tapted
https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constants.h File ui/events/event_constants.h (right): https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constants.h#newcode169 ui/events/event_constants.h:169: EM_PHASE_MAY_BEGIN = 0x1, On 2016/08/02 17:29:45, sky wrote: > ...
4 years, 4 months ago (2016-08-03 00:18:58 UTC) #25
sky
4 years, 4 months ago (2016-08-03 15:25:17 UTC) #26
On Tue, Aug 2, 2016 at 5:18 PM,  <tapted@chromium.org> wrote:
> Reviewers: sky
> CL: https://codereview.chromium.org/2189583004/
>
>
>
https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constan...
> File ui/events/event_constants.h (right):
>
>
https://codereview.chromium.org/2189583004/diff/80001/ui/events/event_constan...
> ui/events/event_constants.h:169: EM_PHASE_MAY_BEGIN = 0x1,
> On 2016/08/02 17:29:45, sky wrote:
>> Use 1 << 0, 1 << 1 .... to be consistent with EventFlags above.
>
> I'll update http://crrev.com/2193153002 with this and get things
> rebased.
>
>
https://codereview.chromium.org/2189583004/diff/80001/ui/views/controls/scrol...
> File ui/views/controls/scroll_view.cc (right):
>
>
https://codereview.chromium.org/2189583004/diff/80001/ui/views/controls/scrol...
> ui/views/controls/scroll_view.cc:198:
> contents_container_->SetPaintToLayer(true);
> On 2016/08/02 17:29:45, sky wrote:
>> Would it be possible to to turn on paint to layer and setscrollable
> for
>> contents_ directly? Otherwise if contents_ already paints to a layer
> we are
>> unnecessarily creating layers.
>
> One issue was that there's no guarantee that |contents_| will fill the
> viewport after layout. (E.g. viewport: 100x100, content: 50x200 => but
> contents_container_ will be 100*x200). LayerTreeHostImpl does
> hit-testing of the scroll events to find the layer to scroll -- if the
> layer doesn't extend the full width of the viewport then hit tests fail.
>
> Other reasons
> - it might be weird for the on-scroll callback to be directed to
> ScrollView for a layer it didn't create
> - ScrollView may need other guarantees about the layer properties -
> e.g. it should be opaque, and it manipulates a bunch of properties in
> ui::Compositor::SetScrollable
> - the separate container filling the viewport gives the correct effect
> during overscroll (i.e. whole viewport gets elasticity, and a background
> may become visible during overscroll [although currently it just blends
> white with white]).
>
>
> I don't think any of these are blockers for calling SetScrollable on
> |contents| itself, but I think it would be tricky to coordinate the
> layout requirement of |contents|. That is, I don't think we can avoid
> the requirement that the scrolling layer is at least as wide and at
> least as tall as the viewport - and that would mess up the existing
> layout logic.
>
>
> Perhaps the use-case for contents requiring its own layer could be
> obsolete, if the scroll view has it instead? (e.g. we could DCHECK that
> the contents doesn't have a layer).

If making scrollview have the layer means we don't need an additional
view with a layer that seems good to me.

  -Scott

>
>
> (*actually the container width would be 100 minus a bit for the vertical
> scroller, if present.)
>
> Description:
> [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to
> views::ScrollView
>
> Old CL: https://codereview.chromium.org/1680613002/ - accumulated too
> many patchsets
>
> Current split looks like:
>
> [landed] http://crrev.com/2192443003 MacViews: Fix scrolling when clicking
> on
> the views::ScrollView scroll track
> [published] http://crrev.com/2188133002 Scroll with Layers in
> views::ScrollView
> http://crrev.com/2193153002 MacViews: Send scrollWheel events as
> ui::ET_SCROLL
> http://crrev.com/2193153002 Route Scroll events through a cc::InputHandler
> http://crrev.com/2194833002 Overscroll and Elasticity for views::ScrollView
>
> BUG=615948, 594907, 605131, 355659, 546520, 585766
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
>
> Base URL: https://chromium.googlesource.com/chromium/src.git@master
>
> Affected files (+1581, -354 lines):
> M cc/blink/web_layer_impl.cc
> M cc/input/input_handler.h
> M cc/input/scroll_elasticity_helper.h
> M cc/input/scroll_elasticity_helper.cc
> M cc/input/scroll_state.h
> M cc/layers/layer.h
> M cc/layers/layer.cc
> M cc/layers/layer_impl.h
> M cc/layers/layer_impl.cc
> M cc/layers/layer_unittest.cc
> M cc/proto/begin_main_frame_and_commit_state.proto
> M cc/proto/layer.proto
> M cc/proto/property_tree.proto
> M cc/test/layer_tree_json_parser.cc
> M cc/test/layer_tree_test.cc
> M cc/test/test_layer_tree_host_base.cc
> M cc/trees/draw_property_utils.cc
> M cc/trees/layer_tree_host.cc
> M cc/trees/layer_tree_host_common.h
> M cc/trees/layer_tree_host_common.cc
> M cc/trees/layer_tree_host_common_unittest.cc
> M cc/trees/layer_tree_host_impl.h
> M cc/trees/layer_tree_host_impl.cc
> M cc/trees/layer_tree_host_unittest.cc
> M cc/trees/layer_tree_impl.h
> M cc/trees/layer_tree_impl.cc
> M cc/trees/property_tree.h
> M cc/trees/property_tree.cc
> M cc/trees/property_tree_builder.cc
> M cc/trees/property_tree_unittest.cc
> M cc/trees/single_thread_proxy.cc
> M cc/trees/transform_node.h
> M cc/trees/transform_node.cc
> M cc/trees/tree_synchronizer_unittest.cc
> M ui/compositor/BUILD.gn
> M ui/compositor/compositor.h
> M ui/compositor/compositor.cc
> M ui/compositor/compositor.gyp
> M ui/compositor/layer.h
> M ui/compositor/layer.cc
> A + ui/compositor/overscroll/DEPS
> A ui/compositor/overscroll/ui_input_handler.h
> A ui/compositor/overscroll/ui_input_handler.cc
> A ui/compositor/overscroll/ui_scroll_input_manager.h
> A ui/compositor/overscroll/ui_scroll_input_manager.cc
> M ui/events/blink/input_handler_proxy.cc
> M ui/events/blink/input_handler_proxy_unittest.cc
> M ui/events/blink/input_scroll_elasticity_controller.h
> M ui/events/blink/input_scroll_elasticity_controller.cc
> M ui/events/blink/input_scroll_elasticity_controller_unittest.cc
> M ui/events/cocoa/events_mac.mm
> M ui/events/event.h
> M ui/events/event.cc
> M ui/events/event_constants.h
> M ui/events/event_utils.h
> M ui/events/event_utils.cc
> M ui/events/events_default.cc
> M ui/events/events_stub.cc
> M ui/events/win/events_win.cc
> M ui/events/x/events_x.cc
> M ui/views/cocoa/bridged_content_view.mm
> M ui/views/controls/scroll_view.h
> M ui/views/controls/scroll_view.cc
> M ui/views/controls/scroll_view_unittest.cc
> M ui/views/controls/scrollbar/base_scroll_bar.h
> M ui/views/controls/scrollbar/cocoa_scroll_bar.mm
> M ui/views/controls/scrollbar/native_scroll_bar.h
> M ui/views/controls/table/table_view.cc
> M ui/views/examples/scroll_view_example.h
> M ui/views/examples/scroll_view_example.cc
> M ui/views/repeat_controller.h
> M ui/views/view.h
> M ui/views/view.cc
>
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698