2008-07-01 Alex Mathews <possessedpenguinbob@gmail.com>
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 03:27:42 +0000 (03:27 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 03:27:42 +0000 (03:27 +0000)
Reviewed by Oliver Hunt.

Prep for more Filter class name changes. Added the first few files for
the new Filter architecture to come.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/svg/Filter.cpp [new file with mode: 0644]
WebCore/svg/Filter.h [new file with mode: 0644]
WebCore/svg/FilterBuilder.h [new file with mode: 0644]
WebCore/svg/FilterEffect.cpp [new file with mode: 0644]
WebCore/svg/FilterEffect.h [new file with mode: 0644]

index ef07d00..7694bda 100644 (file)
@@ -1,3 +1,24 @@
+2008-07-01  Alex Mathews  <possessedpenguinbob@gmail.com>
+
+        Reviewed by Oliver Hunt.
+
+        Prep for more Filter class name changes. Added the first few files for
+        the new Filter architecture to come.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * svg/Filter.cpp: Added.
+        (WebCore::Filter::Filter):
+        (WebCore::Filter::create):
+        * svg/Filter.h: Added.
+        * svg/FilterBuilder.h: Added.
+        (WebCore::FilterBuilder::add):
+        (WebCore::FilterBuilder::getEffectById):
+        (WebCore::FilterBuilder::filter):
+        * svg/FilterEffect.cpp: Added.
+        (WebCore::FilterEffect::FilterEffect):
+        (WebCore::FilterEffect::~FilterEffect):
+        * svg/FilterEffect.h: Added.
+
 2008-07-01  Christian Dywan  <christian@twotoasts.de>
 
         Gtk+ build fix.
index 04e6e86..5f45f77 100644 (file)
                4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */; };
                4E19592D0A39DACC00220FE5 /* MediaQueryExp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4E1959270A39DACC00220FE5 /* MediaQueryExp.cpp */; };
                4E19592E0A39DACC00220FE5 /* MediaQueryExp.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1959280A39DACC00220FE5 /* MediaQueryExp.h */; };
+               50A5DF750E1A13C9000A03AE /* Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A5DF730E1A13C9000A03AE /* Filter.h */; };
+               50A5DF760E1A13C9000A03AE /* FilterBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A5DF740E1A13C9000A03AE /* FilterBuilder.h */; };
+               50A5E2100E1ABAF2000A03AE /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A5E20F0E1ABAF2000A03AE /* FilterEffect.h */; };
+               50A5E4720E1AEF3A000A03AE /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50A5E4710E1AEF3A000A03AE /* Filter.cpp */; };
+               50A5E4740E1AEF84000A03AE /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50A5E4730E1AEF84000A03AE /* FilterEffect.cpp */; };
                510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5101846A0B08602A004A825F /* CachedPage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510184680B08602A004A825F /* CachedPage.cpp */; };
                5116D9770CF177BD00C2B84D /* DatabaseDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 5116D9750CF177BD00C2B84D /* DatabaseDetails.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4E1959260A39DACC00220FE5 /* MediaQueryEvaluator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaQueryEvaluator.h; sourceTree = "<group>"; };
                4E1959270A39DACC00220FE5 /* MediaQueryExp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryExp.cpp; sourceTree = "<group>"; };
                4E1959280A39DACC00220FE5 /* MediaQueryExp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MediaQueryExp.h; sourceTree = "<group>"; };
+               50A5DF730E1A13C9000A03AE /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filter.h; sourceTree = "<group>"; };
+               50A5DF740E1A13C9000A03AE /* FilterBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterBuilder.h; sourceTree = "<group>"; };
+               50A5E20F0E1ABAF2000A03AE /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffect.h; sourceTree = "<group>"; };
+               50A5E4710E1AEF3A000A03AE /* Filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filter.cpp; sourceTree = "<group>"; };
+               50A5E4730E1AEF84000A03AE /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffect.cpp; sourceTree = "<group>"; };
                510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
                510184680B08602A004A825F /* CachedPage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedPage.cpp; sourceTree = "<group>"; };
                5116D9750CF177BD00C2B84D /* DatabaseDetails.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseDetails.h; sourceTree = "<group>"; };
                                B22277CC0D00BF1F0071B782 /* ColorDistance.h */,
                                E415F1830D9A1A830033CE97 /* ElementTimeControl.h */,
                                E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */,
+                               50A5DF730E1A13C9000A03AE /* Filter.h */,
+                               50A5DF740E1A13C9000A03AE /* FilterBuilder.h */,
+                               50A5E20F0E1ABAF2000A03AE /* FilterEffect.h */,
                                B22277CD0D00BF1F0071B782 /* GradientAttributes.h */,
                                B22277CE0D00BF1F0071B782 /* LinearGradientAttributes.h */,
                                B22277DB0D00BF1F0071B782 /* PatternAttributes.h */,
                                B22278150D00BF1F0071B782 /* SVGDefinitionSrcElement.h */,
                                B22278160D00BF1F0071B782 /* SVGDefinitionSrcElement.idl */,
                                B22278170D00BF1F0071B782 /* SVGDefsElement.cpp */,
