[GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
Created attachment 195523 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment on attachment 195523 [details] Patch Attachment 195523 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17330290
Comment on attachment 195523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195523&action=review > Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp:128 > - resizeView(300, (gMinimumAttachedInspectorHeight + 1) * 4 / 3); > + resizeView((gMinimumAttachedInspectorWidth + 1) * 4 / 3, (gMinimumAttachedInspectorHeight + 1) * 4 / 3); Why 4/3 for width too? the inspector always uses the view width, we just want to make sure there's a minimum width, no? > Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp:185 > - notImplemented(); > - return 0; > + GtkAllocation allocation; > + gtk_widget_get_allocation(m_page->viewWidget(), &allocation); > + return allocation.width; This can be just gtk_widget_get_allocated_width(m_page->viewWidget());
Comment on attachment 195523 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195523&action=review >> Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp:128 >> + resizeView((gMinimumAttachedInspectorWidth + 1) * 4 / 3, (gMinimumAttachedInspectorHeight + 1) * 4 / 3); > > Why 4/3 for width too? the inspector always uses the view width, we just want to make sure there's a minimum width, no? Right, makes sense. >> Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp:185 >> + return allocation.width; > > This can be just gtk_widget_get_allocated_width(m_page->viewWidget()); Will reimplement WebInspectorProxy::platformInspectedWindowHeight in a similar fashion.
Created attachment 195569 [details] Patch
Comment on attachment 195569 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195569&action=review This looks good to me, thanks! > Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp:176 > - GtkAllocation allocation; > - gtk_widget_get_allocation(m_page->viewWidget(), &allocation); > - return allocation.height; > + return gtk_widget_get_allocated_height(m_page->viewWidget()); Thanks for the cleanup here.
CC-ing a couple of WK2 owners to possibly give a go-ahead for the patch.
Comment on attachment 195569 [details] Patch Signed off by me.
Comment on attachment 195569 [details] Patch Clearing flags on attachment: 195569 Committed r148082: <http://trac.webkit.org/changeset/148082>
All reviewed patches have been landed. Closing bug.