Changeset 247855 in webkit


Ignore:
Timestamp:
Jul 25, 2019 11:15:38 PM (5 years ago)
Author:
Fujii Hironori
Message:

[Win][WK1] The inspected webview window is misplaced after changing Web Inspector frontend window height
https://bugs.webkit.org/show_bug.cgi?id=200152

Reviewed by Brent Fulgham.

In WebInspectorFrontendClient::setAttachedWindowHeight, the size
of m_inspectedWebViewHwnd was changed to the whole host window
size. But, it's too tall because MiniBrowser's host window has a
toolbar. The toolbar height should be taken into account.

Change to the height of m_inspectedWebViewHwnd to the sum of
inspected WebView and inspector frontend WebView heights.

  • WebCoreSupport/WebInspectorClient.cpp:

(WebInspectorFrontendClient::setAttachedWindowHeight):

Location:
trunk/Source/WebKitLegacy/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r247722 r247855  
     12019-07-25  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][WK1] The inspected webview window is misplaced after changing Web Inspector frontend window height
     4        https://bugs.webkit.org/show_bug.cgi?id=200152
     5
     6        Reviewed by Brent Fulgham.
     7
     8        In WebInspectorFrontendClient::setAttachedWindowHeight, the size
     9        of m_inspectedWebViewHwnd was changed to the whole host window
     10        size. But, it's too tall because MiniBrowser's host window has a
     11        toolbar. The toolbar height should be taken into account.
     12
     13        Change to the height of m_inspectedWebViewHwnd to the sum of
     14        inspected WebView and inspector frontend WebView heights.
     15
     16        * WebCoreSupport/WebInspectorClient.cpp:
     17        (WebInspectorFrontendClient::setAttachedWindowHeight):
     18
    1192019-07-23  Wenson Hsieh  <wenson_hsieh@apple.com>
    220
  • trunk/Source/WebKitLegacy/win/WebCoreSupport/WebInspectorClient.cpp

    r247043 r247855  
    328328    GetClientRect(hostWindow, &hostWindowRect);
    329329
     330    RECT frontendRect;
     331    GetClientRect(m_frontendWebViewHwnd, &frontendRect);
     332
    330333    RECT inspectedRect;
    331334    GetClientRect(m_inspectedWebViewHwnd, &inspectedRect);
    332335
    333     int totalHeight = hostWindowRect.bottom - hostWindowRect.top;
     336    int hostWindowHeight = hostWindowRect.bottom;
    334337    int webViewWidth = inspectedRect.right - inspectedRect.left;
    335 
    336     SetWindowPos(m_frontendWebViewHwnd, 0, 0, totalHeight - height, webViewWidth, height, SWP_NOZORDER);
     338    int webViewHeight = frontendRect.bottom + inspectedRect.bottom;
     339
     340    SetWindowPos(m_frontendWebViewHwnd, 0, 0, hostWindowHeight - height, webViewWidth, height, SWP_NOZORDER);
    337341
    338342    // We want to set the inspected web view height to the totalHeight, because the height adjustment
    339343    // of the inspected web view happens in onWebViewWindowPosChanging, not here.
    340     SetWindowPos(m_inspectedWebViewHwnd, 0, 0, 0, webViewWidth, totalHeight, SWP_NOZORDER);
     344    SetWindowPos(m_inspectedWebViewHwnd, 0, 0, hostWindowHeight - webViewHeight, webViewWidth, webViewHeight, SWP_NOZORDER);
    341345
    342346    RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
Note: See TracChangeset for help on using the changeset viewer.