[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

mitz at apple.com mitz at apple.com
Thu Oct 29 20:51:21 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 2c19cc38f876fe00468dc58a2ac190a7cbc834f9
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 24 22:16:30 2009 +0000

    Missing images at 350.org due to wrong URLs
    https://bugs.webkit.org/show_bug.cgi?id=30748
    
    Reviewed by Sam Weinig.
    
    WebCore:
    
    Test: fast/dom/HTMLImageElement/parse-src.html
    
    * dom/Element.cpp:
    (WebCore::Element::getURLAttribute): Pass the attribute value through deprecateParseURL().
    This matches what the Objective-C bindings do, as well as what HTMLImageLoader::sourceURI()
    and SVGImageLoader::sourceURI() do.
    
    LayoutTests:
    
    * fast/dom/HTMLImageElement/parse-src-expected.txt: Added.
    * fast/dom/HTMLImageElement/parse-src.html: Added.
    * fast/dom/HTMLImageElement/script-tests: Added.
    * fast/dom/HTMLImageElement/script-tests/TEMPLATE.html: Copied from LayoutTests/fast/dom/Document/script-tests/TEMPLATE.html.
    * fast/dom/HTMLImageElement/script-tests/parse-src.js: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 132e45a..f00cbdf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-24  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Missing images at 350.org due to wrong URLs
+        https://bugs.webkit.org/show_bug.cgi?id=30748
+
+        * fast/dom/HTMLImageElement/parse-src-expected.txt: Added.
+        * fast/dom/HTMLImageElement/parse-src.html: Added.
+        * fast/dom/HTMLImageElement/script-tests: Added.
+        * fast/dom/HTMLImageElement/script-tests/TEMPLATE.html: Copied from LayoutTests/fast/dom/Document/script-tests/TEMPLATE.html.
+        * fast/dom/HTMLImageElement/script-tests/parse-src.js: Added.
+
 2009-10-23  Chris Evans  <cevans at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/dom/HTMLImageElement/parse-src-expected.txt b/LayoutTests/fast/dom/HTMLImageElement/parse-src-expected.txt
new file mode 100644
index 0000000..8e16b9f
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/parse-src-expected.txt
@@ -0,0 +1,18 @@
+Test that when using the JavaScript bindings to get the value of a URL attribute such as 'src', leading whitespace is ignored
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testURL("src", url) is url
+PASS testURL("src", "\n" + url) is url
+PASS testURL("src", " " + url) is url
+PASS testURL("lowsrc", url) is url
+PASS testURL("lowsrc", "\n" + url) is url
+PASS testURL("lowsrc", " " + url) is url
+PASS testURL("longDesc", url) is url
+PASS testURL("longDesc", "\n" + url) is url
+PASS testURL("longDesc", " " + url) is url
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLImageElement/parse-src.html b/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
new file mode 100644
index 0000000..ea139e3
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/parse-src.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/backgrounds/repeat/script-tests/TEMPLATE.html b/LayoutTests/fast/dom/HTMLImageElement/script-tests/TEMPLATE.html
similarity index 100%
copy from LayoutTests/fast/backgrounds/repeat/script-tests/TEMPLATE.html
copy to LayoutTests/fast/dom/HTMLImageElement/script-tests/TEMPLATE.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/script-tests/parse-src.js b/LayoutTests/fast/dom/HTMLImageElement/script-tests/parse-src.js
new file mode 100644
index 0000000..3892547
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/script-tests/parse-src.js
@@ -0,0 +1,25 @@
+description('Test that when using the JavaScript bindings to get the value of a URL attribute such \
+    as \'src\', leading whitespace is ignored');
+
+function testURL(attribute, url)
+{
+    img[attribute] = url;
+    return img[attribute];
+}
+
+var img = new Image();
+var url = "about:blank";
+
+shouldBe('testURL("src", url)', 'url');
+shouldBe('testURL("src", "\\n" + url)', 'url');
+shouldBe('testURL("src", " " + url)', 'url');
+
+shouldBe('testURL("lowsrc", url)', 'url');
+shouldBe('testURL("lowsrc", "\\n" + url)', 'url');
+shouldBe('testURL("lowsrc", " " + url)', 'url');
+
+shouldBe('testURL("longDesc", url)', 'url');
+shouldBe('testURL("longDesc", "\\n" + url)', 'url');
+shouldBe('testURL("longDesc", " " + url)', 'url');
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e4df55f..edcf6d0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-24  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Missing images at 350.org due to wrong URLs
+        https://bugs.webkit.org/show_bug.cgi?id=30748
+
+        Test: fast/dom/HTMLImageElement/parse-src.html
+
+        * dom/Element.cpp:
+        (WebCore::Element::getURLAttribute): Pass the attribute value through deprecateParseURL().
+        This matches what the Objective-C bindings do, as well as what HTMLImageLoader::sourceURI()
+        and SVGImageLoader::sourceURI() do.
+
 2009-10-24  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Unreviewed.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index 621c63a..9edde25 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -1414,7 +1414,7 @@ KURL Element::getURLAttribute(const QualifiedName& name) const
             ASSERT(isURLAttribute(attribute));
     }
 #endif
-    return document()->completeURL(getAttribute(name));
+    return document()->completeURL(deprecatedParseURL(getAttribute(name)));
 }
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list