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

Unified Diff: Source/devtools/front_end/profiler/CPUProfileDataGrid.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
Index: Source/devtools/front_end/profiler/CPUProfileDataGrid.js
diff --git a/Source/devtools/front_end/profiler/CPUProfileDataGrid.js b/Source/devtools/front_end/profiler/CPUProfileDataGrid.js
index 339d379fbecf818963d5da43f6d5088bba1285e6..869bd6f480bd7c96187c64b9ce91ed76cb558cc7 100644
--- a/Source/devtools/front_end/profiler/CPUProfileDataGrid.js
+++ b/Source/devtools/front_end/profiler/CPUProfileDataGrid.js
@@ -94,15 +94,15 @@ WebInspector.ProfileDataGridNode.prototype = {
if (columnIdentifier !== "self" && columnIdentifier !== "total")
return null;
- var cell = document.createElement("td");
+ var cell = createElement("td");
cell.className = "numeric-column";
- var div = document.createElement("div");
- var valueSpan = document.createElement("span");
+ var div = createElement("div");
+ var valueSpan = createElement("span");
valueSpan.textContent = this.data[columnIdentifier];
div.appendChild(valueSpan);
var percentColumn = columnIdentifier + "-percent";
if (percentColumn in this.data) {
- var percentSpan = document.createElement("span");
+ var percentSpan = createElement("span");
percentSpan.className = "percent-column";
percentSpan.textContent = this.data[percentColumn];
div.appendChild(percentSpan);
@@ -125,7 +125,7 @@ WebInspector.ProfileDataGridNode.prototype = {
var functionName;
if (this._deoptReason) {
- var content = document.createDocumentFragment();
+ var content = createDocumentFragment();
var marker = content.createChild("span", "profile-warn-marker");
marker.title = WebInspector.UIString("Not optimized: %s", this._deoptReason);
content.createTextChild(this.functionName);
« no previous file with comments | « Source/devtools/front_end/network/RequestTimingView.js ('k') | Source/devtools/front_end/profiler/CPUProfileView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698