diff options
Diffstat (limited to 'WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp')
-rw-r--r-- | WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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); |