Changeset 84824 in webkit


Ignore:
Timestamp:
Apr 25, 2011 4:09:56 PM (13 years ago)
Author:
bweinstein@apple.com
Message:

WebKit2: Web Inspector's style sidebar fails to display when inspecting element
https://bugs.webkit.org/show_bug.cgi?id=58071
<rdar://problem/9243093>

Reviewed by Timothy Hatcher.

When creating our WebKit2 inspector views, we were creating them on both Mac and Windows
with the empty rect for their initial size. Before we sized them correctly, the inspector
was calling window.innerWidth on them, which returned 0, making the sidebar take up 0 pixels.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the window with the initial window width

and height.

  • UIProcess/win/WebInspectorProxyWin.cpp:

(WebKit::WebInspectorProxy::platformCreateInspectorPage): Ditto.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r84785 r84824  
     12011-04-25  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        WebKit2: Web Inspector's style sidebar fails to display when inspecting element
     6        https://bugs.webkit.org/show_bug.cgi?id=58071
     7        <rdar://problem/9243093>
     8       
     9        When creating our WebKit2 inspector views, we were creating them on both Mac and Windows
     10        with the empty rect for their initial size. Before we sized them correctly, the inspector
     11        was calling window.innerWidth on them, which returned 0, making the sidebar take up 0 pixels.
     12
     13        * UIProcess/mac/WebInspectorProxyMac.mm:
     14        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the window with the initial window width
     15            and height.
     16        * UIProcess/win/WebInspectorProxyWin.cpp:
     17        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Ditto.
     18
    1192011-04-25  Brian Weinstein  <bweinstein@apple.com>
    220
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r84785 r84824  
    8383    ASSERT(!m_inspectorView);
    8484
    85     m_inspectorView.adoptNS([[WKView alloc] initWithFrame:NSZeroRect contextRef:toAPI(page()->process()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
     85    m_inspectorView.adoptNS([[WKView alloc] initWithFrame:NSMakeRect(0, 0, initialWindowWidth, initialWindowHeight) contextRef:toAPI(page()->process()->context()) pageGroupRef:toAPI(inspectorPageGroup())]);
    8686    ASSERT(m_inspectorView);
    8787
  • trunk/Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp

    r84785 r84824  
    188188    ASSERT(!m_inspectorWindow);
    189189
    190     RECT emptyRect = { 0 };
    191     m_inspectorView = WebView::create(emptyRect, m_page->process()->context(), inspectorPageGroup(), 0);
     190    RECT initialRect = { 0, 0, initialWindowWidth, initialWindowHeight };
     191    m_inspectorView = WebView::create(initialRect, m_page->process()->context(), inspectorPageGroup(), 0);
    192192
    193193    return m_inspectorView->page();
Note: See TracChangeset for help on using the changeset viewer.