summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/gtk/webkit')
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h2
-rw-r--r--WebKit/gtk/webkit/webkitsoupauthdialog.c9
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp23
3 files changed, 22 insertions, 12 deletions
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 556648d..fa74abc 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -158,7 +158,7 @@ extern "C" {
guint previousClickButton;
guint32 previousClickTime;
- HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> > draggingDataObjects;
+ HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >* draggingDataObjects;
};
#define WEBKIT_WEB_FRAME_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_FRAME, WebKitWebFramePrivate))
diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.c b/WebKit/gtk/webkit/webkitsoupauthdialog.c
index 15863b3..daecc73 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.c
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.c
@@ -25,6 +25,7 @@
#include <gtk/gtk.h>
#include <libsoup/soup.h>
+#include "GtkVersioning.h"
#include "webkitmarshal.h"
#include "webkitsoupauthdialog.h"
@@ -214,9 +215,9 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const
/* Set the dialog up with HIG properties */
gtk_dialog_set_has_separator(dialog, FALSE);
gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
- gtk_box_set_spacing(GTK_BOX(dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
- gtk_container_set_border_width(GTK_CONTAINER(dialog->action_area), 5);
- gtk_box_set_spacing(GTK_BOX(dialog->action_area), 6);
+ gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(dialog)), 2); /* 2 * 5 + 2 = 12 */
+ gtk_container_set_border_width(GTK_CONTAINER(gtk_dialog_get_action_area(dialog)), 5);
+ gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_action_area(dialog)), 6);
gtk_window_set_resizable(window, FALSE);
gtk_window_set_title(window, "");
@@ -233,7 +234,7 @@ static void show_auth_dialog(WebKitAuthData* authData, const char* login, const
/* Build contents */
hbox = gtk_hbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
- gtk_box_pack_start(GTK_BOX(dialog->vbox), hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(dialog)), hbox, TRUE, TRUE, 0);
icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION,
GTK_ICON_SIZE_DIALOG);
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index ce2bbc6..62997c5 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -517,10 +517,16 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
cairo_destroy(cr);
ctx.setGdkExposeEvent(event);
- GOwnPtr<GdkRectangle> rects;
int rectCount;
+#ifdef GTK_API_VERSION_2
+ GOwnPtr<GdkRectangle> rects;
gdk_region_get_rectangles(event->region, &rects.outPtr(), &rectCount);
-
+#else
+ rectCount = cairo_region_num_rectangles(event->region);
+ GOwnPtr<GdkRectangle> rects(g_new(GdkRectangle, rectCount));
+ for (int i = 0; i < rectCount; i++)
+ cairo_region_get_rectangle(event->region, i, rects.get()+i);
+#endif
// Avoid recursing into the render tree excessively
bool coalesce = shouldCoalesce(event->area, rects.get(), rectCount);
@@ -1190,7 +1196,7 @@ static void webkit_web_view_dispose(GObject* object)
priv->subResources = NULL;
}
- priv->draggingDataObjects.clear();
+ priv->draggingDataObjects->clear();
G_OBJECT_CLASS(webkit_web_view_parent_class)->dispose(object);
}
@@ -1207,6 +1213,7 @@ static void webkit_web_view_finalize(GObject* object)
g_free(priv->iconURI);
delete priv->previousClickPoint;
+ delete priv->draggingDataObjects;
G_OBJECT_CLASS(webkit_web_view_parent_class)->finalize(object);
}
@@ -1309,10 +1316,10 @@ static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context)
// This might happen if a drag is still in progress after a WebKitWebView
// is disposed and before it is finalized.
- if (!priv->draggingDataObjects.contains(context))
+ if (!priv->draggingDataObjects->contains(context))
return;
- priv->draggingDataObjects.remove(context);
+ priv->draggingDataObjects->remove(context);
Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
if (!frame)
@@ -1347,10 +1354,10 @@ static void webkit_web_view_drag_data_get(GtkWidget* widget, GdkDragContext* con
// This might happen if a drag is still in progress after a WebKitWebView
// is diposed and before it is finalized.
- if (!priv->draggingDataObjects.contains(context))
+ if (!priv->draggingDataObjects->contains(context))
return;
- pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects.get(context).get());
+ pasteboardHelperInstance()->fillSelectionData(selectionData, info, priv->draggingDataObjects->get(context).get());
}
#if GTK_CHECK_VERSION(2, 12, 0)
@@ -2928,6 +2935,8 @@ static void webkit_web_view_init(WebKitWebView* webView)
priv->previousClickPoint = new IntPoint(0, 0);
priv->previousClickButton = 0;
priv->previousClickTime = 0;
+
+ priv->draggingDataObjects = new HashMap<GdkDragContext*, RefPtr<WebCore::DataObjectGtk> >();
}
GtkWidget* webkit_web_view_new(void)