Bug 107648

Summary: Web Inspector: allow user to resize inspector window by dragging the toolbar
Product: WebKit Reporter: Dmitry Gozman <dgozman>
Component: Web Inspector (Deprecated)Assignee: Dmitry Gozman <dgozman>
Status: RESOLVED FIXED    
Severity: Normal CC: aandrey, abarth, apavlov, dglazkov, fishd, jamesr, keishi, loislo, pfeldman, pmuellr, tkent+wkapi, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Dmitry Gozman 2013-01-23 01:46:42 PST
When user drags toolbar in docked to bottom mode, we should change the height of the inspector window.
Comment 1 Dmitry Gozman 2013-01-23 03:08:40 PST
Created attachment 184189 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-23 03:10:42 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Pavel Feldman 2013-01-23 04:15:57 PST
Comment on attachment 184189 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=184189&action=review

A couple of nits and it is good to land.

> Source/WebCore/inspector/front-end/DockController.js:97
> +    isDockedToBottom: function() {

{ should be on the next line

> Source/WebCore/inspector/front-end/DockController.js:-125
> -            WebInspector.toolbar.setDockedToBottom(this._dockSide === WebInspector.DockController.State.DockedToBottom);

I like reversing this dependency.

> Source/WebCore/inspector/front-end/Toolbar.js:124
> +        this.element.lastHeight = window.innerHeight;

Why storing this property on element? Store it on this with private field.
Comment 4 Dmitry Gozman 2013-01-23 04:45:45 PST
Created attachment 184202 [details]
Patch
Comment 5 WebKit Review Bot 2013-01-23 10:24:07 PST
Comment on attachment 184202 [details]
Patch

Clearing flags on attachment: 184202

Committed r140543: <http://trac.webkit.org/changeset/140543>
Comment 6 WebKit Review Bot 2013-01-23 10:24:11 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Andrey Adaikin 2013-01-24 05:41:14 PST
FYI.
plz get used to run JSCompiler WebCore/inspector/compile-front-end.py from time to time:

Source/WebCore/inspector/front-end/Toolbar.js:104: WARNING - inconsistent return type
found   : (boolean|null)
required: boolean
        return WebInspector.dockController && WebInspector.dockController.isDockedToBottom();