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

zherczeg at webkit.org zherczeg at webkit.org
Wed Dec 22 13:02:59 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5464d5636fc7015596ab2ff7b0007149a0140489
Author: zherczeg at webkit.org <zherczeg at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 6 13:26:29 2010 +0000

    An individual renderer should be assigned to each SVGFE*Element class
    https://bugs.webkit.org/show_bug.cgi?id=43954
    
    Reviewed by Dirk Schulze.
    
    WebCore:
    
    RenderSVGResourceFilterPrimitive renderer is added to
    the project, and assigned to each object, which class is
    derived from SVGFilterPrimitiveStandardAttributes. The patch
    mainly contains build system changes, and it fixes one layout
    test in svg/dynamic-updates.
    
    * Android.mk:
    * CMakeLists.txt:
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * rendering/RenderObject.h:
    (WebCore::RenderObject::isSVGResourceFilterPrimitive):
    * rendering/RenderSVGResourceFilterPrimitive.cpp: Added.
    (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
    * rendering/RenderSVGResourceFilterPrimitive.h: Added.
    (WebCore::RenderSVGResourceFilterPrimitive::isSVGResourceFilterPrimitive):
    * rendering/SVGRenderTreeAsText.cpp:
    (WebCore::writeSVGContainer):
    * svg/SVGFEDiffuseLightingElement.cpp:
    (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
    * svg/SVGFELightElement.cpp:
    (WebCore::SVGFELightElement::svgAttributeChanged):
    (WebCore::SVGFELightElement::childrenChanged):
    * svg/SVGFEOffsetElement.cpp:
    (WebCore::SVGFEOffsetElement::svgAttributeChanged):
    * svg/SVGFilterElement.h:
    * svg/SVGFilterPrimitiveStandardAttributes.cpp:
    (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
    (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
    (WebCore::SVGFilterPrimitiveStandardAttributes::createRenderer):
    * svg/SVGFilterPrimitiveStandardAttributes.h:
    (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
    
    LayoutTests:
    
    The layout test below is fixed by this patch.
    
    * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum:
    * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66823 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2884307..4f0c733 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-06  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Dirk Schulze.
+
+        An individual renderer should be assigned to each SVGFE*Element class
+        https://bugs.webkit.org/show_bug.cgi?id=43954
+
+        The layout test below is fixed by this patch.
+
+        * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum:
+        * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png:
+
 2010-08-26  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Steve Block.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum
index 097ff26..b108a27 100644
--- a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum
+++ b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum
@@ -1 +1 @@
-d53a2e4153d3748984be458e53e813f2
\ No newline at end of file
+b843a316e79ec04f5744a15d667492da
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png
index 34b12ca..dfc805b 100644
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png differ
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 21d1b0d..4097823 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -657,6 +657,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	rendering/RenderSVGResourceClipper.cpp \
 	rendering/RenderSVGResourceContainer.cpp \
 	rendering/RenderSVGResourceFilter.cpp \
+	rendering/RenderSVGResourceFilterPrimitive.cpp \
 	rendering/RenderSVGResourceGradient.cpp \
 	rendering/RenderSVGResourceLinearGradient.cpp \
 	rendering/RenderSVGResourceMarker.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 1d9159f..a933a92 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1615,6 +1615,7 @@ IF (ENABLE_SVG)
         rendering/RenderSVGResourceClipper.cpp
         rendering/RenderSVGResourceContainer.cpp
         rendering/RenderSVGResourceFilter.cpp
+        rendering/RenderSVGResourceFilterPrimitive.cpp
         rendering/RenderSVGResourceGradient.cpp
         rendering/RenderSVGResourceLinearGradient.cpp
         rendering/RenderSVGResourceMarker.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ad6d80a..97e9fa3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,46 @@
+2010-09-06  Zoltan Herczeg  <zherczeg at webkit.org>
+
+        Reviewed by Dirk Schulze.
+
+        An individual renderer should be assigned to each SVGFE*Element class
+        https://bugs.webkit.org/show_bug.cgi?id=43954
+
+        RenderSVGResourceFilterPrimitive renderer is added to
+        the project, and assigned to each object, which class is
+        derived from SVGFilterPrimitiveStandardAttributes. The patch
+        mainly contains build system changes, and it fixes one layout
+        test in svg/dynamic-updates.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isSVGResourceFilterPrimitive):
+        * rendering/RenderSVGResourceFilterPrimitive.cpp: Added.
+        (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive):
+        * rendering/RenderSVGResourceFilterPrimitive.h: Added.
+        (WebCore::RenderSVGResourceFilterPrimitive::isSVGResourceFilterPrimitive):
+        * rendering/SVGRenderTreeAsText.cpp:
+        (WebCore::writeSVGContainer):
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged):
+        * svg/SVGFELightElement.cpp:
+        (WebCore::SVGFELightElement::svgAttributeChanged):
+        (WebCore::SVGFELightElement::childrenChanged):
+        * svg/SVGFEOffsetElement.cpp:
+        (WebCore::SVGFEOffsetElement::svgAttributeChanged):
+        * svg/SVGFilterElement.h:
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::createRenderer):
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
+
 2010-09-06  Gyuyoung Kim  <gyuyoung.kim at samsung.com>
 
         Reviewed by Dirk Schulze.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index d361810..e815dec 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3903,6 +3903,8 @@ webcore_sources += \
 	WebCore/rendering/RenderSVGResourceClipper.h \
 	WebCore/rendering/RenderSVGResourceFilter.cpp \
 	WebCore/rendering/RenderSVGResourceFilter.h \
+	WebCore/rendering/RenderSVGResourceFilterPrimitive.cpp \
+	WebCore/rendering/RenderSVGResourceFilterPrimitive.h \
 	WebCore/rendering/RenderSVGResourceGradient.cpp \
 	WebCore/rendering/RenderSVGResourceGradient.h \
 	WebCore/rendering/RenderSVGResourceLinearGradient.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 3321cbb..4b76a2a 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3462,6 +3462,8 @@
             'rendering/RenderSVGResourceContainer.h',
             'rendering/RenderSVGResourceFilter.cpp',
             'rendering/RenderSVGResourceFilter.h',
+            'rendering/RenderSVGResourceFilterPrimitive.cpp',
+            'rendering/RenderSVGResourceFilterPrimitive.h',
             'rendering/RenderSVGResourceGradient.cpp',
             'rendering/RenderSVGResourceGradient.h',
             'rendering/RenderSVGResourceLinearGradient.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 3f23cdd..688ddde 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1906,6 +1906,7 @@ HEADERS += \
     rendering/RenderSVGResourceClipper.h \
     rendering/RenderSVGResourceContainer.h \
     rendering/RenderSVGResourceFilter.h \ 
+    rendering/RenderSVGResourceFilterPrimitive.h \
     rendering/RenderSVGResourceGradient.h \
     rendering/RenderSVGResourceLinearGradient.h \
     rendering/RenderSVGResourceMarker.h \
@@ -3052,6 +3053,7 @@ contains(DEFINES, ENABLE_SVG=1) {
         rendering/RenderSVGResourceClipper.cpp \
         rendering/RenderSVGResourceContainer.cpp \
         rendering/RenderSVGResourceFilter.cpp \
+        rendering/RenderSVGResourceFilterPrimitive.cpp \
         rendering/RenderSVGResourceGradient.cpp \
         rendering/RenderSVGResourceLinearGradient.cpp \
         rendering/RenderSVGResourceMarker.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index f3e49f5..c931ddc 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -30957,6 +30957,62 @@
 				>
 			</File>
 			<File
+				RelativePath="..\rendering\RenderSVGResourceFilterPrimitive.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Internal|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_All|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\rendering\RenderSVGResourceFilterPrimitive.h"
+				>
+			</File>
+			<File
 				RelativePath="..\rendering\RenderSVGResourceGradient.cpp"
 				>
 				<FileConfiguration
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index c8b88ec..61c2d81 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -324,6 +324,8 @@
 		18F831B80FD48C7800D8C56B /* WorkerLoaderProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 18F831B70FD48C7800D8C56B /* WorkerLoaderProxy.h */; };
 		1921327411C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1921327111C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp */; };
 		1921327511C0E6BB00456238 /* SVGFEConvolveMatrixElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1921327211C0E6BB00456238 /* SVGFEConvolveMatrixElement.h */; };
