[webkit-reviews] review granted: [Bug 17267] [GTK] Primary selection/clipboard support : [Attachment 27129] Preliminary primary selection paste support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 6 14:54:48 PDT 2009


Gustavo Noronha (kov) <gns at gnome.org> has granted Sergio García-Cuevas
González <sergio_gcg at hotmail.com>'s request for review:
Bug 17267: [GTK] Primary selection/clipboard support
https://bugs.webkit.org/show_bug.cgi?id=17267

Attachment 27129: Preliminary primary selection paste support
https://bugs.webkit.org/attachment.cgi?id=27129&action=review

------- Additional Comments from Gustavo Noronha (kov) <gns at gnome.org>
> +static void buttonPressed(GtkWidget* widget, GdkEventButton* event,
EditorClient* client)
> +{
> +    if (event->button == 2 && event->type == GDK_BUTTON_PRESS)
> +    {
> +	   Frame* frame =
core(client->m_webView)->focusController()->focusedOrMainFrame();
> +	   Editor* editor = frame->editor();
> +	   if (editor->canPaste())
> +	   {

The patch looks right, but the if braces are bad. They should look like this:

if (a) {
    blahblah();
}

Also, we should return early, where possible, so I would change that if to:

if (!editor->canPaste())
    return;

I thought about suggesting making only 1 early-return if, but I believe we may
want to use this callback for other features in the future, so it makes sense
this way. r=me with those changes.


More information about the webkit-reviews mailing list