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

Unified Diff: Source/devtools/front_end/ui/DOMExtension.js

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments 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
« no previous file with comments | « Source/devtools/front_end/ui/ContextMenu.js ('k') | Source/devtools/front_end/ui/Dialog.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/DOMExtension.js
diff --git a/Source/devtools/front_end/ui/DOMExtension.js b/Source/devtools/front_end/ui/DOMExtension.js
index e3b9e41c942a001b3d981627142b47a5162e2d60..55f021f6f0a9b0dbd1de750ba9106039e081cdeb 100644
--- a/Source/devtools/front_end/ui/DOMExtension.js
+++ b/Source/devtools/front_end/ui/DOMExtension.js
@@ -282,7 +282,7 @@ Constraints.prototype.addHeight = function(value)
*/
Element.prototype.measurePreferredSize = function(containerElement)
{
- containerElement = containerElement || document.body;
+ containerElement = containerElement || this.ownerDocument.body;
containerElement.appendChild(this);
var fakingComponentRoot = false;
if (!this.classList.contains("component-root")) {
@@ -400,6 +400,7 @@ Element.prototype.isInsertionCaretInside = function()
/**
* @param {string} tagName
* @return {!Element}
+ * @suppressGlobalPropertiesCheck
*/
function createElement(tagName)
{
@@ -409,6 +410,7 @@ function createElement(tagName)
/**
* @param {number|string} data
* @return {!Text}
+ * @suppressGlobalPropertiesCheck
*/
function createTextNode(data)
{
@@ -432,6 +434,7 @@ Document.prototype.createElementWithClass = function(elementName, className)
* @param {string} elementName
* @param {string=} className
* @return {!Element}
+ * @suppressGlobalPropertiesCheck
*/
function createElementWithClass(elementName, className)
{
@@ -440,6 +443,7 @@ function createElementWithClass(elementName, className)
/**
* @return {!DocumentFragment}
+ * @suppressGlobalPropertiesCheck
*/
function createDocumentFragment()
{
« no previous file with comments | « Source/devtools/front_end/ui/ContextMenu.js ('k') | Source/devtools/front_end/ui/Dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698