Changeset 61206 in webkit
- Timestamp:
- Jun 15, 2010 12:14:38 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r61162 r61206 1 2010-06-15 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha. 4 5 [GTK] Does not compile with -DGSEAL_ENABLE 6 https://bugs.webkit.org/show_bug.cgi?id=37851 7 8 Add GSEAL_ENABLE flag when doing debug builds. 9 10 * GNUmakefile.am: 11 1 12 2010-06-13 Tony Chang <tony@chromium.org> 2 13 -
trunk/GNUmakefile.am
r60842 r61206 312 312 global_cppflags += -DNDEBUG 313 313 global_cflags += $(SYMBOL_VISIBILITY) 314 315 314 else 316 315 webcoregtk_cppflags += \ … … 319 318 -DGDK_DISABLE_DEPRECATED \ 320 319 -DGTK_DISABLE_DEPRECATED \ 321 -DPANGO_DISABLE_DEPRECATED 320 -DPANGO_DISABLE_DEPRECATED \ 321 -DGSEAL_ENABLE 322 322 323 323 # Might be useful in the future -
trunk/WebCore/ChangeLog
r61201 r61206 1 2010-06-15 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha. 4 5 [GTK] Does not compile with -DGSEAL_ENABLE 6 https://bugs.webkit.org/show_bug.cgi?id=37851 7 8 Fix compilation with GSEAL_ENABLE. 9 10 * platform/gtk/GtkVersioning.h: 11 * platform/gtk/PlatformScreenGtk.cpp: 12 (WebCore::screenDepth): 13 (WebCore::screenDepthPerComponent): 14 * platform/gtk/PopupMenuGtk.cpp: 15 (WebCore::PopupMenu::show): 16 * platform/gtk/ScrollbarGtk.cpp: 17 (ScrollbarGtk::detachAdjustment): 18 (ScrollbarGtk::updateThumbPosition): 19 (ScrollbarGtk::updateThumbProportion): 20 * plugins/gtk/PluginViewGtk.cpp: 21 (WebCore::PluginView::paint): 22 (WebCore::PluginView::initXEvent): 23 (WebCore::PluginView::platformGetValue): 24 (WebCore::PluginView::platformStart): 25 * plugins/gtk/gtk2xtbin.c: 26 (gtk_xtbin_realize): 27 (gtk_xtbin_new): 28 (gtk_xtbin_set_position): 29 (gtk_xtbin_unrealize): 30 1 31 2010-06-15 Xan Lopez <xlopez@igalia.com> 2 32 -
trunk/WebCore/platform/gtk/GtkVersioning.h
r60785 r61206 24 24 25 25 // Macros to avoid deprecation checking churn 26 #if !GTK_CHECK_VERSION(2, 21, 2) 27 #define gdk_visual_get_depth(visual) (visual)->depth 28 #define gdk_visual_get_bits_per_rgb(visual) (visual)->bits_per_rgb 29 #define gdk_drag_context_get_selected_action(context) (context)->action 30 #endif // GTK_CHECK_VERSION(2, 21, 2) 31 32 #if !GTK_CHECK_VERSION(2, 20, 0) 33 #define gtk_widget_set_realized(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_REALIZED) 34 #define gtk_widget_set_realized(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_REALIZED) 35 #endif // GTK_CHECK_VERSION(2, 20, 0) 36 26 37 #if !GTK_CHECK_VERSION(2, 19, 0) 27 38 #define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL(widget) … … 32 43 #endif // GTK_CHECK_VERSION(2, 19, 0) 33 44 45 #if !GTK_CHECK_VERSION(2, 18, 0) 46 #define gtk_widget_set_visible(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_VISIBLE) 47 #define gtk_widget_set_visible(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_VISIBLE) 48 #define gtk_widget_set_window(widget, new_window) (widget)->window = (new_window) 49 #define gtk_widget_set_can_focus(widget, FALSE) GTK_WIDGET_UNSET_FLAGS((widget), GTK_CAN_FOCUS) 50 #define gtk_widget_set_can_focus(widget, TRUE) GTK_WIDGET_SET_FLAGS((widget), GTK_CAN_FOCUS) 51 #endif // GTK_CHECK_VERSION(2, 18, 0) 52 34 53 #if !GTK_CHECK_VERSION(2, 14, 0) 35 54 #define gtk_widget_get_window(widget) (widget)->window 36 #endif 55 #define gtk_adjustment_get_value(adj) (adj)->value 56 #define gtk_dialog_get_content_area(dialog) (dialog)->vbox 57 #endif // GTK_CHECK_VERSION(2, 14, 0) 37 58 38 59 #endif // GtkVersioning_h -
trunk/WebCore/platform/gtk/PlatformScreenGtk.cpp
r60785 r61206 73 73 if (!visual) 74 74 return 24; 75 return visual->depth;75 return gdk_visual_get_depth(visual); 76 76 } 77 77 … … 82 82 return 8; 83 83 84 return visual->bits_per_rgb;84 return gdk_visual_get_bits_per_rgb(visual); 85 85 } 86 86 -
trunk/WebCore/platform/gtk/PopupMenuGtk.cpp
r60785 r61206 90 90 gtk_widget_set_size_request(GTK_WIDGET(m_popup.get()), std::max(rect.width(), requisition.width), -1); 91 91 92 GList* children = GTK_MENU_SHELL(m_popup.get())->children; 92 GList* children = gtk_container_get_children(GTK_CONTAINER(m_popup.get())); 93 GList* p = children; 93 94 if (size) 94 95 for (int i = 0; i < size; i++) { … … 96 97 break; 97 98 98 GtkWidget* item = reinterpret_cast<GtkWidget*>( children->data);99 GtkWidget* item = reinterpret_cast<GtkWidget*>(p->data); 99 100 GtkRequisition itemRequisition; 100 101 gtk_widget_get_child_requisition(item, &itemRequisition); 101 102 m_menuPosition.setY(m_menuPosition.y() - itemRequisition.height); 102 103 103 children = g_list_next(children);104 p = g_list_next(p); 104 105 } else 105 106 // Center vertically the empty popup in the combo box area 106 107 m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2); 107 108 109 g_list_free(children); 108 110 gtk_menu_popup(m_popup.get(), 0, 0, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, 0, gtk_get_current_event_time()); 109 111 } -
trunk/WebCore/platform/gtk/ScrollbarGtk.cpp
r60288 r61206 121 121 // reset the values so that the surrounding scrollbar gets updated, or 122 122 // e.g. for a GtkScrolledWindow the scrollbar gets hidden. 123 #if GTK_CHECK_VERSION(2, 14, 0) 124 gtk_adjustment_configure(m_adjustment, 0, 0, 0, 0, 0, 0); 125 #else 123 126 m_adjustment->lower = 0; 124 127 m_adjustment->upper = 0; … … 126 129 gtk_adjustment_changed(m_adjustment); 127 130 gtk_adjustment_value_changed(m_adjustment); 131 #endif 128 132 g_object_unref(m_adjustment); 129 133 m_adjustment = 0; … … 159 163 void ScrollbarGtk::updateThumbPosition() 160 164 { 161 if (m_adjustment->value != m_currentPos) { 165 if (gtk_adjustment_get_value(m_adjustment) != m_currentPos) { 166 #if GTK_CHECK_VERSION(2, 14, 0) 167 gtk_adjustment_set_value(m_adjustment, m_currentPos); 168 #else 162 169 m_adjustment->value = m_currentPos; 163 170 gtk_adjustment_value_changed(m_adjustment); 171 #endif 164 172 } 165 173 } … … 167 175 void ScrollbarGtk::updateThumbProportion() 168 176 { 177 #if GTK_CHECK_VERSION(2, 14, 0) 178 gtk_adjustment_configure(m_adjustment, 179 gtk_adjustment_get_value(m_adjustment), 180 gtk_adjustment_get_lower(m_adjustment), 181 m_totalSize, 182 m_lineStep, 183 m_pageStep, 184 m_visibleSize); 185 #else 169 186 m_adjustment->step_increment = m_lineStep; 170 187 m_adjustment->page_increment = m_pageStep; … … 172 189 m_adjustment->upper = m_totalSize; 173 190 gtk_adjustment_changed(m_adjustment); 191 #endif 174 192 } 175 193 -
trunk/WebCore/plugins/gtk/PluginViewGtk.cpp
r58821 r61206 40 40 #include "FrameView.h" 41 41 #include "GraphicsContext.h" 42 #include "GtkVersioning.h" 42 43 #include "HTMLNames.h" 43 44 #include "HTMLPlugInElement.h" … … 215 216 gint xoff = 0, yoff = 0; 216 217 217 gdk_window_get_internal_paint_info( widget->window, &gdkBackingStore, &xoff, &yoff);218 gdk_window_get_internal_paint_info(gtk_widget_get_window(widget), &gdkBackingStore, &xoff, &yoff); 218 219 219 220 GC gc = XDefaultGC(GDK_DISPLAY(), gdk_screen_get_number(gdk_screen_get_default())); … … 349 350 // events; thus, this is right: 350 351 GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient(); 351 xEvent->xany.window = widget ? GDK_WINDOW_XWINDOW( widget->window) : 0;352 xEvent->xany.window = widget ? GDK_WINDOW_XWINDOW(gtk_widget_get_window(widget)) : 0; 352 353 } 353 354 … … 657 658 #if defined(XP_UNIX) 658 659 void* w = reinterpret_cast<void*>(value); 659 *((XID *)w) = GDK_WINDOW_XWINDOW(m_parentFrame->view()->hostWindow()->platformPageClient()->window); 660 GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient(); 661 *((XID *)w) = GDK_WINDOW_XWINDOW(gtk_widget_get_window(widget)); 660 662 #endif 661 663 #ifdef GDK_WINDOWING_WIN32 662 664 HGDIOBJ* w = reinterpret_cast<HGDIOBJ*>(value); 663 *w = GDK_WINDOW_HWND(m_parentFrame->view()->hostWindow()->platformPageClient()->window); 665 GtkWidget* widget = m_parentFrame->view()->hostWindow()->platformPageClient(); 666 *w = GDK_WINDOW_HWND(gtk_widget_get_window(widget)); 664 667 #endif 665 668 *result = NPERR_NO_ERROR; … … 811 814 g_signal_connect(platformPluginWidget(), "plug-removed", G_CALLBACK(plugRemovedCallback), NULL); 812 815 } else 813 setPlatformWidget(gtk_xtbin_new( pageClient->window, 0));816 setPlatformWidget(gtk_xtbin_new(gtk_widget_get_window(pageClient), 0)); 814 817 #else 815 818 setPlatformWidget(gtk_socket_new()); … … 832 835 #if defined(XP_UNIX) 833 836 if (m_needsXEmbed) { 834 gtk_widget_realize(platformPluginWidget()); 837 GtkWidget* widget = platformPluginWidget(); 838 gtk_widget_realize(widget); 835 839 m_npWindow.window = (void*)gtk_socket_get_id(GTK_SOCKET(platformPluginWidget())); 836 ws->display = GDK_WINDOW_XDISPLAY(platformPluginWidget()->window); 837 ws->visual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(GDK_DRAWABLE(platformPluginWidget()->window))); 838 ws->depth = gdk_drawable_get_visual(GDK_DRAWABLE(platformPluginWidget()->window))->depth; 839 ws->colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(GDK_DRAWABLE(platformPluginWidget()->window))); 840 GdkWindow* window = gtk_widget_get_window(widget); 841 ws->display = GDK_WINDOW_XDISPLAY(window); 842 ws->visual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(GDK_DRAWABLE(window))); 843 ws->depth = gdk_visual_get_depth(gdk_drawable_get_visual(GDK_DRAWABLE(window))); 844 ws->colormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(GDK_DRAWABLE(window))); 840 845 } else { 841 846 m_npWindow.window = (void*)GTK_XTBIN(platformPluginWidget())->xtwindow; … … 847 852 XFlush (ws->display); 848 853 #elif defined(GDK_WINDOWING_WIN32) 849 m_npWindow.window = (void*)GDK_WINDOW_HWND( platformPluginWidget()->window);854 m_npWindow.window = (void*)GDK_WINDOW_HWND(gtk_widget_get_window(platformPluginWidget())); 850 855 #endif 851 856 } else { … … 857 862 GdkVisual* gvisual = gdk_screen_get_system_visual(gscreen); 858 863 859 if (g visual->depth== 32 || !m_plugin->quirks().contains(PluginQuirkRequiresDefaultScreenDepth)) {864 if (gdk_visual_get_depth(gvisual) == 32 || !m_plugin->quirks().contains(PluginQuirkRequiresDefaultScreenDepth)) { 860 865 getVisualAndColormap(32, &m_visual, &m_colormap); 861 866 ws->depth = 32; … … 863 868 864 869 if (!m_visual) { 865 getVisualAndColormap(g visual->depth, &m_visual, &m_colormap);866 ws->depth = g visual->depth;870 getVisualAndColormap(gdk_visual_get_depth(gvisual), &m_visual, &m_colormap); 871 ws->depth = gdk_visual_get_depth(gvisual); 867 872 } 868 873 -
trunk/WebCore/plugins/gtk/gtk2xtbin.c
r60438 r61206 272 272 GtkXtBin *xtbin; 273 273 GtkAllocation allocation = { 0, 0, 200, 200 }; 274 #if GTK_CHECK_VERSION(2, 18, 0) 275 GtkAllocation widget_allocation; 276 #endif 274 277 gint x, y, w, h, d; /* geometry of window */ 275 278 … … 292 295 #endif 293 296 297 #if GTK_CHECK_VERSION(2, 18, 0) 298 gtk_widget_get_allocation(widget, &widget_allocation); 299 xtbin->width = widget_allocation.width; 300 xtbin->height = widget_allocation.height; 301 #else 294 302 xtbin->width = widget->allocation.width; 295 303 xtbin->height = widget->allocation.height; 304 #endif 296 305 297 306 /* use GtkSocket's realize */ … … 334 343 GDK_VISUAL_XVISUAL(gdk_rgb_get_visual()), 335 344 GDK_COLORMAP_XCOLORMAP(gdk_rgb_get_colormap()), 336 gdk_ rgb_get_visual()->depth);345 gdk_visual_get_depth(gdk_rgb_get_visual())); 337 346 338 347 if (!xtbin->xtclient.xtdisplay) { … … 405 414 406 415 if (gtk_widget_get_realized (GTK_WIDGET(xtbin))) 407 gdk_window_move ( GTK_WIDGET (xtbin)->window, x, y);416 gdk_window_move (gtk_widget_get_window(GTK_WIDGET (xtbin)), x, y); 408 417 } 409 418 … … 458 467 widget = GTK_WIDGET(object); 459 468 460 GTK_WIDGET_UNSET_FLAGS (widget, GTK_VISIBLE);469 gtk_widget_set_visible(widget, FALSE); 461 470 if (gtk_widget_get_realized (widget)) { 462 471 xt_client_unrealize(&(xtbin->xtclient)); -
trunk/WebKit/gtk/ChangeLog
r61124 r61206 1 2010-06-15 Xan Lopez <xlopez@igalia.com> 2 3 Reviewed by Gustavo Noronha. 4 5 [GTK] Does not compile with -DGSEAL_ENABLE 6 https://bugs.webkit.org/show_bug.cgi?id=37851 7 8 Fix compilation with GSEAL_ENABLE. 9 10 * WebCoreSupport/ChromeClientGtk.cpp: 11 (WebKit::ChromeClient::pageRect): 12 (WebKit::ChromeClient::contentsSizeChanged): 13 * tests/testdomnode.c: 14 (test_dom_node_insertion): 15 * webkit/webkitwebview.cpp: 16 (webkit_web_view_realize): 17 (webkit_web_view_script_dialog): 18 (webkit_web_view_drag_end): 19 (webkit_web_view_init): 20 1 21 2010-06-14 Ilya Tikhonovsky <loislo@chromium.org> 2 22 -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
r60785 r61206 105 105 FloatRect ChromeClient::pageRect() 106 106 { 107 GtkAllocation allocation; 108 #if GTK_CHECK_VERSION(2, 18, 0) 109 gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation); 110 #else 107 111 GtkAllocation allocation = GTK_WIDGET(m_webView)->allocation; 112 #endif 108 113 return IntRect(allocation.x, allocation.y, allocation.width, allocation.height); 109 114 } … … 426 431 // otherwise we get into an infinite loop! 427 432 GtkWidget* widget = GTK_WIDGET(m_webView); 433 GtkRequisition requisition; 434 #if GTK_CHECK_VERSION(2, 20, 0) 435 gtk_widget_get_requisition(widget, &requisition); 436 #else 437 requisition = widget->requisition; 438 #endif 428 439 if (gtk_widget_get_realized(widget) 429 && ( widget->requisition.height != size.height())430 || ( widget->requisition.width != size.width()))440 && (requisition.height != size.height()) 441 || (requisition.width != size.width())) 431 442 gtk_widget_queue_resize_no_redraw(widget); 432 443 } -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r60841 r61206 800 800 static void webkit_web_view_realize(GtkWidget* widget) 801 801 { 802 GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); 802 gtk_widget_set_realized(widget, TRUE); 803 804 GtkAllocation allocation; 805 #if GTK_CHECK_VERSION(2, 18, 0) 806 gtk_widget_get_allocation(widget, &allocation); 807 #else 808 allocation = widget->allocation; 809 #endif 803 810 804 811 GdkWindowAttr attributes; 805 812 attributes.window_type = GDK_WINDOW_CHILD; 806 attributes.x = widget->allocation.x;807 attributes.y = widget->allocation.y;808 attributes.width = widget->allocation.width;809 attributes.height = widget->allocation.height;813 attributes.x = allocation.x; 814 attributes.y = allocation.y; 815 attributes.width = allocation.width; 816 attributes.height = allocation.height; 810 817 attributes.wclass = GDK_INPUT_OUTPUT; 811 attributes.visual = gtk_widget_get_visual 812 attributes.colormap = gtk_widget_get_colormap 818 attributes.visual = gtk_widget_get_visual(widget); 819 attributes.colormap = gtk_widget_get_colormap(widget); 813 820 attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK 814 821 | GDK_EXPOSURE_MASK … … 824 831 825 832 gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; 826 widget->window = gdk_window_new(gtk_widget_get_parent_window (widget), &attributes, attributes_mask); 827 gdk_window_set_user_data(widget->window, widget); 828 829 widget->style = gtk_style_attach(widget->style, widget->window); 830 gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); 833 GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask); 834 gtk_widget_set_window(widget, window); 835 gdk_window_set_user_data(window, widget); 836 837 #if GTK_CHECK_VERSION(2, 20, 0) 838 gtk_widget_style_attach(widget); 839 #else 840 widget->style = gtk_style_attach(gtk_widget_get_style(widget), window); 841 #endif 842 gtk_style_set_background(gtk_widget_get_style(widget), window, GTK_STATE_NORMAL); 831 843 832 844 WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); 833 845 WebKitWebViewPrivate* priv = webView->priv; 834 gtk_im_context_set_client_window(priv->imContext, wi dget->window);846 gtk_im_context_set_client_window(priv->imContext, window); 835 847 } 836 848 … … 971 983 entry = gtk_entry_new(); 972 984 gtk_entry_set_text(GTK_ENTRY(entry), defaultValue); 973 gtk_container_add(GTK_CONTAINER( GTK_DIALOG(dialog)->vbox), entry);985 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), entry); 974 986 gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); 975 987 gtk_widget_show(entry); … … 1313 1325 1314 1326 PlatformMouseEvent platformEvent(&event->button); 1315 frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation( context->action));1327 frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation(gdk_drag_context_get_selected_action(context))); 1316 1328 1317 1329 gdk_event_free(event); … … 2883 2895 g_object_ref_sink(priv->verticalAdjustment); 2884 2896 2885 GTK_WIDGET_SET_FLAGS(webView, GTK_CAN_FOCUS);2897 gtk_widget_set_can_focus(GTK_WIDGET(webView), TRUE); 2886 2898 priv->mainFrame = WEBKIT_WEB_FRAME(webkit_web_frame_new(webView)); 2887 2899 priv->lastPopupXPosition = priv->lastPopupYPosition = -1;
Note: See TracChangeset
for help on using the changeset viewer.