WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101907
Web Inspector: Extract common interface for StatusBarButton and StatusBarCombo
https://bugs.webkit.org/show_bug.cgi?id=101907
Summary
Web Inspector: Extract common interface for StatusBarButton and StatusBarCombo
eustas.bug
Reported
2012-11-12 00:26:12 PST
Status bar control element should have common interface for easier management.
Attachments
Patch
(10.01 KB, patch)
2012-11-12 00:33 PST
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.16 KB, patch)
2012-11-12 03:43 PST
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(11.20 KB, patch)
2012-11-13 21:03 PST
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
eustas.bug
Comment 1
2012-11-12 00:33:11 PST
Created
attachment 173579
[details]
Patch
Pavel Feldman
Comment 2
2012-11-12 02:11:11 PST
Comment on
attachment 173579
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173579&action=review
> Source/WebCore/inspector/front-end/CPUProfileView.js:74 > + this.focusButton.setDisabled(true);
If we change the API, I would introduce setEnabled.
> Source/WebCore/inspector/front-end/StatusBarButton.js:34 > +WebInspector.StatusBarItem = function()
Where is it used? Maybe it should have default implementation that manages element's state based on the calls below? I.e. be not an interface, but a base class?
eustas.bug
Comment 3
2012-11-12 03:43:52 PST
Created
attachment 173610
[details]
Patch
eustas.bug
Comment 4
2012-11-12 03:44:48 PST
Comment on
attachment 173579
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173579&action=review
>> Source/WebCore/inspector/front-end/CPUProfileView.js:74 >> + this.focusButton.setDisabled(true); > > If we change the API, I would introduce setEnabled.
Done
>> Source/WebCore/inspector/front-end/StatusBarButton.js:34 >> +WebInspector.StatusBarItem = function() > > Where is it used? Maybe it should have default implementation that manages element's state based on the calls below? I.e. be not an interface, but a base class?
Done
Pavel Feldman
Comment 5
2012-11-13 01:43:54 PST
Comment on
attachment 173610
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173610&action=review
> Source/WebCore/inspector/front-end/StatusBarButton.js:32 > * @extends {WebInspector.Object}
@constructor should go first (we use alphabetic order)
> Source/WebCore/inspector/front-end/StatusBarButton.js:34 > + * @param {!Element} element
We don't use ! notation
> Source/WebCore/inspector/front-end/StatusBarButton.js:46 > + setEnabled: function(value) {
{ on the next line
> Source/WebCore/inspector/front-end/StatusBarButton.js:58 > + * @constructor
ditto
> Source/WebCore/inspector/front-end/StatusBarButton.js:272 > + * @extends {WebInspector.StatusBarItem}
ditto
> Source/WebCore/inspector/front-end/StatusBarButton.js:291 > + * @param {!Element} option
ditto
> Source/WebCore/inspector/front-end/StatusBarButton.js:301 > + setEnabled: function(value)
Hm. This looks like copy-paste, but I don't have a good suggestion for you :(
eustas.bug
Comment 6
2012-11-13 18:33:11 PST
Comment on
attachment 173610
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173610&action=review
>> Source/WebCore/inspector/front-end/StatusBarButton.js:34 >> + * @param {!Element} element > > We don't use ! notation
Why not? Without "!" closure can't check for potential NPEs.
eustas.bug
Comment 7
2012-11-13 20:59:57 PST
Comment on
attachment 173610
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173610&action=review
>> Source/WebCore/inspector/front-end/StatusBarButton.js:32 >> * @extends {WebInspector.Object} > > @constructor should go first (we use alphabetic order)
Actually, this code fragment hasn't been modified.
>> Source/WebCore/inspector/front-end/StatusBarButton.js:46 >> + setEnabled: function(value) { > > { on the next line
Fixed.
>> Source/WebCore/inspector/front-end/StatusBarButton.js:58 >> + * @constructor > > ditto
Fixed.
>> Source/WebCore/inspector/front-end/StatusBarButton.js:272 >> + * @extends {WebInspector.StatusBarItem} > > ditto
Fixed.
>> Source/WebCore/inspector/front-end/StatusBarButton.js:301 >> + setEnabled: function(value) > > Hm. This looks like copy-paste, but I don't have a good suggestion for you :(
Addressed.
eustas.bug
Comment 8
2012-11-13 21:03:33 PST
Created
attachment 174067
[details]
Patch
WebKit Review Bot
Comment 9
2012-11-13 22:58:08 PST
Comment on
attachment 174067
[details]
Patch Clearing flags on attachment: 174067 Committed
r134550
: <
http://trac.webkit.org/changeset/134550
>
WebKit Review Bot
Comment 10
2012-11-13 22:58:12 PST
All reviewed patches have been landed. Closing bug.
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