2011-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2011 11:18:54 +0000 (11:18 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2011 11:18:54 +0000 (11:18 +0000)
commit6fdf4851bb73c19bcd7d1e4e01ca280c933c7278
tree5b64f2fde946565707264a49a6e642f05ab01d0e
parent498a4662784da2b51b22fbab91c12a38bd39889a
2011-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] GRefPtr should not be used with Gtk widgets
        https://bugs.webkit.org/show_bug.cgi?id=51241

        GRefPtr breaks the widget life-cycle, the main problem is
        that GRefPtr calls g_object_unref() when it's destroyed,
        which is undesirable for widgets. In gtk+ widgets are created with
        a floating reference and when added to a container, the container
        takes the ownership of the widget consuming the floating
        reference. So you don't usually need to call g_object_ref/unref on
        widgets (only for some operations like reparent a widget) and
        toplevel widgets are destroyed with gtk_widget_destroy().

        * platform/ContextMenuItem.h:
        * platform/gtk/ContextMenuGtk.cpp:
        (WebCore::ContextMenu::ContextMenu):
        (WebCore::ContextMenu::~ContextMenu):
        (WebCore::ContextMenu::setPlatformDescription):
        * platform/gtk/ContextMenuItemGtk.cpp:
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::releasePlatformDescription):
        (WebCore::ContextMenuItem::type):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::setAction):
        (WebCore::ContextMenuItem::title):
        (WebCore::ContextMenuItem::setTitle):
        (WebCore::ContextMenuItem::platformSubMenu):
        (WebCore::ContextMenuItem::setSubMenu):
        (WebCore::ContextMenuItem::setChecked):
        (WebCore::ContextMenuItem::setEnabled):
2011-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] GRefPtr should not be used with Gtk widgets
        https://bugs.webkit.org/show_bug.cgi?id=51241

        GRefPtr breaks the widget life-cycle, the main problem is
        that GRefPtr calls g_object_unref() when it's destroyed,
        which is undesirable for widgets. In gtk+ widgets are created with
        a floating reference and when added to a container, the container
        takes the ownership of the widget consuming the floating
        reference. So you don't usually need to call g_object_ref/unref on
        widgets (only for some operations like reparent a widget) and
        toplevel widgets are destroyed with gtk_widget_destroy().

        * WebCoreSupport/DragClientGtk.cpp:
        (WebKit::DragClient::DragClient):
        (WebKit::DragClient::~DragClient):
        (WebKit::DragClient::startDrag):
        * WebCoreSupport/DragClientGtk.h:
        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::postCommitFrameViewSetup):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_dispose):
        * webkit/webkitwebviewprivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@75481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/gtk/ContextMenuGtk.cpp
Source/WebCore/platform/gtk/ContextMenuItemGtk.cpp
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
WebKit/gtk/WebCoreSupport/DragClientGtk.h
WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
WebKit/gtk/webkit/webkitwebview.cpp
WebKit/gtk/webkit/webkitwebviewprivate.h