diff options
Diffstat (limited to 'WebKit/gtk/WebCoreSupport')
-rw-r--r-- | WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp | 16 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/DragClientGtk.cpp | 2 | ||||
-rw-r--r-- | WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp | 9 |
3 files changed, 24 insertions, 3 deletions
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index fe5d9eb..bb469c5 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -372,6 +372,7 @@ void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, con sourceRect.x -= delta.width(); sourceRect.y -= delta.height(); +#ifdef GTK_API_VERSION_2 GdkRegion* invalidRegion = gdk_region_rectangle(&area); if (gdk_rectangle_intersect(&area, &sourceRect, &moveRect)) { @@ -384,6 +385,21 @@ void ChromeClient::scroll(const IntSize& delta, const IntRect& rectToScroll, con gdk_window_invalidate_region(window, invalidRegion, FALSE); gdk_region_destroy(invalidRegion); +#else + cairo_region_t* invalidRegion = cairo_region_create_rectangle(&area); + + if (gdk_rectangle_intersect(&area, &sourceRect, &moveRect)) { + cairo_region_t* moveRegion = cairo_region_create_rectangle(&moveRect); + gdk_window_move_region(window, moveRegion, delta.width(), delta.height()); + cairo_region_translate(moveRegion, delta.width(), delta.height()); + cairo_region_subtract(invalidRegion, moveRegion); + cairo_region_destroy(moveRegion); + } + + gdk_window_invalidate_region(window, invalidRegion, FALSE); + cairo_region_destroy(invalidRegion); +#endif + } // FIXME: this does not take into account the WM decorations diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp index 4bcc4c2..efce3dc 100644 --- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp @@ -77,7 +77,7 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin, GOwnPtr<GdkEvent> currentEvent(gtk_get_current_event()); GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get()); - webView->priv->draggingDataObjects.set(context, dataObject); + webView->priv->draggingDataObjects->set(context, dataObject); // A drag starting should prevent a double-click from happening. This might // happen if a drag is followed very quickly by another click (like in the DRT). diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 17a3cd5..340b789 100644 --- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -1164,8 +1164,13 @@ void FrameLoaderClient::transitionToCommittedFromCachedFrame(CachedFrame* cached void FrameLoaderClient::transitionToCommittedForNewPage() { WebKitWebView* containingWindow = getViewFromFrame(m_frame); - IntSize size = IntSize(GTK_WIDGET(containingWindow)->allocation.width, - GTK_WIDGET(containingWindow)->allocation.height); + GtkAllocation allocation; +#if GTK_CHECK_VERSION(2, 18, 0) + gtk_widget_get_allocation(GTK_WIDGET(containingWindow), &allocation); +#else + allocation = GTK_WIDGET(containingWindow)->allocation; +#endif + IntSize size = IntSize(allocation.width, allocation.height); bool transparent = webkit_web_view_get_transparent(containingWindow); Color backgroundColor = transparent ? WebCore::Color::transparent : WebCore::Color::white; Frame* frame = core(m_frame); |