| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Holger Hans Peter Freyther | 2 * Copyright (C) 2007, 2008 Holger Hans Peter Freyther |
| 3 * Copyright (C) 2007, 2008 Christian Dywan <christian@imendio.com> | 3 * Copyright (C) 2007, 2008 Christian Dywan <christian@imendio.com> |
| 4 * Copyright (C) 2008 Nuanti Ltd. | 4 * Copyright (C) 2008 Nuanti Ltd. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> | 6 * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org> |
| 7 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 7 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 8 * Copyright (C) 2012 Igalia S. L. | 8 * Copyright (C) 2012 Igalia S. L. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 gboolean autoResizeWindow; | 135 gboolean autoResizeWindow; |
| 136 WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView); | 136 WebKitWebSettings* settings = webkit_web_view_get_settings(m_webView); |
| 137 g_object_get(settings, "auto-resize-window", &autoResizeWindow, NULL); | 137 g_object_get(settings, "auto-resize-window", &autoResizeWindow, NULL); |
| 138 | 138 |
| 139 if (!autoResizeWindow) | 139 if (!autoResizeWindow) |
| 140 return; | 140 return; |
| 141 | 141 |
| 142 GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); | 142 GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView)); |
| 143 if (widgetIsOnscreenToplevelWindow(window)) { | 143 if (widgetIsOnscreenToplevelWindow(window)) { |
| 144 gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y()); | 144 gtk_window_move(GTK_WINDOW(window), intrect.x(), intrect.y()); |
| 145 gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.height())
; | 145 if (!intrect.isEmpty()) |
| 146 gtk_window_resize(GTK_WINDOW(window), intrect.width(), intrect.heigh
t()); |
| 146 } | 147 } |
| 147 } | 148 } |
| 148 | 149 |
| 149 static IntRect getWebViewRect(WebKitWebView* webView) | 150 static IntRect getWebViewRect(WebKitWebView* webView) |
| 150 { | 151 { |
| 151 GtkAllocation allocation; | 152 GtkAllocation allocation; |
| 152 gtk_widget_get_allocation(GTK_WIDGET(webView), &allocation); | 153 gtk_widget_get_allocation(GTK_WIDGET(webView), &allocation); |
| 153 return IntRect(allocation.x, allocation.y, allocation.width, allocation.heig
ht); | 154 return IntRect(allocation.x, allocation.y, allocation.width, allocation.heig
ht); |
| 154 } | 155 } |
| 155 | 156 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 #if USE(CLUTTER) | 1072 #if USE(CLUTTER) |
| 1072 // Currently, we only support CSS 3D Transforms. | 1073 // Currently, we only support CSS 3D Transforms. |
| 1073 return ThreeDTransformTrigger | AnimationTrigger; | 1074 return ThreeDTransformTrigger | AnimationTrigger; |
| 1074 #else | 1075 #else |
| 1075 return AllTriggers; | 1076 return AllTriggers; |
| 1076 #endif | 1077 #endif |
| 1077 } | 1078 } |
| 1078 #endif | 1079 #endif |
| 1079 | 1080 |
| 1080 } | 1081 } |
| OLD | NEW |