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

Unified Diff: Source/devtools/front_end/sources/RevisionHistoryView.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/sources/RevisionHistoryView.js
diff --git a/Source/devtools/front_end/sources/RevisionHistoryView.js b/Source/devtools/front_end/sources/RevisionHistoryView.js
index 5990ba507abfc4300373243815c6aa0d1502e129..c25efccbb9ea0351cfce777e03d6b9266fd282ff 100644
--- a/Source/devtools/front_end/sources/RevisionHistoryView.js
+++ b/Source/devtools/front_end/sources/RevisionHistoryView.js
@@ -209,7 +209,7 @@ WebInspector.RevisionHistoryTreeElement = function(revision, baseRevision, allow
this._revision = revision;
this._baseRevision = baseRevision;
- this._revertElement = document.createElement("span");
+ this._revertElement = createElement("span");
this._revertElement.className = "revision-history-link";
this._revertElement.textContent = WebInspector.UIString("apply revision content");
this._revertElement.addEventListener("click", this._revision.revertToThis.bind(this._revision), false);
@@ -310,12 +310,12 @@ WebInspector.RevisionHistoryTreeElement.prototype = {
var child = new TreeElement("", null, false);
child.selectable = false;
this.appendChild(child);
- var lineElement = document.createElement("span");
+ var lineElement = createElement("span");
function appendLineNumber(lineNumber)
{
var numberString = lineNumber !== null ? numberToStringWithSpacesPadding(lineNumber + 1, 4) : spacesPadding(4);
- var lineNumberSpan = document.createElement("span");
+ var lineNumberSpan = createElement("span");
lineNumberSpan.classList.add("webkit-line-number");
lineNumberSpan.textContent = numberString;
child.listItemElement.appendChild(lineNumberSpan);
@@ -324,7 +324,7 @@ WebInspector.RevisionHistoryTreeElement.prototype = {
appendLineNumber(baseLineNumber);
appendLineNumber(newLineNumber);
- var contentSpan = document.createElement("span");
+ var contentSpan = createElement("span");
contentSpan.textContent = lineContent;
child.listItemElement.appendChild(contentSpan);
child.listItemElement.classList.add("revision-history-line");
« no previous file with comments | « Source/devtools/front_end/sources/Placard.js ('k') | Source/devtools/front_end/sources/ScopeChainSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698