[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

chang.shu at nokia.com chang.shu at nokia.com
Thu Apr 8 02:19:18 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 80e3f9a6a3ebf1ba2bc60f66614bf7714991e84c
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 11 03:23:18 2010 +0000

    2010-03-10  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Darin Adler.
    
            While calculating alpha channel, convert the floating point value to
            an integer in [0, 256) with equal distribution.
            https://bugs.webkit.org/show_bug.cgi?id=22150
    
            * css/CSSParser.cpp:
            (WebCore::CSSParser::parseColorParameters):
    
    2010-03-10  Chang Shu  <chang.shu at nokia.com>
    
            Reviewed by Darin Adler.
    
            While calculating alpha channel, convert the floating point value to
            an integer in [0, 256) with equal distribution.
            Updated test results based on this new behavior.
            https://bugs.webkit.org/show_bug.cgi?id=22150
    
            * fast/canvas/canvas-alphaImageData-behavior-expected.txt:
            * fast/canvas/canvas-alphaImageData-behavior.js:
            * platform/qt/Skipped:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55827 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 09cb526..c6a80ed 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-10  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        While calculating alpha channel, convert the floating point value to
+        an integer in [0, 256) with equal distribution.
+        Updated test results based on this new behavior.
+        https://bugs.webkit.org/show_bug.cgi?id=22150
+
+        * fast/canvas/canvas-alphaImageData-behavior-expected.txt:
+        * fast/canvas/canvas-alphaImageData-behavior.js:
+        * platform/qt/Skipped:
+
 2010-03-10  Adam Barth  <abarth at webkit.org>
 
         Unreviewed.
diff --git a/LayoutTests/fast/canvas/canvas-alphaImageData-behavior-expected.txt b/LayoutTests/fast/canvas/canvas-alphaImageData-behavior-expected.txt
index ec89a31..5574fc0 100644
--- a/LayoutTests/fast/canvas/canvas-alphaImageData-behavior-expected.txt
+++ b/LayoutTests/fast/canvas/canvas-alphaImageData-behavior-expected.txt
@@ -6,11 +6,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 PASS imgdata[4] is 0
 PASS imgdata[5] is 255
 PASS imgdata[6] is 0
-PASS imgdata[7] is 253
+PASS imgdata[7] is 254
 PASS imgdata[4] is 0
 PASS imgdata[5] is 255
 PASS imgdata[6] is 0
-PASS imgdata[7] is 253
+PASS imgdata[7] is 254
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/canvas/canvas-alphaImageData-behavior.js b/LayoutTests/fast/canvas/canvas-alphaImageData-behavior.js
index d56c653..148c1ee 100644
--- a/LayoutTests/fast/canvas/canvas-alphaImageData-behavior.js
+++ b/LayoutTests/fast/canvas/canvas-alphaImageData-behavior.js
@@ -9,7 +9,7 @@ var imgdata = imageData.data;
 shouldBe("imgdata[4]", "0");
 shouldBe("imgdata[5]", "255");
 shouldBe("imgdata[6]", "0");
-shouldBe("imgdata[7]", "253");
+shouldBe("imgdata[7]", "254");
 
 ctx.putImageData(imageData, 0, 0);
 
@@ -18,6 +18,6 @@ imgdata = ctx.getImageData(0, 0, 200, 200).data;
 shouldBe("imgdata[4]", "0");
 shouldBe("imgdata[5]", "255");
 shouldBe("imgdata[6]", "0");
-shouldBe("imgdata[7]", "253");
+shouldBe("imgdata[7]", "254");
 
 var successfullyParsed = true;
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index f503c2b..f717c15 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -143,7 +143,6 @@ fast/workers/shared-worker-frame-lifecycle.html
 # ------- works on 64 bit but not on 32 bit
 svg/custom/path-getTotalLength.svg
 svg/custom/glyph-setting-d-attribute.svg
-fast/canvas/canvas-getImageData.html
 
 # ------- crashes
 fast/text/find-hidden-text.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bd07020..42829dd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-10  Chang Shu  <chang.shu at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        While calculating alpha channel, convert the floating point value to
+        an integer in [0, 256) with equal distribution.
+        https://bugs.webkit.org/show_bug.cgi?id=22150
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseColorParameters):
+
 2010-03-10  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Darin Adler, Geoffrey Garen, Maciej Stachowiak.
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index f9388f1..69cade9 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -3591,7 +3591,9 @@ bool CSSParser::parseColorParameters(CSSParserValue* value, int* colorArray, boo
         v = args->next();
         if (!validUnit(v, FNumber, true))
             return false;
-        colorArray[3] = static_cast<int>(max(0.0, min(1.0, v->fValue)) * 255);
+        // Convert the floating pointer number of alpha to an integer in the range [0, 256),
+        // with an equal distribution across all 256 values.
+        colorArray[3] = static_cast<int>(max(0.0, min(1.0, v->fValue)) * nextafter(256.0, 0.0));
     }
     return true;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list