[Webkit-unassigned] [Bug 17267] [GTK] Primary selection/clipboard support

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


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


gns at gnome.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27129|review?                     |review+
               Flag|                            |




------- Comment #15 from gns at gnome.org  2009-05-06 14:54 PDT -------
(From update of attachment 27129)
> +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.


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



More information about the webkit-unassigned mailing list