Re: How should focus and key events work for out-of-process tabs?

Smaug <[email protected]> Sat, 24 Jul 2010 01:44:09 +0300
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
Hi,

my guess for focus and key event handling is that:
1) chrome process should keep track on which process should have focus.
2) if focus isn't in the chrome process itself, key events should be
    re-dispatched to the content process.
    Re-dispatching should probably happen close to the widget level.
    Hmm, or perhaps Presshell level is enough.

I don't know in which way the de-widgetification is done.
Is there still some kind of nsIWidget in the content process?

IME handling may cause some problems.
IME events need to go (well, re-dispatched) to the content process, but
IME needs to know where the events are dispatched so that the IME
software can show its UI in the right place.

Masayuki might have some ideas for IME.

-Olli


(Posting using smaug@ email address so that I can get this
  to m.d.t.dom too)

On 7/24/10 1:13 AM, Chris Jones wrote:
> This is a restatement of a comment in bug 570620.  In that bug, we now
> have patches to eliminate platform widgets from content processes.
>
> Removing platform widgets from content processes takes us to something
> of a crossroads wrt fennec 2.0a1. Fennec *renders* just fine without
> platform widgets, but focus and key events are totally broken. Oleg
> Romashin and I also have code to draw layers in <browser remote=true>
> that are published by widgetless content processes (keys and focus
> similarly borked for <browser remote>).
>
> We definitely want to move away from having platform widgets in content
> processes. However, I know neither how key events and focus work
> currently, nor how we want them to work for widgetless content
> processes. If we can make them work without too much effort, I think we
> should take the de-widgetification patches for fennec 2.0a1. We'll save
> needless rendering to a widget we just draw a canvas over, and work on
> cross-process layers for <browser remote> can continue on m-c without
> disturbing fennec 2.0a1.
>
> Thoughts from those in the know?
>
> Cheers,
> Chris