+		19423B501234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 19423B4E1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.cpp */; };
+		19423B511234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.h in Headers */ = {isa = PBXBuildFile; fileRef = 19423B4F1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.h */; };
 		19BFF64B11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */; };
 		19BFF64C11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 19BFF64711C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm */; };
 		19BFF64D11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */; };
@@ -6136,6 +6138,8 @@
 		1921327111C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEConvolveMatrixElement.cpp; sourceTree = "<group>"; };
 		1921327211C0E6BB00456238 /* SVGFEConvolveMatrixElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEConvolveMatrixElement.h; sourceTree = "<group>"; };
 		1921327311C0E6BB00456238 /* SVGFEConvolveMatrixElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGFEConvolveMatrixElement.idl; sourceTree = "<group>"; };
+		19423B4E1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceFilterPrimitive.cpp; sourceTree = "<group>"; };
+		19423B4F1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceFilterPrimitive.h; sourceTree = "<group>"; };
 		19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEConvolveMatrixElement.h; sourceTree = "<group>"; };
 		19BFF64711C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGFEConvolveMatrixElement.mm; sourceTree = "<group>"; };
 		19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEConvolveMatrixElementInternal.h; sourceTree = "<group>"; };
@@ -17245,6 +17249,8 @@
 				08082372117987C100241DE8 /* RenderSVGResourceContainer.h */,
 				841FDC241178C9BE00F8AC9B /* RenderSVGResourceFilter.cpp */,
 				841FDC251178C9BE00F8AC9B /* RenderSVGResourceFilter.h */,
