Changeset 73330 in webkit


Ignore:
Timestamp:
Dec 4, 2010 6:37:45 AM (13 years ago)
Author:
xan@webkit.org
Message:

WebCore:

2010-12-04 Xan Lopez <xlopez@igalia.com>

Reviewed by Martin Robinson.

[GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
https://bugs.webkit.org/show_bug.cgi?id=50451

GdkDrawable has been removed in GTK+3.x. To cope with this we can
actually stop using it altogether, since GdkWindow is just a
typedef for it and that seems to be good enough for us.

  • platform/graphics/GraphicsContext.h: s/GdkDrawable/GdkWindow/.
  • platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::gdkWindow): ditto.
  • platform/gtk/GtkVersioning.h: declare GDK_WINDOW_XWINDOW for GTK 3.x builds.
  • platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenAvailableRect): s/GdkDrawable/GdkWindow/.
  • platform/gtk/WidgetGtk.cpp: (WebCore::gdkWindow): ditto. (WebCore::Widget::setCursor): ditto.
  • platform/gtk/WidgetRenderingContextGtk2.cpp: ditto.

JavaScriptCore:

2010-12-04 Xan Lopez <xlopez@igalia.com>

Reviewed by Martin Robinson.

[GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
https://bugs.webkit.org/show_bug.cgi?id=50451

  • wtf/gobject/GTypedefs.h: add GdkWindow defines.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r73323 r73330  
     12010-12-04  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
     6        https://bugs.webkit.org/show_bug.cgi?id=50451
     7
     8        * wtf/gobject/GTypedefs.h: add GdkWindow defines.
     9
    1102010-12-03  Gavin Barraclough  <barraclough@apple.com>
    211
  • trunk/JavaScriptCore/wtf/gobject/GTypedefs.h

    r70257 r73330  
    4545typedef struct _GdkCursor GdkCursor;
    4646typedef struct _GdkDragContext GdkDragContext;
    47 typedef struct _GdkDrawable GdkDrawable;
    4847typedef struct _GdkEventConfigure GdkEventConfigure;
    4948typedef struct _GdkEventExpose GdkEventExpose;
     
    8685#ifdef GTK_API_VERSION_2
    8786typedef struct _GdkRectangle GdkRectangle;
     87typedef struct _GdkDrawable GdkWindow;
    8888#else
     89typedef struct _GdkWindow GdkWindow;
    8990typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
    9091typedef cairo_rectangle_int_t GdkRectangle;
  • trunk/WebCore/ChangeLog

    r73319 r73330  
     12010-12-04  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
     6        https://bugs.webkit.org/show_bug.cgi?id=50451
     7
     8        GdkDrawable has been removed in GTK+3.x. To cope with this we can
     9        actually stop using it altogether, since GdkWindow is just a
     10        typedef for it and that seems to be good enough for us.
     11
     12        * platform/graphics/GraphicsContext.h: s/GdkDrawable/GdkWindow/.
     13        * platform/graphics/cairo/GraphicsContextCairo.cpp:
     14        (WebCore::GraphicsContext::gdkWindow): ditto.
     15        * platform/gtk/GtkVersioning.h: declare GDK_WINDOW_XWINDOW for GTK 3.x builds.
     16        * platform/gtk/PlatformScreenGtk.cpp:
     17        (WebCore::screenAvailableRect): s/GdkDrawable/GdkWindow/.
     18        * platform/gtk/WidgetGtk.cpp:
     19        (WebCore::gdkWindow): ditto.
     20        (WebCore::Widget::setCursor): ditto.
     21        * platform/gtk/WidgetRenderingContextGtk2.cpp: ditto.
     22
    1232010-12-03  Dimitri Glazkov  <dglazkov@chromium.org>
    224
  • trunk/WebCore/platform/Widget.h

    r70153 r73330  
    6161
    6262#if PLATFORM(GTK)
    63 typedef struct _GdkDrawable GdkDrawable;
    6463typedef struct _GtkWidget GtkWidget;
    6564typedef struct _GtkContainer GtkContainer;
  • trunk/WebCore/platform/graphics/GraphicsContext.h

    r73284 r73330  
    9090#endif
    9191
    92 #if PLATFORM(GTK)
    93 typedef struct _GdkDrawable GdkDrawable;
    94 typedef struct _GdkEventExpose GdkEventExpose;
    95 #endif
    96 
    9792#if PLATFORM(WIN)
    9893typedef struct HDC__* HDC;
     
    408403#if PLATFORM(GTK)
    409404        void setGdkExposeEvent(GdkEventExpose*);
    410         GdkDrawable* gdkDrawable() const;
     405        GdkWindow* gdkWindow() const;
    411406        GdkEventExpose* gdkExposeEvent() const;
    412407#endif
  • trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r72926 r73330  
    10861086}
    10871087
    1088 GdkDrawable* GraphicsContext::gdkDrawable() const
     1088GdkWindow* GraphicsContext::gdkWindow() const
    10891089{
    10901090    if (!m_data->expose)
    10911091        return 0;
    10921092
    1093     return GDK_DRAWABLE(m_data->expose->window);
     1093    return m_data->expose->window;
    10941094}
    10951095#endif
  • trunk/WebCore/platform/gtk/GtkVersioning.h

    r72722 r73330  
    3333#ifndef GTK_API_VERSION_2
    3434#define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
     35#define GDK_WINDOW_XWINDOW(window) (gdk_x11_window_get_xid(window))
    3536#else
    3637GdkPixbuf* gdk_pixbuf_get_from_surface(cairo_surface_t* surface, int srcX, int srcY,
  • trunk/WebCore/platform/gtk/PlatformScreenGtk.cpp

    r69293 r73330  
    122122        return screenRect(widget);
    123123
    124     GdkDrawable* rootWindow = GDK_DRAWABLE(gtk_widget_get_root_window(container));
     124    GdkWindow* rootWindow = gtk_widget_get_root_window(container);
    125125    GdkDisplay* display = gdk_window_get_display(rootWindow);
    126126    Atom xproperty = gdk_x11_get_xatom_by_name_for_display(display, "_NET_WORKAREA");
  • trunk/WebCore/platform/gtk/WidgetGtk.cpp

    r64526 r73330  
    6161}
    6262
    63 static GdkDrawable* gdkDrawable(PlatformWidget widget)
     63static GdkWindow* gdkWindow(PlatformWidget widget)
    6464{
    6565    return widget ? gtk_widget_get_window(widget) : 0;
     
    7979        return;
    8080
    81     gdk_window_set_cursor(gdkDrawable(platformWidget()) ? GDK_WINDOW(gdkDrawable(platformWidget())) : gtk_widget_get_window(GTK_WIDGET(root()->hostWindow()->platformPageClient())), platformCursor);
     81    gdk_window_set_cursor(gdkWindow(platformWidget()) ? gdkWindow(platformWidget()) : gtk_widget_get_window(GTK_WIDGET(root()->hostWindow()->platformPageClient())), platformCursor);
    8282    lastSetCursor = platformCursor;
    8383}
  • trunk/WebCore/platform/gtk/WidgetRenderingContextGtk2.cpp

    r71791 r73330  
    9090    // to a temporary surface and preserve transparency. To ensure decent widget rendering, just
    9191    // paint directly to the target drawable. This will not render CSS rotational transforms properly.
    92     if (!theme->m_themePartsHaveRGBAColormap && graphicsContext->gdkDrawable()) {
     92    if (!theme->m_themePartsHaveRGBAColormap && graphicsContext->gdkWindow()) {
    9393        m_paintRect = graphicsContext->getCTM().mapRect(targetRect);
    94         m_target = graphicsContext->gdkDrawable();
     94        m_target = graphicsContext->gdkWindow();
    9595        return;
    9696    }
     
    132132    // We do not need to blit back to the target in the fallback case. See above.
    133133    RenderThemeGtk* theme = static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get());
    134     if (!theme->m_themePartsHaveRGBAColormap && m_graphicsContext->gdkDrawable())
     134    if (!theme->m_themePartsHaveRGBAColormap && m_graphicsContext->gdkWindow())
    135135        return;
    136136
Note: See TracChangeset for help on using the changeset viewer.