diff options
author | Kristian Monsen <kristianm@google.com> | 2010-06-28 16:42:48 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-07-02 10:29:56 +0100 |
commit | 06ea8e899e48f1f2f396b70e63fae369f2f23232 (patch) | |
tree | 20c1428cd05c76f32394ab354ea35ed99acd86d8 /WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp | |
parent | 72aad67af14193199e29cdd5c4ddc095a8b9a8a8 (diff) | |
download | external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.zip external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.gz external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.bz2 |
Merge WebKit at r61871: Initial merge by git.
Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
Diffstat (limited to 'WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp')
-rw-r--r-- | WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index 5759601..fe5d9eb 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -104,7 +104,12 @@ void ChromeClient::setWindowRect(const FloatRect& rect) FloatRect ChromeClient::pageRect() { - GtkAllocation allocation = GTK_WIDGET(m_webView)->allocation; + GtkAllocation allocation; +#if GTK_CHECK_VERSION(2, 18, 0) + gtk_widget_get_allocation(GTK_WIDGET(m_webView), &allocation); +#else + allocation = GTK_WIDGET(m_webView)->allocation; +#endif return IntRect(allocation.x, allocation.y, allocation.width, allocation.height); } @@ -425,9 +430,15 @@ void ChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const // We need to queue a resize request only if the size changed, // otherwise we get into an infinite loop! GtkWidget* widget = GTK_WIDGET(m_webView); + GtkRequisition requisition; +#if GTK_CHECK_VERSION(2, 20, 0) + gtk_widget_get_requisition(widget, &requisition); +#else + requisition = widget->requisition; +#endif if (gtk_widget_get_realized(widget) - && (widget->requisition.height != size.height()) - || (widget->requisition.width != size.width())) + && (requisition.height != size.height()) + || (requisition.width != size.width())) gtk_widget_queue_resize_no_redraw(widget); } |