[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
apavlov at chromium.org
apavlov at chromium.org
Sun Feb 20 23:58:58 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit f46837c8cd5de7cce69eaefb3b7de531ec140259
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 27 12:54:33 2011 +0000
2011-01-27 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
https://bugs.webkit.org/show_bug.cgi?id=53171
WebCore:
* inspector/front-end/inspector.js:
(WebInspector.completeURL): Taught to understand partial href's that start with "?" (contain GET parameters only)
LayoutTests:
* inspector/styles-url-linkify-expected.txt:
* inspector/styles-url-linkify.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f962dd0..7accf7f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-27 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
+ https://bugs.webkit.org/show_bug.cgi?id=53171
+
+ * inspector/styles-url-linkify-expected.txt:
+ * inspector/styles-url-linkify.html:
+
2011-01-27 Sergio Villar Senin <svillar at igalia.com>
Unreviewed.
diff --git a/LayoutTests/inspector/styles-url-linkify-expected.txt b/LayoutTests/inspector/styles-url-linkify-expected.txt
index 66692d8..5625cee 100755
--- a/LayoutTests/inspector/styles-url-linkify-expected.txt
+++ b/LayoutTests/inspector/styles-url-linkify-expected.txt
@@ -1,6 +1,17 @@
-Tests that the Styles sidebar pane URLs are linked correctly. Bug 51663
+Tests that URLs are linked to and completed correctly. Bugs 51663, 53171
+Partial URLs completed:
+http://example.com/
+http://example.com/moo
+https://secure.com/moo
+https://secure.com/moo
+http://example.com/moo
+http://example.com/foo/zoo/moo
+http://example.com/foo/boo/moo
+http://example.com/moo
+http://example.com/foo?a=b
+http://example.com/foo?a=b
Link for a URI from CSS document:
LayoutTests/inspector/resources/fromcss.png
Link for a URI from iframe inline stylesheet:
diff --git a/LayoutTests/inspector/styles-url-linkify.html b/LayoutTests/inspector/styles-url-linkify.html
index 3bc7acd..fe67177 100755
--- a/LayoutTests/inspector/styles-url-linkify.html
+++ b/LayoutTests/inspector/styles-url-linkify.html
@@ -46,8 +46,29 @@ function test()
InspectorTest.selectElementAndRun("local", executeLocalTest);
}
+ function completeURL(baseURL, href)
+ {
+ InspectorTest.addResult(WebInspector.completeURL(baseURL, href));
+ }
+
+ function completeURLTest()
+ {
+ InspectorTest.addResult("Partial URLs completed:");
+ completeURL("http://example.com", "/");
+ completeURL("http://example.com", "moo");
+ completeURL("http://example.com/", "https://secure.com/moo");
+ completeURL("https://example.com/foo", "//secure.com/moo");
+ completeURL("http://example.com/foo/zoo", "/moo");
+ completeURL("http://example.com/foo/zoo/", "moo");
+ completeURL("http://example.com/foo/zoo", "boo/moo");
+ completeURL("http://example.com/foo", "moo");
+ completeURL("http://example.com/foo", "?a=b");
+ completeURL("http://example.com/foo?c=d", "?a=b");
+ }
+
function executeLocalTest()
{
+ completeURLTest();
InspectorTest.addResult("Link for a URI from CSS document:");
dumpHref();
InspectorTest.selectElementAndRun("iframed", executeIframedTest);
@@ -67,7 +88,7 @@ function test()
</head>
<body onload="runAfterIframeLoaded()">
<p>
-Tests that the Styles sidebar pane URLs are linked correctly. <a href="http://bugs.webkit.org/show_bug.cgi?id=51663">Bug 51663</a>
+Tests that URLs are linked to and completed correctly. Bugs <a href="http://bugs.webkit.org/show_bug.cgi?id=51663">51663</a>, <a href="http://bugs.webkit.org/show_bug.cgi?id=53171">53171</a>
</p>
<div id="local"></div>
<iframe src="resources/styles-url-linkify-iframe.html"></iframe>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index e17d002..f0ba477 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-27 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
+ https://bugs.webkit.org/show_bug.cgi?id=53171
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.completeURL): Taught to understand partial href's that start with "?" (contain GET parameters only)
+
2011-01-27 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/Source/WebCore/inspector/front-end/inspector.js b/Source/WebCore/inspector/front-end/inspector.js
index 0fa4209..344caea 100644
--- a/Source/WebCore/inspector/front-end/inspector.js
+++ b/Source/WebCore/inspector/front-end/inspector.js
@@ -1515,7 +1515,19 @@ WebInspector.completeURL = function(baseURL, href)
var path = href;
if (path.charAt(0) !== "/") {
var basePath = parsedURL.path;
- path = basePath.substring(0, basePath.lastIndexOf("/")) + "/" + path;
+ // A href of "?foo=bar" implies "basePath?foo=bar".
+ // With "basePath?a=b" and "?foo=bar" we should get "basePath?foo=bar".
+ var prefix;
+ if (path.charAt(0) === "?") {
+ var basePathCutIndex = basePath.indexOf("?");
+ if (basePathCutIndex !== -1)
+ prefix = basePath.substring(0, basePathCutIndex);
+ else
+ prefix = basePath;
+ } else
+ prefix = basePath.substring(0, basePath.lastIndexOf("/")) + "/";
+
+ path = prefix + path;
} else if (path.length > 1 && path.charAt(1) === "/") {
// href starts with "//" which is a full URL with the protocol dropped (use the baseURL protocol).
return parsedURL.scheme + ":" + path;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list