Title: [183092] trunk/Source/WebInspectorUI
Revision
183092
Author
[email protected]
Date
2015-04-21 19:37:07 -0700 (Tue, 21 Apr 2015)

Log Message

Web Inspector: Use String.prototype.startsWith in more places
https://bugs.webkit.org/show_bug.cgi?id=144025

Patch by Joseph Pecoraro <[email protected]> on 2015-04-21
Reviewed by Timothy Hatcher.

* UserInterface/Models/Gradient.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (183091 => 183092)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-04-22 02:30:22 UTC (rev 183091)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-04-22 02:37:07 UTC (rev 183092)
@@ -1,3 +1,16 @@
+2015-04-21  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Use String.prototype.startsWith in more places
+        https://bugs.webkit.org/show_bug.cgi?id=144025
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Models/Gradient.js:
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
+
 2015-04-21  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: Make formatted nodes more consistent with formatted objects

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js (183091 => 183092)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js	2015-04-22 02:30:22 UTC (rev 183091)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js	2015-04-22 02:37:07 UTC (rev 183092)
@@ -91,7 +91,7 @@
             gradient = WebInspector.RadialGradient.radialGradientWithComponents(components);
 
         if (gradient)
-            gradient.repeats = typeString.indexOf("repeating") === 0;
+            gradient.repeats = typeString.startsWith("repeating");
 
         return gradient;
     },

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (183091 => 183092)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2015-04-22 02:30:22 UTC (rev 183091)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js	2015-04-22 02:37:07 UTC (rev 183092)
@@ -379,7 +379,7 @@
             return;
 
         // Exclude inspector scripts.
-        if (script.url && script.url.indexOf("__WebInspector") === 0)
+        if (script.url && script.url.startsWith("__WebInspector"))
             return;
 
         // Don't add breakpoints if the script is represented by a Resource. They were

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (183091 => 183092)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-04-22 02:30:22 UTC (rev 183091)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js	2015-04-22 02:37:07 UTC (rev 183092)
@@ -679,7 +679,7 @@
             return;
 
         // Exclude inspector scripts.
-        if (script.url.indexOf("__WebInspector") === 0)
+        if (script.url.startsWith("__WebInspector"))
             return;
 
         // If the script URL matches a resource we can assume it is part of that resource and does not need added.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to