Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1232)

Unified Diff: Source/devtools/front_end/timeline/Layers3DView.js

Issue 720223002: DevTools: only allow status bar items in status bars. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/Layers3DView.js
diff --git a/Source/devtools/front_end/timeline/Layers3DView.js b/Source/devtools/front_end/timeline/Layers3DView.js
index b028231f02d02a1366d05f0e53611f16bbe71f98..6479a970c985f4314e32f4b10e6839d548d89844 100644
--- a/Source/devtools/front_end/timeline/Layers3DView.js
+++ b/Source/devtools/front_end/timeline/Layers3DView.js
@@ -681,13 +681,13 @@ WebInspector.Layers3DView.prototype = {
* @param {string} caption
* @param {string} name
* @param {boolean} value
- * @param {!Element} statusBarElement
+ * @param {!WebInspector.StatusBar} statusBar
* @return {!WebInspector.Setting}
*/
- _createVisibilitySetting: function(caption, name, value, statusBarElement)
+ _createVisibilitySetting: function(caption, name, value, statusBar)
{
var checkbox = new WebInspector.StatusBarCheckbox(WebInspector.UIString(caption))
- statusBarElement.appendChild(checkbox.element);
+ statusBar.appendStatusBarItem(checkbox);
var setting = WebInspector.settings.createSetting(name, value)
WebInspector.SettingsUI.bindCheckbox(checkbox.inputElement, setting);
setting.addChangeListener(this._update, this);
@@ -696,10 +696,10 @@ WebInspector.Layers3DView.prototype = {
_initStatusBar: function()
{
- this._panelStatusBarElement = this.element.createChild("div", "panel-status-bar");
- this._panelStatusBarElement.appendChild(this._transformController.controlPanelElement());
- this._showSlowScrollRectsSetting = this._createVisibilitySetting("Slow scroll rects", "frameViewerShowSlowScrollRects", true, this._panelStatusBarElement);
- this._showPaintsSetting = this._createVisibilitySetting("Paints", "frameViewerShowPaints", true, this._panelStatusBarElement);
+ this._panelStatusBar = new WebInspector.StatusBar(this.element);
+ this._panelStatusBar.appendStatusBarItem(new WebInspector.StatusBarItem(this._transformController.controlPanelElement()));
+ this._showSlowScrollRectsSetting = this._createVisibilitySetting("Slow scroll rects", "frameViewerShowSlowScrollRects", true, this._panelStatusBar);
+ this._showPaintsSetting = this._createVisibilitySetting("Paints", "frameViewerShowPaints", true, this._panelStatusBar);
WebInspector.settings.frameViewerHideChromeWindow.addChangeListener(this._update, this);
},
« no previous file with comments | « Source/devtools/front_end/resources/resourcesPanel.css ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698