+				19423B4E1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.cpp */,
+				19423B4F1234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.h */,
 				08C34AF11179C056002D7456 /* RenderSVGResourceGradient.cpp */,
 				08C34AF21179C057002D7456 /* RenderSVGResourceGradient.h */,
 				08C34AF31179C057002D7456 /* RenderSVGResourceLinearGradient.cpp */,
@@ -19723,6 +19729,7 @@
 				84BDA16C11358D2A00DBF64C /* RenderSVGResourceClipper.h in Headers */,
 				08082373117987C100241DE8 /* RenderSVGResourceContainer.h in Headers */,
 				841FDC271178C9BE00F8AC9B /* RenderSVGResourceFilter.h in Headers */,
+				19423B511234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.h in Headers */,
 				08C34AF61179C057002D7456 /* RenderSVGResourceGradient.h in Headers */,
 				08C34AF81179C057002D7456 /* RenderSVGResourceLinearGradient.h in Headers */,
 				8499A515115FB33000F566E3 /* RenderSVGResourceMarker.h in Headers */,
@@ -22277,6 +22284,7 @@
 				84BDA16B11358D2A00DBF64C /* RenderSVGResourceClipper.cpp in Sources */,
 				086A400611F6D6B7002CEC53 /* RenderSVGResourceContainer.cpp in Sources */,
 				841FDC261178C9BE00F8AC9B /* RenderSVGResourceFilter.cpp in Sources */,
+				19423B501234E86B00D1EE9E /* RenderSVGResourceFilterPrimitive.cpp in Sources */,
 				08C34AF51179C057002D7456 /* RenderSVGResourceGradient.cpp in Sources */,
 				08C34AF71179C057002D7456 /* RenderSVGResourceLinearGradient.cpp in Sources */,
 				8499A514115FB33000F566E3 /* RenderSVGResourceMarker.cpp in Sources */,
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index b8aa8a9..c369db8 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -320,6 +320,7 @@ public:
     virtual bool isSVGImage() const { return false; }
     virtual bool isSVGForeignObject() const { return false; }
     virtual bool isSVGResourceContainer() const { return false; }
