Changeset 70677 in webkit


Ignore:
Timestamp:
Oct 27, 2010 11:36:22 AM (14 years ago)
Author:
Martin Robinson
Message:

2010-10-27 Martin Robinson <mrobinson@igalia.com>

Reviewed by Gustavo Noronha Silva.

[GTK] r69296 includes a cast from GdkWindow* to GtkWindow*
https://bugs.webkit.org/show_bug.cgi?id=48445

Pass the pageClient GtkWidget* to gtk_xtbin_new instead of the
GdkWindow*. The pageClient is used to get the proper visual for the
plugin container widget.

No new tests. This patch should prevent plugins/null-npp-getvalue-pointer.html
from crashing.

  • plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformStart): Pass the widget instead of the window.
  • plugins/gtk/gtk2xtbin.c: Accept the widget instead of the window. (gtk_xtbin_new):
  • plugins/gtk/gtk2xtbin.h: Update the declaration.
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70675 r70677  
     12010-10-27  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [GTK] r69296 includes a cast from GdkWindow* to GtkWindow*
     6        https://bugs.webkit.org/show_bug.cgi?id=48445
     7
     8        Pass the pageClient GtkWidget* to gtk_xtbin_new instead of the
     9        GdkWindow*. The pageClient is used to get the proper visual for the
     10        plugin container widget.
     11
     12        No new tests. This patch should prevent plugins/null-npp-getvalue-pointer.html
     13        from crashing.
     14
     15        * plugins/gtk/PluginViewGtk.cpp:
     16        (WebCore::PluginView::platformStart): Pass the widget instead of the window.
     17        * plugins/gtk/gtk2xtbin.c: Accept the widget instead of the window.
     18        (gtk_xtbin_new):
     19        * plugins/gtk/gtk2xtbin.h: Update the declaration.
     20
    1212010-10-27  Kwang Yul Seo  <skyul@company100.net>
    222
  • trunk/WebCore/plugins/gtk/PluginViewGtk.cpp

    r69998 r70677  
    791791            g_signal_connect(platformPluginWidget(), "plug-removed", G_CALLBACK(plugRemovedCallback), NULL);
    792792        } else
    793             setPlatformWidget(gtk_xtbin_new(gtk_widget_get_window(pageClient), 0));
     793            setPlatformWidget(gtk_xtbin_new(pageClient, 0));
    794794#else
    795795        setPlatformWidget(gtk_socket_new());
  • trunk/WebCore/plugins/gtk/gtk2xtbin.c

    r69301 r70677  
    323323
    324324GtkWidget*
    325 gtk_xtbin_new (GdkWindow *parent_window, String * f)
     325gtk_xtbin_new (GtkWidget *parent_widget, String *f)
    326326{
    327327  GtkXtBin *xtbin;
     
    330330  GdkVisual* visual;
    331331  Colormap colormap;
     332  GdkWindow* parent_window = gtk_widget_get_window(parent_widget);
    332333
    333334  assert(parent_window != NULL);
     
    343344  xtbin->parent_window = parent_window;
    344345
    345   screen = gtk_widget_get_screen(GTK_WIDGET(parent_window));
     346  screen = gtk_widget_get_screen(parent_widget);
    346347  visual = gdk_screen_get_system_visual(screen);
    347348  colormap = XCreateColormap(GDK_DISPLAY_XDISPLAY(gdk_screen_get_display(screen)),
  • trunk/WebCore/plugins/gtk/gtk2xtbin.h

    r38232 r70677  
    102102
    103103GTKXTBIN_API(GType)       gtk_xtbin_get_type (void);
    104 GTKXTBIN_API(GtkWidget *) gtk_xtbin_new (GdkWindow *parent_window, String *f);
     104GTKXTBIN_API(GtkWidget *) gtk_xtbin_new (GtkWidget *parent_widget, String *f);
    105105GTKXTBIN_API(void)        gtk_xtbin_set_position (GtkXtBin *xtbin,
    106106                                                  gint       x,
Note: See TracChangeset for help on using the changeset viewer.