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

Issue 335943002: [Android] Composited selection handle rendering (Closed)

Created:
6 years, 6 months ago by jdduke (slow)
Modified:
6 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jdduke+watch_chromium.org, miu+watch_chromium.org, nona+watch_chromium.org, penghuang+watch_chromium.org, James Su, yukishiino+watch_chromium.org, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@input_native_handles_final
Project:
chromium
Visibility:
Public.

Description

[Android] Composited selection handle rendering Previously, selection handles on Android were rendered using a PopupWindow construct. This is problematic for a number of reasons, the chief being poor performance and responsiveness. As an alternative, support a native, composited layer rendering pipeline for selection handles using the browser compositor. Also port selection handle-related logic from Java to C++, using a PopupWindow rendering fallback for WebView, lacking a proper browser compositor. This change depends directly on selection update and visibility routing through the compositor: https://codereview.chromium.org/300323005/ BUG=380781, 135959, 279489, 393948 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284491

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Cleanup, working paste popup #

Patch Set 4 : Rebase and cleanup #

Patch Set 5 : Remove dead code #

Patch Set 6 : Don't hide handles while dragging #

Patch Set 7 : Working tests #

Patch Set 8 : TouchHandle tests #

Patch Set 9 : Test and comments #

Total comments: 18

Patch Set 10 : Code review per cjhopman@ #

Patch Set 11 : Clean up paste popup interaction #

Total comments: 24

Patch Set 12 : Code review #

Patch Set 13 : Fixes for WebView positioning and visibility #

Patch Set 14 : Rebase #

Total comments: 14

Patch Set 15 : Safeguards for WebView garbage collection (WeakReference) #

Patch Set 16 : Tweaks to dragging and visibility #

Total comments: 10

Patch Set 17 : More code review #

Total comments: 8

Patch Set 18 : Rebase #

Patch Set 19 : Code review and comments #

Total comments: 2

Patch Set 20 : Don't use DCHECK'ed condition #

Patch Set 21 : Partial fix for L #

Total comments: 2

Patch Set 22 : Decouple from compositor positioning #

Patch Set 23 : Remove old tests #

Patch Set 24 : Update android_webview.gyp #

Total comments: 2

Patch Set 25 : Fix webview dependency and comment #

Patch Set 26 : Fix gcc #

Patch Set 27 : Fix package #

Patch Set 28 : Mac/Win compilation fixes #