+    virtual bool isSVGResourceFilterPrimitive() const { return false; }
     virtual bool isSVGShadowTreeRootContainer() const { return false; }
 
     virtual RenderSVGResourceContainer* toRenderSVGResourceContainer();
diff --git a/WebCore/rendering/RenderSVGResourceFilterPrimitive.cpp b/WebCore/rendering/RenderSVGResourceFilterPrimitive.cpp
new file mode 100644
index 0000000..f7381fa
--- /dev/null
+++ b/WebCore/rendering/RenderSVGResourceFilterPrimitive.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 University of Szeged
+ * Copyright (C) 2010 Zoltan Herczeg
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "RenderSVGResourceFilterPrimitive.h"
+
+namespace WebCore {
+
+RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive(SVGFilterPrimitiveStandardAttributes* filterPrimitiveElement)
+    : RenderSVGHiddenContainer(filterPrimitiveElement)
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(FILTERS)
diff --git a/WebCore/rendering/RenderSVGResourceFilterPrimitive.h b/WebCore/rendering/RenderSVGResourceFilterPrimitive.h
new file mode 100644
index 0000000..96e2c5e
--- /dev/null
+++ b/WebCore/rendering/RenderSVGResourceFilterPrimitive.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 University of Szeged
+ * Copyright (C) 2010 Zoltan Herczeg
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RenderSVGResourceFilterPrimitive_h
+#define RenderSVGResourceFilterPrimitive_h
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+
+#include "RenderSVGHiddenContainer.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace WebCore {
+
+class RenderSVGResourceFilterPrimitive : public RenderSVGHiddenContainer {
+public:
+     RenderSVGResourceFilterPrimitive(SVGFilterPrimitiveStandardAttributes* filterPrimitiveElement);
+
+private:
+     virtual bool isSVGResourceFilterPrimitive() const { return true; }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(FILTERS)
+
+#endif // RenderSVGResourceFilterPrimitive_h
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index 0c9b7e1..20d7220 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -676,6 +676,9 @@ void writeSVGResourceContainer(TextStream& ts, const RenderObject& object, int i
 
 void writeSVGContainer(TextStream& ts, const RenderObject& container, int indent)
 {
+    // Currently RenderSVGResourceFilterPrimitive has no meaningful output.
+    if (container.isSVGResourceFilterPrimitive())
+        return;
     writeStandardPrefix(ts, container, indent);
     writePositionAndStyle(ts, container);
     ts << "\n";
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index 8c7e7ed..4349f27 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -75,7 +75,7 @@ void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrN
         || attrName == SVGNames::diffuseConstantAttr
         || attrName == SVGNames::kernelUnitLengthAttr
         || attrName == SVGNames::lighting_colorAttr)
-        SVGFilterElement::invalidateFilter(this);
+        invalidate();
 }
 
 void SVGFEDiffuseLightingElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGFELightElement.cpp b/WebCore/svg/SVGFELightElement.cpp
index dc10cf9..61d7df0 100644
--- a/WebCore/svg/SVGFELightElement.cpp
+++ b/WebCore/svg/SVGFELightElement.cpp
@@ -25,6 +25,7 @@
 #include "SVGFELightElement.h"
 
 #include "Attribute.h"
+#include "RenderSVGResource.h"
 #include "SVGFilterElement.h"
 #include "SVGNames.h"
 
@@ -76,8 +77,13 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
         || attrName == SVGNames::pointsAtYAttr
         || attrName == SVGNames::pointsAtZAttr
         || attrName == SVGNames::specularExponentAttr
-        || attrName == SVGNames::limitingConeAngleAttr)
-        SVGFilterElement::invalidateFilter(this);
+        || attrName == SVGNames::limitingConeAngleAttr) {
+        if (Node* parentNode = parent()) {
+            RenderObject* renderer = parentNode->renderer();
+            if (renderer && renderer->isSVGResourceFilterPrimitive())
+                RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+        }
+    }
 }
 
 void SVGFELightElement::synchronizeProperty(const QualifiedName& attrName)
