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

Unified Diff: Source/devtools/front_end/timeline/TimelineView.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/timeline/TimelineView.js
diff --git a/Source/devtools/front_end/timeline/TimelineView.js b/Source/devtools/front_end/timeline/TimelineView.js
index 8800b1e71c2fe848b6b76cc36eb651a58884f6b5..5ffaef9c76ef75c08e09db01c660173b6830b7e7 100644
--- a/Source/devtools/front_end/timeline/TimelineView.js
+++ b/Source/devtools/front_end/timeline/TimelineView.js
@@ -150,7 +150,7 @@ WebInspector.TimelineView.prototype = {
this._frameContainer.removeChildren();
} else {
const frameContainerBorderWidth = 1;
- this._frameContainer = document.createElementWithClass("div", "fill timeline-frame-container");
+ this._frameContainer = createElementWithClass("div", "fill timeline-frame-container");
this._frameContainer.style.height = WebInspector.TimelinePanel.rowHeight + frameContainerBorderWidth + "px";
this._frameContainer.addEventListener("dblclick", this._onFrameDoubleClicked.bind(this), false);
this._frameContainer.addEventListener("click", this._onFrameClicked.bind(this), false);
@@ -164,7 +164,7 @@ WebInspector.TimelineView.prototype = {
var frameStart = this._calculator.computePosition(frame.startTime);
var frameEnd = this._calculator.computePosition(frame.endTime);
- var frameStrip = document.createElementWithClass("div", "timeline-frame-strip");
+ var frameStrip = createElementWithClass("div", "timeline-frame-strip");
var actualStart = Math.max(frameStart, 0);
var width = frameEnd - actualStart;
frameStrip.style.left = actualStart + "px";
@@ -1030,7 +1030,7 @@ WebInspector.TimelineCalculator.prototype = {
*/
WebInspector.TimelineRecordListRow = function(linkifier, selectRecord, scheduleRefresh)
{
- this.element = document.createElement("div");
+ this.element = createElement("div");
this.element.row = this;
this.element.style.cursor = "pointer";
this.element.addEventListener("click", this._onClick.bind(this), false);
@@ -1163,7 +1163,7 @@ WebInspector.TimelineRecordListRow.prototype = {
*/
WebInspector.TimelineRecordGraphRow = function(graphContainer, selectRecord, scheduleRefresh)
{
- this.element = document.createElement("div");
+ this.element = createElement("div");
this.element.row = this;
this.element.addEventListener("mouseover", this._onMouseOver.bind(this), false);
this.element.addEventListener("mouseout", this._onMouseOut.bind(this), false);

Powered by Google App Engine
This is Rietveld 408576698