Title: [198555] trunk/Source/WebInspectorUI
Revision
198555
Author
[email protected]
Date
2016-03-22 14:44:19 -0700 (Tue, 22 Mar 2016)

Log Message

Web Inspector: Consider Automation script names as internal and hide them

https://bugs.webkit.org/show_bug.cgi?id=155753
rdar://problem/25293310

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Utilities.js:
(isWebKitInternalScript): Renamed from isWebInspectorDebugScript.
Check for "__Web" prefix and "__" suffix.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Renamed _inspectorDebugScripts to _internalWebKitScripts. And renamed
isWebInspectorDebugScript to isWebKitInternalScript.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Renamed isWebInspectorDebugScript to isWebKitInternalScript.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (198554 => 198555)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-22 21:42:06 UTC (rev 198554)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-22 21:44:19 UTC (rev 198555)
@@ -1,3 +1,30 @@
+2016-03-22  Timothy Hatcher  <[email protected]>
+
+        Web Inspector: Consider Automation script names as internal and hide them
+
+        https://bugs.webkit.org/show_bug.cgi?id=155753
+        rdar://problem/25293310
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Base/Utilities.js:
+        (isWebKitInternalScript): Renamed from isWebInspectorDebugScript.
+        Check for "__Web" prefix and "__" suffix.
+
+        * UserInterface/Controllers/DebuggerManager.js:
+        (WebInspector.DebuggerManager):
+        (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
+        (WebInspector.DebuggerManager.prototype.reset):
+        (WebInspector.DebuggerManager.prototype.debuggerDidPause):
+        (WebInspector.DebuggerManager.prototype.scriptDidParse):
+        (WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
+        Renamed _inspectorDebugScripts to _internalWebKitScripts. And renamed
+        isWebInspectorDebugScript to isWebKitInternalScript.
+
+        * UserInterface/Protocol/RemoteObject.js:
+        (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
+        Renamed isWebInspectorDebugScript to isWebKitInternalScript.
+
 2016-03-22  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: REGRESSION: Shift + Click on record button should create a new recording

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (198554 => 198555)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js	2016-03-22 21:42:06 UTC (rev 198554)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js	2016-03-22 21:44:19 UTC (rev 198555)
@@ -1186,9 +1186,9 @@
     return url ="" "__WebInspectorInternal__";
 }
 
-function isWebInspectorDebugScript(url)
+function isWebKitInternalScript(url)
 {
-    return url && url.startsWith("__WebInspector");
+    return url && url.startsWith("__Web") && url.endsWith("__");
 }
 
 function isFunctionStringNativeCode(str)

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (198554 => 198555)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2016-03-22 21:42:06 UTC (rev 198554)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2016-03-22 21:44:19 UTC (rev 198555)
@@ -64,7 +64,7 @@
         this._pauseReason = null;
         this._pauseData = null;
 
-        this._inspectorDebugScripts = [];
+        this._internalWebKitScripts = [];
         this._scriptIdMap = new Map;
         this._scriptURLMap = new Map;
 
@@ -327,7 +327,7 @@
         for (let script of this._scriptIdMap.values()) {
             if (script.resource)
                 continue;
-            if (!WebInspector.isDebugUIEnabled() && isWebInspectorDebugScript(script.url))
+            if (!WebInspector.isDebugUIEnabled() && isWebKitInternalScript(script.url))
                 continue;
             knownScripts.push(script);
         }
@@ -447,7 +447,7 @@
         this._pauseReason = null;
         this._pauseData = null;
 
-        this._inspectorDebugScripts = [];
+        this._internalWebKitScripts = [];
         this._scriptIdMap.clear();
         this._scriptURLMap.clear();
 
@@ -497,7 +497,7 @@
                 continue;
 
             // Exclude the case where the call frame is in the inspector code.
-            if (!WebInspector.isDebugUIEnabled() && isWebInspectorDebugScript(sourceCodeLocation.sourceCode.url))
+            if (!WebInspector.isDebugUIEnabled() && isWebKitInternalScript(sourceCodeLocation.sourceCode.url))
                 continue;
 
             let scopeChain = this._scopeChainFromPayload(callFramePayload.scopeChain);
@@ -556,8 +556,8 @@
             scripts.push(script);
         }
 
-        if (isWebInspectorDebugScript(script.url)) {
-            this._inspectorDebugScripts.push(script);
+        if (isWebKitInternalScript(script.url)) {
+            this._internalWebKitScripts.push(script);
             if (!WebInspector.isDebugUIEnabled())
                 return;
         }
@@ -925,7 +925,7 @@
     _debugUIEnabledDidChange()
     {
         let eventType = WebInspector.isDebugUIEnabled() ? WebInspector.DebuggerManager.Event.ScriptAdded : WebInspector.DebuggerManager.Event.ScriptRemoved;
-        for (let script of this._inspectorDebugScripts)
+        for (let script of this._internalWebKitScripts)
             this.dispatchEventToListeners(eventType, {script});
     }
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (198554 => 198555)


--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2016-03-22 21:42:06 UTC (rev 198554)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js	2016-03-22 21:44:19 UTC (rev 198555)
@@ -513,7 +513,7 @@
             var location = response.location;
             var sourceCode = WebInspector.debuggerManager.scriptForIdentifier(location.scriptId);
 
-            if (!sourceCode || (!WebInspector.isDebugUIEnabled() && isWebInspectorDebugScript(sourceCode.url))) {
+            if (!sourceCode || (!WebInspector.isDebugUIEnabled() && isWebKitInternalScript(sourceCode.url))) {
                 result.resolve(WebInspector.RemoteObject.SourceCodeLocationPromise.NoSourceFound);
                 return;
             }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to