RenderWidgetHostViewAndroid::Focus is wrong |
|||
Issue descriptionRenderWidgetHostViewAndroid::Focus is content requesting android to make the native view backing this widget focused. Then as a response (if successful), can call host->GotFocus(). On android ContentViewCore is currently acting as the "native view". The current implementation is broken. It just shortcuts back to host without talking to CVC at all. I think at minimum, we should make sure rwhva/rwh focus state stays in sync with CVC, rather than lying to rwh that it always gets focus whenever requested. Of course if we can actually implement real "request focus", it would be better. This is changing existing behavior though, so could have subtle effects elsewhere unfortunately
,
Jul 24 2017
Well, the expectation is: """ RenderWidgetHostViewAndroid::Focus is content requesting android to make the native view backing this widget focused. Then as a response (if successful), can call host->GotFocus(). """ so call requestFocus on the container view. then when view received focus, call back down to host->GotFocus hopefully that doesn't break anything..
,
Jul 24 2017
Thanks. I'll do that and see what it breaks : )
,
Aug 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f commit 74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f Author: Jinsuk Kim <jinsukkim@chromium.org> Date: Thu Aug 10 05:16:36 2017 Keep RenderWidgetHostView focus state in sync with Content Previously, the request |RWHVA::Focus()| on Android was not propagated to the content native view but simply shortcut back to the host, which is not correct. This CL requests focus on the container view upon request from RWHVA, and reflects the result accordinly. BUG= 746099 Change-Id: I87d6be654049787331f73a5ac30ea6cebf13d6b3 Reviewed-on: https://chromium-review.googlesource.com/583412 Reviewed-by: Bo <boliu@chromium.org> Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#493252} [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/browser/android/content_view_core.cc [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/browser/android/content_view_core.h [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/browser/renderer_host/render_widget_host_view_android.cc [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/public/android/BUILD.gn [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java [delete] https://crrev.com/1b8abc019a5b476d503bff7405120c44036799eb/content/public/android/java/src/org/chromium/content/browser/ViewUtils.java [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/ui/android/BUILD.gn [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java [add] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/ui/android/java/src/org/chromium/ui/base/ViewUtils.java [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/ui/android/view_android.cc [modify] https://crrev.com/74b8a0a5ebfe5dc1a1dcd5c0a6ac62e68f8a787f/ui/android/view_android.h
,
Aug 10 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jinsuk...@chromium.org
, Jul 24 2017