[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

Attachment 27129: Preliminary primary selection paste support

------- 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 =
> +	   Editor* editor = frame->editor();
> +	   if (editor->canPaste())
> +	   {

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

if (a) {

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

if (!editor->canPaste())

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