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

Unified Diff: Source/devtools/front_end/elements/ElementsPanel.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/elements/ElementsPanel.js
diff --git a/Source/devtools/front_end/elements/ElementsPanel.js b/Source/devtools/front_end/elements/ElementsPanel.js
index b711a931a438e725515c330305cb6a5ec679d3af..22af3ab2a06188c1a584e4bd46e4662d3484da01 100644
--- a/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/Source/devtools/front_end/elements/ElementsPanel.js
@@ -70,9 +70,9 @@ WebInspector.ElementsPanel = function()
this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Events.SelectorEditingStarted, this._onEditingSelectorStarted.bind(this));
this.sidebarPanes.styles.addEventListener(WebInspector.StylesSidebarPane.Events.SelectorEditingEnded, this._onEditingSelectorEnded.bind(this));
- this._matchedStylesFilterBoxContainer = document.createElement("div");
+ this._matchedStylesFilterBoxContainer = createElement("div");
this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box";
- this._computedStylesFilterBoxContainer = document.createElement("div");
+ this._computedStylesFilterBoxContainer = createElement("div");
this._computedStylesFilterBoxContainer.className = "sidebar-pane-filter-box";
this.sidebarPanes.styles.setFilterBoxContainers(this._matchedStylesFilterBoxContainer, this._computedStylesFilterBoxContainer);
@@ -774,7 +774,7 @@ WebInspector.ElementsPanel.prototype = {
if (current.nodeType() === Node.DOCUMENT_NODE)
continue;
- crumb = document.createElement("span");
+ crumb = createElement("span");
crumb.className = "crumb";
crumb.representedObject = current;
crumb.addEventListener("mousedown", selectCrumbFunction, false);
@@ -809,7 +809,7 @@ WebInspector.ElementsPanel.prototype = {
}
if (!crumb.childNodes.length) {
- var nameElement = document.createElement("span");
+ var nameElement = createElement("span");
nameElement.textContent = crumbTitle;
crumb.appendChild(nameElement);
crumb.title = crumbTitle;
@@ -1340,9 +1340,9 @@ WebInspector.ElementsPanel.prototype = {
computedPane.bodyElement.classList.add("metrics-and-computed");
this.sidebarPanes.computedStyle.setExpandCallback(expandComputed);
- var matchedStylePanesWrapper = document.createElement("div");
+ var matchedStylePanesWrapper = createElement("div");
matchedStylePanesWrapper.className = "style-panes-wrapper";
- var computedStylePanesWrapper = document.createElement("div");
+ var computedStylePanesWrapper = createElement("div");
computedStylePanesWrapper.className = "style-panes-wrapper";
/**
« no previous file with comments | « Source/devtools/front_end/elements/AnimationsSidebarPane.js ('k') | Source/devtools/front_end/elements/ElementsTreeOutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698