@@ -124,8 +130,13 @@ void SVGFELightElement::childrenChanged(bool changedByParser, Node* beforeChange
 {
     SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
-    if (!changedByParser)
-        SVGFilterElement::invalidateFilter(this);
+    if (!changedByParser) {
+        if (Node* parentNode = parent()) {
+            RenderObject* renderer = parentNode->renderer();
+            if (renderer && renderer->isSVGResourceFilterPrimitive())
+                RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+        }
+    }
 }
 
 }
diff --git a/WebCore/svg/SVGFEOffsetElement.cpp b/WebCore/svg/SVGFEOffsetElement.cpp
index b27db31..58b4a6a 100644
--- a/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/WebCore/svg/SVGFEOffsetElement.cpp
@@ -57,7 +57,7 @@ void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName)
     if (attrName == SVGNames::inAttr
         || attrName == SVGNames::dxAttr
         || attrName == SVGNames::dyAttr)
-        SVGFilterElement::invalidateFilter(this);
+        invalidate();
 }
 
 void SVGFEOffsetElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index 67d0a47..c228fe7 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -45,22 +45,6 @@ public:
     void setFilterRes(unsigned long filterResX, unsigned long filterResY);
     FloatRect filterBoundingBox(const FloatRect&) const;
 
-    static void invalidateFilter(SVGElement* element)
-    {
-        ASSERT(element);
-        if (!element->inDocument())
-            return;
-        Node* parent = element->parentNode();
-        while (parent && !parent->hasTagName(SVGNames::filterTag))
-            parent = parent->parentNode();
-
-        if (!parent)
-            return;
-
-        if (RenderObject* object = parent->renderer())
-            object->setNeedsLayout(true);
-    }
-
 private:
     SVGFilterElement(const QualifiedName&, Document*);
 
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
index 07d9241..c2c443e 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -26,6 +26,7 @@
 
 #include "Attribute.h"
 #include "FilterEffect.h"
+#include "RenderSVGResourceFilterPrimitive.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGStyledElement.h"
@@ -70,7 +71,7 @@ void SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(const QualifiedNa
         || attrName == SVGNames::widthAttr
         || attrName == SVGNames::heightAttr
         || attrName == SVGNames::resultAttr)
-        SVGFilterElement::invalidateFilter(this);
+        invalidate();
 }
 
 void SVGFilterPrimitiveStandardAttributes::synchronizeProperty(const QualifiedName& attrName)
@@ -103,7 +104,7 @@ void SVGFilterPrimitiveStandardAttributes::childrenChanged(bool changedByParser,
     SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (!changedByParser)
-        SVGFilterElement::invalidateFilter(this);
+        invalidate();
 }
 
 void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(bool primitiveBoundingBoxMode, FilterEffect* filterEffect) const
@@ -136,6 +137,11 @@ void SVGFilterPrimitiveStandardAttributes::setStandardAttributes(bool primitiveB
     filterEffect->setEffectBoundaries(effectBBox);
 }
 
+RenderObject* SVGFilterPrimitiveStandardAttributes::createRenderer(RenderArena* arena, RenderStyle*)
+{
+    return new (arena) RenderSVGResourceFilterPrimitive(this);
+}
+
 }
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
index 2fb41ea..0ffa1c9 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -23,6 +23,7 @@
 
 #if ENABLE(SVG) && ENABLE(FILTERS)
 #include "FilterEffect.h"
+#include "RenderSVGResource.h"
 #include "SVGFilterBuilder.h"
 #include "SVGFilterElement.h"
 #include "SVGNames.h"
@@ -47,10 +48,17 @@ protected:
     virtual void synchronizeProperty(const QualifiedName&);
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
+protected:
+    inline void invalidate()
+    {
+        if (RenderObject* primitiveRenderer = renderer())
+            RenderSVGResource::markForLayoutAndParentResourceInvalidation(primitiveRenderer);
+    }
+
 private:
     virtual bool isFilterEffect() const { return true; }
 
-    virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
     DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::xAttr, SVGLength, X, x)
     DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::yAttr, SVGLength, Y, y)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list