+                               50A5E4710E1AEF3A000A03AE /* Filter.cpp */,
                                B22278180D00BF1F0071B782 /* SVGDefsElement.h */,
+                               50A5E4730E1AEF84000A03AE /* FilterEffect.cpp */,
                                B22278190D00BF1F0071B782 /* SVGDefsElement.idl */,
                                B222781A0D00BF1F0071B782 /* SVGDescElement.cpp */,
                                B222781B0D00BF1F0071B782 /* SVGDescElement.h */,
                                BC686CBB0E0C349D00DE8A08 /* DOMCSSVariablesDeclarationInternal.h in Headers */,
                                BC686CBC0E0C349D00DE8A08 /* DOMCSSVariablesRuleInternal.h in Headers */,
                                3784C34B0E11AA34007D8D48 /* FontTraitsMask.h in Headers */,
+                               50A5DF750E1A13C9000A03AE /* Filter.h in Headers */,
+                               50A5DF760E1A13C9000A03AE /* FilterBuilder.h in Headers */,
+                               50A5E2100E1ABAF2000A03AE /* FilterEffect.h in Headers */,
                                1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                                BC686CB30E0C343900DE8A08 /* DOMCSSVariablesDeclaration.mm in Sources */,
                                BC686CB60E0C343900DE8A08 /* DOMCSSVariablesRule.mm in Sources */,
                                BC7951550E15DBFF00A898AB /* JSCanvasPixelArrayCustom.cpp in Sources */,
+                               50A5E4720E1AEF3A000A03AE /* Filter.cpp in Sources */,
+                               50A5E4740E1AEF84000A03AE /* FilterEffect.cpp in Sources */,
                                1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
diff --git a/WebCore/svg/Filter.cpp b/WebCore/svg/Filter.cpp
new file mode 100644 (file)
index 0000000..24a9fb8
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+    
+    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(SVG_FILTERS)
+#include "Filter.h"
+
+namespace WebCore {
+
+Filter::Filter(FilterEffect* effect)
+    : m_effect(effect)
+{
+}
+
+PassRefPtr<Filter> Filter::create(FilterEffect* effect)
+{ 
+    return adoptRef(new Filter(effect));
+}
+
+} //namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
diff --git a/WebCore/svg/Filter.h b/WebCore/svg/Filter.h
new file mode 100644 (file)
index 0000000..f3a110e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+    
+    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 Filter_h
+#define Filter_h
+
+#include "config.h"
+
+#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#include "FilterEffect.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+    class Filter : public RefCounted<Filter> {
+    public:    
+        static PassRefPtr<Filter> create(FilterEffect*);
+        
+    private:
+        Filter(FilterEffect* effect);
+    
+        RefPtr<FilterEffect> m_effect;
+    };
+    
+} //namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#endif
diff --git a/WebCore/svg/FilterBuilder.h b/WebCore/svg/FilterBuilder.h
new file mode 100644 (file)
index 0000000..319615d
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+    
+    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 FilterBuilder_h
+#define FilterBuilder_h
+
+#include "config.h"
+
+#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#include "PlatformString.h"
+#include "FilterEffect.h"
+#include "Filter.h"
+
+#include <wtf/HashMap.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+    
+    class FilterBuilder : public RefCounted<FilterBuilder> {
+    public:
+        void add(const String& id, PassRefPtr<FilterEffect> effect) { m_namedEffects.set(id, effect); }
+        FilterEffect* getEffectById(const String& id) const { return m_namedEffects.get(id).get(); }
+        
+        PassRefPtr<Filter> filter() const { return m_filter; }
+        
+    private:
+        HashMap<String, RefPtr<FilterEffect> > m_namedEffects;
+        
+        RefPtr<Filter> m_filter;
+    };
+    
+} //namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#endif
diff --git a/WebCore/svg/FilterEffect.cpp b/WebCore/svg/FilterEffect.cpp
new file mode 100644 (file)
index 0000000..c47d40c
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+    Copyright (C) Alex Mathews <possessedpenguinbob@gmail.com>
+
+    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
+    aint 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(SVG_FILTERS)
+#include "FilterEffect.h"
+
+namespace WebCore {
+
+FilterEffect::FilterEffect()
+{
+}
+
+FilterEffect::~FilterEffect()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
diff --git a/WebCore/svg/FilterEffect.h b/WebCore/svg/FilterEffect.h
new file mode 100644 (file)
index 0000000..5f8d400
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+    Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
+
+    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
+    aint 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 FilterEffect_h
+#define FilterEffect_h
+
+#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+    class FilterEffect : public RefCounted<FilterEffect> {
+    public:
+        virtual ~FilterEffect();
+        
+        virtual void apply() = 0;
+        virtual void dump() = 0;
+        
+    protected:
+        FilterEffect();
+    };
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
+
+#endif // FilterEffect_h