[Webkit-unassigned] [Bug 49658] [GTK] Simplify context-menu handling code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 17 08:39:43 PST 2010


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


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #74103|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #2 from Martin Robinson <mrobinson at webkit.org>  2010-11-17 08:39:43 PST ---
(From update of attachment 74103)
View in context: https://bugs.webkit.org/attachment.cgi?id=74103&action=review

Great patch! I have two small tweaks to suggest.

> WebCore/platform/ContextMenuItem.h:188
> +    typedef GtkMenuItem* PlatformMenuItemDescription;

I think we should make this a PlatformRefPtr<GtkMenuItem>(...).

> WebCore/platform/gtk/ContextMenuItemGtk.cpp:118
> +    : m_platformDescription(GTK_MENU_ITEM(g_object_ref(item)))

It would remove the need to call g_object_ref here.

> WebCore/platform/gtk/ContextMenuItemGtk.cpp:135
> +    GOwnPtr<char>actionName(g_strdup_printf("context-menu-action-%d", action));

Missing a space here between <char> and actionName.

> WebCore/platform/gtk/ContextMenuItemGtk.cpp:156
> +    if (m_platformDescription)
> +        g_object_unref(m_platformDescription);

A smart pointer also removes the need for this code.

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