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

Issue 1203223002: [Experimental, WIP] Demo version of extracting WebView selection data from CompositorFrame. (Closed)

Created:
5 years, 6 months ago by wjmaclean
Modified:
4 years, 7 months ago
Reviewers:
mohsen, mfomitchev
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Demo version of extracting WebView selection data from CompositorFrame. This CL shows a proposed outline of how we might extract frame selection information from CompositorFrame metadata, and ensure that only the focused element's selection data is output. Imagine that, in place of fprintf() statements, we forward the selection data to a central controller for touch-selection handles (one per view hierarchy). BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -10 lines) Patch
M content/browser/browser_plugin/browser_plugin_guest.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 3 chunks +8 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 2 chunks +19 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M content/child/runtime_features.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/view_messages.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/public/renderer/render_view.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 2 chunks +8 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 8 (1 generated)
wjmaclean
Here's a rough outline of how we *might* wire it up ... please comment. BTW, ...
5 years, 6 months ago (2015-06-24 19:28:34 UTC) #1
mohsen
Thanks for putting this together, James, and sorry for my late response. This looks good ...
5 years, 5 months ago (2015-06-30 22:32:22 UTC) #2
mfomitchev
Thanks for putting this together James! I think adding extra state (focused_node_is_plugin) to RWHVB to ...
5 years, 5 months ago (2015-07-02 15:50:44 UTC) #3
wjmaclean
On 2015/07/02 15:50:44, mfomitchev wrote: > Thanks for putting this together James! > I think ...
5 years, 5 months ago (2015-07-02 16:06:36 UTC) #4
mfomitchev
On 2015/07/02 16:06:36, wjmaclean wrote: > On 2015/07/02 15:50:44, mfomitchev wrote: > > Thanks for ...
5 years, 5 months ago (2015-07-06 16:40:10 UTC) #5
wjmaclean
> > (Sorry, somehow I was removed from the reviewers/CC list, so I missed this ...
5 years, 5 months ago (2015-07-06 16:58:26 UTC) #6
mfomitchev
5 years, 5 months ago (2015-07-06 17:39:35 UTC) #7
On 2015/07/06 16:58:26, wjmaclean wrote:
> > 
> > (Sorry, somehow I was removed from the reviewers/CC list, so I missed this
> > reply)
> 
> Not sure how that happened, sorry! I've added you back.
>  
> > I think the controller should be able to deal with multiple "active"
> selections.
> > It can get focus status through RWHV::Focus(), 
> 
> Keep in mind that the RWHV for the embedder will have focus at the same time
the
> RWHV for the guest has focus, since the BrowserPlugin in the embedder must
have
> focus in order for the Guest to have focus(). There's a whole chain of focused
> elements, though it can be 'traversed' (inferred?) if we know the
embedder-guest
> pairs.

Hmm.. yeah, that complicates things, especially for deeply nested structures,
which I guess are possible.
If all else fails, I think we could use the changes you made in
FocusedNodeChanged to let the controller know the leaf focused RWHV.
But we may not even need that - the existing hooks like OnTouchEvent and Env
listener may be enough.


> > it gets called on touch events,
> > on Aura it listens to global events through Env. Based on all of these, I
> think
> > it should be able to determine which selection (if any) needs the handles to
> be
> > drawn. The problem right now is that the controller has no way of
> > differentiating between the selection info from the embedder vs. the
selection
> > info from guest. So one can overwrite the other. If we send IDs along with
the
> > selection info - that would be solved.
> 
> Couldn't the (new?) controller keep track of *all* the selection ranges, and
> then decide which one to attach the handles to? Certainly we can send
additional
> info along to the controller ... which "ID"s did you have in mind?

Yep, that's what I was thinking as well. The ID would just identify RWHV which
is the origin of the frame/selection info in some way.

Powered by Google App Engine
This is Rietveld 408576698