[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
krit at webkit.org
krit at webkit.org
Thu Oct 29 20:42:34 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 5a9a31fc0bf351ce829513062d72a1ea0693db92
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 9 19:13:55 2009 +0000
2009-10-08 Dirk Schulze <krit at webkit.org>
Reviewed by Nikolas Zimmermann.
feMorphology filter is not implemented
[https://bugs.webkit.org/show_bug.cgi?id=5863]
Adds SVGFEMorphologyElement, for the SVG filter. It also fixes a bug
with the attribute "operator". It was only accessible via "_operator"
on JavaScript.
Test: svg/dom/operatorAttribute.xhtml
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.SVG.Filters.exp:
* WebCore.gypi:
* WebCore.pro:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
(WebCore::createElementClassMap):
* bindings/objc/DOMSVG.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* page/DOMWindow.idl:
* svg/SVGAllInOne.cpp:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEMorphologyElement.cpp: Added.
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::~SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::setRadius):
(WebCore::SVGFEMorphologyElement::parseMappedAttribute):
(WebCore::SVGFEMorphologyElement::build):
* svg/SVGFEMorphologyElement.h: Added.
* svg/SVGFEMorphologyElement.idl: Added.
* svg/graphics/filters/SVGFEMorphology.cpp:
(WebCore::operator<<):
* svg/graphics/filters/SVGFEMorphology.h:
(WebCore::):
* svg/svgtags.in:
Reviewed by Nikolas Zimmermann.
Attribute "operator" schould only be accessible by "operator", not by "_operator"
* svg/dom/operatorAttribute-expected.txt: Added.
* svg/dom/operatorAttribute.html: Added.
* svg/dom/script-tests/operatorAttribute.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c1d8090..daea1d8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-09 Dirk Schulze <krit at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Attribute "operator" schould only be accessible by "operator", not by "_operator"
+
+ * svg/dom/operatorAttribute-expected.txt: Added.
+ * svg/dom/operatorAttribute.html: Added.
+ * svg/dom/script-tests/operatorAttribute.js: Added.
+
2009-10-09 Darin Adler <darin at apple.com>
Requested by Mark Rowe.
diff --git a/LayoutTests/svg/dom/operatorAttribute-expected.txt b/LayoutTests/svg/dom/operatorAttribute-expected.txt
new file mode 100644
index 0000000..7aae5cc
--- /dev/null
+++ b/LayoutTests/svg/dom/operatorAttribute-expected.txt
@@ -0,0 +1,9 @@
+This test checks that SVG operator attribute exists while _operator doesn't
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/operatorAttribute.html b/LayoutTests/svg/dom/operatorAttribute.html
new file mode 100644
index 0000000..5ca5ac3
--- /dev/null
+++ b/LayoutTests/svg/dom/operatorAttribute.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/operatorAttribute.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/operatorAttribute.js b/LayoutTests/svg/dom/script-tests/operatorAttribute.js
new file mode 100644
index 0000000..31337b6
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/operatorAttribute.js
@@ -0,0 +1,17 @@
+description("This test checks that SVG operator attribute exists while _operator doesn't");
+
+var feMorphologyElement = document.createElementNS("http://www.w3.org/2000/svg", "feMorphology");
+
+feMorphologyElement.setAttribute("operator", "dilate");
+
+// We need to check if we are on a filters enabled build:
+if ('SVGFEMorphologyElement' in window) {
+ shouldBe("feMorphologyElement.operator.baseVal", "SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE");
+
+ feMorphologyElement.setAttribute("operator", "erode");
+ shouldBe("feMorphologyElement.operator.baseVal", "SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE");
+
+ shouldBeUndefined("feMorphologyElement._operator");
+}
+
+successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 36b2b33..74db319 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,45 @@
+2009-10-09 Dirk Schulze <krit at webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ feMorphology filter is not implemented
+ [https://bugs.webkit.org/show_bug.cgi?id=5863]
+
+ Adds SVGFEMorphologyElement, for the SVG filter. It also fixes a bug
+ with the attribute "operator". It was only accessible via "_operator"
+ on JavaScript.
+
+ Test: svg/dom/operatorAttribute.xhtml
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.SVG.Filters.exp:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/objc/DOM.mm:
+ (WebCore::createElementClassMap):
+ * bindings/objc/DOMSVG.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * page/DOMWindow.idl:
+ * svg/SVGAllInOne.cpp:
+ * svg/SVGFECompositeElement.idl:
+ * svg/SVGFEMorphologyElement.cpp: Added.
+ (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+ (WebCore::SVGFEMorphologyElement::~SVGFEMorphologyElement):
+ (WebCore::SVGFEMorphologyElement::setRadius):
+ (WebCore::SVGFEMorphologyElement::parseMappedAttribute):
+ (WebCore::SVGFEMorphologyElement::build):
+ * svg/SVGFEMorphologyElement.h: Added.
+ * svg/SVGFEMorphologyElement.idl: Added.
+ * svg/graphics/filters/SVGFEMorphology.cpp:
+ (WebCore::operator<<):
+ * svg/graphics/filters/SVGFEMorphology.h:
+ (WebCore::):
+ * svg/svgtags.in:
+
2009-10-09 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 48a67e9..be83136 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -244,6 +244,7 @@
#include "JSSVGFEImageElement.cpp"
#include "JSSVGFEMergeElement.cpp"
#include "JSSVGFEMergeNodeElement.cpp"
+#include "JSSVGFEMorphologyElement.cpp"
#include "JSSVGFEOffsetElement.cpp"
#include "JSSVGFEPointLightElement.cpp"
#include "JSSVGFESpecularLightingElement.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 157b01a..fa37a3d 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -288,6 +288,7 @@ DOM_CLASSES = \
SVGFEImageElement \
SVGFEMergeElement \
SVGFEMergeNodeElement \
+ SVGFEMorphologyElement \
SVGFEOffsetElement \
SVGFEPointLightElement \
SVGFESpecularLightingElement \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index ae6f192..5135eb4 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -2711,6 +2711,7 @@ IDL_BINDINGS += \
WebCore/svg/SVGFEImageElement.idl \
WebCore/svg/SVGFEMergeElement.idl \
WebCore/svg/SVGFEMergeNodeElement.idl \
+ WebCore/svg/SVGFEMorphologyElement.idl \
WebCore/svg/SVGFEOffsetElement.idl \
WebCore/svg/SVGFEPointLightElement.idl \
WebCore/svg/SVGFESpecularLightingElement.idl \
@@ -2965,6 +2966,8 @@ webcore_sources += \
WebCore/svg/SVGFEMergeElement.h \
WebCore/svg/SVGFEMergeNodeElement.cpp \
WebCore/svg/SVGFEMergeNodeElement.h \
+ WebCore/svg/SVGFEMorphologyElement.cpp \
+ WebCore/svg/SVGFEMorphologyElement.h \
WebCore/svg/SVGFEOffsetElement.cpp \
WebCore/svg/SVGFEOffsetElement.h \
WebCore/svg/SVGFEPointLightElement.cpp \
diff --git a/WebCore/WebCore.SVG.Filters.exp b/WebCore/WebCore.SVG.Filters.exp
index b0244db..5698258 100644
--- a/WebCore/WebCore.SVG.Filters.exp
+++ b/WebCore/WebCore.SVG.Filters.exp
@@ -15,6 +15,7 @@
.objc_class_name_DOMSVGFEImageElement
.objc_class_name_DOMSVGFEMergeElement
.objc_class_name_DOMSVGFEMergeNodeElement
+.objc_class_name_DOMSVGFEMorphologyElement
.objc_class_name_DOMSVGFEOffsetElement
.objc_class_name_DOMSVGFEPointLightElement
.objc_class_name_DOMSVGFESpecularLightingElement
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 3164101..52718d9 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -259,6 +259,7 @@
'svg/SVGFEImageElement.idl',
'svg/SVGFEMergeElement.idl',
'svg/SVGFEMergeNodeElement.idl',
+ 'svg/SVGFEMorphologyElement.idl',
'svg/SVGFEOffsetElement.idl',
'svg/SVGFEPointLightElement.idl',
'svg/SVGFESpecularLightingElement.idl',
@@ -3288,6 +3289,8 @@
'svg/SVGFEMergeElement.h',
'svg/SVGFEMergeNodeElement.cpp',
'svg/SVGFEMergeNodeElement.h',
+ 'svg/SVGFEMorphologyElement.cpp',
+ 'svg/SVGFEMorphologyElement.h',
'svg/SVGFEOffsetElement.cpp',
'svg/SVGFEOffsetElement.h',
'svg/SVGFEPointLightElement.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index c35ea20..e09026c 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -547,6 +547,7 @@ IDL_BINDINGS += \
svg/SVGFEImageElement.idl \
svg/SVGFEMergeElement.idl \
svg/SVGFEMergeNodeElement.idl \
+ svg/SVGFEMorphologyElement.idl \
svg/SVGFEOffsetElement.idl \
svg/SVGFEPointLightElement.idl \
svg/SVGFESpecularLightingElement.idl \
@@ -2161,6 +2162,7 @@ HEADERS += \
svg/SVGFELightElement.h \
svg/SVGFEMergeElement.h \
svg/SVGFEMergeNodeElement.h \
+ svg/SVGFEMorphologyElement.h \
svg/SVGFEOffsetElement.h \
svg/SVGFEPointLightElement.h \
svg/SVGFESpecularLightingElement.h \
@@ -2901,6 +2903,7 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGFELightElement.cpp \
svg/SVGFEMergeElement.cpp \
svg/SVGFEMergeNodeElement.cpp \
+ svg/SVGFEMorphologyElement.cpp \
svg/SVGFEOffsetElement.cpp \
svg/SVGFEPointLightElement.cpp \
svg/SVGFESpecularLightingElement.cpp \
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 9b35acf..ccb75bd 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1212,6 +1212,13 @@
7A74ECBD101839DA00BF939E /* JSInspectorBackendCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorBackendCustom.cpp */; };
7AED3E050FBB1EAA00D2B03C /* InspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */; };
7AED3E060FBB1EAA00D2B03C /* InspectorFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */; };
+ 84224183107E77F400766A87 /* JSSVGFEMorphologyElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */; };
+ 84224184107E77F400766A87 /* JSSVGFEMorphologyElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84224182107E77F400766A87 /* JSSVGFEMorphologyElement.h */; };
+ 8422418C107E786F00766A87 /* DOMSVGFEMorphologyElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84224189107E786F00766A87 /* DOMSVGFEMorphologyElement.h */; };
+ 8422418D107E786F00766A87 /* DOMSVGFEMorphologyElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8422418A107E786F00766A87 /* DOMSVGFEMorphologyElement.mm */; };
+ 8422418E107E786F00766A87 /* DOMSVGFEMorphologyElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 8422418B107E786F00766A87 /* DOMSVGFEMorphologyElementInternal.h */; };
+ 84224193107E78A700766A87 /* SVGFEMorphologyElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84224190107E78A700766A87 /* SVGFEMorphologyElement.cpp */; };
+ 84224194107E78A700766A87 /* SVGFEMorphologyElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84224191107E78A700766A87 /* SVGFEMorphologyElement.h */; };
845E72F80FD261EE00A87D79 /* Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = 845E72F70FD261EE00A87D79 /* Filter.h */; };
845E72FB0FD2623900A87D79 /* SVGFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 845E72F90FD2623900A87D79 /* SVGFilter.cpp */; };
845E72FC0FD2623900A87D79 /* SVGFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 845E72FA0FD2623900A87D79 /* SVGFilter.h */; };
@@ -6480,6 +6487,14 @@
7A74ECBC101839DA00BF939E /* JSInspectorBackendCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorBackendCustom.cpp; sourceTree = "<group>"; };
7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontend.cpp; sourceTree = "<group>"; };
7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontend.h; sourceTree = "<group>"; };
+ 84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEMorphologyElement.cpp; sourceTree = "<group>"; };
+ 84224182107E77F400766A87 /* JSSVGFEMorphologyElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFEMorphologyElement.h; sourceTree = "<group>"; };
+ 84224189107E786F00766A87 /* DOMSVGFEMorphologyElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEMorphologyElement.h; sourceTree = "<group>"; };
+ 8422418A107E786F00766A87 /* DOMSVGFEMorphologyElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGFEMorphologyElement.mm; sourceTree = "<group>"; };
+ 8422418B107E786F00766A87 /* DOMSVGFEMorphologyElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEMorphologyElementInternal.h; sourceTree = "<group>"; };
+ 84224190107E78A700766A87 /* SVGFEMorphologyElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEMorphologyElement.cpp; sourceTree = "<group>"; };
+ 84224191107E78A700766A87 /* SVGFEMorphologyElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEMorphologyElement.h; sourceTree = "<group>"; };
+ 84224192107E78A700766A87 /* SVGFEMorphologyElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGFEMorphologyElement.idl; sourceTree = "<group>"; };
845E72F70FD261EE00A87D79 /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Filter.h; path = filters/Filter.h; sourceTree = "<group>"; };
845E72F90FD2623900A87D79 /* SVGFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilter.cpp; sourceTree = "<group>"; };
845E72FA0FD2623900A87D79 /* SVGFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFilter.h; sourceTree = "<group>"; };
@@ -11491,6 +11506,9 @@
8502AB320AD438C000378540 /* DOMSVGFEMergeNodeElement.h */,
8502AB330AD438C000378540 /* DOMSVGFEMergeNodeElement.mm */,
A8E544610CA9D1C20097D09B /* DOMSVGFEMergeNodeElementInternal.h */,
+ 84224189107E786F00766A87 /* DOMSVGFEMorphologyElement.h */,
+ 8422418A107E786F00766A87 /* DOMSVGFEMorphologyElement.mm */,
+ 8422418B107E786F00766A87 /* DOMSVGFEMorphologyElementInternal.h */,
8502AB340AD438C000378540 /* DOMSVGFEOffsetElement.h */,
8502AB350AD438C000378540 /* DOMSVGFEOffsetElement.mm */,
A8E5445F0CA9D1C20097D09B /* DOMSVGFEOffsetElementInternal.h */,
@@ -12990,6 +13008,8 @@
B2FA3C9F0AB75A6E000E5AC4 /* JSSVGFEMergeElement.h */,
B2FA3CA00AB75A6E000E5AC4 /* JSSVGFEMergeNodeElement.cpp */,
B2FA3CA10AB75A6E000E5AC4 /* JSSVGFEMergeNodeElement.h */,
+ 84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */,
+ 84224182107E77F400766A87 /* JSSVGFEMorphologyElement.h */,
B2FA3CA20AB75A6E000E5AC4 /* JSSVGFEOffsetElement.cpp */,
B2FA3CA30AB75A6E000E5AC4 /* JSSVGFEOffsetElement.h */,
B2FA3CA40AB75A6E000E5AC4 /* JSSVGFEPointLightElement.cpp */,
@@ -13542,6 +13562,9 @@
B22278600D00BF200071B782 /* SVGFEMergeNodeElement.cpp */,
B22278610D00BF200071B782 /* SVGFEMergeNodeElement.h */,
B22278620D00BF200071B782 /* SVGFEMergeNodeElement.idl */,
+ 84224190107E78A700766A87 /* SVGFEMorphologyElement.cpp */,
+ 84224191107E78A700766A87 /* SVGFEMorphologyElement.h */,
+ 84224192107E78A700766A87 /* SVGFEMorphologyElement.idl */,
B22278630D00BF200071B782 /* SVGFEOffsetElement.cpp */,
B22278640D00BF200071B782 /* SVGFEOffsetElement.h */,
B22278650D00BF200071B782 /* SVGFEOffsetElement.idl */,
@@ -16246,6 +16269,8 @@
8502AB5E0AD438C000378540 /* DOMSVGFEMergeNodeElement.h in Headers */,
8502AB9D0AD4394E00378540 /* DOMSVGFEMergeNodeElementInternal.h in Headers */,
A8E5455F0CA9D1C20097D09B /* DOMSVGFEMergeNodeElementInternal.h in Headers */,
+ 8422418C107E786F00766A87 /* DOMSVGFEMorphologyElement.h in Headers */,
+ 8422418E107E786F00766A87 /* DOMSVGFEMorphologyElementInternal.h in Headers */,
8502AB600AD438C000378540 /* DOMSVGFEOffsetElement.h in Headers */,
8502AB9E0AD4394E00378540 /* DOMSVGFEOffsetElementInternal.h in Headers */,
A8E5455D0CA9D1C20097D09B /* DOMSVGFEOffsetElementInternal.h in Headers */,
@@ -17096,6 +17121,7 @@
B2FA3D850AB75A6F000E5AC4 /* JSSVGFEImageElement.h in Headers */,
B2FA3D870AB75A6F000E5AC4 /* JSSVGFEMergeElement.h in Headers */,
B2FA3D890AB75A6F000E5AC4 /* JSSVGFEMergeNodeElement.h in Headers */,
+ 84224184107E77F400766A87 /* JSSVGFEMorphologyElement.h in Headers */,
B2FA3D8B0AB75A6F000E5AC4 /* JSSVGFEOffsetElement.h in Headers */,
B2FA3D8D0AB75A6F000E5AC4 /* JSSVGFEPointLightElement.h in Headers */,
B2FA3D8F0AB75A6F000E5AC4 /* JSSVGFESpecularLightingElement.h in Headers */,
@@ -17667,6 +17693,7 @@
B22279F40D00BF220071B782 /* SVGFEMergeElement.h in Headers */,
B22279F70D00BF220071B782 /* SVGFEMergeNodeElement.h in Headers */,
B25599890D00D8BA00BB825C /* SVGFEMorphology.h in Headers */,
+ 84224194107E78A700766A87 /* SVGFEMorphologyElement.h in Headers */,
B255998B0D00D8BA00BB825C /* SVGFEOffset.h in Headers */,
B22279FA0D00BF220071B782 /* SVGFEOffsetElement.h in Headers */,
B22279FD0D00BF220071B782 /* SVGFEPointLightElement.h in Headers */,
@@ -18595,6 +18622,7 @@
8502AB5B0AD438C000378540 /* DOMSVGFEImageElement.mm in Sources */,
8502AB5D0AD438C000378540 /* DOMSVGFEMergeElement.mm in Sources */,
8502AB5F0AD438C000378540 /* DOMSVGFEMergeNodeElement.mm in Sources */,
+ 8422418D107E786F00766A87 /* DOMSVGFEMorphologyElement.mm in Sources */,
8502AB610AD438C000378540 /* DOMSVGFEOffsetElement.mm in Sources */,
8502AB630AD438C000378540 /* DOMSVGFEPointLightElement.mm in Sources */,
8502AB650AD438C000378540 /* DOMSVGFESpecularLightingElement.mm in Sources */,
@@ -19291,6 +19319,7 @@
B2FA3D840AB75A6F000E5AC4 /* JSSVGFEImageElement.cpp in Sources */,
B2FA3D860AB75A6F000E5AC4 /* JSSVGFEMergeElement.cpp in Sources */,
B2FA3D880AB75A6F000E5AC4 /* JSSVGFEMergeNodeElement.cpp in Sources */,
+ 84224183107E77F400766A87 /* JSSVGFEMorphologyElement.cpp in Sources */,
B2FA3D8A0AB75A6F000E5AC4 /* JSSVGFEOffsetElement.cpp in Sources */,
B2FA3D8C0AB75A6F000E5AC4 /* JSSVGFEPointLightElement.cpp in Sources */,
B2FA3D8E0AB75A6F000E5AC4 /* JSSVGFESpecularLightingElement.cpp in Sources */,
@@ -19829,6 +19858,7 @@
B22279F30D00BF220071B782 /* SVGFEMergeElement.cpp in Sources */,
B22279F60D00BF220071B782 /* SVGFEMergeNodeElement.cpp in Sources */,
B25599880D00D8BA00BB825C /* SVGFEMorphology.cpp in Sources */,
+ 84224193107E78A700766A87 /* SVGFEMorphologyElement.cpp in Sources */,
B255998A0D00D8BA00BB825C /* SVGFEOffset.cpp in Sources */,
B22279F90D00BF220071B782 /* SVGFEOffsetElement.cpp in Sources */,
B22279FC0D00BF220071B782 /* SVGFEPointLightElement.cpp in Sources */,
diff --git a/WebCore/bindings/objc/DOM.mm b/WebCore/bindings/objc/DOM.mm
index 63a3b2a..907961f 100644
--- a/WebCore/bindings/objc/DOM.mm
+++ b/WebCore/bindings/objc/DOM.mm
@@ -176,6 +176,7 @@ static void createElementClassMap()
addElementClass(SVGNames::feImageTag, [DOMSVGFEImageElement class]);
addElementClass(SVGNames::feMergeTag, [DOMSVGFEMergeElement class]);
addElementClass(SVGNames::feMergeNodeTag, [DOMSVGFEMergeNodeElement class]);
+ addElementClass(SVGNames::feMorphologyTag, [DOMSVGFEMorphologyElement class]);
addElementClass(SVGNames::feOffsetTag, [DOMSVGFEOffsetElement class]);
addElementClass(SVGNames::fePointLightTag, [DOMSVGFEPointLightElement class]);
addElementClass(SVGNames::feSpecularLightingTag, [DOMSVGFESpecularLightingElement class]);
diff --git a/WebCore/bindings/objc/DOMSVG.h b/WebCore/bindings/objc/DOMSVG.h
index cb74544..c59532f 100644
--- a/WebCore/bindings/objc/DOMSVG.h
+++ b/WebCore/bindings/objc/DOMSVG.h
@@ -75,6 +75,7 @@
#import <WebCore/DOMSVGFEImageElement.h>
#import <WebCore/DOMSVGFEMergeElement.h>
#import <WebCore/DOMSVGFEMergeNodeElement.h>
+#import <WebCore/DOMSVGFEMorphologyElement.h>
#import <WebCore/DOMSVGFEOffsetElement.h>
#import <WebCore/DOMSVGFEPointLightElement.h>
#import <WebCore/DOMSVGFESpecularLightingElement.h>
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 095c75f..5a05d1a 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1933,6 +1933,8 @@ sub NativeToJSValue
}
if ($codeGenerator->IsSVGAnimatedType($type)) {
+ # Some SVGFE*Element.idl use 'operator' as attribute name, rewrite as '_operator' to avoid clashes with C/C++
+ $value =~ s/operator\(\)/_operator\(\)/ if ($value =~ /operator/);
$value =~ s/\(\)//;
$value .= "Animated()";
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 317086b..d3a009f 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -725,6 +725,8 @@ sub GenerateHeader
my $attributeIsReadonly = ($attribute->type =~ /^readonly/);
my $property = "\@property" . GetPropertyAttributes($attribute->signature->type, $attributeIsReadonly);
+ # Some SVGFE*Element.idl use 'operator' as attribute name, rewrite as '_operator' to avoid clashes with C/C++
+ $attributeName =~ s/operator/_operator/ if ($attributeName =~ /operator/);
$property .= " " . $attributeType . ($attributeType =~ /\*$/ ? "" : " ") . $attributeName;
my $publicInterfaceKey = $property . ";";
@@ -1149,6 +1151,11 @@ sub GenerateImplementation
# - GETTER
my $getterSig = "- ($attributeType)$attributeInterfaceName\n";
+
+ # Some SVGFE*Element.idl use 'operator' as attribute name, rewrite as '_operator' to avoid clashes with C/C++
+ $attributeName =~ s/operatorAnimated/_operatorAnimated/ if ($attributeName =~ /operatorAnimated/);
+ $getterSig =~ s/operator/_operator/ if ($getterSig =~ /operator/);
+
my $hasGetterException = @{$attribute->getterExceptions};
my $getterContentHead;
my $reflect = $attribute->signature->extendedAttributes->{"Reflect"};
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 9e3df48..1855a28 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -560,7 +560,7 @@ module window {
attribute SVGFECompositeElementConstructor SVGFECompositeElement;
// attribute SVGFEConvolveMatrixElementConstructor SVGFEConvolveMatrixElement;
attribute SVGFEDisplacementMapElementConstructor SVGFEDisplacementMapElement;
-// attribute SVGFEMorphologyElementConstructor SVGFEMorphologyElement;
+ attribute SVGFEMorphologyElementConstructor SVGFEMorphologyElement;
attribute SVGFETurbulenceElementConstructor SVGFETurbulenceElement;
#endif
#endif
diff --git a/WebCore/svg/SVGAllInOne.cpp b/WebCore/svg/SVGAllInOne.cpp
index 6ca4539..b54220a 100644
--- a/WebCore/svg/SVGAllInOne.cpp
+++ b/WebCore/svg/SVGAllInOne.cpp
@@ -67,6 +67,7 @@
#include "SVGFELightElement.cpp"
#include "SVGFEMergeElement.cpp"
#include "SVGFEMergeNodeElement.cpp"
+#include "SVGFEMorphologyElement.cpp"
#include "SVGFEOffsetElement.cpp"
#include "SVGFEPointLightElement.cpp"
#include "SVGFESpecularLightingElement.cpp"
diff --git a/WebCore/svg/SVGFECompositeElement.idl b/WebCore/svg/SVGFECompositeElement.idl
index 97a13fc..d317997 100644
--- a/WebCore/svg/SVGFECompositeElement.idl
+++ b/WebCore/svg/SVGFECompositeElement.idl
@@ -38,7 +38,7 @@ module svg {
readonly attribute SVGAnimatedString in1;
readonly attribute SVGAnimatedString in2;
- readonly attribute SVGAnimatedEnumeration _operator;
+ readonly attribute SVGAnimatedEnumeration operator;
readonly attribute SVGAnimatedNumber k1;
readonly attribute SVGAnimatedNumber k2;
readonly attribute SVGAnimatedNumber k3;
diff --git a/WebCore/svg/SVGFEMorphologyElement.cpp b/WebCore/svg/SVGFEMorphologyElement.cpp
new file mode 100644
index 0000000..4a06188
--- /dev/null
+++ b/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2009 Dirk Schulze <krit at webkit.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "SVGFEMorphologyElement.h"
+
+#include "MappedAttribute.h"
+#include "SVGNames.h"
+#include "SVGParserUtilities.h"
+#include "SVGResourceFilter.h"
+
+namespace WebCore {
+
+char SVGRadiusXAttrIdentifier[] = "SVGRadiusXAttr";
+char SVGRadiusYAttrIdentifier[] = "SVGRadiusYAttr";
+
+SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
+ , m_in1(this, SVGNames::inAttr)
+ , m__operator(this, SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)
+ , m_radiusX(this, SVGNames::radiusAttr)
+ , m_radiusY(this, SVGNames::radiusAttr)
+{
+}
+
+SVGFEMorphologyElement::~SVGFEMorphologyElement()
+{
+}
+
+void SVGFEMorphologyElement::setRadius(float, float)
+{
+ // FIXME: Needs an implementation.
+}
+
+void SVGFEMorphologyElement::parseMappedAttribute(MappedAttribute* attr)
+{
+ const String& value = attr->value();
+ if (attr->name() == SVGNames::operatorAttr) {
+ if (value == "erode")
+ set_operatorBaseValue(FEMORPHOLOGY_OPERATOR_ERODE);
+ else if (value == "dilate")
+ set_operatorBaseValue(FEMORPHOLOGY_OPERATOR_DILATE);
+ } else if (attr->name() == SVGNames::inAttr)
+ setIn1BaseValue(value);
+ else if (attr->name() == SVGNames::radiusAttr) {
+ float x, y;
+ if (parseNumberOptionalNumber(value, x, y)) {
+ setRadiusXBaseValue(x);
+ setRadiusYBaseValue(y);
+ }
+ } else
+ SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
+}
+
+bool SVGFEMorphologyElement::build(SVGResourceFilter* filterResource)
+{
+ FilterEffect* input1 = filterResource->builder()->getEffectById(in1());
+
+ if (!input1)
+ return false;
+
+ RefPtr<FilterEffect> effect = FEMorphology::create(input1, static_cast<MorphologyOperatorType>(_operator()), radiusX(), radiusY());
+ filterResource->addFilterEffect(this, effect.release());
+
+ return true;
+}
+
+} //namespace WebCore
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGFEMorphologyElement.h b/WebCore/svg/SVGFEMorphologyElement.h
new file mode 100644
index 0000000..6c1aec1
--- /dev/null
+++ b/WebCore/svg/SVGFEMorphologyElement.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2009 Dirk Schulze <krit at webkit.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGFEMorphologyElement_h
+#define SVGFEMorphologyElement_h
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "SVGFEMorphology.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace WebCore {
+
+ extern char SVGRadiusXAttrIdentifier[];
+ extern char SVGRadiusYAttrIdentifier[];
+
+ class SVGFEMorphologyElement : public SVGFilterPrimitiveStandardAttributes {
+ public:
+ SVGFEMorphologyElement(const QualifiedName&, Document*);
+ virtual ~SVGFEMorphologyElement();
+
+ void setRadius(float radiusX, float radiusY);
+
+ virtual void parseMappedAttribute(MappedAttribute*);
+ virtual bool build(SVGResourceFilter*);
+
+ private:
+ ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGNames::inAttrString, String, In1, in1)
+ ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGNames::operatorAttrString, int, _operator, _operator)
+ ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGRadiusXAttrIdentifier, float, RadiusX, radiusX)
+ ANIMATED_PROPERTY_DECLARATIONS(SVGFEMorphologyElement, SVGNames::feMorphologyTagString, SVGRadiusYAttrIdentifier, float, RadiusY, radiusY)
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/svg/SVGFEMorphologyElement.idl b/WebCore/svg/SVGFEMorphologyElement.idl
new file mode 100644
index 0000000..cce0e36
--- /dev/null
+++ b/WebCore/svg/SVGFEMorphologyElement.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009 Dirk Schulze <krit at webkit.org>
+ *
+ * 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
+ */
+
+module svg {
+
+ interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEMorphologyElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+ // Morphology Operators
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedEnumeration operator;
+ readonly attribute SVGAnimatedNumber radiusX;
+ readonly attribute SVGAnimatedNumber radiusY;
+
+ void setRadius(in float radiusX, in float radiusY);
+ };
+
+}
diff --git a/WebCore/svg/graphics/filters/SVGFEMorphology.cpp b/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
index 3767734..f7fc5d8 100644
--- a/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEMorphology.cpp
@@ -28,7 +28,7 @@
namespace WebCore {
-FEMorphology::FEMorphology(FilterEffect* in, MorphologyOperatorType type, const float& radiusX, const float& radiusY)
+FEMorphology::FEMorphology(FilterEffect* in, MorphologyOperatorType type, float radiusX, float radiusY)
: FilterEffect()
, m_in(in)
, m_type(type)
@@ -37,7 +37,7 @@ FEMorphology::FEMorphology(FilterEffect* in, MorphologyOperatorType type, const
{
}
-PassRefPtr<FEMorphology> FEMorphology::create(FilterEffect* in, MorphologyOperatorType type, const float& radiusX, const float& radiusY)
+PassRefPtr<FEMorphology> FEMorphology::create(FilterEffect* in, MorphologyOperatorType type, float radiusX, float radiusY)
{
return adoptRef(new FEMorphology(in, type, radiusX, radiusY));
}
@@ -88,8 +88,8 @@ static TextStream& operator<<(TextStream& ts, MorphologyOperatorType t)
ts << "UNKNOWN"; break;
case FEMORPHOLOGY_OPERATOR_ERODE:
ts << "ERODE"; break;
- case FEMORPHOLOGY_OPERATOR_DIALATE:
- ts << "DIALATE"; break;
+ case FEMORPHOLOGY_OPERATOR_DILATE:
+ ts << "DILATE"; break;
}
return ts;
}
diff --git a/WebCore/svg/graphics/filters/SVGFEMorphology.h b/WebCore/svg/graphics/filters/SVGFEMorphology.h
index bdc2b9b..6a321c8 100644
--- a/WebCore/svg/graphics/filters/SVGFEMorphology.h
+++ b/WebCore/svg/graphics/filters/SVGFEMorphology.h
@@ -31,12 +31,12 @@ namespace WebCore {
enum MorphologyOperatorType {
FEMORPHOLOGY_OPERATOR_UNKNOWN = 0,
FEMORPHOLOGY_OPERATOR_ERODE = 1,
- FEMORPHOLOGY_OPERATOR_DIALATE = 2
+ FEMORPHOLOGY_OPERATOR_DILATE = 2
};
class FEMorphology : public FilterEffect {
public:
- PassRefPtr<FEMorphology> create(FilterEffect*, MorphologyOperatorType, const float&, const float&);
+ static PassRefPtr<FEMorphology> create(FilterEffect*, MorphologyOperatorType, float radiusX, float radiusY);
MorphologyOperatorType morphologyOperator() const;
void setMorphologyOperator(MorphologyOperatorType);
@@ -52,7 +52,7 @@ namespace WebCore {
TextStream& externalRepresentation(TextStream& ts) const;
private:
- FEMorphology(FilterEffect*, MorphologyOperatorType, const float&, const float&);
+ FEMorphology(FilterEffect*, MorphologyOperatorType, float radiusX, float radiusY);
RefPtr<FilterEffect> m_in;
MorphologyOperatorType m_type;
diff --git a/WebCore/svg/svgtags.in b/WebCore/svg/svgtags.in
index 471c77b..30a0e4c 100644
--- a/WebCore/svg/svgtags.in
+++ b/WebCore/svg/svgtags.in
@@ -47,9 +47,7 @@ feGaussianBlur createWithNew
feImage createWithNew
feMerge createWithNew
feMergeNode createWithNew
-#if 0
feMorphology createWithNew
-#endif
feOffset createWithNew
fePointLight createWithNew
feSpecularLighting createWithNew
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list