Patch Set 29 : Fix animation tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3174 lines, -2244 lines) Patch
M android_webview/android_webview.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -1 line 0 comments Download
M android_webview/java_library_common.mk View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +6 lines, -0 lines 0 comments Download
A content/browser/android/composited_touch_handle_drawable.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +48 lines, -0 lines 0 comments Download
A content/browser/android/composited_touch_handle_drawable.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +165 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 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 5 chunks +9 lines, -5 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 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 9 chunks +46 lines, -35 lines 0 comments Download
A content/browser/android/popup_touch_handle_drawable.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +40 lines, -0 lines 0 comments Download
A content/browser/android/popup_touch_handle_drawable.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +80 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/selection_event_type.h View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/selection_event_type_list.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_handle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +131 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_handle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +237 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_handle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +433 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_selection_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +136 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_selection_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +344 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/touch_selection_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +492 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 chunks +26 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 19 chunks +161 lines, -10 lines 0 comments Download
M content/content.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +13 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +10 lines, -0 lines 0 comments Download
M content/content_jni.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 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 15 16 17 18 19 20 21 22 23 24 25 26 27 31 chunks +139 lines, -298 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/input/CursorController.java View 1 2 3 4 1 chunk +0 lines, -41 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/input/HandleView.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -412 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/input/HandleViewResources.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +100 lines, -0 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java View 1 2 3 4 1 chunk +0 lines, -332 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +204 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +295 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/input/SelectionEventType.template View 1 1 chunk +13 lines, -0 lines 0 comments Download
D content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -216 lines 0 comments Download
D content/public/android/javatests/src/org/chromium/content/browser/input/InsertionHandleTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -408 lines 0 comments Download
D content/public/android/javatests/src/org/chromium/content/browser/input/SelectionHandleTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -481 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
jdduke (slow)
Chris, I'd like to start initial review of this change. I realize it's rather large, ...
6 years, 5 months ago (2014-06-30 18:55:52 UTC) #1
jdduke (slow)
Chris, would you like me to find another reviewer?
6 years, 5 months ago (2014-07-07 18:26:57 UTC) #2
cjhopman
On 2014/07/07 18:26:57, jdduke wrote: > Chris, would you like me to find another reviewer? ...
6 years, 5 months ago (2014-07-07 18:51:08 UTC) #3
jdduke (slow)
On 2014/07/07 18:51:08, cjhopman wrote: > On 2014/07/07 18:26:57, jdduke wrote: > > Chris, would ...
6 years, 5 months ago (2014-07-07 19:00:38 UTC) #4
cjhopman
High level: this looks great. https://codereview.chromium.org/335943002/diff/160001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/160001/content/browser/renderer_host/input/touch_handle.cc#newcode183 content/browser/renderer_host/input/touch_handle.cc:183: drawable_->SetVisible(is_visible_); Should this call ...
6 years, 5 months ago (2014-07-07 22:13:41 UTC) #5
jdduke (slow)
Thanks for review! https://codereview.chromium.org/335943002/diff/160001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/160001/content/browser/renderer_host/input/touch_handle.cc#newcode183 content/browser/renderer_host/input/touch_handle.cc:183: drawable_->SetVisible(is_visible_); On 2014/07/07 22:13:40, cjhopman wrote: ...
6 years, 5 months ago (2014-07-08 00:54:45 UTC) #6
jdduke (slow)
https://codereview.chromium.org/335943002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java File content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java (right): https://codereview.chromium.org/335943002/diff/160001/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java#newcode92 content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java:92: if (!mAllowAutomaticShowing) return; On 2014/07/07 22:13:41, cjhopman wrote: > ...
6 years, 5 months ago (2014-07-08 01:35:42 UTC) #7
cjhopman
https://codereview.chromium.org/335943002/diff/210001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/335943002/diff/210001/content/browser/android/content_view_core_impl.cc#newcode805 content/browser/android/content_view_core_impl.cc:805: if (anchor.x() == focus.x() && anchor.y() == focus.y()) nit: ...
6 years, 5 months ago (2014-07-09 22:29:12 UTC) #8
jdduke (slow)
Thanks again for review. I need to do some deeper investigation of the WebView animation ...
6 years, 5 months ago (2014-07-10 02:08:40 UTC) #9
jdduke (slow)
https://codereview.chromium.org/335943002/diff/290001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/335943002/diff/290001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode2340 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:2340: return new PopupTouchHandleDrawable( So, I think the one major ...
6 years, 5 months ago (2014-07-10 21:11:28 UTC) #10
cjhopman
https://codereview.chromium.org/335943002/diff/290001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/290001/content/browser/renderer_host/input/touch_handle.cc#newcode48 content/browser/renderer_host/input/touch_handle.cc:48: EndFade(); I think that, since EndDrag() can trigger a ...
6 years, 5 months ago (2014-07-14 18:23:52 UTC) #11
jdduke (slow)
https://codereview.chromium.org/335943002/diff/290001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/290001/content/browser/renderer_host/input/touch_handle.cc#newcode48 content/browser/renderer_host/input/touch_handle.cc:48: EndFade(); On 2014/07/14 18:23:52, cjhopman wrote: > I think ...
6 years, 5 months ago (2014-07-15 15:44:25 UTC) #12
cjhopman
Mostly just some notes about weird edge cases. I didn't really look into the states ...
6 years, 5 months ago (2014-07-15 18:40:28 UTC) #13
jdduke (slow)
https://codereview.chromium.org/335943002/diff/350001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/350001/content/browser/renderer_host/input/touch_handle.cc#newcode93 content/browser/renderer_host/input/touch_handle.cc:93: deferred_orientation_ = TOUCH_HANDLE_ORIENTATION_UNDEFINED; On 2014/07/15 18:40:28, cjhopman wrote: > ...
6 years, 5 months ago (2014-07-15 21:51:57 UTC) #14
cjhopman
https://codereview.chromium.org/335943002/diff/370001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/370001/content/browser/renderer_host/input/touch_handle.cc#newcode178 content/browser/renderer_host/input/touch_handle.cc:178: void TouchHandle::EndDrag() { This can DCHECK(enabled_) and then the ...
6 years, 5 months ago (2014-07-17 00:48:38 UTC) #15
jdduke (slow)
https://codereview.chromium.org/335943002/diff/370001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/370001/content/browser/renderer_host/input/touch_handle.cc#newcode178 content/browser/renderer_host/input/touch_handle.cc:178: void TouchHandle::EndDrag() { On 2014/07/17 00:48:37, cjhopman wrote: > ...
6 years, 5 months ago (2014-07-17 15:43:04 UTC) #16
cjhopman
lgtm https://codereview.chromium.org/335943002/diff/410001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/410001/content/browser/renderer_host/input/touch_handle.cc#newcode192 content/browser/renderer_host/input/touch_handle.cc:192: if (enabled_ && animate_deferred_fade_) { enabled_ is always ...
6 years, 5 months ago (2014-07-17 16:04:31 UTC) #17
jdduke (slow)
https://codereview.chromium.org/335943002/diff/410001/content/browser/renderer_host/input/touch_handle.cc File content/browser/renderer_host/input/touch_handle.cc (right): https://codereview.chromium.org/335943002/diff/410001/content/browser/renderer_host/input/touch_handle.cc#newcode192 content/browser/renderer_host/input/touch_handle.cc:192: if (enabled_ && animate_deferred_fade_) { On 2014/07/17 16:04:31, cjhopman ...
6 years, 5 months ago (2014-07-18 18:49:27 UTC) #18
jdduke (slow)
aelias@: PTAL for owner review of content/browser/renderer_host/render_widget_host_view_android.{cc,h}. I'm somewhat inclined to land this using the ...
6 years, 5 months ago (2014-07-18 18:56:39 UTC) #19
aelias_OOO_until_Jul13
lgtm for RWHVA I'm okay with landing this before the Blink side, it does seem ...
6 years, 5 months ago (2014-07-18 19:06:40 UTC) #20
jdduke (slow)
https://codereview.chromium.org/335943002/diff/450001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/335943002/diff/450001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1572 content/browser/renderer_host/render_widget_host_view_android.cc:1572: selection_controller_->AllowAutomaticSelectionShowing(); On 2014/07/18 19:06:40, aelias wrote: > nit: can ...
6 years, 5 months ago (2014-07-18 22:58:06 UTC) #21
jdduke (slow)
brettw@: Owner review for content/content.gyp? Thanks.
6 years, 5 months ago (2014-07-18 23:05:50 UTC) #22
jdduke (slow)
boliu@: Review for android_webview/android_webview.gyp? Thanks.
6 years, 5 months ago (2014-07-18 23:09:04 UTC) #23
boliu
https://codereview.chromium.org/335943002/diff/530001/android_webview/android_webview.gyp File android_webview/android_webview.gyp (right): https://codereview.chromium.org/335943002/diff/530001/android_webview/android_webview.gyp#newcode25 android_webview/android_webview.gyp:25: # android_webview_java in android_webview/Android.mk. Need to update Android.mk file. ...
6 years, 5 months ago (2014-07-18 23:13:32 UTC) #24
jdduke (slow)
https://codereview.chromium.org/335943002/diff/530001/android_webview/android_webview.gyp File android_webview/android_webview.gyp (right): https://codereview.chromium.org/335943002/diff/530001/android_webview/android_webview.gyp#newcode25 android_webview/android_webview.gyp:25: # android_webview_java in android_webview/Android.mk. On 2014/07/18 23:13:31, boliu wrote: ...
6 years, 5 months ago (2014-07-18 23:21:33 UTC) #25
boliu
lgtm Thanks!
6 years, 5 months ago (2014-07-18 23:24:59 UTC) #26
jdduke (slow)
jam@: Looks like brettw@ may be out, would you mind reviewing the changes to content/content.gyp? ...
6 years, 5 months ago (2014-07-21 16:14:26 UTC) #27
jam
lgtm
6 years, 5 months ago (2014-07-21 17:11:34 UTC) #28
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 5 months ago (2014-07-21 17:14:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/335943002/620001
6 years, 5 months ago (2014-07-21 17:15:37 UTC) #30
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 19:58:49 UTC) #31
Message was sent while issue was closed.
Change committed as 284491

Powered by Google App Engine
This is Rietveld 408576698