Changeset 42199 in webkit
- Timestamp:
- Apr 3, 2009 6:00:35 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r42153 r42199 1 2009-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 1 10 2009-04-01 Christian Dywan <christian@twotoasts.de> 2 11 -
trunk/WebCore/ChangeLog
r42198 r42199 1 2009-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 1 24 2009-04-02 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp
r41768 r42199 110 110 cairo_matrix_init_identity(&ctm); 111 111 112 #if GTK_CHECK_VERSION(2,10,0)113 112 if (GdkScreen* screen = gdk_screen_get_default()) 114 113 options = gdk_screen_get_font_options(screen); 115 #endif 114 116 115 // gdk_screen_get_font_options() returns NULL if no default options are 117 116 // set, so we always have to check. … … 151 150 const cairo_font_options_t* options = NULL; 152 151 153 #if GTK_CHECK_VERSION(2,10,0)154 152 if (GdkScreen* screen = gdk_screen_get_default()) 155 153 options = gdk_screen_get_font_options(screen); 156 #endif 154 157 155 // gdk_screen_get_font_options() returns NULL if no default options are 158 156 // set, so we always have to check. -
trunk/WebCore/platform/gtk/ContextMenuItemGtk.cpp
r41283 r42199 57 57 case ContextMenuItemTagDelete: 58 58 return GTK_STOCK_DELETE; 59 #if GTK_CHECK_VERSION(2, 10, 0)60 59 case ContextMenuItemTagSelectAll: 61 60 return GTK_STOCK_SELECT_ALL; 62 #endif63 61 case ContextMenuItemTagSpellingGuess: 64 62 return GTK_STOCK_INFO; -
trunk/WebCore/platform/gtk/KeyEventGtk.cpp
r39172 r42199 37 37 #include <gdk/gdk.h> 38 38 #include <gdk/gdkkeysyms.h> 39 40 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h41 #include <gtk/gtk.h>42 39 43 40 namespace WebCore { … … 537 534 , m_ctrlKey(event->state & GDK_CONTROL_MASK) 538 535 , m_altKey(event->state & GDK_MOD1_MASK) 539 #if GTK_CHECK_VERSION(2,10,0)540 536 , m_metaKey(event->state & GDK_META_MASK) 541 #else542 // GDK_MOD2_MASK doesn't always mean meta so we can't use it543 , m_metaKey(false)544 #endif545 537 , m_gdkEventKey(event) 546 538 { -
trunk/WebCore/platform/gtk/LocalizedStringsGtk.cpp
r37949 r42199 126 126 String contextMenuItemTagSelectAll() 127 127 { 128 #if GTK_CHECK_VERSION(2,10,0)129 128 static String stockLabel = String::fromUTF8(gtkStockLabel(GTK_STOCK_SELECT_ALL)); 130 #else131 static String stockLabel = String::fromUTF8(_("Select _All"));132 #endif133 129 return stockLabel; 134 130 } -
trunk/WebCore/platform/gtk/MouseEventGtk.cpp
r39784 r42199 32 32 #include <gdk/gdk.h> 33 33 34 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h35 #include <gtk/gtk.h>36 37 34 namespace WebCore { 38 35 … … 48 45 m_ctrlKey = event->state & GDK_CONTROL_MASK; 49 46 m_altKey = event->state & GDK_MOD1_MASK; 50 #if GTK_CHECK_VERSION(2,10,0)51 47 m_metaKey = event->state & GDK_META_MASK; 52 #else53 // GDK_MOD2_MASK doesn't always mean meta so we can't use it54 m_metaKey = false;55 #endif56 48 57 49 switch (event->type) { -
trunk/WebCore/platform/gtk/PasteboardGtk.cpp
r30374 r42199 104 104 { 105 105 GtkClipboard* clipboard = m_helper->getClipboard(frame); 106 #if GTK_CHECK_VERSION(2,10,0)107 106 gchar* text = g_strdup(frame->selectedText().utf8().data()); 108 107 gchar* markup = g_strdup(createMarkup(selectedRange, 0, AnnotateForInterchange).utf8().data()); … … 114 113 clipboard_get_contents_cb, clipboard_clear_contents_cb, data); 115 114 gtk_target_table_free(targets, n_targets); 116 #else117 gtk_clipboard_set_text(clipboard, frame->selectedText().utf8().data(), frame->selectedText().utf8().length());118 #endif119 115 } 120 116 … … 164 160 bool allowPlainText, bool& chosePlainText) 165 161 { 166 #if GTK_CHECK_VERSION(2,10,0)167 162 GdkAtom textHtml = gdk_atom_intern_static_string("text/html"); 168 #else169 GdkAtom textHtml = gdk_atom_intern("text/html", false);170 #endif171 163 GtkClipboard* clipboard = m_helper->getClipboard(frame); 172 164 chosePlainText = false; -
trunk/WebCore/platform/gtk/WheelEventGtk.cpp
r41746 r42199 31 31 32 32 #include <gdk/gdk.h> 33 34 // GTK_CHECK_VERSION is defined in gtk/gtkversion.h35 #include <gtk/gtk.h>36 33 37 34 namespace WebCore { … … 70 67 m_ctrlKey = event->state & GDK_CONTROL_MASK; 71 68 m_altKey = event->state & GDK_MOD1_MASK; 72 #if GTK_CHECK_VERSION(2,10,0)73 69 m_metaKey = event->state & GDK_META_MASK; 74 #else75 // GDK_MOD2_MASK doesn't always mean meta so we can't use it76 m_metaKey = false;77 #endif78 70 79 71 // FIXME: retrieve the user setting for the number of lines to scroll on each wheel event -
trunk/WebKit/gtk/ChangeLog
r42169 r42199 1 2009-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 1 14 2009-04-02 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 15 -
trunk/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
r41249 r42199 165 165 } 166 166 167 #if GTK_CHECK_VERSION(2,10,0)168 167 static void clipboard_get_contents_cb(GtkClipboard* clipboard, GtkSelectionData* selection_data, guint info, gpointer data) 169 168 { … … 190 189 frame->selection()->setBase(frame->selection()->extent(), frame->selection()->affinity()); 191 190 } 192 #endif193 191 194 192 void EditorClient::respondToChangedSelection() … … 203 201 return; 204 202 205 #if GTK_CHECK_VERSION(2,10,0)206 203 GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(m_webView), GDK_SELECTION_PRIMARY); 207 204 if (targetFrame->selection()->isRange()) { … … 214 211 } else if (gtk_clipboard_get_owner(clipboard) == G_OBJECT(m_webView)) 215 212 gtk_clipboard_clear(clipboard); 216 #endif217 213 218 214 if (!targetFrame->editor()->hasComposition()) -
trunk/WebKit/gtk/webkit/webkitwebframe.cpp
r41341 r42199 611 611 } 612 612 613 #if GTK_CHECK_VERSION(2,10,0)614 615 613 static void begin_print(GtkPrintOperation* op, GtkPrintContext* context, gpointer user_data) 616 614 { … … 680 678 } 681 679 682 #else683 684 void webkit_web_frame_print(WebKitWebFrame*)685 {686 g_warning("Printing support is not available in older versions of GTK+");687 }688 689 #endif690 691 680 bool webkit_web_frame_pause_animation(WebKitWebFrame* frame, const gchar* name, double time, const gchar* element) 692 681 { -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r42150 r42199 292 292 g_value_set_string(value, webkit_web_view_get_uri(webView)); 293 293 break; 294 #if GTK_CHECK_VERSION(2,10,0)295 294 case PROP_COPY_TARGET_LIST: 296 295 g_value_set_boxed(value, webkit_web_view_get_copy_target_list(webView)); … … 299 298 g_value_set_boxed(value, webkit_web_view_get_paste_target_list(webView)); 300 299 break; 301 #endif302 300 case PROP_EDITABLE: 303 301 g_value_set_boolean(value, webkit_web_view_get_editable(webView)); … … 1684 1682 WEBKIT_PARAM_READABLE)); 1685 1683 1686 #if GTK_CHECK_VERSION(2,10,0)1687 1684 /** 1688 1685 * WebKitWebView:copy-target-list: … … 1712 1709 GTK_TYPE_TARGET_LIST, 1713 1710 WEBKIT_PARAM_READABLE)); 1714 #endif1715 1711 1716 1712 g_object_class_install_property(objectClass, PROP_SETTINGS, … … 1834 1830 1835 1831 gdouble DPI = defaultDPI; 1836 #if GTK_CHECK_VERSION(2,10,0)1837 1832 GdkScreen* screen = gtk_widget_has_screen(GTK_WIDGET(webView)) ? gtk_widget_get_screen(GTK_WIDGET(webView)) : gdk_screen_get_default(); 1838 1833 if (screen) { … … 1842 1837 DPI = defaultDPI; 1843 1838 } 1844 #endif1845 1839 ASSERT(DPI > 0); 1846 1840 return DPI; … … 2020 2014 priv->zoomFullContent = FALSE; 2021 2015 2022 #if GTK_CHECK_VERSION(2,10,0)2023 2016 GdkAtom textHtml = gdk_atom_intern_static_string("text/html"); 2024 #else2025 GdkAtom textHtml = gdk_atom_intern("text/html", false);2026 #endif2027 2017 /* Targets for copy */ 2028 2018 priv->copy_target_list = gtk_target_list_new(NULL, 0); -
trunk/configure.ac
r42123 r42199 184 184 # minimum GTK+ base dependencies 185 185 PANGO_REQUIRED_VERSION=1.0 186 GTK_REQUIRED_VERSION=2. 8186 GTK_REQUIRED_VERSION=2.10 187 187 188 188 # optional modules
Note: See TracChangeset
for help on using the changeset viewer.