[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jchaffraix at webkit.org jchaffraix at webkit.org
Wed Dec 22 14:42:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 69f48e06d45f1fd1980bc86d3ac33bd0da242136
Author: jchaffraix at webkit.org <jchaffraix at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 01:22:44 2010 +0000

    WebCore: 'transparent' should be a valid color
    https://bugs.webkit.org/show_bug.cgi?id=45482
    
    Reviewed by Andreas Kling.
    
    Test: svg/animations/svg-animate-color-transparent.svg
    
    Based on previous work by Jan Erik Hanssen  <jhanssen at codeaurora.org>
    
    * platform/ColorData.gperf: Added 'transparent' to the list of colors.
    Added the alpha to all the colors as it was needed to support the new color.
    
    * platform/graphics/Color.cpp:
    (WebCore::Color::Color):
    (WebCore::Color::setNamedColor): Avoid setting the alpha as now it is not
    always 0xFF.
    
    LayoutTests: Test for: 'transparent' should be a valid color
    https://bugs.webkit.org/show_bug.cgi?id=45482
    
    Reviewed by Andreas Kling.
    
    Test that animation works with 'transparent' as they check the validity of the
    color.
    
    * svg/animations/svg-animate-color-transparent-expected.txt: Added.
    * svg/animations/svg-animate-color-transparent.svg: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d4237ac..429fbd4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-17  Julien Chaffraix  <jchaffraix at codeaurora.org>
+
+        Reviewed by Andreas Kling.
+
+        Test for: 'transparent' should be a valid color
+        https://bugs.webkit.org/show_bug.cgi?id=45482
+
+        Test that animation works with 'transparent' as they check the validity of the
+        color.
+
+        * svg/animations/svg-animate-color-transparent-expected.txt: Added.
+        * svg/animations/svg-animate-color-transparent.svg: Added.
+
 2010-10-17  Justin Schuh  <jschuh at chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt b/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt
new file mode 100644
index 0000000..19b859c
--- /dev/null
+++ b/LayoutTests/svg/animations/svg-animate-color-transparent-expected.txt
@@ -0,0 +1,3 @@
+Test for https://bugs.webkit.org/show_bug.cgi?id=45482
+The rectangle above should animate and should see PASSED below.
+PASSED
diff --git a/LayoutTests/svg/animations/svg-animate-color-transparent.svg b/LayoutTests/svg/animations/svg-animate-color-transparent.svg
new file mode 100644
index 0000000..7ee4664
--- /dev/null
+++ b/LayoutTests/svg/animations/svg-animate-color-transparent.svg
@@ -0,0 +1,28 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+    <rect width="100px" height="100px" id="test">
+        <animateColor attributeName="fill"
+             from="transparent" by="red" dur="5s" repeatCount="indefinite" />
+    </rect>
+    <text y="140px">Test for https://bugs.webkit.org/show_bug.cgi?id=45482</text>
+    <text y="160px">The rectangle above should animate and should see PASSED below.</text>
+    <text y="180px" id="console"/>
+    <script><![CDATA[
+        if (window.layoutTestController) {
+            layoutTestController.dumpAsText();
+            layoutTestController.waitUntilDone();
+        }
+
+        function doTest() {
+            var console = document.getElementById("console");
+            // Should not be transparent (initial value) as it would mean that the color is considered invalid.
+            if (document.getElementById("test").style.fill.match(/^#(?!(000000||000)$)/))
+                console.appendChild(document.createTextNode("PASSED"));
+            else
+                console.appendChild(document.createTextNode("FAILED"));
+            if (window.layoutTestController)
+                layoutTestController.notifyDone();
+        }
+
+        window.setTimeout(doTest, 100);
+    ]]></script>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 532e547..a160067 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-17  Julien Chaffraix  <jchaffraix at codeaurora.org>
+
+        Reviewed by Andreas Kling.
+
+        'transparent' should be a valid color
+        https://bugs.webkit.org/show_bug.cgi?id=45482
+
+        Test: svg/animations/svg-animate-color-transparent.svg
+
+        Based on previous work by Jan Erik Hanssen  <jhanssen at codeaurora.org>
+
+        * platform/ColorData.gperf: Added 'transparent' to the list of colors.
+        Added the alpha to all the colors as it was needed to support the new color.
+
+        * platform/graphics/Color.cpp:
+        (WebCore::Color::Color):
+        (WebCore::Color::setNamedColor): Avoid setting the alpha as now it is not
+        always 0xFF.
+
 2010-10-17  Justin Schuh  <jschuh at chromium.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/make-hash-tools.pl b/WebCore/make-hash-tools.pl
index 3ad5ee9..b070829 100644
--- a/WebCore/make-hash-tools.pl
+++ b/WebCore/make-hash-tools.pl
@@ -56,7 +56,7 @@ struct PubIDInfo {
 
 struct NamedColor {
     const char* name;
-    int RGBValue;
+    unsigned ARGBValue;
 };
 
 struct Property {
diff --git a/WebCore/platform/ColorData.gperf b/WebCore/platform/ColorData.gperf
index dd726cc..f83e793 100644
--- a/WebCore/platform/ColorData.gperf
+++ b/WebCore/platform/ColorData.gperf
@@ -10,152 +10,153 @@ struct NamedColor;
 %define hash-function-name colordata_hash_function
 %enum
 %%
-aliceblue, 0xf0f8ff
-antiquewhite, 0xfaebd7
-aqua, 0x00ffff
-aquamarine, 0x7fffd4
-azure, 0xf0ffff
-beige, 0xf5f5dc
-bisque, 0xffe4c4
-black, 0x000000
-blanchedalmond, 0xffebcd
-blue, 0x0000ff
-blueviolet, 0x8a2be2
-brown, 0xa52a2a
-burlywood, 0xdeb887
-cadetblue, 0x5f9ea0
-chartreuse, 0x7fff00
-chocolate, 0xd2691e
-coral, 0xff7f50
-cornflowerblue, 0x6495ed
-cornsilk, 0xfff8dc
-crimson, 0xdc143c
-cyan, 0x00ffff
-darkblue, 0x00008b
-darkcyan, 0x008b8b
-darkgoldenrod, 0xb8860b
-darkgray, 0xa9a9a9
-darkgrey, 0xa9a9a9
-darkgreen, 0x006400
-darkkhaki, 0xbdb76b
-darkmagenta, 0x8b008b
-darkolivegreen, 0x556b2f
-darkorange, 0xff8c00
-darkorchid, 0x9932cc
-darkred, 0x8b0000
-darksalmon, 0xe9967a
-darkseagreen, 0x8fbc8f
-darkslateblue, 0x483d8b
-darkslategray, 0x2f4f4f
-darkslategrey, 0x2f4f4f
-darkturquoise, 0x00ced1
-darkviolet, 0x9400d3
-deeppink, 0xff1493
-deepskyblue, 0x00bfff
-dimgray, 0x696969
-dimgrey, 0x696969
-dodgerblue, 0x1e90ff
-firebrick, 0xb22222
-floralwhite, 0xfffaf0
-forestgreen, 0x228b22
-fuchsia, 0xff00ff
-gainsboro, 0xdcdcdc
-ghostwhite, 0xf8f8ff
-gold, 0xffd700
-goldenrod, 0xdaa520
-gray, 0x808080
-grey, 0x808080
-green, 0x008000
-greenyellow, 0xadff2f
-honeydew, 0xf0fff0
-hotpink, 0xff69b4
-indianred, 0xcd5c5c
-indigo, 0x4b0082
-ivory, 0xfffff0
-khaki, 0xf0e68c
-lavender, 0xe6e6fa
-lavenderblush, 0xfff0f5
-lawngreen, 0x7cfc00
-lemonchiffon, 0xfffacd
-lightblue, 0xadd8e6
-lightcoral, 0xf08080
-lightcyan, 0xe0ffff
-lightgoldenrodyellow, 0xfafad2
-lightgray, 0xd3d3d3
-lightgrey, 0xd3d3d3
-lightgreen, 0x90ee90
-lightpink, 0xffb6c1
-lightsalmon, 0xffa07a
-lightseagreen, 0x20b2aa
-lightskyblue, 0x87cefa
-lightslateblue, 0x8470ff
-lightslategray, 0x778899
-lightslategrey, 0x778899
-lightsteelblue, 0xb0c4de
-lightyellow, 0xffffe0
-lime, 0x00ff00
-limegreen, 0x32cd32
-linen, 0xfaf0e6
-magenta, 0xff00ff
-maroon, 0x800000
-mediumaquamarine, 0x66cdaa
-mediumblue, 0x0000cd
-mediumorchid, 0xba55d3
-mediumpurple, 0x9370d8
-mediumseagreen, 0x3cb371
-mediumslateblue, 0x7b68ee
-mediumspringgreen, 0x00fa9a
-mediumturquoise, 0x48d1cc
-mediumvioletred, 0xc71585
-midnightblue, 0x191970
-mintcream, 0xf5fffa
-mistyrose, 0xffe4e1
-moccasin, 0xffe4b5
-navajowhite, 0xffdead
-navy, 0x000080
-oldlace, 0xfdf5e6
-olive, 0x808000
-olivedrab, 0x6b8e23
-orange, 0xffa500
-orangered, 0xff4500
-orchid, 0xda70d6
-palegoldenrod, 0xeee8aa
-palegreen, 0x98fb98
-paleturquoise, 0xafeeee
-palevioletred, 0xd87093
-papayawhip, 0xffefd5
-peachpuff, 0xffdab9
-peru, 0xcd853f
-pink, 0xffc0cb
-plum, 0xdda0dd
-powderblue, 0xb0e0e6
-purple, 0x800080
-red, 0xff0000
-rosybrown, 0xbc8f8f
-royalblue, 0x4169e1
-saddlebrown, 0x8b4513
-salmon, 0xfa8072
-sandybrown, 0xf4a460
-seagreen, 0x2e8b57
-seashell, 0xfff5ee
-sienna, 0xa0522d
-silver, 0xc0c0c0
-skyblue, 0x87ceeb
-slateblue, 0x6a5acd
-slategray, 0x708090
-slategrey, 0x708090
-snow, 0xfffafa
-springgreen, 0x00ff7f
-steelblue, 0x4682b4
-tan, 0xd2b48c
-teal, 0x008080
-thistle, 0xd8bfd8
-tomato, 0xff6347
-turquoise, 0x40e0d0
-violet, 0xee82ee
-violetred, 0xd02090
-wheat, 0xf5deb3
-white, 0xffffff
-whitesmoke, 0xf5f5f5
-yellow, 0xffff00
-yellowgreen, 0x9acd32
+aliceblue, 0xfff0f8ff
+antiquewhite, 0xfffaebd7
+aqua, 0xff00ffff
+aquamarine, 0xff7fffd4
+azure, 0xfff0ffff
+beige, 0xfff5f5dc
+bisque, 0xffffe4c4
+black, 0xff000000
+blanchedalmond, 0xffffebcd
+blue, 0xff0000ff
+blueviolet, 0xff8a2be2
+brown, 0xffa52a2a
+burlywood, 0xffdeb887
+cadetblue, 0xff5f9ea0
+chartreuse, 0xff7fff00
+chocolate, 0xffd2691e
+coral, 0xffff7f50
+cornflowerblue, 0xff6495ed
+cornsilk, 0xfffff8dc
+crimson, 0xffdc143c
+cyan, 0xff00ffff
+darkblue, 0xff00008b
+darkcyan, 0xff008b8b
+darkgoldenrod, 0xffb8860b
+darkgray, 0xffa9a9a9
+darkgrey, 0xffa9a9a9
+darkgreen, 0xff006400
+darkkhaki, 0xffbdb76b
+darkmagenta, 0xff8b008b
+darkolivegreen, 0xff556b2f
+darkorange, 0xffff8c00
+darkorchid, 0xff9932cc
+darkred, 0xff8b0000
+darksalmon, 0xffe9967a
+darkseagreen, 0xff8fbc8f
+darkslateblue, 0xff483d8b
+darkslategray, 0xff2f4f4f
+darkslategrey, 0xff2f4f4f
+darkturquoise, 0xff00ced1
+darkviolet, 0xff9400d3
+deeppink, 0xffff1493
+deepskyblue, 0xff00bfff
+dimgray, 0xff696969
+dimgrey, 0xff696969
+dodgerblue, 0xff1e90ff
+firebrick, 0xffb22222
+floralwhite, 0xfffffaf0
+forestgreen, 0xff228b22
+fuchsia, 0xffff00ff
+gainsboro, 0xffdcdcdc
+ghostwhite, 0xfff8f8ff
+gold, 0xffffd700
+goldenrod, 0xffdaa520
+gray, 0xff808080
+grey, 0xff808080
+green, 0xff008000
+greenyellow, 0xffadff2f
+honeydew, 0xfff0fff0
+hotpink, 0xffff69b4
+indianred, 0xffcd5c5c
+indigo, 0xff4b0082
+ivory, 0xfffffff0
+khaki, 0xfff0e68c
+lavender, 0xffe6e6fa
+lavenderblush, 0xfffff0f5
+lawngreen, 0xff7cfc00
+lemonchiffon, 0xfffffacd
+lightblue, 0xffadd8e6
+lightcoral, 0xfff08080
+lightcyan, 0xffe0ffff
+lightgoldenrodyellow, 0xfffafad2
+lightgray, 0xffd3d3d3
+lightgrey, 0xffd3d3d3
+lightgreen, 0xff90ee90
+lightpink, 0xffffb6c1
+lightsalmon, 0xffffa07a
+lightseagreen, 0xff20b2aa
+lightskyblue, 0xff87cefa
+lightslateblue, 0xff8470ff
+lightslategray, 0xff778899
+lightslategrey, 0xff778899
+lightsteelblue, 0xffb0c4de
+lightyellow, 0xffffffe0
+lime, 0xff00ff00
+limegreen, 0xff32cd32
+linen, 0xfffaf0e6
+magenta, 0xffff00ff
+maroon, 0xff800000
+mediumaquamarine, 0xff66cdaa
+mediumblue, 0xff0000cd
+mediumorchid, 0xffba55d3
+mediumpurple, 0xff9370d8
+mediumseagreen, 0xff3cb371
+mediumslateblue, 0xff7b68ee
+mediumspringgreen, 0xff00fa9a
+mediumturquoise, 0xff48d1cc
+mediumvioletred, 0xffc71585
+midnightblue, 0xff191970
+mintcream, 0xfff5fffa
+mistyrose, 0xffffe4e1
+moccasin, 0xffffe4b5
+navajowhite, 0xffffdead
+navy, 0xff000080
+oldlace, 0xfffdf5e6
+olive, 0xff808000
+olivedrab, 0xff6b8e23
+orange, 0xffffa500
+orangered, 0xffff4500
+orchid, 0xffda70d6
+palegoldenrod, 0xffeee8aa
+palegreen, 0xff98fb98
+paleturquoise, 0xffafeeee
+palevioletred, 0xffd87093
+papayawhip, 0xffffefd5
+peachpuff, 0xffffdab9
+peru, 0xffcd853f
+pink, 0xffffc0cb
+plum, 0xffdda0dd
+powderblue, 0xffb0e0e6
+purple, 0xff800080
+red, 0xffff0000
+rosybrown, 0xffbc8f8f
+royalblue, 0xff4169e1
+saddlebrown, 0xff8b4513
+salmon, 0xfffa8072
+sandybrown, 0xfff4a460
+seagreen, 0xff2e8b57
+seashell, 0xfffff5ee
+sienna, 0xffa0522d
+silver, 0xffc0c0c0
+skyblue, 0xff87ceeb
+slateblue, 0xff6a5acd
+slategray, 0xff708090
+slategrey, 0xff708090
+snow, 0xfffffafa
+springgreen, 0xff00ff7f
+steelblue, 0xff4682b4
+tan, 0xffd2b48c
+teal, 0xff008080
+thistle, 0xffd8bfd8
+tomato, 0xffff6347
+transparent, 0x00000000
+turquoise, 0xff40e0d0
+violet, 0xffee82ee
+violetred, 0xffd02090
+wheat, 0xfff5deb3
+white, 0xffffffff
+whitesmoke, 0xfff5f5f5
+yellow, 0xffffff00
+yellowgreen, 0xff9acd32
diff --git a/WebCore/platform/graphics/Color.cpp b/WebCore/platform/graphics/Color.cpp
index f28d51c..fa7346e 100644
--- a/WebCore/platform/graphics/Color.cpp
+++ b/WebCore/platform/graphics/Color.cpp
@@ -175,8 +175,7 @@ Color::Color(const char* name)
         m_valid = parseHexColor(&name[1], m_color);
     else {
         const NamedColor* foundColor = findColor(name, strlen(name));
-        m_color = foundColor ? foundColor->RGBValue : 0;
-        m_color |= 0xFF000000;
+        m_color = foundColor ? foundColor->ARGBValue : 0;
         m_valid = foundColor;
     }
 }
@@ -219,8 +218,7 @@ static inline const NamedColor* findNamedColor(const String& name)
 void Color::setNamedColor(const String& name)
 {
     const NamedColor* foundColor = findNamedColor(name);
-    m_color = foundColor ? foundColor->RGBValue : 0;
-    m_color |= 0xFF000000;
+    m_color = foundColor ? foundColor->ARGBValue : 0;
     m_valid = foundColor;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list