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

Issue 22265009: Implement initial version of scroll end effect

Created:
7 years, 4 months ago by rharrison
Modified:
7 years ago
Reviewers:
Ian Vollick, sadrul, sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Implement initial version of scroll end effect This is the first step of implementing the scroll end effect as shown in the mocks. This version of the code depends primarily on bounds manipulation to achieve the desired effect. It specifically depends on the fast resize path existing in NativeViewHost, which has recently been done for NativeViewHostAura. The intent of this CL is land an initial version of the effect, which can be polished and launched while determining what further work is needed. This CL does not implement the effect in immersive/fullscreen mode and does not implement the subtle shift of the tab contents. Those will be implemented in follow on CLs. BUG=151356 BUG=282463 TEST=Manually confirmed that effect behaves as expected with flag enabled and does not occur with flag disabled. Added new tests and confirmed they work.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Added comment blob and clean up #

Patch Set 3 : Fixed build issue on windows and updated description. #

Total comments: 8

Patch Set 4 : Fixed comment/style issues from sky@ #

Patch Set 5 : Major rewrite to handle corner cases and clean up code #

Total comments: 4

Patch Set 6 : De-nitted #

Patch Set 7 : Fixed stale paint in top container #

Patch Set 8 : Added SlideAnimation to smooth out transitions #

Total comments: 16

Patch Set 9 : Cleaned up animation code #

Total comments: 13

Patch Set 10 : Code cleanup for sadrul@ #

Total comments: 37

Patch Set 11 : Responded to most of sky@'s comments #

Patch Set 12 : Missed adding the delegate changes #

Patch Set 13 : Missed adding the delegate changes #

Patch Set 14 : Rewrote CL to use bounds manipulation instead of transforms. #

Patch Set 15 : Moved clipping into NativeViewHostAura::InstallClip #

Patch Set 16 : Moved the NVHA changes to their own CL #

Patch Set 17 : Rebased, fixed bounds glitch, improved bypass for fullscreen #

Patch Set 18 : Added tests for ScrollEndEffectControllerAsh #

Patch Set 19 : Fixed build breakage #

Patch Set 20 : Fixed another compile issue :-/ #

Total comments: 16

