Title: [148082] trunk/Source/WebKit2
Revision
148082
Author
zandober...@gmail.com
Date
2013-04-10 00:38:02 -0700 (Wed, 10 Apr 2013)

Log Message

[GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
https://bugs.webkit.org/show_bug.cgi?id=113498

Patch by Zan Dobersek <zandober...@gmail.com> on 2013-04-10
Reviewed by Martin Robinson.

The method was introduced in r147004.

* UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
InspectorTest::resizeViewAndAttach.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
widget height.
(WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
gtk_widget_get_allocated_width method to return the widget width.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (148081 => 148082)


--- trunk/Source/WebKit2/ChangeLog	2013-04-10 07:36:42 UTC (rev 148081)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-10 07:38:02 UTC (rev 148082)
@@ -1,3 +1,21 @@
+2013-04-10  Zan Dobersek  <zandober...@gmail.com>
+
+        [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
+        https://bugs.webkit.org/show_bug.cgi?id=113498
+
+        Reviewed by Martin Robinson.
+
+        The method was introduced in r147004.
+
+        * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
+        of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
+        InspectorTest::resizeViewAndAttach.
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
+        widget height.
+        (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
+        gtk_widget_get_allocated_width method to return the widget width.
+
 2013-04-09  Antoine Quint  <grao...@apple.com>
 
         WKFrameIsDisplayingMarkupDocument should return true for Web Archives

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp (148081 => 148082)


--- trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp	2013-04-10 07:36:42 UTC (rev 148081)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp	2013-04-10 07:38:02 UTC (rev 148082)
@@ -59,6 +59,7 @@
         return test->detach();
     }
 
+    static const unsigned gMinimumAttachedInspectorWidth = 750;
     static const unsigned gMinimumAttachedInspectorHeight = 250;
 
     InspectorTest()
@@ -124,7 +125,7 @@
     void resizeViewAndAttach()
     {
         // Resize the view to make room for the inspector.
-        resizeView(300, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
+        resizeView(gMinimumAttachedInspectorWidth, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
         webkit_web_inspector_attach(m_inspector);
     }
 

Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (148081 => 148082)


--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2013-04-10 07:36:42 UTC (rev 148081)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp	2013-04-10 07:38:02 UTC (rev 148082)
@@ -173,15 +173,12 @@
 
 unsigned WebInspectorProxy::platformInspectedWindowHeight()
 {
-    GtkAllocation allocation;
-    gtk_widget_get_allocation(m_page->viewWidget(), &allocation);
-    return allocation.height;
+    return gtk_widget_get_allocated_height(m_page->viewWidget());
 }
 
 unsigned WebInspectorProxy::platformInspectedWindowWidth()
 {
-    notImplemented();
-    return 0;
+    return gtk_widget_get_allocated_width(m_page->viewWidget());
 }
 
 void WebInspectorProxy::platformAttach()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to