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

Issue 1072123002: Refactor GestureNavigation to eliminate code redundancy (Closed)

Created:
5 years, 8 months ago by Nina
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor GestureNavigation to eliminate code redundancy Right now, Gesture Navigation has two very distinct phases: the initial one, where the web contents window receives events and is moved, and the follow up navigation, where the page still hasn't loaded and the user scrolls on the overlay. The meat of this patch is to unify as much of the logic as possible without sacrificing features. A new class is introduced, OverscrollWindowAnimation, and the responsibility of the existing OverscrollNavigationOverlay is steered into performing the actual navigation. Reland of: https://codereview.chromium.org/895543005/. TEST=Overscroll* BUG=467692, 464532, 420121 Committed: https://crrev.com/5384f002f839439ef666ed9688069e42ca5ccdca Cr-Commit-Position: refs/heads/master@{#324275} Committed: https://crrev.com/c0b2fa5d0ad1a266234240d9fac20be93b5ca0fc Cr-Commit-Position: refs/heads/master@{#324526}

Patch Set 1 : Original patch #

Patch Set 2 : Fix invalid pointer reference on WebContentsViewAuraTest.RepeatedQuickOverscrollGestures #

Total comments: 1

Patch Set 3 : Removed comment #

Total comments: 2

Patch Set 4 : Fixed window ownership #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1413 lines, -1767 lines) Patch
M content/browser/BUILD.gn View 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/overscroll_controller_delegate.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/aura/overscroll_navigation_overlay.h View 3 chunks +62 lines, -67 lines 0 comments Download
M content/browser/web_contents/aura/overscroll_navigation_overlay.cc View 1 2 3 6 chunks +119 lines, -153 lines 0 comments Download
M content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc View 6 chunks +255 lines, -75 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_animation.h View 1 chunk +121 lines, -0 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_animation.cc View 1 chunk +151 lines, -0 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_animation_unittest.cc View 1 chunk +226 lines, -0 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_delegate.h View 1 chunk +73 lines, -0 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_delegate.cc View 1 chunk +129 lines, -0 lines 0 comments Download
A content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc View 1 chunk +242 lines, -0 lines 0 comments Download
D content/browser/web_contents/aura/window_slider.h View 1 chunk +0 lines, -156 lines 0 comments Download
D content/browser/web_contents/aura/window_slider.cc View 1 chunk +0 lines, -309 lines 0 comments Download
D content/browser/web_contents/aura/window_slider_unittest.cc View 1 chunk +0 lines, -639 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 7 chunks +0 lines, -39 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 14 chunks +21 lines, -322 lines 2 comments Download
M content/content_browser.gypi View 1 chunk +4 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 chunk +2 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 15 (5 generated)
mfomitchev
LGTM with nits. I think not checking for null in other places is okay.. others ...
5 years, 8 months ago (2015-04-09 17:47:06 UTC) #2
Nina
sadrul@, avi@, can you please review the reland of the GestureNav refactoring patch? I had ...
5 years, 8 months ago (2015-04-09 18:24:02 UTC) #5
sadrul
The fix lgtm, but you should address the ownership issue: https://codereview.chromium.org/1072123002/diff/40001/content/browser/web_contents/aura/overscroll_navigation_overlay.cc File content/browser/web_contents/aura/overscroll_navigation_overlay.cc (right): https://codereview.chromium.org/1072123002/diff/40001/content/browser/web_contents/aura/overscroll_navigation_overlay.cc#newcode180 ...
5 years, 8 months ago (2015-04-09 19:41:24 UTC) #6
Nina
Thanks for the ownership fix, sadrul@! https://codereview.chromium.org/1072123002/diff/40001/content/browser/web_contents/aura/overscroll_navigation_overlay.cc File content/browser/web_contents/aura/overscroll_navigation_overlay.cc (right): https://codereview.chromium.org/1072123002/diff/40001/content/browser/web_contents/aura/overscroll_navigation_overlay.cc#newcode180 content/browser/web_contents/aura/overscroll_navigation_overlay.cc:180: window->Show(); On 2015/04/09 ...
5 years, 8 months ago (2015-04-09 20:18:54 UTC) #7
Avi (use Gerrit)
lgtm stampity stamp
5 years, 8 months ago (2015-04-09 21:16:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1072123002/60001
5 years, 8 months ago (2015-04-09 21:18:40 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-09 22:31:01 UTC) #12
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/c0b2fa5d0ad1a266234240d9fac20be93b5ca0fc Cr-Commit-Position: refs/heads/master@{#324526}
5 years, 8 months ago (2015-04-09 22:33:13 UTC) #13
sadrul
https://codereview.chromium.org/1072123002/diff/60001/content/browser/web_contents/web_contents_view_aura.cc File content/browser/web_contents/web_contents_view_aura.cc (left): https://codereview.chromium.org/1072123002/diff/60001/content/browser/web_contents/web_contents_view_aura.cc#oldcode1191 content/browser/web_contents/web_contents_view_aura.cc:1191: else if (!navigation_overlay_) I believe the 'else' removal was ...
5 years, 8 months ago (2015-04-13 22:38:05 UTC) #14
mfomitchev
5 years, 8 months ago (2015-04-14 19:07:27 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/1072123002/diff/60001/content/browser/web_con...
File content/browser/web_contents/web_contents_view_aura.cc (left):

https://codereview.chromium.org/1072123002/diff/60001/content/browser/web_con...
content/browser/web_contents/web_contents_view_aura.cc:1191: else if
(!navigation_overlay_)
On 2015/04/13 22:38:05, sadrul wrote:
> I believe the 'else' removal was accidental? Because otherwise, we are always
> creating the ONO, even when OC is disabled. Can you fix this up?

Good catch, thanks!
https://codereview.chromium.org/1082313002

Powered by Google App Engine
This is Rietveld 408576698