Title: [94067] trunk
Revision
94067
Author
[email protected]
Date
2011-08-30 03:57:11 -0700 (Tue, 30 Aug 2011)

Log Message

Web Inspector: wrong script display name when there is a slash in its URL query parameters
https://bugs.webkit.org/show_bug.cgi?id=67120

Source/WebCore:

Fixed folder name computation in ScriptsPanel. Now search query is ignored
when searching for the script folder name.

Reviewed by Pavel Feldman.

* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL):

LayoutTests:

Reviewed by Pavel Feldman.

* inspector/debugger/scripts-sorting.html:
* platform/chromium/inspector/debugger/scripts-sorting-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (94066 => 94067)


--- trunk/LayoutTests/ChangeLog	2011-08-30 10:54:47 UTC (rev 94066)
+++ trunk/LayoutTests/ChangeLog	2011-08-30 10:57:11 UTC (rev 94067)
@@ -1,3 +1,13 @@
+2011-08-29  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: wrong script display name when there is a slash in its URL query parameters
+        https://bugs.webkit.org/show_bug.cgi?id=67120
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/debugger/scripts-sorting.html:
+        * platform/chromium/inspector/debugger/scripts-sorting-expected.txt:
+
 2011-08-30  Yury Semikhatsky  <[email protected]>
 
         Unreviewed. Update window.onerror tests after r94061 to match new semantics

Modified: trunk/LayoutTests/inspector/debugger/scripts-sorting.html (94066 => 94067)


--- trunk/LayoutTests/inspector/debugger/scripts-sorting.html	2011-08-30 10:54:47 UTC (rev 94066)
+++ trunk/LayoutTests/inspector/debugger/scripts-sorting.html	2011-08-30 10:57:11 UTC (rev 94067)
@@ -13,7 +13,9 @@
     "_js/production/motor.js?1308927432",
     "i/xgemius.js",
     "i/js/jquery-1.5.1.min.js",
-    "i/js/jquery.cookie.js" ];
+    "i/js/jquery.cookie.js",
+    "foo/path/bar.js?file=bar/zzz.js",
+    "foo/path/foo.js?file=bar/aaa.js" ];
 
 for (var i = 0; i < scripts.length; ++i)
     window.eval("function func" + i + "() {} //@ sourceURL=http://foo.com/" + scripts[i]);

Modified: trunk/LayoutTests/platform/chromium/inspector/debugger/scripts-sorting-expected.txt (94066 => 94067)


--- trunk/LayoutTests/platform/chromium/inspector/debugger/scripts-sorting-expected.txt	2011-08-30 10:54:47 UTC (rev 94066)
+++ trunk/LayoutTests/platform/chromium/inspector/debugger/scripts-sorting-expected.txt	2011-08-30 10:57:11 UTC (rev 94067)
@@ -12,6 +12,9 @@
     top100.jcn?80674
 /_js/production
     motor.js?1308927432
+/foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
 /i
     xgemius.js
 /i/js
@@ -20,7 +23,9 @@
 
 WebInspector.settings.showScriptFolders = false
 *Non*URL*path
+bar.js?file=bar/zzz.js
 block.js?block=foo
+foo.js?file=bar/aaa.js
 ga.js
 jquery-1.5.1.min.js
 jquery.cookie.js
@@ -40,6 +45,9 @@
     top100.jcn?80674
 /_js/production
     motor.js?1308927432
+/foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
 /i
     xgemius.js
 /i/js

Modified: trunk/Source/WebCore/ChangeLog (94066 => 94067)


--- trunk/Source/WebCore/ChangeLog	2011-08-30 10:54:47 UTC (rev 94066)
+++ trunk/Source/WebCore/ChangeLog	2011-08-30 10:57:11 UTC (rev 94067)
@@ -1,5 +1,18 @@
 2011-08-29  Yury Semikhatsky  <[email protected]>
 
+        Web Inspector: wrong script display name when there is a slash in its URL query parameters
+        https://bugs.webkit.org/show_bug.cgi?id=67120
+
+        Fixed folder name computation in ScriptsPanel. Now search query is ignored
+        when searching for the script folder name.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL):
+
+2011-08-29  Yury Semikhatsky  <[email protected]>
+
         Return value of window.onerror has inverted semantics
         https://bugs.webkit.org/show_bug.cgi?id=67119
 

Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (94066 => 94067)


--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js	2011-08-30 10:54:47 UTC (rev 94066)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js	2011-08-30 10:57:11 UTC (rev 94067)
@@ -351,7 +351,11 @@
         var folderName = "";
         var displayName = url;
 
-        var fromIndex = displayName.lastIndexOf("/", displayName.length - 2);
+        var pathLength = displayName.indexOf("?");
+        if (pathLength === -1)
+            pathLength = displayName.length;
+
+        var fromIndex = displayName.lastIndexOf("/", pathLength - 2);
         if (fromIndex !== -1) {
             folderName = displayName.substring(0, fromIndex);
             displayName = displayName.substring(fromIndex + 1);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to