Changeset 42199 in webkit


Ignore:
Timestamp:
Apr 3, 2009 6:00:35 AM (15 years ago)
Author:
kov@webkit.org
Message:

2009-04-03 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Holger Freyther.

Require GTK+ >= 2.10; 2.8 is already very old, and some very
useful APIs are only available since 2.10.

  • configure.ac:

WebCore/

2009-04-03 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Holger Freyther.

Remove pre-processor checks for GTK+ >= 2.10, since we now require
at least that version.

  • platform/graphics/gtk/FontPlatformDataGtk.cpp: (WebCore::FontPlatformData::FontPlatformData):
  • platform/gtk/ContextMenuItemGtk.cpp: (WebCore::gtkStockIDFromContextMenuAction):
  • platform/gtk/KeyEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
  • platform/gtk/LocalizedStringsGtk.cpp: (WebCore::contextMenuItemTagSelectAll):
  • platform/gtk/MouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent):
  • platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::documentFragment):
  • platform/gtk/WheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent):

WebKit/gtk

2009-04-03 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Holger Freyther.

Remove pre-processor checks for GTK+ >= 2.10, since we now require
at least that version.

  • WebCoreSupport/EditorClientGtk.cpp: (WebKit::clipboard_clear_contents_cb): (WebKit::EditorClient::respondToChangedSelection):
  • webkit/webkitwebframe.cpp:
  • webkit/webkitwebview.cpp:
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r42153 r42199  
     12009-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Holger Freyther.
     4
     5        Require GTK+ >= 2.10; 2.8 is already very old, and some very
     6        useful APIs are only available since 2.10.
     7
     8        * configure.ac:
     9
    1102009-04-01  Christian Dywan  <christian@twotoasts.de>
    211
  • trunk/WebCore/ChangeLog

    r42198 r42199  
     12009-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Holger Freyther.
     4
     5        Remove pre-processor checks for GTK+ >= 2.10, since we now require
     6        at least that version.
     7
     8        * platform/graphics/gtk/FontPlatformDataGtk.cpp:
     9        (WebCore::FontPlatformData::FontPlatformData):
     10        * platform/gtk/ContextMenuItemGtk.cpp:
     11        (WebCore::gtkStockIDFromContextMenuAction):
     12        * platform/gtk/KeyEventGtk.cpp:
     13        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
     14        * platform/gtk/LocalizedStringsGtk.cpp:
     15        (WebCore::contextMenuItemTagSelectAll):
     16        * platform/gtk/MouseEventGtk.cpp:
     17        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
     18        * platform/gtk/PasteboardGtk.cpp:
     19        (WebCore::Pasteboard::writeSelection):
     20        (WebCore::Pasteboard::documentFragment):
     21        * platform/gtk/WheelEventGtk.cpp:
     22        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
     23
    1242009-04-02  Simon Fraser  <simon.fraser@apple.com>
    225
  • trunk/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp

    r41768 r42199  
    110110    cairo_matrix_init_identity(&ctm);
    111111
    112 #if GTK_CHECK_VERSION(2,10,0)
    113112    if (GdkScreen* screen = gdk_screen_get_default())
    114113        options = gdk_screen_get_font_options(screen);
    115 #endif
     114
    116115    // gdk_screen_get_font_options() returns NULL if no default options are
    117116    // set, so we always have to check.
     
    151150    const cairo_font_options_t* options = NULL;
    152151
    153 #if GTK_CHECK_VERSION(2,10,0)
    154152    if (GdkScreen* screen = gdk_screen_get_default())
    155153        options = gdk_screen_get_font_options(screen);
    156 #endif
     154
    157155    // gdk_screen_get_font_options() returns NULL if no default options are
    158156    // set, so we always have to check.
  • trunk/WebCore/platform/gtk/ContextMenuItemGtk.cpp

    r41283 r42199  
    5757    case ContextMenuItemTagDelete:
    5858        return GTK_STOCK_DELETE;
    59 #if GTK_CHECK_VERSION(2, 10, 0)
    6059    case ContextMenuItemTagSelectAll:
    6160        return GTK_STOCK_SELECT_ALL;
    62 #endif
    6361    case ContextMenuItemTagSpellingGuess:
    6462        return GTK_STOCK_INFO;
  • trunk/WebCore/platform/gtk/KeyEventGtk.cpp

    r39172 r42199  
    3737#include <gdk/gdk.h>
    3838#include <gdk/gdkkeysyms.h>
    39 
    40 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h
    41 #include <gtk/gtk.h>
    4239
    4340namespace WebCore {
     
    537534    , m_ctrlKey(event->state & GDK_CONTROL_MASK)
    538535    , m_altKey(event->state & GDK_MOD1_MASK)
    539 #if GTK_CHECK_VERSION(2,10,0)
    540536    , m_metaKey(event->state & GDK_META_MASK)
    541 #else
    542     // GDK_MOD2_MASK doesn't always mean meta so we can't use it
    543     , m_metaKey(false)
    544 #endif
    545537    , m_gdkEventKey(event)
    546538{
  • trunk/WebCore/platform/gtk/LocalizedStringsGtk.cpp

    r37949 r42199  
    126126String contextMenuItemTagSelectAll()
    127127{
    128 #if GTK_CHECK_VERSION(2,10,0)
    129128    static String stockLabel = String::fromUTF8(gtkStockLabel(GTK_STOCK_SELECT_ALL));
    130 #else
    131     static String stockLabel = String::fromUTF8(_("Select _All"));
    132 #endif
    133129    return stockLabel;
    134130}
  • trunk/WebCore/platform/gtk/MouseEventGtk.cpp

    r39784 r42199  
    3232#include <gdk/gdk.h>
    3333
    34 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h
    35 #include <gtk/gtk.h>
    36 
    3734namespace WebCore {
    3835
     
    4845    m_ctrlKey = event->state & GDK_CONTROL_MASK;
    4946    m_altKey = event->state & GDK_MOD1_MASK;
    50 #if GTK_CHECK_VERSION(2,10,0)
    5147    m_metaKey = event->state & GDK_META_MASK;
    52 #else
    53     // GDK_MOD2_MASK doesn't always mean meta so we can't use it
    54     m_metaKey = false;
    55 #endif
    5648
    5749    switch (event->type) {
  • trunk/WebCore/platform/gtk/PasteboardGtk.cpp

    r30374 r42199  
    104104{
    105105    GtkClipboard* clipboard = m_helper->getClipboard(frame);
    106 #if GTK_CHECK_VERSION(2,10,0)
    107106    gchar* text = g_strdup(frame->selectedText().utf8().data());
    108107    gchar* markup = g_strdup(createMarkup(selectedRange, 0, AnnotateForInterchange).utf8().data());
     
    114113                                clipboard_get_contents_cb, clipboard_clear_contents_cb, data);
    115114    gtk_target_table_free(targets, n_targets);
    116 #else
    117     gtk_clipboard_set_text(clipboard, frame->selectedText().utf8().data(), frame->selectedText().utf8().length());
    118 #endif
    119115}
    120116
     
    164160                                                          bool allowPlainText, bool& chosePlainText)
    165161{
    166 #if GTK_CHECK_VERSION(2,10,0)
    167162    GdkAtom textHtml = gdk_atom_intern_static_string("text/html");
    168 #else
    169     GdkAtom textHtml = gdk_atom_intern("text/html", false);
    170 #endif
    171163    GtkClipboard* clipboard = m_helper->getClipboard(frame);
    172164    chosePlainText = false;
  • trunk/WebCore/platform/gtk/WheelEventGtk.cpp

    r41746 r42199  
    3131
    3232#include <gdk/gdk.h>
    33 
    34 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h
    35 #include <gtk/gtk.h>
    3633
    3734namespace WebCore {
     
    7067    m_ctrlKey = event->state & GDK_CONTROL_MASK;
    7168    m_altKey = event->state & GDK_MOD1_MASK;
    72 #if GTK_CHECK_VERSION(2,10,0)
    7369    m_metaKey = event->state & GDK_META_MASK;
    74 #else
    75     // GDK_MOD2_MASK doesn't always mean meta so we can't use it
    76     m_metaKey = false;
    77 #endif
    7870
    7971    // FIXME: retrieve the user setting for the number of lines to scroll on each wheel event
  • trunk/WebKit/gtk/ChangeLog

    r42169 r42199  
     12009-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Holger Freyther.
     4
     5        Remove pre-processor checks for GTK+ >= 2.10, since we now require
     6        at least that version.
     7
     8        * WebCoreSupport/EditorClientGtk.cpp:
     9        (WebKit::clipboard_clear_contents_cb):
     10        (WebKit::EditorClient::respondToChangedSelection):
     11        * webkit/webkitwebframe.cpp:
     12        * webkit/webkitwebview.cpp:
     13
    1142009-04-02  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    215
  • trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp

    r41249 r42199  
    165165}
    166166
    167 #if GTK_CHECK_VERSION(2,10,0)
    168167static void clipboard_get_contents_cb(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data)
    169168{
     
    190189    frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity());
    191190}
    192 #endif
    193191
    194192void EditorClient::respondToChangedSelection()
     
    203201        return;
    204202
    205 #if GTK_CHECK_VERSION(2,10,0)
    206203    GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(m_webView), GDK_SELECTION_PRIMARY);
    207204    if (targetFrame->selection()->isRange()) {
     
    214211    } else if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(m_webView))
    215212        gtk_clipboard_clear(clipboard);
    216 #endif
    217213
    218214    if (!targetFrame->editor()->hasComposition())
  • trunk/WebKit/gtk/webkit/webkitwebframe.cpp

    r41341 r42199  
    611611}
    612612
    613 #if GTK_CHECK_VERSION(2,10,0)
    614 
    615613static void begin_print(GtkPrintOperation* op, GtkPrintContext* context, gpointer user_data)
    616614{
     
    680678}
    681679
    682 #else
    683 
    684 void webkit_web_frame_print(WebKitWebFrame*)
    685 {
    686     g_warning("Printing support is not available in older versions of GTK+");
    687 }
    688 
    689 #endif
    690 
    691680bool webkit_web_frame_pause_animation(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element)
    692681{
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r42150 r42199  
    292292        g_value_set_string(value, webkit_web_view_get_uri(webView));
    293293        break;
    294 #if GTK_CHECK_VERSION(2,10,0)
    295294    case PROP_COPY_TARGET_LIST:
    296295        g_value_set_boxed(value, webkit_web_view_get_copy_target_list(webView));
     
    299298        g_value_set_boxed(value, webkit_web_view_get_paste_target_list(webView));
    300299        break;
    301 #endif
    302300    case PROP_EDITABLE:
    303301        g_value_set_boolean(value, webkit_web_view_get_editable(webView));
     
    16841682                                                        WEBKIT_PARAM_READABLE));
    16851683
    1686 #if GTK_CHECK_VERSION(2,10,0)
    16871684    /**
    16881685    * WebKitWebView:copy-target-list:
     
    17121709                                                       GTK_TYPE_TARGET_LIST,
    17131710                                                       WEBKIT_PARAM_READABLE));
    1714 #endif
    17151711
    17161712    g_object_class_install_property(objectClass, PROP_SETTINGS,
     
    18341830
    18351831    gdouble DPI = defaultDPI;
    1836 #if GTK_CHECK_VERSION(2,10,0)
    18371832    GdkScreen* screen = gtk_widget_has_screen(GTK_WIDGET(webView)) ? gtk_widget_get_screen(GTK_WIDGET(webView)) : gdk_screen_get_default();
    18381833    if (screen) {
     
    18421837            DPI = defaultDPI;
    18431838    }
    1844 #endif
    18451839    ASSERT(DPI > 0);
    18461840    return DPI;
     
    20202014    priv->zoomFullContent = FALSE;
    20212015
    2022 #if GTK_CHECK_VERSION(2,10,0)
    20232016    GdkAtom textHtml = gdk_atom_intern_static_string("text/html");
    2024 #else
    2025     GdkAtom textHtml = gdk_atom_intern("text/html", false);
    2026 #endif
    20272017    /* Targets for copy */
    20282018    priv->copy_target_list = gtk_target_list_new(NULL, 0);
  • trunk/configure.ac

    r42123 r42199  
    184184# minimum GTK+ base dependencies
    185185PANGO_REQUIRED_VERSION=1.0
    186 GTK_REQUIRED_VERSION=2.8
     186GTK_REQUIRED_VERSION=2.10
    187187
    188188# optional modules
Note: See TracChangeset for help on using the changeset viewer.