[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
apavlov at chromium.org
apavlov at chromium.org
Fri Jan 21 14:44:14 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 4a66e9f1c0f8fdfb2a55be310ceb5b0d8a4a58c8
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 28 15:32:33 2010 +0000
2010-12-28 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: REGRESSION: Clicking image resource in style sidebar doesn't actually go to resource anymore
https://bugs.webkit.org/show_bug.cgi?id=51663
* inspector/elements-tests2.js:
(initialize_ElementTest.InspectorTest.dumpSelectedElementStyles): Drive-by: remove bad test exit code.
* inspector/resources/styles-url-linkify-iframe.html: Added.
* inspector/resources/styles-url-linkify.css: Added.
(#local):
* inspector/styles-url-linkify-expected.txt: Added.
* inspector/styles-url-linkify.html: Added.
2010-12-28 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: REGRESSION: Clicking image resource in style sidebar doesn't actually go to resource anymore
https://bugs.webkit.org/show_bug.cgi?id=51663
The base URI is now computed correctly for links from CSS property uri(...) values. Additionally,
optional quotes/apostrophes and spaces are now allowed inside uri(...).
Test: inspector/styles-url-linkify.html
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
(WebInspector.StylePropertyTreeElement.prototype.updateTitle):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4004d77..57d2c7b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-28 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: REGRESSION: Clicking image resource in style sidebar doesn't actually go to resource anymore
+ https://bugs.webkit.org/show_bug.cgi?id=51663
+
+ * inspector/elements-tests2.js:
+ (initialize_ElementTest.InspectorTest.dumpSelectedElementStyles): Drive-by: remove bad test exit code.
+ * inspector/resources/styles-url-linkify-iframe.html: Added.
+ * inspector/resources/styles-url-linkify.css: Added.
+ (#local):
+ * inspector/styles-url-linkify-expected.txt: Added.
+ * inspector/styles-url-linkify.html: Added.
+
2010-12-27 Martin Robinson <mrobinson at igalia.com>
Reviewed by Daniel Bates.
diff --git a/LayoutTests/inspector/elements-tests2.js b/LayoutTests/inspector/elements-tests2.js
index 550882f..f9926e3 100755
--- a/LayoutTests/inspector/elements-tests2.js
+++ b/LayoutTests/inspector/elements-tests2.js
@@ -43,8 +43,6 @@ InspectorTest.selectElementAndRun = function(idValue, callback)
InspectorTest.dumpSelectedElementStyles = function()
{
- InspectorTest.addResult("Debugger was enabled.");
- InspectorTest.completeTest();
InspectorTest.addResults(InspectorTest.getSelectedElementStyles(false));
};
diff --git a/LayoutTests/inspector/resources/styles-url-linkify-iframe.html b/LayoutTests/inspector/resources/styles-url-linkify-iframe.html
new file mode 100755
index 0000000..0858e4d
--- /dev/null
+++ b/LayoutTests/inspector/resources/styles-url-linkify-iframe.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<style>
+#iframed {
+ background-image: url( iframed.png );
+}
+</style>
+<script>
+function iframeOnload()
+{
+ window.parent.iframeLoaded = true;
+}
+</script>
+</head>
+
+<body onload="iframeOnload()">
+<div id="iframed"></div>
+</body>
+
+</html>
diff --git a/LayoutTests/inspector/resources/styles-url-linkify.css b/LayoutTests/inspector/resources/styles-url-linkify.css
new file mode 100755
index 0000000..fbce6b5
--- /dev/null
+++ b/LayoutTests/inspector/resources/styles-url-linkify.css
@@ -0,0 +1,3 @@
+#local {
+ background-image: url( 'fromcss.png' );
+}
diff --git a/LayoutTests/inspector/styles-url-linkify-expected.txt b/LayoutTests/inspector/styles-url-linkify-expected.txt
new file mode 100755
index 0000000..66692d8
--- /dev/null
+++ b/LayoutTests/inspector/styles-url-linkify-expected.txt
@@ -0,0 +1,8 @@
+Tests that the Styles sidebar pane URLs are linked correctly. Bug 51663
+
+
+Link for a URI from CSS document:
+LayoutTests/inspector/resources/fromcss.png
+Link for a URI from iframe inline stylesheet:
+LayoutTests/inspector/resources/iframed.png
+
diff --git a/LayoutTests/inspector/styles-url-linkify.html b/LayoutTests/inspector/styles-url-linkify.html
new file mode 100755
index 0000000..af7ad6d
--- /dev/null
+++ b/LayoutTests/inspector/styles-url-linkify.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+<script src="../http/tests/inspector/inspector-test.js"></script>
+<script src="../http/tests/inspector/inspector-test2.js"></script>
+<script src="elements-tests2.js"></script>
+<link rel="stylesheet" href="resources/styles-url-linkify.css">
+<script>
+
+function runAfterIframeLoaded()
+{
+ function step()
+ {
+ if (!window.iframeLoaded)
+ setTimeout(step, 100);
+ else
+ runTest();
+ }
+ setTimeout(step, 100);
+}
+
+function test()
+{
+ function dumpHref()
+ {
+ var href = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2].propertiesTreeOutline.children[0].valueElement.childNodes[2].href;
+ var segments = href.split("/");
+ var output = [];
+ for (var i = segments.length - 1, minSegment = i - 3; i >= 0 && i >= minSegment; --i)
+ output.unshift(segments[i]);
+ InspectorTest.addResult(output.join("/"));
+ }
+
+ function selectLocalElement()
+ {
+ InspectorTest.selectElementAndRun("local", executeLocalTest);
+ }
+
+ function executeLocalTest()
+ {
+ InspectorTest.addResult("Link for a URI from CSS document:");
+ dumpHref();
+ InspectorTest.selectElementAndRun("iframed", executeIframedTest);
+ }
+
+ function executeIframedTest()
+ {
+ InspectorTest.addResult("Link for a URI from iframe inline stylesheet:");
+ dumpHref();
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.expandDOMSubtreeAndRun(null, selectLocalElement);
+}
+
+</script>
+</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>
+</p>
+<div id="local"></div>
+<iframe src="resources/styles-url-linkify-iframe.html"></iframe>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b72422d..c087ad6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-28 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: REGRESSION: Clicking image resource in style sidebar doesn't actually go to resource anymore
+ https://bugs.webkit.org/show_bug.cgi?id=51663
+
+ The base URI is now computed correctly for links from CSS property uri(...) values. Additionally,
+ optional quotes/apostrophes and spaces are now allowed inside uri(...).
+
+ Test: inspector/styles-url-linkify.html
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
+ (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
+
2010-12-21 Ilya Tikhonovsky <loislo at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 75611a3..0bc941c 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -1236,6 +1236,8 @@ WebInspector.StylePropertyTreeElement.prototype = {
this.valueElement = valueElement;
if (value) {
+ var self = this;
+
function processValue(regex, processor, nextProcessor, valueText)
{
var container = document.createDocumentFragment();
@@ -1259,10 +1261,19 @@ WebInspector.StylePropertyTreeElement.prototype = {
function linkifyURL(url)
{
+ var hrefUrl = url;
+ var match = hrefUrl.match(/['"]?([^'"]+)/);
+ if (match)
+ hrefUrl = match[1];
var container = document.createDocumentFragment();
container.appendChild(document.createTextNode("url("));
- var hasResource = !!WebInspector.resourceForURL(url);
- container.appendChild(WebInspector.linkifyURLAsNode(url, url, null, hasResource));
+ if (self._styleRule.sourceURL)
+ hrefUrl = WebInspector.completeURL(self._styleRule.sourceURL, hrefUrl);
+ else if (WebInspector.panels.elements.focusedDOMNode)
+ hrefUrl = WebInspector.resourceURLForRelatedNode(WebInspector.panels.elements.focusedDOMNode, hrefUrl);
+ var hasResource = !!WebInspector.resourceForURL(hrefUrl);
+ // FIXME: WebInspector.linkifyURLAsNode() should really use baseURI.
+ container.appendChild(WebInspector.linkifyURLAsNode(hrefUrl, url, null, hasResource));
container.appendChild(document.createTextNode(")"));
return container;
}
@@ -1364,7 +1375,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
var colorRegex = /((?:rgb|hsl)a?\([^)]+\)|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|\b\w+\b(?!-))/g;
var colorProcessor = processValue.bind(window, colorRegex, processColor, null);
- valueElement.appendChild(processValue(/url\(([^)]+)\)/g, linkifyURL, colorProcessor, value));
+ valueElement.appendChild(processValue(/url\(\s*([^)\s]+)\s*\)/g, linkifyURL, colorProcessor, value));
}
this.listItemElement.removeChildren();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list