Changeset 85480 in webkit


Ignore:
Timestamp:
May 2, 2011 9:13:58 AM (13 years ago)
Author:
Philippe Normand
Message:

2011-05-02 Philippe Normand <pnormand@igalia.com>

Reviewed by Martin Robinson.

[GTK] gdk_drawable_get_size() shouldn't be used with GTK+ >= 2.24
https://bugs.webkit.org/show_bug.cgi?id=59932

Use gdk_window_get_width() and gdk_window_get_height() if
available, instead of the deprecated gdk_drawable_get_size().

No new tests, build fix only.

  • platform/gtk/WidgetRenderingContext.cpp: (WebCore::WidgetRenderingContext::WidgetRenderingContext):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85478 r85480  
     12011-05-02  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] gdk_drawable_get_size() shouldn't be used with GTK+ >= 2.24
     6        https://bugs.webkit.org/show_bug.cgi?id=59932
     7
     8        Use gdk_window_get_width() and gdk_window_get_height() if
     9        available, instead of the deprecated gdk_drawable_get_size().
     10
     11        No new tests, build fix only.
     12
     13        * platform/gtk/WidgetRenderingContext.cpp:
     14        (WebCore::WidgetRenderingContext::WidgetRenderingContext):
     15
    1162011-05-02  Eric Carlson  <eric.carlson@apple.com>
    217
  • trunk/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp

    r84978 r85480  
    8585    // This prevents giant pixmap allocations for very large widgets in smaller views.
    8686    int maxWidth = 0, maxHeight = 0;
     87#if GTK_CHECK_VERSION(2, 24, 0)
     88    maxWidth = gdk_window_get_width(graphicsContext->gdkWindow());
     89    maxHeight = gdk_window_get_height(graphicsContext->gdkWindow());
     90#else
    8791    gdk_drawable_get_size(graphicsContext->gdkWindow(), &maxWidth, &maxHeight);
     92#endif
    8893    m_targetRect.setSize(m_targetRect.size().shrunkTo(IntSize(maxWidth, maxHeight)));
    8994
Note: See TracChangeset for help on using the changeset viewer.