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

Unified Diff: Source/devtools/front_end/sources/SourcesView.js

Issue 362273002: DevTools: Reduce code via using document.createElementWithClass and document.createChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « Source/devtools/front_end/sources/SourcesPanel.js ('k') | Source/devtools/front_end/ui/Checkbox.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/SourcesView.js
diff --git a/Source/devtools/front_end/sources/SourcesView.js b/Source/devtools/front_end/sources/SourcesView.js
index 12257d2b3d0408048bc8f3490a3cf7315df82d00..f8ac80b41438939408b0982e74a5a5e6bc6b799e 100644
--- a/Source/devtools/front_end/sources/SourcesView.js
+++ b/Source/devtools/front_end/sources/SourcesView.js
@@ -36,12 +36,6 @@ WebInspector.SourcesView = function(workspace, sourcesPanel)
this._historyManager = new WebInspector.EditingLocationHistoryManager(this, this.currentSourceFrame.bind(this));
- this._scriptViewStatusBarItemsContainer = document.createElement("div");
- this._scriptViewStatusBarItemsContainer.className = "inline-block";
-
- this._scriptViewStatusBarTextContainer = document.createElement("div");
- this._scriptViewStatusBarTextContainer.className = "hbox";
-
this._statusBarContainerElement = this.element.createChild("div", "sources-status-bar");
/**
@@ -55,8 +49,8 @@ WebInspector.SourcesView = function(workspace, sourcesPanel)
var editorActions = /** @type {!Array.<!WebInspector.SourcesView.EditorAction>} */ (WebInspector.moduleManager.instances(WebInspector.SourcesView.EditorAction));
editorActions.forEach(appendButtonForExtension.bind(this));
- this._statusBarContainerElement.appendChild(this._scriptViewStatusBarItemsContainer);
- this._statusBarContainerElement.appendChild(this._scriptViewStatusBarTextContainer);
+ this._scriptViewStatusBarItemsContainer = this._statusBarContainerElement.createChild("div", "inline-block");
+ this._scriptViewStatusBarTextContainer = this._statusBarContainerElement.createChild("div", "hbox");
WebInspector.startBatchUpdate();
this._workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));
« no previous file with comments | « Source/devtools/front_end/sources/SourcesPanel.js ('k') | Source/devtools/front_end/ui/Checkbox.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698