Title: [98293] trunk
Revision
98293
Author
timothy_hor...@apple.com
Date
2011-10-24 15:56:01 -0700 (Mon, 24 Oct 2011)

Log Message

feColorMatrix doesn't use the correct default "matrix" type when no type attribute is specified
https://bugs.webkit.org/show_bug.cgi?id=70035
<rdar://problem/10280177>

Reviewed by Nikolas Zimmermann.

Make feColorMatrix's type attribute be "matrix" by default.

Test: svg/filters/feColorMatrix-default-type.svg

* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (98292 => 98293)


--- trunk/LayoutTests/ChangeLog	2011-10-24 22:51:51 UTC (rev 98292)
+++ trunk/LayoutTests/ChangeLog	2011-10-24 22:56:01 UTC (rev 98293)
@@ -1,3 +1,17 @@
+2011-10-24  Tim Horton  <timothy_hor...@apple.com>
+
+        feColorMatrix doesn't use the correct default "matrix" type when no type attribute is specified
+        https://bugs.webkit.org/show_bug.cgi?id=70035
+        <rdar://problem/10280177>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add a test that ensures that feColorMatrix's type attribute defaults to "matrix".
+
+        * platform/mac/svg/filters/feColorMatrix-default-type-expected.png: Added.
+        * platform/mac/svg/filters/feColorMatrix-default-type-expected.txt: Added.
+        * svg/filters/feColorMatrix-default-type.svg: Added.
+
 2011-10-24  Levi Weintraub  <le...@chromium.org>
 
         Adding Chromium expectations from http://trac.webkit.org/changeset/98263

Added: trunk/LayoutTests/platform/mac/svg/filters/feColorMatrix-default-type-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/svg/filters/feColorMatrix-default-type-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/platform/mac/svg/filters/feColorMatrix-default-type-expected.txt (0 => 98293)


--- trunk/LayoutTests/platform/mac/svg/filters/feColorMatrix-default-type-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/svg/filters/feColorMatrix-default-type-expected.txt	2011-10-24 22:56:01 UTC (rev 98293)
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 230x111
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceFilter {filter} [id="filt"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feColorMatrix type="MATRIX" values="0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00"]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="filt2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feColorMatrix type="MATRIX" values="0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00"]
+          [SourceGraphic]
+    RenderSVGPath {rect} at (0,0) size 111x111 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+      [filter="filt"] RenderSVGResourceFilter {filter} at (-10,-10) size 120x120
+    RenderSVGPath {rect} at (110,0) size 120x111 [fill={[type=SOLID] [color=#FF0000]}] [x=120.00] [y=0.00] [width=100.00] [height=100.00]
+      [filter="filt2"] RenderSVGResourceFilter {filter} at (110,-10) size 120x120

Added: trunk/LayoutTests/svg/filters/feColorMatrix-default-type.svg (0 => 98293)


--- trunk/LayoutTests/svg/filters/feColorMatrix-default-type.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/filters/feColorMatrix-default-type.svg	2011-10-24 22:56:01 UTC (rev 98293)
@@ -0,0 +1,19 @@
+<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
+    <title>There should be two green squares.</title>
+    <defs>
+        <filter id="filt">
+            <feColorMatrix values="0 0 0 0 0
+                                   1 0 0 0 0
+                                   0 0 0 0 0
+                                   0 0 0 1 0" />
+        </filter>
+        <filter id="filt2">
+            <feColorMatrix type="matrix" values="0 0 0 0 0
+                                                 1 0 0 0 0
+                                                 0 0 0 0 0
+                                                 0 0 0 1 0" />
+        </filter>
+    </defs>
+    <rect x="0" y="0" width="100" height="100" fill="red" filter="url(#filt)"/>
+    <rect x="120" y="0" width="100" height="100" fill="red" filter="url(#filt2)"/>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (98292 => 98293)


--- trunk/Source/WebCore/ChangeLog	2011-10-24 22:51:51 UTC (rev 98292)
+++ trunk/Source/WebCore/ChangeLog	2011-10-24 22:56:01 UTC (rev 98293)
@@ -1,3 +1,18 @@
+2011-10-24  Tim Horton  <timothy_hor...@apple.com>
+
+        feColorMatrix doesn't use the correct default "matrix" type when no type attribute is specified
+        https://bugs.webkit.org/show_bug.cgi?id=70035
+        <rdar://problem/10280177>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Make feColorMatrix's type attribute be "matrix" by default.
+
+        Test: svg/filters/feColorMatrix-default-type.svg
+
+        * svg/SVGFEColorMatrixElement.cpp:
+        (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
+
 2011-10-24  Joshua Bell  <jsb...@chromium.org>
 
         Unbreak binding generation tests

Modified: trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp (98292 => 98293)


--- trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp	2011-10-24 22:51:51 UTC (rev 98292)
+++ trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp	2011-10-24 22:56:01 UTC (rev 98293)
@@ -45,7 +45,7 @@
 
 inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_type(FECOLORMATRIX_TYPE_UNKNOWN)
+    , m_type(FECOLORMATRIX_TYPE_MATRIX)
 {
     ASSERT(hasTagName(SVGNames::feColorMatrixTag));
     registerAnimatedPropertiesForSVGFEColorMatrixElement();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to