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

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.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/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 044179db622ce474b9f15fe1b0a250df3823926b..2efd473b2b301cb40bdda398635a73ee98ed2b6c 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -150,7 +150,7 @@ WebInspector.TimelinePanel.prototype = {
{
if (!WebInspector.TimelinePanel._categoryStylesInitialized) {
WebInspector.TimelinePanel._categoryStylesInitialized = true;
- var style = document.createElement("style");
+ var style = createElement("style");
var categories = WebInspector.TimelineUIUtils.categories();
style.textContent = Object.values(categories).map(WebInspector.TimelineUIUtils.createStyleRuleForCategory).join("\n");
document.head.appendChild(style);
@@ -302,7 +302,7 @@ WebInspector.TimelinePanel.prototype = {
if (!this._recordingOptionUIControls)
this._recordingOptionUIControls = [];
- var checkboxElement = document.createElement("input");
+ var checkboxElement = createElement("input");
var labelElement = WebInspector.SettingsUI.createSettingCheckbox(name, setting, true, checkboxElement, tooltip);
this._recordingOptionUIControls.push({ "label": labelElement, "checkbox": checkboxElement });
return labelElement;
@@ -1077,7 +1077,7 @@ WebInspector.TimelinePanel.prototype = {
aggregatedTotal += aggregatedStats[categoryName];
aggregatedStats["idle"] = Math.max(0, endTime - startTime - aggregatedTotal);
- var pieChartContainer = document.createElement("div");
+ var pieChartContainer = createElement("div");
pieChartContainer.classList.add("vbox", "timeline-range-summary");
var startOffset = startTime - this._model.minimumRecordTime();
var endOffset = endTime - this._model.minimumRecordTime();
@@ -1131,7 +1131,7 @@ WebInspector.TimelineDetailsView = function()
{
WebInspector.TabbedPane.call(this);
- this._recordTitleElement = document.createElement("div");
+ this._recordTitleElement = createElement("div");
this._recordTitleElement.classList.add("record-title");
this.headerElement().insertBefore(this._recordTitleElement, this.headerElement().firstChild)
this._defaultDetailsView = new WebInspector.VBox();
« no previous file with comments | « Source/devtools/front_end/timeline/PaintProfilerView.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698