Web Inspector: Extract common interface for StatusBarButton and StatusBarCombo
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 06:57:36 +0000 (06:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2012 06:57:36 +0000 (06:57 +0000)
commitb57dbc40861717becfbeba4f4ca64ec2712c8996
tree7ef462527fc8b35e4b1fcac95a01948cbd4ecc81
parent89061968625a79927b067aee6501780e2e26c652
Web Inspector: Extract common interface for StatusBarButton and StatusBarCombo
https://bugs.webkit.org/show_bug.cgi?id=101907

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-11-13
Reviewed by Pavel Feldman.

Status bar control element should have common interface for
easier management.
In this patch getter/setter for StatusBarButton "disabled" are replaced
with regular functions "enabled"/"setEnabled"; added "setEnabled"
to StatusBarCombo; added new base class StatusBarItem with
method "setEnabled" and member "element".

* inspector/front-end/CPUProfileView.js: Adopted refactoring.
* inspector/front-end/DockController.js: Ditto.
* inspector/front-end/ScriptsPanel.js: Ditto.
* inspector/front-end/TimelinePanel.js: Ditto.
* inspector/front-end/inspector.js: Ditto.
* inspector/front-end/StatusBarButton.js:
(WebInspector.StatusBarItem): Added.
(WebInspector.StatusBarButton): Replaced getter/setter with
regular functions.
(WebInspector.StatusBarComboBox.prototype.setEnabled): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/CPUProfileView.js
Source/WebCore/inspector/front-end/DockController.js
Source/WebCore/inspector/front-end/ScriptsPanel.js
Source/WebCore/inspector/front-end/StatusBarButton.js
Source/WebCore/inspector/front-end/TimelinePanel.js
Source/WebCore/inspector/front-end/inspector.js