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

Unified Diff: Source/devtools/front_end/profiler/CanvasProfileView.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/CanvasProfileView.js
diff --git a/Source/devtools/front_end/profiler/CanvasProfileView.js b/Source/devtools/front_end/profiler/CanvasProfileView.js
index 03f5f8f5530cca12f24820c60c3bb0868ed82566..10986556a73f4492e2c06ad378b62d1550e72b82 100644
--- a/Source/devtools/front_end/profiler/CanvasProfileView.js
+++ b/Source/devtools/front_end/profiler/CanvasProfileView.js
@@ -484,7 +484,7 @@ WebInspector.CanvasProfileView.prototype = {
*/
_createCallNode: function(index, call)
{
- var callViewElement = document.createElement("div");
+ var callViewElement = createElement("div");
var data = {};
data[0] = index + 1;
@@ -653,7 +653,7 @@ WebInspector.CanvasProfileType = function()
this._canvasAgentEnabled = false;
- this._decorationElement = document.createElement("div");
+ this._decorationElement = createElement("div");
this._decorationElement.className = "profile-canvas-decoration";
this._updateDecorationElement();
}
@@ -890,7 +890,7 @@ WebInspector.CanvasProfileType.prototype = {
_addFrame: function(frame)
{
var frameId = frame.id;
- var option = document.createElement("option");
+ var option = createElement("option");
option.text = frame.displayName();
option.title = frame.url;
option.value = frameId;
@@ -1148,7 +1148,7 @@ WebInspector.CanvasProfileDataGridHelper = {
{
if (callArgument.enumName)
return WebInspector.CanvasProfileDataGridHelper.createEnumValueElement(callArgument.enumName, +callArgument.description);
- var element = document.createElement("span");
+ var element = createElement("span");
element.className = "canvas-call-argument";
var description = callArgument.description;
if (callArgument.type === "string") {
@@ -1184,7 +1184,7 @@ WebInspector.CanvasProfileDataGridHelper = {
*/
createEnumValueElement: function(enumName, enumValue)
{
- var element = document.createElement("span");
+ var element = createElement("span");
element.className = "canvas-call-argument canvas-formatted-number";
element.textContent = enumName;
element.__evalResult = WebInspector.runtimeModel.createRemoteObjectFromPrimitiveValue(enumValue);
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileView.js ('k') | Source/devtools/front_end/profiler/CanvasReplayStateView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698