Patch Set 21 : Responded to outstanding comments from sadrul@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+601 lines, -18 lines) Patch
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +19 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view_layout_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +25 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/contents_container.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +26 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/contents_container.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +42 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/scroll_end_effect_controller.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +56 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +110 lines, -4 lines 0 comments Download
A chrome/browser/ui/views/frame/scroll_end_effect_controller_ash_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +282 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/frame/scroll_end_effect_controller_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 17 1 chunk +27 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
rharrison
PTAL
7 years, 4 months ago (2013-08-09 15:34:12 UTC) #1
rharrison
On 2013/08/09 15:34:12, rharrison wrote: > PTAL ping? :-(
7 years, 4 months ago (2013-08-19 20:40:00 UTC) #2
Ian Vollick
On 2013/08/19 20:40:00, rharrison wrote: > On 2013/08/09 15:34:12, rharrison wrote: > > PTAL > ...
7 years, 4 months ago (2013-08-19 21:02:42 UTC) #3
sadrul
This looks reasonable. Please send to owners in the next iteration. https://codereview.chromium.org/22265009/diff/1/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): ...
7 years, 4 months ago (2013-08-20 16:14:58 UTC) #4
rharrison
Adding sky@ for OWNERS https://codereview.chromium.org/22265009/diff/1/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/1/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode85 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:85: CHECK(web_contents_layer_ != NULL); On 2013/08/20 ...
7 years, 4 months ago (2013-08-20 19:57:41 UTC) #5
sky
Is this description correct? I thought we weren't going with the obviously wrong approach?
7 years, 4 months ago (2013-08-20 21:01:52 UTC) #6
rharrison
On 2013/08/20 21:01:52, sky wrote: > Is this description correct? I thought we weren't going ...
7 years, 4 months ago (2013-08-21 17:22:52 UTC) #7
sky
I'm a bit hesitant to look at the nitty gritty until you know how you'are ...
7 years, 4 months ago (2013-08-21 21:01:01 UTC) #8
rharrison
I resolved the inline comments you had. I am going to look at writing a ...
7 years, 4 months ago (2013-08-22 15:08:39 UTC) #9
sky
Also, make sure you deal with the following: webcontents size changing during the animation, or ...
7 years, 4 months ago (2013-08-22 22:53:04 UTC) #10
rharrison
On 2013/08/22 22:53:04, sky wrote: > Also, make sure you deal with the following: webcontents ...
7 years, 3 months ago (2013-09-04 15:43:19 UTC) #11
Ian Vollick
Math in ApplyDelta lg2m. https://codereview.chromium.org/22265009/diff/39001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/39001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode72 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:72: // | web_contents_layer_ | Nice ...
7 years, 3 months ago (2013-09-04 16:41:08 UTC) #12
rharrison
https://codereview.chromium.org/22265009/diff/39001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/39001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode72 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:72: // | web_contents_layer_ | On 2013/09/04 16:41:09, Ian Vollick ...
7 years, 3 months ago (2013-09-04 17:41:17 UTC) #13
rharrison
vollick, can you review this yet again :-D Added in the animation code here instead ...
7 years, 3 months ago (2013-09-04 21:24:36 UTC) #14
Ian Vollick
Yeah, that animation code looks pretty reasonable and simple. https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode137 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:137: ...
7 years, 3 months ago (2013-09-05 02:33:48 UTC) #15
rharrison
https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode137 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:137: if (animation != animation_.get()) On 2013/09/05 02:33:48, Ian Vollick ...
7 years, 3 months ago (2013-09-05 15:33:47 UTC) #16
sadrul
Some minor nits, a couple of questions below. Otherwise looks good! Please note that some ...
7 years, 3 months ago (2013-09-05 16:09:01 UTC) #17
rharrison
sky@, PTAL I have addressed all of sadrul's concerns https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/22265009/diff/75001/chrome/browser/ui/views/frame/browser_view.cc#newcode1862 chrome/browser/ui/views/frame/browser_view.cc:1862: ...
7 years, 3 months ago (2013-09-05 20:18:34 UTC) #18
sky
How come no tests? https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/browser_view.cc#newcode1845 chrome/browser/ui/views/frame/browser_view.cc:1845: return frame_ ? frame_->GetLayer() : ...
7 years, 3 months ago (2013-09-05 21:12:56 UTC) #19
rharrison
sorry about the plenitude of uploads, missed part of the changes and then it succeeded ...
7 years, 3 months ago (2013-09-09 20:01:16 UTC) #20
sky
https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode207 chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc:207: web_clipping_layer_->Add(web_contents_layer_); On 2013/09/09 20:01:17, rharrison wrote: > On 2013/09/05 ...
7 years, 3 months ago (2013-09-11 00:13:39 UTC) #21
rharrison
On 2013/09/11 00:13:39, sky wrote: > https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc > File chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc (right): > > https://codereview.chromium.org/22265009/diff/82008/chrome/browser/ui/views/frame/scroll_end_effect_controller_ash.cc#newcode207 > ...
7 years, 3 months ago (2013-09-11 14:35:58 UTC) #22
rharrison
PTAL, major rewrite of the CL. Ended of having troubles implementing the suggested paths. Took ...
7 years, 3 months ago (2013-09-16 21:05:51 UTC) #23
sky
Could you insert a View whose layer you turn on when necessary and enable the ...
7 years, 3 months ago (2013-09-16 23:25:01 UTC) #24
sky
And the view would always be there. -Scott On Mon, Sep 16, 2013 at 4:24 ...
7 years, 3 months ago (2013-09-16 23:25:15 UTC) #25
Ian Vollick
On 2013/09/16 23:25:15, sky wrote: > And the view would always be there. > > ...
7 years, 3 months ago (2013-09-17 12:40:45 UTC) #26
rharrison
On 2013/09/17 12:40:45, Ian Vollick wrote: > On 2013/09/16 23:25:15, sky wrote: > > And ...
7 years, 3 months ago (2013-09-17 13:44:47 UTC) #27
sky
Generally we try to avoid animating the bounds of Windows that can be big. For ...
7 years, 3 months ago (2013-09-17 16:00:18 UTC) #28
rharrison
Looking at the maximize animation code, my understanding is that it is fading between a ...
7 years, 3 months ago (2013-09-18 16:25:25 UTC) #29
sky
On Wed, Sep 18, 2013 at 9:25 AM, <rharrison@chromium.org> wrote: > Looking at the maximize ...
7 years, 3 months ago (2013-09-18 17:24:05 UTC) #30
rharrison
Currently my code doesn't resize the content, it just moves it to the origin, so ...
7 years, 3 months ago (2013-09-18 18:03:23 UTC) #31
rharrison
Just built the CL and tested it on daisy. Showed it to vollick and sadrul, ...
7 years, 3 months ago (2013-09-18 20:17:39 UTC) #32
sky
Can you use the fast_resize code path of NativeViewHost to avoid having to roll your ...
7 years, 3 months ago (2013-09-18 21:29:28 UTC) #33
rharrison
I have implemented a version of this that uses the NativeViewHost fast_resize code path to ...
7 years, 3 months ago (2013-09-23 20:43:55 UTC) #34
rharrison
On 2013/09/23 20:43:55, rharrison wrote: > I have implemented a version of this that uses ...
7 years, 2 months ago (2013-09-24 15:36:17 UTC) #35
sky
Could you also separate out the NativeViewHostAura changes into its own patch and send that ...
7 years, 2 months ago (2013-09-24 17:22:49 UTC) #36
rharrison
Do you want the gravity and InstallClip changes in one CL, or should I break ...
7 years, 2 months ago (2013-09-24 18:06:20 UTC) #37
rharrison
On 2013/09/24 18:06:20, rharrison wrote: > Do you want the gravity and InstallClip changes in ...
7 years, 2 months ago (2013-09-24 18:59:14 UTC) #38
rharrison
PTAL, Rebased onto changes to NVHA and add tests
7 years, 2 months ago (2013-10-16 15:31:04 UTC) #39
rharrison
The prerequisite CL for this is in the CQ, so PTAL.
7 years, 1 month ago (2013-10-25 13:25:27 UTC) #40
sadrul
Looks pretty good. Some nits: https://codereview.chromium.org/22265009/diff/157001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/22265009/diff/157001/chrome/browser/ui/views/frame/browser_view.cc#newcode2595 chrome/browser/ui/views/frame/browser_view.cc:2595: // related cases have ...
7 years, 1 month ago (2013-10-25 18:28:24 UTC) #41
rharrison
PTAL https://codereview.chromium.org/22265009/diff/157001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/22265009/diff/157001/chrome/browser/ui/views/frame/browser_view.cc#newcode2595 chrome/browser/ui/views/frame/browser_view.cc:2595: // related cases have been fixed in the ...
7 years, 1 month ago (2013-11-18 21:52:25 UTC) #42
rharrison
sky, sadrul, do you have any other comments on this CL?
7 years ago (2013-11-26 17:00:39 UTC) #43
rharrison
7 years ago (2013-11-29 15:54:13 UTC) #44
On 2013/11/26 17:00:39, rharrison wrote:
> sky, sadrul, do you have any other comments on this CL?

I am going to be on leave/vacation for December while I work on my thesis and
for the winter holidays. In the new year I am expecting to be leaving the Chrome
team, so I won't be working on this CL anymore. There are people in WAT that are
going to be taking over the scroll end effect work. I am leaving this CL up for
them to reference, but there will be a new version from one of them in the
future.

Powered by Google App Engine
This is Rietveld 408576698