--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
Let's just use this tread to discuss.Jinsuk is starting to implement hit testing in ViewAndroid, and I don't feel confident in reviewing some of the design decisions. Examples of things that I feel are design decisions:* the position and size of child is stored in the child object* Children have "z order", ie order events are delivered* how should z order be expressed? right now it's just order of addChild
Let's just use this tread to discuss.Jinsuk is starting to implement hit testing in ViewAndroid, and I don't feel confident in reviewing some of the design decisions. Examples of things that I feel are design decisions:* the position and size of child is stored in the child object* Children have "z order", ie order events are delivered* how should z order be expressed? right now it's just order of addChild* event is delivered to children before parent* match parent is implemented as a special case for dimension
Anyone has strong feelings for anything in particular here? Please to reply here or jump on the code review.
--On Tue, Jan 31, 2017 at 3:08 PM, 'Jinsuk Kim (via Google Docs)' via Slimming Clank <slimmin...@chromium.org> wrote:--Jinsuk Kim has invited you to edit the following document:A brief summary on how the hit testing for ViewAndroid is implemented. This is to clarify ideas/assumption made in it. Any comments/corrections will be welcome. https://codereview.chromium.org/2645353004/
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUp17OYkNfdUUE2WD%2BAqd%2B%3DQOFCsOF8-RdwGLzLPU1Rr8Q%40mail.gmail.com.
On Tue, Jan 31, 2017 at 3:25 PM, Bo Liu <bo...@chromium.org> wrote:Let's just use this tread to discuss.Jinsuk is starting to implement hit testing in ViewAndroid, and I don't feel confident in reviewing some of the design decisions. Examples of things that I feel are design decisions:* the position and size of child is stored in the child object* Children have "z order", ie order events are delivered* how should z order be expressed? right now it's just order of addChild* event is delivered to children before parent* match parent is implemented as a special case for dimensionAll those decisions sound OK to me. They seem similar enough to other view frameworks I'm familiar with.Anyone has strong feelings for anything in particular here? Please to reply here or jump on the code review.I'm a bit surprised there are no use cases for having views overlapping transparently or side-by-side. Isn't the contextual search bar at the bottom a C++-based view thing that would require at least hit testing for x/y position instead of blindly passing to the z-topmost view?
As mentioned in other thread, I'm thinking of keeping all the layout + event filter logic doing their job. This makes overall hit testing at ViewAndroid much simpler than what Java Android view hierarchy does.
On Wed, Feb 1, 2017 at 8:25 AM, Bo Liu <bo...@chromium.org> wrote:Let's just use this tread to discuss.Jinsuk is starting to implement hit testing in ViewAndroid, and I don't feel confident in reviewing some of the design decisions. Examples of things that I feel are design decisions:* the position and size of child is stored in the child object* Children have "z order", ie order events are delivered* how should z order be expressed? right now it's just order of addChild
Chrome gets the right content to route events to from current tabs' view. Now native also needs to keep track of the ViewAndroid that matches with it. The ViewAndroids are being managed with std::list, which I think is enough for the purpose. I'm handling it by adding a new child at the front of the list, and calling ViewAndroid::MoveToFront if users switch the current tab. Tested it in https://crrev.com/2595263002 and it seems to work as expected though there can be corner cases I'm not aware of.
* event is delivered to children before parent
* match parent is implemented as a special case for dimension
Anyone has strong feelings for anything in particular here? Please to reply here or jump on the code review.
On Tue, Jan 31, 2017 at 3:08 PM, 'Jinsuk Kim (via Google Docs)' via Slimming Clank <slimmin...@chromium.org> wrote:
Jinsuk Kim has invited you to edit the following document:A brief summary on how the hit testing for ViewAndroid is implemented. This is to clarify ideas/assumption made in it. Any comments/corrections will be welcome. https://codereview.chromium.org/2645353004/
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
Thanks for the doc Jinsuk!As an FYI for the future, in docs you can click on comments, notifications, and select "All" to be notified of all comments on a doc you didn't author (thanks to nyquist@ for figuring this out).On Tue, Jan 31, 2017 at 4:19 PM 'Jinsuk Kim' via Slimming Clank <slimmin...@chromium.org> wrote:As mentioned in other thread, I'm thinking of keeping all the layout + event filter logic doing their job. This makes overall hit testing at ViewAndroid much simpler than what Java Android view hierarchy does.I agree that it isn't in the scope of removing CVC, but I've been talking with +mdj...@chromium.org and +khush...@chromium.org about what a more comprehensive front end refactor of the Layout system with ViewAndroids would look like. It would be great to build on your work here and see if we can use it for more of the front end.
Re complexity, it looks like we'll already have ViewAndroid bounds hit testing and Z ordering. The hit testing logic we'd need for the rest of the UI isn't much more complex. I think the main missing component is gesture persistence. Once a ViewAndroid starts getting a touch gesture it gets all the events for it (we probably want this anyway or we'll get DCHECK failures in the gesture detector code in RWHVA).If we don't want to (or aren't willing to) build out ViewAndroid to use it for more of our UI, I don't really see the point of building a hierarchy concept at all. If the hierarchy is always always Parent -> Child (WebContents) -> Child (RWHV), the sizes always match, and we aren't automatically hooking up the CC layers it feels like this is overkill (I do get that you could have two RWHV attached for a short period of time, but still!).
To Alex's earlier point about contextual search and the rest of the UI, a lot of this stuff lets us solve problems like the contextual search bar hit testing just by virtue of building out the ViewAndroid hierarchy for display. Right now we have to build a native CC layer tree, but still have these other classes for event filters and hit testing in Java to figure out where the user clicked. So we're completely decoupling and duplicating logic for display and hit testing even though the concepts seem pretty tightly intertwined.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
No feedback.. just \o/On Sun, Feb 12, 2017 at 10:11 PM, Jinsuk Kim <jins...@google.com> wrote:I've been experimenting one approach which I think is feasible - largely based on David's suggestion - and had got the initial version working, though I'm sure there will still be many corner cases I haven't run into yet.A short summary is that it works by adding a ViewAndroid that represents a Java view at the top of the VA list when you want the events to be handled by Java layer, such as tab switcher, overlay panel bar, new tab page, etc.
CompositorViewHolder always intercepts touch events and route them to native via ViewRoot. The children of ViewRoot are for WebContents and the one at the top is the target to consume them in most cases. But if there is a Java UI component that should get the events, you create a VA and place it at the top via ViewRoot.addViewAndroid(). Its bounds should match the area on screen, and when matched in hit testing, it returns false back to Compositor.onTouchEvent so that the Java layer can consume them. No need to find the target in event filters any more, and EventTarget.CONTENT would have been already handled by the time flow reaches there.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUpEBamWGYKOZ58xLXSrkaka8wam6mktTxuM_sKCKRWafA%40mail.gmail.com.
Cool! Thanks for doing a lot of this investigation! Are you able to route the touch event to the contextual search panel's ViewAndroid, or is that still giving you trouble?I talked to Khushal and we had another idea that might work too. This might be a super simple way to migrate the content layer over without worrying about the Chrome UI. Let me know what you think:Right now the main issue is passing touch events to a ViewAndroid without a Java class or a built out view hierarchy right? What if we did this intermediate refactor to help you get rid of ContentViewCore without the other headaches of worrying about the LayoutManager:- ViewRoot is basically a JNI bridge to a ViewAndroid.- We make WebContents have a ViewRoot and we expose it in Java.
- We migrate all of the code that passes touch events to the ContentViewCore/ContentView to hit WebContents' ViewRoot.- As we refactor the front end and we no longer need the Java hook for the ViewAndroid WebContents we simply make it a ViewAndroid and no longer a ViewRoot.That would let us keep basically the same approaches we have now... although the only difference is we have more than one ViewRoot in the system. I'm not sure if this is a big deal or not in the short term.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUpEBamWGYKOZ58xLXSrkaka8wam6mktTxuM_sKCKRWafA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbOxGRi4x2CcmCzLMWQAVHLDk%2BY2AEXi5dhAj9P0Syk8hw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUpEBamWGYKOZ58xLXSrkaka8wam6mktTxuM_sKCKRWafA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clan...@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
Cool! Thanks for doing a lot of this investigation! Are you able to route the touch event to the contextual search panel's ViewAndroid, or is that still giving you trouble?
I talked to Khushal and we had another idea that might work too. This might be a super simple way to migrate the content layer over without worrying about the Chrome UI. Let me know what you think:Right now the main issue is passing touch events to a ViewAndroid without a Java class or a built out view hierarchy right? What if we did this intermediate refactor to help you get rid of ContentViewCore without the other headaches of worrying about the LayoutManager:
- ViewRoot is basically a JNI bridge to a ViewAndroid.
- We make WebContents have a ViewRoot and we expose it in Java.- We migrate all of the code that passes touch events to the ContentViewCore/ContentView to hit WebContents' ViewRoot.
- As we refactor the front end and we no longer need the Java hook for the ViewAndroid WebContents we simply make it a ViewAndroid and no longer a ViewRoot.That would let us keep basically the same approaches we have now... although the only difference is we have more than one ViewRoot in the system. I'm not sure if this is a big deal or not in the short term.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUpEBamWGYKOZ58xLXSrkaka8wam6mktTxuM_sKCKRWafA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbOxGRi4x2CcmCzLMWQAVHLDk%2BY2AEXi5dhAj9P0Syk8hw%40mail.gmail.com.
Cool! Thanks for doing a lot of this investigation! Are you able to route the touch event to the contextual search panel's ViewAndroid, or is that still giving you trouble?I talked to Khushal and we had another idea that might work too. This might be a super simple way to migrate the content layer over without worrying about the Chrome UI. Let me know what you think:Right now the main issue is passing touch events to a ViewAndroid without a Java class or a built out view hierarchy right? What if we did this intermediate refactor to help you get rid of ContentViewCore without the other headaches of worrying about the LayoutManager:- ViewRoot is basically a JNI bridge to a ViewAndroid.- We make WebContents have a ViewRoot and we expose it in Java.- We migrate all of the code that passes touch events to the ContentViewCore/ContentView to hit WebContents' ViewRoot.- As we refactor the front end and we no longer need the Java hook for the ViewAndroid WebContents we simply make it a ViewAndroid and no longer a ViewRoot.That would let us keep basically the same approaches we have now... although the only difference is we have more than one ViewRoot in the system. I'm not sure if this is a big deal or not in the short term.On Mon, Feb 13, 2017 at 2:36 PM Bo Liu <bo...@chromium.org> wrote:No feedback.. just \o/On Sun, Feb 12, 2017 at 10:11 PM, Jinsuk Kim <jins...@google.com> wrote:I've been experimenting one approach which I think is feasible - largely based on David's suggestion - and had got the initial version working, though I'm sure there will still be many corner cases I haven't run into yet.A short summary is that it works by adding a ViewAndroid that represents a Java view at the top of the VA list when you want the events to be handled by Java layer, such as tab switcher, overlay panel bar, new tab page, etc.Just to clarify: so we always steal from Java and route back to Java to these views in the hierarchy?
CompositorViewHolder always intercepts touch events and route them to native via ViewRoot. The children of ViewRoot are for WebContents and the one at the top is the target to consume them in most cases. But if there is a Java UI component that should get the events, you create a VA and place it at the top via ViewRoot.addViewAndroid(). Its bounds should match the area on screen, and when matched in hit testing, it returns false back to Compositor.onTouchEvent so that the Java layer can consume them. No need to find the target in event filters any more, and EventTarget.CONTENT would have been already handled by the time flow reaches there.Could you elaborate a bit on how this matches the event to the panel's WebContents and delegates it?
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/001a114d72344da70005476c0314%40google.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGReGTX_Zt2HRUzbkYEMdCY5TKXQGEkgzd7Uwj4q7-%2Bfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbMPYcjz%2BJDAx7sx7W0BGfSsqWdJgZ0R8xgc2U3CY4rsZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbEZAo0JNRUSe0om5qvHFSrXnHgamzwaHDs7aJpHqyTdmg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUr%2BG4eziS1oRKpZUgfn-xEE%2BY9vZrexaLra42oMHdgZ7Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To post to this group, send email to slimmin...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAPCJOUpEBamWGYKOZ58xLXSrkaka8wam6mktTxuM_sKCKRWafA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Slimming Clank" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slimming-clank+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAAUoNbOxGRi4x2CcmCzLMWQAVHLDk%2BY2AEXi5dhAj9P0Syk8hw%40mail.gmail.com.
On Tue, Feb 14, 2017 at 8:48 AM, David Trainor <dtra...@chromium.org> wrote:Cool! Thanks for doing a lot of this investigation! Are you able to route the touch event to the contextual search panel's ViewAndroid, or is that still giving you trouble?Now I'm having no problem routing the event to CS panel VA in my experiment. It's slightly more involved because overlay panel content is lazily created (i.e. overlay panel can be visible with or without actual content) though.
I talked to Khushal and we had another idea that might work too. This might be a super simple way to migrate the content layer over without worrying about the Chrome UI. Let me know what you think:Right now the main issue is passing touch events to a ViewAndroid without a Java class or a built out view hierarchy right? What if we did this intermediate refactor to help you get rid of ContentViewCore without the other headaches of worrying about the LayoutManager:Interesting because I also started with a somewhat similar approach assigning a ViewRoot for each WebContent. That certainly (I think) was a way to go for an intermediate step, without having to introduce much changes in compositor/layout. First patch of https://codereview.chromium.org/2595263002 is based on per-content ViewRoot with an intent to replacing ContentView{Core} with ViewRoot as a path to native. I'd have loved this idea much more if it had been suggested a month sooner. I came a long way from that since then, following the general feedback of the reviewers preferring single ViewRoot. So it feels like going back in time.. but it's not entirely same as what I did, so probably worth consideration.- ViewRoot is basically a JNI bridge to a ViewAndroid.I think ViewRoot is already made in this way.- We make WebContents have a ViewRoot and we expose it in Java.- We migrate all of the code that passes touch events to the ContentViewCore/ContentView to hit WebContents' ViewRoot.I take it that layout will pass touch events through WebContents rather than ContentView{Core}. WebContents already (its corresponding WebContentsViewAndroid) has a ViewAndroid. So touch events can be passed straight to that - I think the suggestion actually does not need ViewRoot at all.
- As we refactor the front end and we no longer need the Java hook for the ViewAndroid WebContents we simply make it a ViewAndroid and no longer a ViewRoot.That would let us keep basically the same approaches we have now... although the only difference is we have more than one ViewRoot in the system. I'm not sure if this is a big deal or not in the short term.If single ViewRoot is the goal we'll have in the end then the question to ask is what we benefit from this short-term, multiple ViewRoot step. Does it help decouple content / chrome refactoring work?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/slimming-clank/CAC4m%2BbGsW3_rZjApMR%2B8Zxd3R3GqNrUPW2zQtaKpBEM7oPM8iQ%40mail.gmail.com.
On Mon, Feb 13, 2017 at 11:53 PM, 'Jinsuk Kim' via Slimming Clank <slimmin...@chromium.org> wrote:On Tue, Feb 14, 2017 at 8:48 AM, David Trainor <dtra...@chromium.org> wrote:Cool! Thanks for doing a lot of this investigation! Are you able to route the touch event to the contextual search panel's ViewAndroid, or is that still giving you trouble?Now I'm having no problem routing the event to CS panel VA in my experiment. It's slightly more involved because overlay panel content is lazily created (i.e. overlay panel can be visible with or without actual content) though.That's cool. Do you mind sharing the patch? I was mostly curious about what the tree looked like, and how much plumbing was involved to get that set up for getting something like the content overscroll logic working (its here right now).
I talked to Khushal and we had another idea that might work too. This might be a super simple way to migrate the content layer over without worrying about the Chrome UI. Let me know what you think:Right now the main issue is passing touch events to a ViewAndroid without a Java class or a built out view hierarchy right? What if we did this intermediate refactor to help you get rid of ContentViewCore without the other headaches of worrying about the LayoutManager:Interesting because I also started with a somewhat similar approach assigning a ViewRoot for each WebContent. That certainly (I think) was a way to go for an intermediate step, without having to introduce much changes in compositor/layout. First patch of https://codereview.chromium.org/2595263002 is based on per-content ViewRoot with an intent to replacing ContentView{Core} with ViewRoot as a path to native. I'd have loved this idea much more if it had been suggested a month sooner. I came a long way from that since then, following the general feedback of the reviewers preferring single ViewRoot. So it feels like going back in time.. but it's not entirely same as what I did, so probably worth consideration.- ViewRoot is basically a JNI bridge to a ViewAndroid.I think ViewRoot is already made in this way.- We make WebContents have a ViewRoot and we expose it in Java.- We migrate all of the code that passes touch events to the ContentViewCore/ContentView to hit WebContents' ViewRoot.I take it that layout will pass touch events through WebContents rather than ContentView{Core}. WebContents already (its corresponding WebContentsViewAndroid) has a ViewAndroid. So touch events can be passed straight to that - I think the suggestion actually does not need ViewRoot at all.This was for layout being able to have a java hook to pass events to a WebContents. Right now CVC effectively acts as that JNI bridge. We do have ViewAndroid in WCVA which represents the NativeView for it but nothing to interact with it in java.
- As we refactor the front end and we no longer need the Java hook for the ViewAndroid WebContents we simply make it a ViewAndroid and no longer a ViewRoot.That would let us keep basically the same approaches we have now... although the only difference is we have more than one ViewRoot in the system. I'm not sure if this is a big deal or not in the short term.If single ViewRoot is the goal we'll have in the end then the question to ask is what we benefit from this short-term, multiple ViewRoot step. Does it help decouple content / chrome refactoring work?Right now all layout code is set up to do most routing in java until the event needs to go to WebContents and then it is sent to native. Like you said, the thought was that having a java bridge directly to a WebContents will decouple content / chrome refactoring work, since we can incrementally move functionality from CVC to VA and understand how that should fit into it. Much of that should be the same irrespective of how events are routed to content's view from the embedder right? From chrome's perspective, the change is easier to understand then.
Its just that without having a clearer picture of how Layouts are going to move to/use VA, its hard to know whether we are just shoehorning the single ViewRoot right now, with only the content requirements in mind, or is it actually a step towards how chrome UI is going to change. May be we can take a look at your patch and see which approach is simpler?
...
[Message clipped]