Changeset 148082 in webkit


Ignore:
Timestamp:
Apr 10, 2013 12:38:02 AM (11 years ago)
Author:
zandobersek@gmail.com
Message:

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

Patch by Zan Dobersek <zandobersek@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.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r148078 r148082  
     12013-04-10  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
     4        https://bugs.webkit.org/show_bug.cgi?id=113498
     5
     6        Reviewed by Martin Robinson.
     7
     8        The method was introduced in r147004.
     9
     10        * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
     11        of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
     12        InspectorTest::resizeViewAndAttach.
     13        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
     14        (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
     15        widget height.
     16        (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
     17        gtk_widget_get_allocated_width method to return the widget width.
     18
    1192013-04-09  Antoine Quint  <graouts@apple.com>
    220
  • trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestInspector.cpp

    r124479 r148082  
    6060    }
    6161
     62    static const unsigned gMinimumAttachedInspectorWidth = 750;
    6263    static const unsigned gMinimumAttachedInspectorHeight = 250;
    6364
     
    125126    {
    126127        // Resize the view to make room for the inspector.
    127         resizeView(300, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
     128        resizeView(gMinimumAttachedInspectorWidth, (gMinimumAttachedInspectorHeight + 1) * 4 / 3);
    128129        webkit_web_inspector_attach(m_inspector);
    129130    }
  • trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp

    r147004 r148082  
    174174unsigned WebInspectorProxy::platformInspectedWindowHeight()
    175175{
    176     GtkAllocation allocation;
    177     gtk_widget_get_allocation(m_page->viewWidget(), &allocation);
    178     return allocation.height;
     176    return gtk_widget_get_allocated_height(m_page->viewWidget());
    179177}
    180178
    181179unsigned WebInspectorProxy::platformInspectedWindowWidth()
    182180{
    183     notImplemented();
    184     return 0;
     181    return gtk_widget_get_allocated_width(m_page->viewWidget());
    185182}
    186183
Note: See TracChangeset for help on using the changeset viewer.