Changeset 85874 in webkit


Ignore:
Timestamp:
May 5, 2011 1:31:10 PM (13 years ago)
Author:
bweinstein@apple.com
Message:

Source/WebCore: WebKit2: Docking Web Inspector doesn't respect maximum inspector size
https://bugs.webkit.org/show_bug.cgi?id=60294
<rdar://problem/9388518>

Reviewed by Timothy Hatcher.

Make a needed function public and export it.

  • WebCore.exp.in: Export constrainedAttaechedWindowHeight.
  • inspector/InspectorFrontendClientLocal.h: Make constrainedAttaechedWindowHeight public.

Source/WebKit2: WebKit2: Docking Web Inspector doesn't respect maximum inspector size
https://bugs.webkit.org/show_bug.cgi?id=60294
<rdar://problem/9388518>

Reviewed by Timothy Hatcher.

Before we place the inspector and the inspected views, make sure that we have constrained the height
of the docked inspector. Putting the code here covers both when the inspector is initially attached
and when a window with the docked inspector is resized.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.

  • UIProcess/win/WebInspectorProxyWin.cpp:

(WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85873 r85874  
     12011-05-05  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        WebKit2: Docking Web Inspector doesn't respect maximum inspector size
     6        https://bugs.webkit.org/show_bug.cgi?id=60294
     7        <rdar://problem/9388518>
     8
     9        Make a needed function public and export it.
     10
     11        * WebCore.exp.in: Export constrainedAttaechedWindowHeight.
     12        * inspector/InspectorFrontendClientLocal.h: Make constrainedAttaechedWindowHeight public.
     13
    1142011-05-05  Tony Gentilcore  <tonyg@chromium.org>
    215
  • trunk/Source/WebCore/WebCore.exp.in

    r85864 r85874  
    15541554__ZN7WebCore28InspectorFrontendClientLocal26changeAttachedWindowHeightEj
    15551555__ZN7WebCore28InspectorFrontendClientLocal27restoreAttachedWindowHeightEv
     1556__ZN7WebCore28InspectorFrontendClientLocal31constrainedAttachedWindowHeightEjj
    15561557__ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN3WTF10PassOwnPtrINS0_8SettingsEEE
    15571558__ZN7WebCore28InspectorFrontendClientLocalD2Ev
  • trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h

    r84359 r85874  
    7373    virtual void sendMessageToBackend(const String& message);
    7474
     75    static unsigned constrainedAttachedWindowHeight(unsigned preferredHeight, unsigned totalWindowHeight);
     76
    7577protected:
    7678    virtual void setAttachedWindowHeight(unsigned) = 0;
     
    7981
    8082private:
    81     static unsigned constrainedAttachedWindowHeight(unsigned preferredHeight, unsigned totalWindowHeight);
    82 
    8383    friend class FrontendMenuProvider;
    8484    InspectorController* m_inspectorController;
  • trunk/Source/WebKit2/ChangeLog

    r85867 r85874  
     12011-05-05  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        WebKit2: Docking Web Inspector doesn't respect maximum inspector size
     6        https://bugs.webkit.org/show_bug.cgi?id=60294
     7        <rdar://problem/9388518>
     8       
     9        Before we place the inspector and the inspected views, make sure that we have constrained the height
     10        of the docked inspector. Putting the code here covers both when the inspector is initially attached
     11        and when a window with the docked inspector is resized.
     12
     13        * UIProcess/mac/WebInspectorProxyMac.mm:
     14        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.
     15        * UIProcess/win/WebInspectorProxyWin.cpp:
     16        (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.
     17
    1182011-05-05  Chang Shu  <cshu@webkit.org>
    219
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r85457 r85874  
    3535#import "WebProcessProxy.h"
    3636#import <WebKitSystemInterface.h>
     37#import <WebCore/InspectorFrontendClientLocal.h>
    3738#import <WebCore/LocalizedStrings.h>
    3839#import <WebCore/NotImplemented.h>
     
    177178    CGFloat inspectedWidth = NSWidth(inspectedViewFrame);
    178179    CGFloat inspectorHeight = NSHeight([m_inspectorView.get() frame]);
     180   
     181    CGFloat parentHeight = NSHeight([[inspectedView superview] frame]);
     182    inspectorHeight = InspectorFrontendClientLocal::constrainedAttachedWindowHeight(inspectorHeight, parentHeight);
    179183
    180184    [m_inspectorView.get() setFrame:NSMakeRect(inspectedLeft, 0.0, inspectedWidth, inspectorHeight)];
  • trunk/Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp

    r85457 r85874  
    3333#include "WebProcessProxy.h"
    3434#include "WebView.h"
     35#include <WebCore/InspectorFrontendClientLocal.h>
    3536#include <WebCore/WebCoreInstanceHandle.h>
    3637#include <WebCore/WindowMessageBroadcaster.h>
     
    178179    unsigned inspectorHeight = inspectorRect.bottom - inspectorRect.top;
    179180
     181    RECT parentRect;
     182    ::GetClientRect(::GetParent(inspectorWindow), &parentRect);
     183    inspectorHeight = InspectorFrontendClientLocal::constrainedAttachedWindowHeight(inspectorHeight, parentRect.bottom - parentRect.top);
     184
    180185    windowPos->cy -= inspectorHeight;
    181186
Note: See TracChangeset for help on using the changeset viewer.