Changeset 47192 in webkit


Ignore:
Timestamp:
Aug 13, 2009 5:16:46 AM (15 years ago)
Author:
pfeldman@chromium.org
Message:

2009-08-13 Mikhail Naganov <mnaganov@chromium.org>

Reviewed by Timothy Hatcher.

Introduced StatusBarButton class that encapsulates glyphs support.
Views updated accordingly.

https://bugs.webkit.org/show_bug.cgi?id=28174

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): (WebInspector.CookieItemsView.prototype.get statusBarItems): Updated to retrieve DOM element from StatusBarButton instance (here and in similar getters below.) (WebInspector.CookieItemsView.prototype.hide): (WebInspector.CookieItemsView.prototype.update):
  • inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView): (WebInspector.DOMStorageItemsView.prototype.get statusBarItems): (WebInspector.DOMStorageItemsView.prototype.hide): (WebInspector.DOMStorageItemsView.prototype.update):
  • inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.get statusBarItems): (WebInspector.ElementsPanel.prototype.hide): (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
  • inspector/front-end/Panel.js:
  • inspector/front-end/ProfileView.js: (WebInspector.ProfileView): (WebInspector.ProfileView.prototype.get statusBarItems): (WebInspector.ProfileView.prototype._updatePercentButton): (WebInspector.ProfileView.prototype._focusClicked): (WebInspector.ProfileView.prototype._excludeClicked): (WebInspector.ProfileView.prototype._resetClicked):
  • inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype._updateInterface):
  • inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.get statusBarItems): (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
  • inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton): (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
  • inspector/front-end/StatusBarButton.js: Added. (WebInspector.StatusBarButton): (WebInspector.StatusBarButton.prototype._clicked): (WebInspector.StatusBarButton.prototype.get disabled): (WebInspector.StatusBarButton.prototype.set disabled): (WebInspector.StatusBarButton.prototype.get title): (WebInspector.StatusBarButton.prototype.set title): (WebInspector.StatusBarButton.prototype.get toggled): (WebInspector.StatusBarButton.prototype.set toggled): (WebInspector.StatusBarButton.prototype.get visible): (WebInspector.StatusBarButton.prototype.set visible):
  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.css: For uniformity, class names are always used to identify status bar buttons. Also, fixed "Reload" button style to use glyphs.
  • inspector/front-end/inspector.html:
Location:
trunk/WebCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r47190 r47192  
     12009-08-13  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Introduced StatusBarButton class that encapsulates glyphs support.
     6        Views updated accordingly.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=28174
     9
     10        * WebCore.gypi:
     11        * WebCore.vcproj/WebCore.vcproj:
     12        * inspector/front-end/CookieItemsView.js:
     13        (WebInspector.CookieItemsView):
     14        (WebInspector.CookieItemsView.prototype.get statusBarItems): Updated to retrieve DOM element from StatusBarButton instance (here and in similar getters below.)
     15        (WebInspector.CookieItemsView.prototype.hide):
     16        (WebInspector.CookieItemsView.prototype.update):
     17        * inspector/front-end/DOMStorageItemsView.js:
     18        (WebInspector.DOMStorageItemsView):
     19        (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
     20        (WebInspector.DOMStorageItemsView.prototype.hide):
     21        (WebInspector.DOMStorageItemsView.prototype.update):
     22        * inspector/front-end/ElementsPanel.js:
     23        (WebInspector.ElementsPanel):
     24        (WebInspector.ElementsPanel.prototype.get statusBarItems):
     25        (WebInspector.ElementsPanel.prototype.hide):
     26        (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
     27        * inspector/front-end/Panel.js:
     28        * inspector/front-end/ProfileView.js:
     29        (WebInspector.ProfileView):
     30        (WebInspector.ProfileView.prototype.get statusBarItems):
     31        (WebInspector.ProfileView.prototype._updatePercentButton):
     32        (WebInspector.ProfileView.prototype._focusClicked):
     33        (WebInspector.ProfileView.prototype._excludeClicked):
     34        (WebInspector.ProfileView.prototype._resetClicked):
     35        * inspector/front-end/ProfilesPanel.js:
     36        (WebInspector.ProfilesPanel):
     37        (WebInspector.ProfilesPanel.prototype.get statusBarItems):
     38        (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
     39        (WebInspector.ProfilesPanel.prototype._updateInterface):
     40        * inspector/front-end/ResourcesPanel.js:
     41        (WebInspector.ResourcesPanel.prototype.get statusBarItems):
     42        (WebInspector.ResourcesPanel.prototype.reset):
     43        (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
     44        * inspector/front-end/ScriptsPanel.js:
     45        (WebInspector.ScriptsPanel):
     46        (WebInspector.ScriptsPanel.prototype.get statusBarItems):
     47        (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
     48        (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
     49        * inspector/front-end/StatusBarButton.js: Added.
     50        (WebInspector.StatusBarButton):
     51        (WebInspector.StatusBarButton.prototype._clicked):
     52        (WebInspector.StatusBarButton.prototype.get disabled):
     53        (WebInspector.StatusBarButton.prototype.set disabled):
     54        (WebInspector.StatusBarButton.prototype.get title):
     55        (WebInspector.StatusBarButton.prototype.set title):
     56        (WebInspector.StatusBarButton.prototype.get toggled):
     57        (WebInspector.StatusBarButton.prototype.set toggled):
     58        (WebInspector.StatusBarButton.prototype.get visible):
     59        (WebInspector.StatusBarButton.prototype.set visible):
     60        * inspector/front-end/WebKit.qrc:
     61        * inspector/front-end/inspector.css: For uniformity, class names are always used to identify status bar buttons. Also, fixed "Reload" button style to use glyphs.
     62        * inspector/front-end/inspector.html:
     63
    1642009-08-12  Ariya Hidayat  <ariya.hidayat@nokia.com>
    265
  • trunk/WebCore/WebCore.gypi

    r47170 r47192  
    34693469            'inspector/front-end/SourceFrame.js',
    34703470            'inspector/front-end/SourceView.js',
     3471            'inspector/front-end/StatusBarButton.js',
    34713472            'inspector/front-end/StylesSidebarPane.js',
    34723473            'inspector/front-end/TextPrompt.js',
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r47170 r47192  
    3123231232                                </File>
    3123331233                                <File
     31234                                        RelativePath="..\inspector\front-end\StatusBarButton.js"
     31235                                        >
     31236                                </File>
     31237                                <File
    3123431238                                        RelativePath="..\inspector\front-end\StylesSidebarPane.js"
    3123531239                                        >
  • trunk/WebCore/inspector/front-end/CookieItemsView.js

    r47181 r47192  
    3535    this.element.addStyleClass("table");
    3636
    37     this.deleteButton = document.createElement("button");
    38     this.deleteButton.title = WebInspector.UIString("Delete");
    39     this.deleteButton.className = "delete-storage-status-bar-item status-bar-item hidden";
     37    this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("Delete"), "delete-storage-status-bar-item");
     38    this.deleteButton.visible = false;
    4039    this.deleteButton.addEventListener("click", this._deleteButtonClicked.bind(this), false);
    4140
    42     this.refreshButton = document.createElement("button");
    43     this.refreshButton.title = WebInspector.UIString("Refresh");
    44     this.refreshButton.className = "refresh-storage-status-bar-item status-bar-item";
     41    this.refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
    4542    this.refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this), false);
    4643}
     
    4946    get statusBarItems()
    5047    {
    51         return [this.refreshButton, this.deleteButton];
     48        return [this.refreshButton.element, this.deleteButton.element];
    5249    },
    5350
     
    6158    {
    6259        WebInspector.View.prototype.hide.call(this);
    63         this.deleteButton.addStyleClass("hidden");
     60        this.deleteButton.visible = false;
    6461    },
    6562
     
    7168            this._dataGrid = dataGrid;
    7269            this.element.appendChild(dataGrid.element);
    73             this.deleteButton.removeStyleClass("hidden");
     70            this.deleteButton.visible = true;
    7471        } else {
    7572            var emptyMsgElement = document.createElement("div");
     
    7875            this.element.appendChild(emptyMsgElement);
    7976            this._dataGrid = null;
    80             this.deleteButton.addStyleClass("hidden");
     77            this.deleteButton.visible = false;
    8178        }
    8279    },
  • trunk/WebCore/inspector/front-end/DOMStorageItemsView.js

    r46891 r47192  
    3333    this.element.addStyleClass("table");
    3434
    35     this.deleteButton = document.createElement("button");
    36     this.deleteButton.title = WebInspector.UIString("Delete");
    37     this.deleteButton.className = "delete-storage-status-bar-item status-bar-item hidden";
     35    this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("Delete"), "delete-storage-status-bar-item");
     36    this.deleteButton.visible = false;
    3837    this.deleteButton.addEventListener("click", this._deleteButtonClicked.bind(this), false);
    3938
    40     this.refreshButton = document.createElement("button");
    41     this.refreshButton.title = WebInspector.UIString("Refresh");
    42     this.refreshButton.className = "refresh-storage-status-bar-item status-bar-item";
     39    this.refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
    4340    this.refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this), false);
    4441}
     
    4744    get statusBarItems()
    4845    {
    49         return [this.refreshButton, this.deleteButton];
     46        return [this.refreshButton.element, this.deleteButton.element];
    5047    },
    5148
     
    5956    {
    6057        WebInspector.View.prototype.hide.call(this);
    61         this.deleteButton.addStyleClass("hidden");
     58        this.deleteButton.visible = false;
    6259    },
    6360
     
    7774                this.element.appendChild(dataGrid.element);
    7875                this._dataGrid.updateWidths();
    79                 this.deleteButton.removeStyleClass("hidden");
     76                this.deleteButton.visible = true;
    8077            }
    8178        }
     
    8885            this.element.appendChild(emptyMsgElement);
    8986            this._dataGrid = null;
    90             this.deleteButton.addStyleClass("hidden");
     87            this.deleteButton.visible = false;
    9188        }
    9289    },
  • trunk/WebCore/inspector/front-end/ElementsPanel.js

    r46979 r47192  
    9898    this.sidebarResizeElement.addEventListener("mousedown", this.rightSidebarResizerDragStart.bind(this), false);
    9999
    100     this.nodeSearchButton = this.createStatusBarButton();
    101     this.nodeSearchButton.title = WebInspector.UIString("Select an element in the page to inspect it.");
    102     this.nodeSearchButton.id = "node-search-status-bar-item";
    103     this.nodeSearchButton.className = "status-bar-item";
     100    this.nodeSearchButton = new WebInspector.StatusBarButton(WebInspector.UIString("Select an element in the page to inspect it."), "node-search-status-bar-item");
    104101    this.nodeSearchButton.addEventListener("click", this._nodeSearchButtonClicked.bind(this), false);
    105102
     
    131128    get statusBarItems()
    132129    {
    133         return [this.nodeSearchButton, this.crumbsElement];
     130        return [this.nodeSearchButton.element, this.crumbsElement];
    134131    },
    135132
     
    157154        if (InspectorController.searchingForNode()) {
    158155            InspectorController.toggleNodeSearch();
    159             this.nodeSearchButton.removeStyleClass("toggled-on");
     156            this.nodeSearchButton.toggled = false;
    160157        }
    161158    },
     
    176173        if (InspectorController.searchingForNode()) {
    177174            InspectorController.toggleNodeSearch();
    178             this.nodeSearchButton.removeStyleClass("toggled-on");
     175            this.nodeSearchButton.toggled = false;
    179176        }
    180177
     
    13171314        InspectorController.toggleNodeSearch();
    13181315
    1319         if (InspectorController.searchingForNode())
    1320             this.nodeSearchButton.addStyleClass("toggled-on");
    1321         else
    1322             this.nodeSearchButton.removeStyleClass("toggled-on");
     1316        this.nodeSearchButton.toggled = InspectorController.searchingForNode();
    13231317    }
    13241318}
  • trunk/WebCore/inspector/front-end/Panel.js

    r46979 r47192  
    6767    },
    6868
    69     createStatusBarButton: function()
    70     {
    71         var button = document.createElement("button");
    72         var glyph = document.createElement("div");
    73         glyph.className = "glyph";
    74         button.appendChild(glyph);
    75         var glyphShadow = document.createElement("div");
    76         glyphShadow.className = "glyph shadow";
    77         button.appendChild(glyphShadow);
    78         return button;
    79     },
    80 
    8169    show: function()
    8270    {
  • trunk/WebCore/inspector/front-end/ProfileView.js

    r46891 r47192  
    5757    this.viewSelectElement.appendChild(treeViewOption);
    5858
    59     this.percentButton = document.createElement("button");
    60     this.percentButton.className = "percent-time-status-bar-item status-bar-item";
     59    this.percentButton = new WebInspector.StatusBarButton("", "percent-time-status-bar-item");
    6160    this.percentButton.addEventListener("click", this._percentClicked.bind(this), false);
    6261
    63     this.focusButton = document.createElement("button");
    64     this.focusButton.title = WebInspector.UIString("Focus selected function.");
    65     this.focusButton.className = "focus-profile-node-status-bar-item status-bar-item";
     62    this.focusButton = new WebInspector.StatusBarButton(WebInspector.UIString("Focus selected function."), "focus-profile-node-status-bar-item");
    6663    this.focusButton.disabled = true;
    6764    this.focusButton.addEventListener("click", this._focusClicked.bind(this), false);
    6865
    69     this.excludeButton = document.createElement("button");
    70     this.excludeButton.title = WebInspector.UIString("Exclude selected function.");
    71     this.excludeButton.className = "exclude-profile-node-status-bar-item status-bar-item";
     66    this.excludeButton = new WebInspector.StatusBarButton(WebInspector.UIString("Exclude selected function."), "exclude-profile-node-status-bar-item");
    7267    this.excludeButton.disabled = true;
    7368    this.excludeButton.addEventListener("click", this._excludeClicked.bind(this), false);
    7469
    75     this.resetButton = document.createElement("button");
    76     this.resetButton.title = WebInspector.UIString("Restore all functions.");
    77     this.resetButton.className = "reset-profile-status-bar-item status-bar-item hidden";
     70    this.resetButton = new WebInspector.StatusBarButton(WebInspector.UIString("Restore all functions."), "reset-profile-status-bar-item");
     71    this.resetButton.visible = false;
    7872    this.resetButton.addEventListener("click", this._resetClicked.bind(this), false);
    7973
     
    9185    get statusBarItems()
    9286    {
    93         return [this.viewSelectElement, this.percentButton, this.focusButton, this.excludeButton, this.resetButton];
     87        return [this.viewSelectElement, this.percentButton.element, this.focusButton.element, this.excludeButton.element, this.resetButton.element];
    9488    },
    9589
     
    440434        if (this.showSelfTimeAsPercent && this.showTotalTimeAsPercent && this.showAverageTimeAsPercent) {
    441435            this.percentButton.title = WebInspector.UIString("Show absolute total and self times.");
    442             this.percentButton.addStyleClass("toggled-on");
     436            this.percentButton.toggled = true;
    443437        } else {
    444438            this.percentButton.title = WebInspector.UIString("Show total and self times as percentages.");
    445             this.percentButton.removeStyleClass("toggled-on");
     439            this.percentButton.toggled = false;
    446440        }
    447441    },
     
    452446            return;
    453447
    454         this.resetButton.removeStyleClass("hidden");
     448        this.resetButton.visible = true;
    455449        this.profileDataGridTree.focus(this.dataGrid.selectedNode);
    456450        this.refresh();
     
    467461        selectedNode.deselect();
    468462
    469         this.resetButton.removeStyleClass("hidden");
     463        this.resetButton.visible = true;
    470464        this.profileDataGridTree.exclude(selectedNode);
    471465        this.refresh();
     
    475469    _resetClicked: function(event)
    476470    {
    477         this.resetButton.addStyleClass("hidden");
     471        this.resetButton.visible = false;
    478472        this.profileDataGridTree.restore();
    479473        this.refresh();
  • trunk/WebCore/inspector/front-end/ProfilesPanel.js

    r46979 r47192  
    6060    this.element.appendChild(this.profileViews);
    6161
    62     this.enableToggleButton = this.createStatusBarButton();
    63     this.enableToggleButton.className = "enable-toggle-status-bar-item status-bar-item";
     62    this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
    6463    this.enableToggleButton.addEventListener("click", this._toggleProfiling.bind(this), false);
    6564
    66     this.recordButton = this.createStatusBarButton();
    67     this.recordButton.title = WebInspector.UIString("Start profiling.");
    68     this.recordButton.id = "record-profile-status-bar-item";
    69     this.recordButton.className = "status-bar-item";
     65    this.recordButton = new WebInspector.StatusBarButton(WebInspector.UIString("Start profiling."), "record-profile-status-bar-item");
    7066    this.recordButton.addEventListener("click", this._recordClicked.bind(this), false);
    7167
     
    8884    get statusBarItems()
    8985    {
    90         return [this.enableToggleButton, this.recordButton, this.profileViewStatusBarItemsContainer];
     86        return [this.enableToggleButton.element, this.recordButton.element, this.profileViewStatusBarItemsContainer];
    9187    },
    9288
     
    318314
    319315        if (isProfiling) {
    320             this.recordButton.addStyleClass("toggled-on");
     316            this.recordButton.toggled = true;
    321317            this.recordButton.title = WebInspector.UIString("Stop profiling.");
    322318        } else {
    323             this.recordButton.removeStyleClass("toggled-on");
     319            this.recordButton.toggled = false;
    324320            this.recordButton.title = WebInspector.UIString("Start profiling.");
    325321        }
     
    337333        if (InspectorController.profilerEnabled()) {
    338334            this.enableToggleButton.title = WebInspector.UIString("Profiling enabled. Click to disable.");
    339             this.enableToggleButton.addStyleClass("toggled-on");
    340             this.recordButton.removeStyleClass("hidden");
     335            this.enableToggleButton.toggled = true;
     336            this.recordButton.visible = true;
    341337            this.profileViewStatusBarItemsContainer.removeStyleClass("hidden");
    342338            this.panelEnablerView.visible = false;
    343339        } else {
    344340            this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable.");
    345             this.enableToggleButton.removeStyleClass("toggled-on");
    346             this.recordButton.addStyleClass("hidden");
     341            this.enableToggleButton.toggled = false;
     342            this.recordButton.visible = false;
    347343            this.profileViewStatusBarItemsContainer.addStyleClass("hidden");
    348344            this.panelEnablerView.visible = true;
  • trunk/WebCore/inspector/front-end/ResourcesPanel.js

    r47011 r47192  
    140140    this.element.appendChild(this.panelEnablerView.element);
    141141
    142     this.enableToggleButton = this.createStatusBarButton();
    143     this.enableToggleButton.className = "enable-toggle-status-bar-item status-bar-item";
     142    this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
    144143    this.enableToggleButton.addEventListener("click", this._toggleResourceTracking.bind(this), false);
    145144
    146     this.largerResourcesButton = this.createStatusBarButton();
    147     this.largerResourcesButton.id = "resources-larger-resources-status-bar-item";
    148     this.largerResourcesButton.className = "status-bar-item toggled-on";
    149     this.largerResourcesButton.title = WebInspector.UIString("Use small resource rows.");
     145    this.largerResourcesButton = new WebInspector.StatusBarButton(WebInspector.UIString("Use small resource rows."), "resources-larger-resources-status-bar-item");
     146    this.largerResourcesButton.toggled = true;
    150147    this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
    151148
     
    212209    get statusBarItems()
    213210    {
    214         return [this.enableToggleButton, this.largerResourcesButton, this.sortingSelectElement];
     211        return [this.enableToggleButton.element, this.largerResourcesButton.element, this.sortingSelectElement];
    215212    },
    216213
     
    468465        if (InspectorController.resourceTrackingEnabled()) {
    469466            this.enableToggleButton.title = WebInspector.UIString("Resource tracking enabled. Click to disable.");
    470             this.enableToggleButton.addStyleClass("toggled-on");
    471             this.largerResourcesButton.removeStyleClass("hidden");
     467            this.enableToggleButton.toggled = true;
     468            this.largerResourcesButton.visible = true;
    472469            this.sortingSelectElement.removeStyleClass("hidden");
    473470            this.panelEnablerView.visible = false;
    474471        } else {
    475472            this.enableToggleButton.title = WebInspector.UIString("Resource tracking disabled. Click to enable.");
    476             this.enableToggleButton.removeStyleClass("toggled-on");
    477             this.largerResourcesButton.addStyleClass("hidden");
     473            this.enableToggleButton.toggled = false;
     474            this.largerResourcesButton.visible = false;
    478475            this.sortingSelectElement.addStyleClass("hidden");
    479476            this.panelEnablerView.visible = true;
     
    10771074            this.resourcesGraphsElement.addStyleClass("small");
    10781075            this.largerResourcesButton.title = WebInspector.UIString("Use large resource rows.");
    1079             this.largerResourcesButton.removeStyleClass("toggled-on");
     1076            this.largerResourcesButton.toggled = false;
    10801077            this._adjustScrollPosition();
    10811078        } else {
    10821079            this.resourcesGraphsElement.removeStyleClass("small");
    10831080            this.largerResourcesButton.title = WebInspector.UIString("Use small resource rows.");
    1084             this.largerResourcesButton.addStyleClass("toggled-on");
     1081            this.largerResourcesButton.toggled = true;
    10851082        }
    10861083    },
  • trunk/WebCore/inspector/front-end/ScriptsPanel.js

    r46979 r47192  
    152152    this.element.appendChild(this.sidebarResizeElement);
    153153
    154     this.enableToggleButton = this.createStatusBarButton();
    155     this.enableToggleButton.className = "enable-toggle-status-bar-item status-bar-item";
     154    this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
    156155    this.enableToggleButton.addEventListener("click", this._toggleDebugging.bind(this), false);
    157156
    158     this.pauseOnExceptionButton = this.createStatusBarButton();
    159     this.pauseOnExceptionButton.id = "scripts-pause-on-exceptions-status-bar-item";
    160     this.pauseOnExceptionButton.className = "status-bar-item";
     157    this.pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item");
    161158    this.pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions.bind(this), false);
    162159
     
    209206    get statusBarItems()
    210207    {
    211         return [this.enableToggleButton, this.pauseOnExceptionButton];
     208        return [this.enableToggleButton.element, this.pauseOnExceptionButton.element];
    212209    },
    213210
     
    765762        if (InspectorController.pauseOnExceptions()) {
    766763            this.pauseOnExceptionButton.title = WebInspector.UIString("Don't pause on exceptions.");
    767             this.pauseOnExceptionButton.addStyleClass("toggled-on");
     764            this.pauseOnExceptionButton.toggled = true;
    768765        } else {
    769766            this.pauseOnExceptionButton.title = WebInspector.UIString("Pause on exceptions.");
    770             this.pauseOnExceptionButton.removeStyleClass("toggled-on");
     767            this.pauseOnExceptionButton.toggled = false;
    771768        }
    772769    },
     
    776773        if (InspectorController.debuggerEnabled()) {
    777774            this.enableToggleButton.title = WebInspector.UIString("Debugging enabled. Click to disable.");
    778             this.enableToggleButton.addStyleClass("toggled-on");
    779             this.pauseOnExceptionButton.removeStyleClass("hidden");
     775            this.enableToggleButton.toggled = true;
     776            this.pauseOnExceptionButton.visible = true;
    780777            this.panelEnablerView.visible = false;
    781778        } else {
    782779            this.enableToggleButton.title = WebInspector.UIString("Debugging disabled. Click to enable.");
    783             this.enableToggleButton.removeStyleClass("toggled-on");
    784             this.pauseOnExceptionButton.addStyleClass("hidden");
     780            this.enableToggleButton.toggled = false;
     781            this.pauseOnExceptionButton.visible = false;
    785782            this.panelEnablerView.visible = true;
    786783        }
  • trunk/WebCore/inspector/front-end/WebKit.qrc

    r47181 r47192  
    5353    <file>SourceFrame.js</file>
    5454    <file>SourceView.js</file>
     55    <file>StatusBarButton.js</file>
    5556    <file>StylesSidebarPane.js</file>
    5657    <file>TextPrompt.js</file>
  • trunk/WebCore/inspector/front-end/inspector.css

    r47181 r47192  
    20962096}
    20972097
    2098 #scripts-pause-on-exceptions-status-bar-item .glyph {
     2098.scripts-pause-on-exceptions-status-bar-item .glyph {
    20992099    -webkit-mask-image: url(Images/pauseOnExceptionButtonGlyph.png);
    21002100}
     
    22142214}
    22152215
    2216 #resources-larger-resources-status-bar-item .glyph {
     2216.resources-larger-resources-status-bar-item .glyph {
    22172217    -webkit-mask-image: url(Images/largerResourcesButtonGlyph.png);
    22182218}
     
    30983098}
    30993099
    3100 #record-profile-status-bar-item .glyph {
     3100.record-profile-status-bar-item .glyph {
    31013101    -webkit-mask-image: url(Images/recordButtonGlyph.png);
    31023102}
    31033103
    3104 #record-profile-status-bar-item.toggled-on .glyph {
     3104.record-profile-status-bar-item.toggled-on .glyph {
    31053105    -webkit-mask-image: url(Images/recordToggledButtonGlyph.png);
    3106     background-color: rgb(216, 0, 0);
    3107 }
    3108 
    3109 #node-search-status-bar-item .glyph {
     3106    background-color: rgb(216, 0, 0) !important;
     3107}
     3108
     3109.node-search-status-bar-item .glyph {
    31103110    -webkit-mask-image: url(Images/nodeSearchButtonGlyph.png);
    31113111}
     
    31413141}
    31423142
    3143 .refresh-storage-status-bar-item {
    3144     background-image: url(Images/reloadButtons.png) !important;
    3145 }
    3146 
    3147 .refresh-storage-status-bar-item:active {
    3148     background-position: 32px 0;
     3143.refresh-storage-status-bar-item .glyph {
     3144    -webkit-mask-image: url(Images/reloadButtonGlyph.png);
    31493145}
    31503146
  • trunk/WebCore/inspector/front-end/inspector.html

    r47181 r47192  
    6969    <script type="text/javascript" src="Panel.js"></script>
    7070    <script type="text/javascript" src="PanelEnablerView.js"></script>
     71    <script type="text/javascript" src="StatusBarButton.js"></script>
    7172    <script type="text/javascript" src="ElementsPanel.js"></script>
    7273    <script type="text/javascript" src="ResourcesPanel.js"></script>
Note: See TracChangeset for help on using the changeset viewer.