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

Unified Diff: Source/devtools/front_end/components/FlameChart.js

Issue 367093003: DevTools: More code reduce 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/common/DOMExtension.js ('k') | Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/components/FlameChart.js
diff --git a/Source/devtools/front_end/components/FlameChart.js b/Source/devtools/front_end/components/FlameChart.js
index 9f4bd0e328ef37b525e02d5ad0e79ff804bb1447..4f338aaaeccac32bbbbf0f74b88daa6b9b628e1b 100644
--- a/Source/devtools/front_end/components/FlameChart.js
+++ b/Source/devtools/front_end/components/FlameChart.js
@@ -829,15 +829,11 @@ WebInspector.FlameChart.prototype = {
_buildEntryInfo: function(entryInfo)
{
- var infoTable = document.createElement("table");
- infoTable.className = "info-table";
+ var infoTable = document.createElementWithClass("table", "info-table");
for (var i = 0; i < entryInfo.length; ++i) {
var row = infoTable.createChild("tr");
- var titleCell = row.createChild("td");
- titleCell.textContent = entryInfo[i].title;
- titleCell.className = "title";
- var textCell = row.createChild("td");
- textCell.textContent = entryInfo[i].text;
+ row.createChild("td", "title").textContent = entryInfo[i].title;
+ row.createChild("td").textContent = entryInfo[i].text;
}
return infoTable;
},
« no previous file with comments | « Source/devtools/front_end/common/DOMExtension.js ('k') | Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698