Diff
Modified: trunk/Source/WebCore/ChangeLog (93337 => 93338)
--- trunk/Source/WebCore/ChangeLog 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Source/WebCore/ChangeLog 2011-08-18 20:08:04 UTC (rev 93338)
@@ -1,3 +1,20 @@
+2011-08-17 Alejandro G. Castro <[email protected]>
+
+ [GTK] Fix compilation problems with deprecations in gtk+
+ https://bugs.webkit.org/show_bug.cgi?id=66073
+
+ Reviewed by Martin Robinson.
+
+ * platform/gtk/GtkAuthenticationDialog.cpp:
+ (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added
+ gtk_box_new conditional compilation for gtk+-3.
+ * platform/gtk/RenderThemeGtk3.cpp:
+ (WebCore::RenderThemeGtk::adjustRepaintRect):
+ (WebCore::RenderThemeGtk::paintSliderTrack):
+ (WebCore::RenderThemeGtk::paintSliderThumb):
+ (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have
+ GTK_TYPE_SCALE in gtk+3.
+
2011-08-18 Kentaro Hara <[email protected]>
A Worker constructor should throw TypeError, when the number of arguments is not enough
Modified: trunk/Source/WebCore/platform/gtk/GtkAuthenticationDialog.cpp (93337 => 93338)
--- trunk/Source/WebCore/platform/gtk/GtkAuthenticationDialog.cpp 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Source/WebCore/platform/gtk/GtkAuthenticationDialog.cpp 2011-08-18 20:08:04 UTC (rev 93338)
@@ -87,7 +87,11 @@
gtk_window_set_transient_for(window, parentWindow);
// Build contents.
+#ifdef GTK_API_VERSION_2
GtkWidget* hBox = gtk_hbox_new(FALSE, 12);
+#else
+ GtkWidget* hBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
+#endif
gtk_container_set_border_width(GTK_CONTAINER(hBox), 5);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(dialog)), hBox, TRUE, TRUE, 0);
@@ -95,7 +99,11 @@
gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0.0);
gtk_box_pack_start(GTK_BOX(hBox), icon, FALSE, FALSE, 0);
+#ifdef GTK_API_VERSION_2
GtkWidget* mainVBox = gtk_vbox_new(FALSE, 18);
+#else
+ GtkWidget* mainVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 18);
+#endif
gtk_box_pack_start(GTK_BOX(hBox), mainVBox, TRUE, TRUE, 0);
SoupURI* uri = soup_message_get_uri(m_message.get());
@@ -105,7 +113,11 @@
gtk_label_set_line_wrap(GTK_LABEL(descriptionLabel), TRUE);
gtk_box_pack_start(GTK_BOX(mainVBox), GTK_WIDGET(descriptionLabel), FALSE, FALSE, 0);
+#ifdef GTK_API_VERSION_2
GtkWidget* vBox = gtk_vbox_new(FALSE, 6);
+#else
+ GtkWidget* vBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
+#endif
gtk_box_pack_start(GTK_BOX(mainVBox), vBox, FALSE, FALSE, 0);
// The table that holds the entries.
@@ -139,7 +151,11 @@
gtk_entry_set_visibility(GTK_ENTRY(m_passwordEntry), FALSE);
if (sessionCanSavePasswords(m_session)) {
+#ifdef GTK_API_VERSION_2
GtkWidget* rememberBox = gtk_vbox_new(FALSE, 6);
+#else
+ GtkWidget* rememberBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
+#endif
gtk_box_pack_start(GTK_BOX(vBox), rememberBox, FALSE, FALSE, 0);
m_rememberCheckButton = gtk_check_button_new_with_mnemonic(_("_Remember password"));
Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp (93337 => 93338)
--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp 2011-08-18 20:08:04 UTC (rev 93338)
@@ -149,7 +149,7 @@
return;
case SliderVerticalPart:
case SliderHorizontalPart:
- context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
+ context = getStyleContext(GTK_TYPE_SCALE);
break;
case ButtonPart:
case MenulistButtonPart:
@@ -598,7 +598,7 @@
ControlPart part = renderObject->style()->appearance();
ASSERT(part == SliderHorizontalPart || part == SliderVerticalPart || part == MediaVolumeSliderPart);
- GtkStyleContext* context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
+ GtkStyleContext* context = getStyleContext(GTK_TYPE_SCALE);
gtk_style_context_save(context);
gtk_style_context_set_direction(context, gtkTextDirection(renderObject->style()->direction()));
@@ -633,7 +633,7 @@
ControlPart part = renderObject->style()->appearance();
ASSERT(part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart || part == MediaVolumeSliderThumbPart);
- GtkStyleContext* context = getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE);
+ GtkStyleContext* context = getStyleContext(GTK_TYPE_SCALE);
gtk_style_context_save(context);
gtk_style_context_set_direction(context, gtkTextDirection(renderObject->style()->direction()));
@@ -674,7 +674,7 @@
#endif
gint sliderWidth, sliderLength;
- gtk_style_context_get_style(getStyleContext(part == SliderThumbHorizontalPart ? GTK_TYPE_HSCALE : GTK_TYPE_VSCALE),
+ gtk_style_context_get_style(getStyleContext(GTK_TYPE_SCALE),
"slider-width", &sliderWidth,
"slider-length", &sliderLength,
NULL);
Modified: trunk/Source/WebKit/gtk/ChangeLog (93337 => 93338)
--- trunk/Source/WebKit/gtk/ChangeLog 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Source/WebKit/gtk/ChangeLog 2011-08-18 20:08:04 UTC (rev 93338)
@@ -1,3 +1,14 @@
+2011-08-17 Alejandro G. Castro <[email protected]>
+
+ [GTK] Fix compilation problems with deprecations in gtk+
+ https://bugs.webkit.org/show_bug.cgi?id=66073
+
+ Reviewed by Martin Robinson.
+
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ (FullscreenVideoController::createHud): Added gtk_box_new
+ conditional compilation for gtk+-3.
+
2011-08-18 Caio Marcelo de Oliveira Filho <[email protected]>
[GTK] Change webview API tests to use "load-status" signal instead of "load-progress"
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp (93337 => 93338)
--- trunk/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp 2011-08-18 20:08:04 UTC (rev 93338)
@@ -531,7 +531,11 @@
g_signal_connect(m_hudWindow, "motion-notify-event", G_CALLBACK(onFullscreenGtkMotionNotifyEvent), this);
+#ifdef GTK_API_VERSION_2
GtkWidget* hbox = gtk_hbox_new(FALSE, 4);
+#else
+ GtkWidget* hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
+#endif
gtk_container_add(GTK_CONTAINER(m_hudWindow), hbox);
m_playPauseAction = gtk_action_new("play", _("Play / Pause"), _("Play or pause the media"), PAUSE_ICON_NAME);
@@ -546,7 +550,11 @@
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
GtkAdjustment* adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0));
+#ifdef GTK_API_VERSION_2
m_timeHScale = gtk_hscale_new(adjustment);
+#else
+ m_timeHScale = gtk_scale_new(GTK_ORIENTATION_HORIZONTAL, adjustment);
+#endif
gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);
gtk_range_set_show_fill_level(GTK_RANGE(m_timeHScale), TRUE);
g_signal_connect(m_timeHScale, "button-press-event", G_CALLBACK(timeScaleButtonPressed), this);
Modified: trunk/Tools/ChangeLog (93337 => 93338)
--- trunk/Tools/ChangeLog 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Tools/ChangeLog 2011-08-18 20:08:04 UTC (rev 93338)
@@ -1,3 +1,19 @@
+2011-08-17 Alejandro G. Castro <[email protected]>
+
+ [GTK] Fix compilation problems with deprecations in gtk+
+ https://bugs.webkit.org/show_bug.cgi?id=66073
+
+ Reviewed by Martin Robinson.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (main): G_CONST_RETURN was deprecated
+ * GtkLauncher/main.c:
+ (createWindow): Added gtk_box_new conditional compilation for
+ gtk+-3.
+ * MiniBrowser/gtk/BrowserWindow.c:
+ (browser_window_init): Replaced gtk_vbox_new with gtk_box_new, we
+ are just supporting gtk+-3 for WebKit2.
+
2011-08-18 Anders Carlsson <[email protected]>
Fix libc++ C++0x build
Modified: trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp (93337 => 93338)
--- trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2011-08-18 20:08:04 UTC (rev 93338)
@@ -64,7 +64,7 @@
extern "C" {
// This API is not yet public.
-extern G_CONST_RETURN gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
+extern const gchar* webkit_web_history_item_get_target(WebKitWebHistoryItem*);
extern gboolean webkit_web_history_item_is_target_item(WebKitWebHistoryItem*);
extern GList* webkit_web_history_item_get_children(WebKitWebHistoryItem*);
extern void webkit_web_settings_add_extra_plugin_directory(WebKitWebView* view, const gchar* directory);
@@ -1167,7 +1167,12 @@
initializeFonts();
window = gtk_window_new(GTK_WINDOW_POPUP);
+#ifdef GTK_API_VERSION_2
container = gtk_hbox_new(TRUE, 0);
+#else
+ container = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_set_homogeneous(GTK_BOX(container), TRUE);
+#endif
gtk_container_add(GTK_CONTAINER(window), container);
gtk_widget_show_all(window);
Modified: trunk/Tools/GtkLauncher/main.c (93337 => 93338)
--- trunk/Tools/GtkLauncher/main.c 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Tools/GtkLauncher/main.c 2011-08-18 20:08:04 UTC (rev 93338)
@@ -213,7 +213,11 @@
webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
uriEntry = gtk_entry_new();
+#ifdef GTK_API_VERSION_2
vbox = gtk_vbox_new(FALSE, 0);
+#else
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+#endif
statusbar = createStatusbar(webView);
gtk_box_pack_start(GTK_BOX(vbox), createToolbar(uriEntry, webView), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), createBrowser(window, uriEntry, statusbar, webView), TRUE, TRUE, 0);
Modified: trunk/Tools/MiniBrowser/gtk/BrowserWindow.c (93337 => 93338)
--- trunk/Tools/MiniBrowser/gtk/BrowserWindow.c 2011-08-18 20:01:08 UTC (rev 93337)
+++ trunk/Tools/MiniBrowser/gtk/BrowserWindow.c 2011-08-18 20:08:04 UTC (rev 93338)
@@ -159,7 +159,7 @@
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
gtk_widget_show(GTK_WIDGET(item));
- GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
+ GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
window->mainBox = vbox;
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
gtk_widget_show(toolbar);