Bug 54671 - Web Inspector: provide a button to expand inspector toolbar when not all panel buttons fit
Summary: Web Inspector: provide a button to expand inspector toolbar when not all pane...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-17 10:08 PST by Andrey Kosyakov
Modified: 2011-02-22 05:25 PST (History)
12 users (show)

See Also:


Attachments
screenshot (56.59 KB, image/png)
2011-02-17 10:09 PST, Andrey Kosyakov
no flags Details
patch (19.68 KB, patch)
2011-02-17 10:16 PST, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (20.31 KB, patch)
2011-02-18 05:53 PST, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (73.18 KB, patch)
2011-02-21 08:54 PST, Andrey Kosyakov
pfeldman: review-
Details | Formatted Diff | Diff
patch (17.62 KB, patch)
2011-02-21 10:36 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
patch (added missing file) (25.83 KB, patch)
2011-02-21 10:38 PST, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff
patch to land (28.85 KB, patch)
2011-02-22 04:13 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-02-17 10:08:57 PST
When window is not wide enough for toolbar to accommodate everything, search control is retained, right-most icons are hidden and a button is displayed to open a drop down with the rest of the icons.
Comment 1 Andrey Kosyakov 2011-02-17 10:09:29 PST
Created attachment 82826 [details]
screenshot
Comment 2 Andrey Kosyakov 2011-02-17 10:16:00 PST
Created attachment 82829 [details]
patch
Comment 3 WebKit Review Bot 2011-02-17 10:18:40 PST
Attachment 82829 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/inspector/front-end/ToolbarDropdown.js:1:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
Total errors found: 125 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Pavel Feldman 2011-02-17 10:35:07 PST
Comment on attachment 82829 [details]
patch

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

> Source/WebCore/inspector/front-end/ToolbarDropdown.js:37
> +    var toolbarStyle = getComputedStyle(this._toolbar);

You should make original style applicable to the new elements. Also won't work for the Mac port.

> Source/WebCore/inspector/front-end/ToolbarDropdown.js:99
> +    if (!WebInspector.toolbarDropdown) {

Could you keep it as a local state?

> Source/WebCore/inspector/front-end/inspector.css:184
> +    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(251, 251, 251, 0.9)), to(rgba(231, 231, 231, 0.9)));

Should it be themed? toolbar-label ?
Comment 5 Andrey Kosyakov 2011-02-18 05:53:15 PST
Created attachment 82948 [details]
patch
Comment 6 Pavel Feldman 2011-02-18 06:29:04 PST
Comment on attachment 82948 [details]
patch

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

> Source/WebCore/inspector/front-end/ToolbarDropdown.js:31
> +WebInspector.ToolbarDropdown = function()

I think you should extract toobar component from inspector.js, not make it involved with dropdown in addition to the toolbar internals.

> Source/WebCore/inspector/front-end/ToolbarDropdown.js:77
> +                var clone = toolbarElement.cloneNode(true);

I don't think you should clone node here, it would be more intuitive to simply reuse toolbar button creation code.
Comment 7 Andrey Kosyakov 2011-02-21 08:54:57 PST
Created attachment 83170 [details]
patch
Comment 8 Pavel Feldman 2011-02-21 08:58:06 PST
Comment on attachment 83170 [details]
patch

Could you split this into a number of changes that we could review?
Comment 9 Andrey Kosyakov 2011-02-21 10:36:29 PST
Created attachment 83183 [details]
patch
Comment 10 Andrey Kosyakov 2011-02-21 10:38:59 PST
Created attachment 83184 [details]
patch (added missing file)
Comment 11 WebKit Review Bot 2011-02-21 10:39:48 PST
Attachment 83183 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/7939811
Comment 12 Pavel Feldman 2011-02-21 10:45:39 PST
Comment on attachment 83184 [details]
patch (added missing file)

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

> Source/WebCore/inspector/front-end/Toolbar.js:110
> +    {

Nuke this?
Comment 13 Andrey Kosyakov 2011-02-22 04:13:25 PST
Created attachment 83297 [details]
patch to land

- Fixed toolbar dragging
- Nuked _toolbarItemClicked
Comment 14 Andrey Kosyakov 2011-02-22 05:25:03 PST
Manually committed r79313: http://trac.webkit.org/changeset/79313