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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 18:35:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f2befe9f405ba7b880a5726d5a1040c61a37e93f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 11:02:56 2010 +0000

    2010-12-14  Pieter Senster  <psenster at google.com>
    
            Reviewed by Dirk Schulze.
    
            Test that the channel offsets in the ColorMatrix filter are correctly incorporated
            https://bugs.webkit.org/show_bug.cgi?id=50682
    
            * platform/mac/svg/filters/feColorMatrix-offset-expected.checksum: Added.
            * platform/mac/svg/filters/feColorMatrix-offset-expected.png: Added.
            * platform/mac/svg/filters/feColorMatrix-offset-expected.txt: Added.
            * svg/filters/feColorMatrix-offset.svg: Added.
    2010-12-14  Pieter Senster  <psenster at google.com>
    
            Reviewed by Dirk Schulze.
    
            Incorporate the channel offsets from the ColorMatrix filter in the filter calculation
            https://bugs.webkit.org/show_bug.cgi?id=50682
    
            Test: svg/filters/feColorMatrix-offset.svg
    
            * platform/graphics/filters/FEColorMatrix.cpp:
            (WebCore::matrix):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 820b064..a8c920a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-14  Pieter Senster  <psenster at google.com>
+
+        Reviewed by Dirk Schulze.
+
+        Test that the channel offsets in the ColorMatrix filter are correctly incorporated
+        https://bugs.webkit.org/show_bug.cgi?id=50682
+
+        * platform/mac/svg/filters/feColorMatrix-offset-expected.checksum: Added.
+        * platform/mac/svg/filters/feColorMatrix-offset-expected.png: Added.
+        * platform/mac/svg/filters/feColorMatrix-offset-expected.txt: Added.
+        * svg/filters/feColorMatrix-offset.svg: Added.
+
 2010-12-13  Dan Bernstein  <mitz at apple.com>
 
         Updated Leopard-specific results after r73993.
diff --git a/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.checksum b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.checksum
new file mode 100644
index 0000000..2bf5d43
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.checksum
@@ -0,0 +1 @@
+c29b69e69fa294cf43b53df844b458a0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png
new file mode 100644
index 0000000..0ef27d4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.txt b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.txt
new file mode 100644
index 0000000..0f075f0
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/filters/feColorMatrix-offset-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 400x400
+  RenderSVGRoot {svg} at (5,5) size 180x60
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceFilter {filter} [id="offset1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feColorMatrix type="MATRIX" values="1.00 0.00 0.00 0.00 0.20 0.00 1.00 0.00 0.00 0.20 0.00 0.00 1.00 0.00 0.50 0.00 0.00 0.00 1.00 0.00"]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="offset2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feColorMatrix type="MATRIX" values="1.00 0.00 0.00 0.00 -0.80 0.00 1.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 -1.00 0.00 0.00 0.00 1.00 0.00"]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="offset3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feColorMatrix type="MATRIX" values="0.00 0.00 0.00 0.00 0.50 0.00 0.30 0.00 0.00 0.40 0.00 0.00 1.00 0.00 -0.50 0.00 0.00 0.00 0.20 0.50"]
+          [SourceGraphic]
+    RenderSVGPath {rect} at (5,5) size 60x60 [fill={[type=SOLID] [color=#000000]}] [x=10.00] [y=10.00] [width=50.00] [height=50.00]
+      [filter="offset1"] RenderSVGResourceFilter {filter} at (5,5) size 60x60
+    RenderSVGPath {rect} at (65,5) size 60x60 [fill={[type=SOLID] [color=#FFFFFF]}] [x=70.00] [y=10.00] [width=50.00] [height=50.00]
+      [filter="offset2"] RenderSVGResourceFilter {filter} at (65,5) size 60x60
+    RenderSVGPath {rect} at (125,5) size 60x60 [fill={[type=SOLID] [color=#FFFFFF]}] [x=130.00] [y=10.00] [width=50.00] [height=50.00]
+      [filter="offset3"] RenderSVGResourceFilter {filter} at (125,5) size 60x60
diff --git a/LayoutTests/svg/filters/feColorMatrix-offset.svg b/LayoutTests/svg/filters/feColorMatrix-offset.svg
new file mode 100755
index 0000000..fdd780f
--- /dev/null
+++ b/LayoutTests/svg/filters/feColorMatrix-offset.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" standalone="no"?> 
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 
+<svg width="400" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> 
+<defs> 
+<filter id="offset1"> 
+<feColorMatrix type="matrix" values="1 0 0 0 0.2   0 1 0 0 0.2   0 0 1 0 0.5   0 0 0 1 0"/>
+</filter> 
+<filter id="offset2"> 
+<feColorMatrix type="matrix" values="1 0 0 0 -0.8   0 1 0 0 0   0 0 1 0 -1   0 0 0 1 0"/>
+</filter> 
+<filter id="offset3"> 
+<feColorMatrix type="matrix" values="0 0 0 0 0.5   0 0.3 0 0 0.4   0 0 1 0 -0.5   0 0 0 0.2 0.5"/>
+</filter>
+</defs> 
+<rect x="10" y="10" width="50" height="50" filter="url(#offset1)" />
+<rect x="70" y="10" width="50" height="50" fill="white" filter="url(#offset2)" />
+<rect x="130" y="10" width="50" height="50" fill="white" filter="url(#offset3)" />
+</svg> 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 50f243a..609a9e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-14  Pieter Senster  <psenster at google.com>
+
+        Reviewed by Dirk Schulze.
+
+        Incorporate the channel offsets from the ColorMatrix filter in the filter calculation
+        https://bugs.webkit.org/show_bug.cgi?id=50682
+
+        Test: svg/filters/feColorMatrix-offset.svg
+
+        * platform/graphics/filters/FEColorMatrix.cpp:
+        (WebCore::matrix):
+
 2010-12-14  Jarred Nicholls  <jarred at sencha.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/filters/FEColorMatrix.cpp b/WebCore/platform/graphics/filters/FEColorMatrix.cpp
index 38246cf..d316dfb 100644
--- a/WebCore/platform/graphics/filters/FEColorMatrix.cpp
+++ b/WebCore/platform/graphics/filters/FEColorMatrix.cpp
@@ -67,10 +67,10 @@ void FEColorMatrix::setValues(const Vector<float> &values)
 
 inline void matrix(double& red, double& green, double& blue, double& alpha, const Vector<float>& values)
 {
-    double r = values[0]  * red + values[1]  * green + values[2]  * blue + values[3]  * alpha;
-    double g = values[5]  * red + values[6]  * green + values[7]  * blue + values[8]  * alpha;
-    double b = values[10]  * red + values[11]  * green + values[12] * blue + values[13] * alpha;
-    double a = values[15] * red + values[16] * green + values[17] * blue + values[18] * alpha;
+    double r = values[0]  * red + values[1]  * green + values[2]  * blue + values[3]  * alpha + values[4] * 255;
+    double g = values[5]  * red + values[6]  * green + values[7]  * blue + values[8]  * alpha + values[9] * 255;
+    double b = values[10]  * red + values[11]  * green + values[12] * blue + values[13] * alpha + values[14] * 255;
+    double a = values[15] * red + values[16] * green + values[17] * blue + values[18] * alpha + values[19] * 255;
 
     red = r;
     green = g;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list