WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 68155
Web Inspector: refactor ConsoleView, Drawer, ConsolePanel trio.
https://bugs.webkit.org/show_bug.cgi?id=68155
Summary
Web Inspector: refactor ConsoleView, Drawer, ConsolePanel trio.
Pavel Feldman
Reported
2011-09-15 05:44:15 PDT
1. ConsoleView, ConsolePanel and Drawer are all Views with custom show/hide implementations and weird DOM element ownership. 2. We have a number of cases when switching console from full panel to drawer mode and back result in UI glitches. For the sake of code clarity and no glitches, I'd like to sacrifice the "grow into full screen" console animation.
Attachments
Patch
(27.28 KB, patch)
2011-09-15 05:57 PDT
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] with fixed drawer status bar style.
(27.38 KB, patch)
2011-09-15 06:26 PDT
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] Review comments addressed
(27.35 KB, patch)
2011-09-15 07:22 PDT
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] rebaselined.
(27.29 KB, patch)
2011-09-19 10:47 PDT
,
Pavel Feldman
tonyg
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-09-15 05:57:08 PDT
Created
attachment 107481
[details]
Patch
Pavel Feldman
Comment 2
2011-09-15 06:26:04 PDT
Created
attachment 107487
[details]
[Patch] with fixed drawer status bar style.
Andrey Kosyakov
Comment 3
2011-09-15 07:02:37 PDT
Comment on
attachment 107487
[details]
[Patch] with fixed drawer status bar style. View in context:
https://bugs.webkit.org/attachment.cgi?id=107487&action=review
> Source/WebCore/inspector/front-end/ConsolePanel.js:57 > + this._view.show(this.element);
passing parent element to show() is redundant here.
> Source/WebCore/inspector/front-end/Drawer.js:173 > + resize: function()
shouldn't this propagate resize to the child view?
> Source/WebCore/inspector/front-end/inspector.js:219 > + this._toggleConsoleButton.toggled = !this._toggleConsoleButton.toggled;
I think the way we used to maintain console button state previously was better: this gave us somewhat better encapsulation, less logic in inspector.js and a clear assertion that the state of the button matches that of the view. Now we have this logic spread over 3 methods of inspector.js.
Pavel Feldman
Comment 4
2011-09-15 07:18:13 PDT
(In reply to
comment #3
)
> (From update of
attachment 107487
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=107487&action=review
> > > Source/WebCore/inspector/front-end/ConsolePanel.js:57 > > + this._view.show(this.element); > > passing parent element to show() is redundant here.
Done.
> > > Source/WebCore/inspector/front-end/Drawer.js:173 > > + resize: function() > > shouldn't this propagate resize to the child view?
Done.
> > > Source/WebCore/inspector/front-end/inspector.js:219 > > + this._toggleConsoleButton.toggled = !this._toggleConsoleButton.toggled; > > I think the way we used to maintain console button state previously was better: this gave us somewhat better encapsulation, less logic in inspector.js and a clear assertion that the state of the button matches that of the view. Now we have this logic spread over 3 methods of inspector.js.
ConsoleView should not host a button that toggles drawer. This button is a glue, and our glue lives in the inspector.js.
Pavel Feldman
Comment 5
2011-09-15 07:22:27 PDT
Created
attachment 107492
[details]
[Patch] Review comments addressed
Andrey Kosyakov
Comment 6
2011-09-15 07:26:33 PDT
Comment on
attachment 107492
[details]
[Patch] Review comments addressed LGTM
Pavel Feldman
Comment 7
2011-09-19 10:47:45 PDT
Created
attachment 107882
[details]
[Patch] rebaselined.
Tony Gentilcore
Comment 8
2011-09-20 05:55:42 PDT
Comment on
attachment 107882
[details]
[Patch] rebaselined. View in context:
https://bugs.webkit.org/attachment.cgi?id=107882&action=review
> Source/WebCore/ChangeLog:10 > + screen" console animation.
The one line description suggestions this is just a refactor, but it is actually a behavior change. Maybe there is a better one-line description?
> Source/WebCore/inspector/front-end/ConsolePanel.js:31 > WebInspector.Panel.call(this, "console");
While you are here, why not add an /**@constructor*/ annotation to this ConsolePanel ctor. Ditto for ConsoleView below.
> Source/WebCore/inspector/front-end/Drawer.js:63 > + this.immediatelyFinishAnimation();
Don't quite get why these are still necessary. Should the animation bits be ripped out more completely or do some animations still exist?
Pavel Feldman
Comment 9
2011-09-20 06:46:45 PDT
Comment on
attachment 107882
[details]
[Patch] rebaselined. View in context:
https://bugs.webkit.org/attachment.cgi?id=107882&action=review
Thanks for your review!
>> Source/WebCore/ChangeLog:10 >> + screen" console animation. > > The one line description suggestions this is just a refactor, but it is actually a behavior change. Maybe there is a better one-line description?
Done.
>> Source/WebCore/inspector/front-end/ConsolePanel.js:31 >> WebInspector.Panel.call(this, "console"); > > While you are here, why not add an /**@constructor*/ annotation to this ConsolePanel ctor. Ditto for ConsoleView below.
I haven't added them to the compilation yet. I do it file by file as a part of the separate effort. Thanks for noticing though!
>> Source/WebCore/inspector/front-end/Drawer.js:63 >> + this.immediatelyFinishAnimation(); > > Don't quite get why these are still necessary. Should the animation bits be ripped out more completely or do some animations still exist?
Drawer is still animating. It is just that transition between visible drawer and console panel does not animate anymore.
Pavel Feldman
Comment 10
2011-09-20 06:50:16 PDT
Committed
r95536
: <
http://trac.webkit.org/changeset/95536
>
Csaba Osztrogonác
Comment 11
2011-09-20 10:24:11 PDT
It broke a test on the SL and the Qt bot:
http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20%28Tests%29/r95540%20%2833226%29/inspector/debugger/script-formatter-pretty-diff.html
Could you check it, please?
Pavel Feldman
Comment 12
2011-09-20 10:56:16 PDT
Looking
Pavel Feldman
Comment 13
2011-09-20 11:16:47 PDT
(In reply to
comment #12
)
> Looking
Fix landed as
r95557
. Sorry for trouble - this test was disabled on chromium :(
Csaba Osztrogonác
Comment 14
2011-09-20 11:18:20 PDT
(In reply to
comment #13
)
> (In reply to
comment #12
) > > Looking > > Fix landed as
r95557
. Sorry for trouble - this test was disabled on chromium :(
Not problem, thanks for the quick fix.
Yury Semikhatsky
Comment 15
2011-09-21 05:00:39 PDT
Comment on
attachment 107882
[details]
[Patch] rebaselined. View in context:
https://bugs.webkit.org/attachment.cgi?id=107882&action=review
> Source/WebCore/inspector/front-end/ConsolePanel.js:51 > + WebInspector.drawer.hide(true);
ConsolePanel should not directly depend on the Drawer.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug