Title: [140523] trunk/Source/WebCore
Revision
140523
Author
[email protected]
Date
2013-01-23 01:18:48 -0800 (Wed, 23 Jan 2013)

Log Message

Web Inspector: use inspectedWindow.document instead of document in InjectedScript
https://bugs.webkit.org/show_bug.cgi?id=107642

Reviewed by Pavel Feldman.

* inspector/InjectedScriptSource.js:
(.):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140522 => 140523)


--- trunk/Source/WebCore/ChangeLog	2013-01-23 09:02:01 UTC (rev 140522)
+++ trunk/Source/WebCore/ChangeLog	2013-01-23 09:18:48 UTC (rev 140523)
@@ -1,3 +1,13 @@
+2013-01-23  Andrey Adaikin  <[email protected]>
+
+        Web Inspector: use inspectedWindow.document instead of document in InjectedScript
+        https://bugs.webkit.org/show_bug.cgi?id=107642
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/InjectedScriptSource.js:
+        (.):
+
 2013-01-23  Vivek Galatage  <[email protected]>
 
         xml-stylesheet XSL is not requested with _javascript_ disabled

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (140522 => 140523)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2013-01-23 09:02:01 UTC (rev 140522)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2013-01-23 09:18:48 UTC (rev 140523)
@@ -1050,13 +1050,13 @@
         if (this._canQuerySelectorOnNode(start))
             return start.querySelector(selector);
 
-        var result = document.querySelector(selector);
+        var result = inspectedWindow.document.querySelector(selector);
         if (result)
             return result;
         if (selector && selector[0] !== "#") {
-            result = document.getElementById(selector);
+            result = inspectedWindow.document.getElementById(selector);
             if (result) {
-                console.warn("The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $(\"#%s\")", selector );
+                inspectedWindow.console.warn("The console function $() has changed from $=getElementById(id) to $=querySelector(selector). You might try $(\"#%s\")", selector );
                 return null;
             }
         }
@@ -1071,11 +1071,11 @@
     {
         if (this._canQuerySelectorOnNode(start))
             return start.querySelectorAll(selector);
-        return document.querySelectorAll(selector);
+        return inspectedWindow.document.querySelectorAll(selector);
     },
 
     /**
-     * @param {Node|undefined} node
+     * @param {Node=} node
      * @return {boolean}
      */
     _canQuerySelectorOnNode: function(node)
@@ -1109,12 +1109,12 @@
 
     dir: function()
     {
-        return console.dir.apply(console, arguments)
+        return inspectedWindow.console.dir.apply(inspectedWindow.console, arguments)
     },
 
     dirxml: function()
     {
-        return console.dirxml.apply(console, arguments)
+        return inspectedWindow.console.dirxml.apply(inspectedWindow.console, arguments)
     },
 
     keys: function(object)
@@ -1132,12 +1132,12 @@
 
     profile: function()
     {
-        return console.profile.apply(console, arguments)
+        return inspectedWindow.console.profile.apply(inspectedWindow.console, arguments)
     },
 
     profileEnd: function()
     {
-        return console.profileEnd.apply(console, arguments)
+        return inspectedWindow.console.profileEnd.apply(inspectedWindow.console, arguments)
     },
 
     /**
@@ -1237,7 +1237,7 @@
      */
     _logEvent: function(event)
     {
-        console.log(event.type, event);
+        inspectedWindow.console.log(event.type, event);
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to