[Webkit-unassigned] [Bug 64790] [GTK][WK2] Handle doneWithKeyEvent in GTK port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 25 01:03:24 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=64790





--- Comment #15 from Ravi Phaneendra Kasibhatla <ravi.kasibhatla at motorola.com>  2011-07-25 01:03:24 PST ---
(In reply to comment #11)
> (From update of attachment 101478 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=101478&action=review
> 
> I have a few concerns below. Please also take into account Carlos's suggestions.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:56
> > +    gboolean shouldForwardEvent;
> 
> I think that shouldForwardKeyboardEvent would be a better name here.
Done.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:208
> > +    // Since WebProcess key event handling is not synchronous, make it 2-pass handling.
> > +    // First, always return TRUE in event handler.
> > +    // Second, PageClientImpl::doneWithKeyEvent return status of event handling in WebProcess.
> > +    // Third, using status, determine whether to pass the event to parent or not using gtk_main_do_event().
> 
> I think this would be easier to read as a paragraph. Something like:
> 
> // Since WebProcess key event handling is not synchronous, we must handle this event in two passes. When
> // the WebProcess is done handling the event it will call PageClientImpl::doneWithKeyEvent, where we will
> // be able to determine whether to pass the event to our parent or not using gtk_main_do_event().
Done.
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:212
> > +    if (priv->shouldForwardEvent) {
> > +        priv->shouldForwardEvent = FALSE;
> > +        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->key_press_event(widget, event);
> > +    }
> 
> I'm not sure how I understand how priv->shouldForwardEvent can be true before you call PageProxy::handleKeyboardEvent below.
shouldForwardKeyboardEvent will not be true when we are calling PageProxy::handleKeyboardEvent. It would be FALSE and hence event would be sent to PageProxy for handling. On handling the input event, when we get the call back to PageClientImpl::doneWithKeyEvent, we check for handled status. If it is false, then we call webkitWebViewBaseSetForwardEvent which set shouldForwardKeyboardEvent to TRUE. Then we call gtk_main_do_event which triggers key_press_event where we pass the event to parent widget.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list