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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 22 23:41:02 PDT 2011


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


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #101478|review?                     |review-
               Flag|                            |




--- Comment #11 from Martin Robinson <mrobinson at webkit.org>  2011-07-22 23:41:02 PST ---
(From update of attachment 101478)
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.

> 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().

> 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.

-- 
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