Changeset 62092 in webkit


Ignore:
Timestamp:
Jun 29, 2010 12:05:58 AM (14 years ago)
Author:
zherczeg@webkit.org
Message:

WebCore: Add ConvolveMatrix SVG filter effect
https://bugs.webkit.org/show_bug.cgi?id=5861

Reviewed by Nikolas Zimmermann.

The patch was originally started by Dirk Schulze,
and the .cpp and .h files are mostly his work.
I updated the build systems and do some minor updates
to the source files as well. The patch does not contain
the implementation of the filter: this is intended,
and will be landed in a follow-up patch.

  • Android.derived.jscbindings.mk:
  • Android.derived.v8bindings.mk:
  • Android.mk:
  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pri:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/objc/DOM.mm:

(WebCore::createElementClassMap):

  • bindings/objc/DOMSVG.h:
  • page/DOMWindow.idl:
  • svg/SVGAllInOne.cpp:
  • svg/SVGFEConvolveMatrixElement.cpp: Added.

(WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
(WebCore::SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement):
(WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
(WebCore::SVGFEConvolveMatrixElement::setOrder):
(WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
(WebCore::SVGFEConvolveMatrixElement::build):

  • svg/SVGFEConvolveMatrixElement.h: Added.
  • svg/SVGFEConvolveMatrixElement.idl: Added.
  • svg/graphics/filters/SVGFEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::FEConvolveMatrix):
(WebCore::FEConvolveMatrix::create):
(WebCore::FEConvolveMatrix::kernelSize):
(WebCore::FEConvolveMatrix::setKernelSize):
(WebCore::FEConvolveMatrix::targetOffset):
(WebCore::FEConvolveMatrix::setTargetOffset):
(WebCore::operator<<):
(WebCore::FEConvolveMatrix::externalRepresentation):

  • svg/graphics/filters/SVGFEConvolveMatrix.h:

(WebCore::):

  • svg/svgattrs.in:
  • svg/svgtags.in:

WebKit/mac: Add ConvolveMatrixElement to MigrateHeaders.make
https://bugs.webkit.org/show_bug.cgi?id=5861

Reviewed by Nikolas Zimmermann.

  • MigrateHeaders.make:

LayoutTests: Updating expected values for convolve matrix filter
https://bugs.webkit.org/show_bug.cgi?id=5861

Reviewed by Nikolas Zimmermann.

  • platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.txt:
  • svg/custom/global-constructors-expected.txt:
  • svg/custom/js-svg-constructors-expected.txt:
  • svg/custom/js-svg-constructors.svg:
Location:
trunk
Files:
3 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62091 r62092  
     12010-06-29  Zoltan Herczeg  <zherczeg@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Updating expected values for convolve matrix filter
     6        https://bugs.webkit.org/show_bug.cgi?id=5861
     7
     8        * platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.txt:
     9        * svg/custom/global-constructors-expected.txt:
     10        * svg/custom/js-svg-constructors-expected.txt:
     11        * svg/custom/js-svg-constructors.svg:
     12
    1132010-06-28  Adam Barth  <abarth@webkit.org>
    214
  • trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.txt

    r61393 r62092  
    77        RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    88          RenderSVGResourceFilter {filter} [id="convolve1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     9            [feConvolveMatrix order="width=3 height=3" kernelMatrix="[0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]" divisor="1.00" bias="0.00" target="(1,1)" edgeMode="NONE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     10              [SourceGraphic]
    911          RenderSVGResourceFilter {filter} [id="convolve2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     12            [feConvolveMatrix order="width=3 height=3" kernelMatrix="[-1.00, -1.00, -1.00, -1.00, 8.00, -1.00, -1.00, -1.00, -1.00]" divisor="1.00" bias="0.00" target="(1,1)" edgeMode="DUPLICATE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     13              [SourceGraphic]
    1014          RenderSVGResourceFilter {filter} [id="convolve3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     15            [feConvolveMatrix order="width=3 height=3" kernelMatrix="[-1.00, -1.00, -1.00, -1.00, 9.00, -1.00, -1.00, -1.00, -1.00]" divisor="1.00" bias="0.00" target="(1,1)" edgeMode="NONE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     16              [SourceGraphic]
    1117          RenderSVGResourceFilter {filter} [id="convolve4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     18            [feConvolveMatrix order="width=3 height=3" kernelMatrix="[-2.00, 0.00, 0.00, 0.00, 1.00, 0.00, 0.00, 0.00, 2.00]" divisor="1.00" bias="0.00" target="(1,1)" edgeMode="NONE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     19              [SourceGraphic]
    1220          RenderSVGResourceFilter {filter} [id="convolve5"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     21            [feConvolveMatrix order="width=3 height=1" kernelMatrix="[0.33, 0.33, 0.33]" divisor="1.00" bias="0.00" target="(1,0)" edgeMode="NONE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     22              [SourceGraphic]
    1323          RenderSVGResourceFilter {filter} [id="convolve6"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
     24            [feConvolveMatrix order="width=1 height=3" kernelMatrix="[0.33, 0.33, 0.33]" divisor="1.00" bias="0.00" target="(0,1)" edgeMode="NONE" kernelUnitLength="(0,0)" preserveAlpha="0"]
     25              [SourceGraphic]
    1426        RenderSVGContainer {g} at (30,46) size 415x180
    1527          RenderSVGText {text} at (10,6) size 66x18 contains 1 chunk(s)
  • trunk/LayoutTests/svg/custom/global-constructors-expected.txt

    r59010 r62092  
    119119PASS SVGFEFuncAElement.toString() is '[object SVGFEFuncAElementConstructor]'
    120120PASS SVGFECompositeElement.toString() is '[object SVGFECompositeElementConstructor]'
    121 FAIL SVGFEConvolveMatrixElement.toString() should be [object SVGFEConvolveMatrixElementConstructor]. Threw exception ReferenceError: Can't find variable: SVGFEConvolveMatrixElement
     121PASS SVGFEConvolveMatrixElement.toString() is '[object SVGFEConvolveMatrixElementConstructor]'
    122122PASS SVGFEDiffuseLightingElement.toString() is '[object SVGFEDiffuseLightingElementConstructor]'
    123123PASS SVGFEDistantLightElement.toString() is '[object SVGFEDistantLightElementConstructor]'
  • trunk/LayoutTests/svg/custom/js-svg-constructors-expected.txt

    r51800 r62092  
    3636SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR PASSED
    3737SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC PASSED
     38SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN PASSED
     39SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE PASSED
     40SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP PASSED
     41SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE PASSED
    3842SVGFEDisplacementMapElement.SVG_CHANNEL_UNKNOWN PASSED
    3943SVGFEDisplacementMapElement.SVG_CHANNEL_R PASSED
  • trunk/LayoutTests/svg/custom/js-svg-constructors.svg

    r28568 r62092  
    7979
    8080      if (window.SVGFEConvolveMatrixElement) {
    81           expect_failure("SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN", 0);
    82           expect_failure("SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE", 1);
    83           expect_failure("SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP", 2);
    84           expect_failure("SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE", 3);
     81          expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN", 0);
     82          expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE", 1);
     83          expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP", 2);
     84          expect("SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE", 3);
    8585      }
    8686
  • trunk/WebCore/Android.derived.jscbindings.mk

    r61650 r62092  
    422422    $(intermediates)/svg/JSSVGFEComponentTransferElement.h \
    423423    $(intermediates)/svg/JSSVGFECompositeElement.h \
     424    $(intermediates)/svg/JSSVGFEConvolveMatrixElement.h \
    424425    $(intermediates)/svg/JSSVGFEDiffuseLightingElement.h \
    425426    $(intermediates)/svg/JSSVGFEDisplacementMapElement.h \
  • trunk/WebCore/Android.derived.v8bindings.mk

    r61650 r62092  
    393393    $(intermediates)/bindings/V8SVGFEComponentTransferElement.h \
    394394    $(intermediates)/bindings/V8SVGFECompositeElement.h \
     395    $(intermediates)/bindings/V8SVGFEConvolveMatrixElement.h \
    395396    $(intermediates)/bindings/V8SVGFEDiffuseLightingElement.h \
    396397    $(intermediates)/bindings/V8SVGFEDisplacementMapElement.h \
  • trunk/WebCore/Android.mk

    r61985 r62092  
    796796        svg/SVGFEComponentTransferElement.cpp \
    797797        svg/SVGFECompositeElement.cpp \
     798        svg/SVGFEConvolveMatrixElement.cpp \
    798799        svg/SVGFEDiffuseLightingElement.cpp \
    799800        svg/SVGFEDisplacementMapElement.cpp \
  • trunk/WebCore/CMakeLists.txt

    r61985 r62092  
    414414        svg/SVGFEComponentTransferElement.idl
    415415        svg/SVGFECompositeElement.idl
     416        svg/SVGFEConvolveMatrixElement.idl
    416417        svg/SVGFEDiffuseLightingElement.idl
    417418        svg/SVGFEDisplacementMapElement.idl
     
    15611562        svg/SVGFEComponentTransferElement.cpp
    15621563        svg/SVGFECompositeElement.cpp
     1564        svg/SVGFEConvolveMatrixElement.cpp
    15631565        svg/SVGFEDiffuseLightingElement.cpp
    15641566        svg/SVGFEDisplacementMapElement.cpp
  • trunk/WebCore/ChangeLog

    r62090 r62092  
     12010-06-29  Zoltan Herczeg  <zherczeg@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Add ConvolveMatrix SVG filter effect
     6        https://bugs.webkit.org/show_bug.cgi?id=5861
     7
     8        The patch was originally started by Dirk Schulze,
     9        and the .cpp and .h files are mostly his work.
     10        I updated the build systems and do some minor updates
     11        to the source files as well. The patch does not contain
     12        the implementation of the filter: this is intended,
     13        and will be landed in a follow-up patch.
     14
     15        * Android.derived.jscbindings.mk:
     16        * Android.derived.v8bindings.mk:
     17        * Android.mk:
     18        * CMakeLists.txt:
     19        * DerivedSources.cpp:
     20        * DerivedSources.make:
     21        * GNUmakefile.am:
     22        * WebCore.gypi:
     23        * WebCore.pri:
     24        * WebCore.pro:
     25        * WebCore.vcproj/WebCore.vcproj:
     26        * WebCore.xcodeproj/project.pbxproj:
     27        * bindings/objc/DOM.mm:
     28        (WebCore::createElementClassMap):
     29        * bindings/objc/DOMSVG.h:
     30        * page/DOMWindow.idl:
     31        * svg/SVGAllInOne.cpp:
     32        * svg/SVGFEConvolveMatrixElement.cpp: Added.
     33        (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
     34        (WebCore::SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement):
     35        (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute):
     36        (WebCore::SVGFEConvolveMatrixElement::setOrder):
     37        (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
     38        (WebCore::SVGFEConvolveMatrixElement::build):
     39        * svg/SVGFEConvolveMatrixElement.h: Added.
     40        * svg/SVGFEConvolveMatrixElement.idl: Added.
     41        * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
     42        (WebCore::FEConvolveMatrix::FEConvolveMatrix):
     43        (WebCore::FEConvolveMatrix::create):
     44        (WebCore::FEConvolveMatrix::kernelSize):
     45        (WebCore::FEConvolveMatrix::setKernelSize):
     46        (WebCore::FEConvolveMatrix::targetOffset):
     47        (WebCore::FEConvolveMatrix::setTargetOffset):
     48        (WebCore::operator<<):
     49        (WebCore::FEConvolveMatrix::externalRepresentation):
     50        * svg/graphics/filters/SVGFEConvolveMatrix.h:
     51        (WebCore::):
     52        * svg/svgattrs.in:
     53        * svg/svgtags.in:
     54
    1552010-06-28  Adam Barth  <abarth@webkit.org>
    256
  • trunk/WebCore/DerivedSources.cpp

    r61983 r62092  
    280280#include "JSSVGFEComponentTransferElement.cpp"
    281281#include "JSSVGFECompositeElement.cpp"
     282#include "JSSVGFEConvolveMatrixElement.cpp"
    282283#include "JSSVGFEDiffuseLightingElement.cpp"
    283284#include "JSSVGFEDisplacementMapElement.cpp"
  • trunk/WebCore/DerivedSources.make

    r61964 r62092  
    321321    SVGFEComponentTransferElement \
    322322    SVGFECompositeElement \
     323    SVGFEConvolveMatrixElement \
    323324    SVGFEDiffuseLightingElement \
    324325    SVGFEDisplacementMapElement \
  • trunk/WebCore/GNUmakefile.am

    r62049 r62092  
    32063206        WebCore/svg/SVGFEComponentTransferElement.idl \
    32073207        WebCore/svg/SVGFECompositeElement.idl \
     3208        WebCore/svg/SVGFEConvolveMatrixElement.idl \
    32083209        WebCore/svg/SVGFEDiffuseLightingElement.idl \
    32093210        WebCore/svg/SVGFEDisplacementMapElement.idl \
     
    34843485        WebCore/svg/SVGFECompositeElement.cpp \
    34853486        WebCore/svg/SVGFECompositeElement.h \
     3487        WebCore/svg/SVGFEConvolveMatrixElement.cpp \
     3488        WebCore/svg/SVGFEConvolveMatrixElement.h \
    34863489        WebCore/svg/SVGFEDiffuseLightingElement.cpp \
    34873490        WebCore/svg/SVGFEDiffuseLightingElement.h \
  • trunk/WebCore/WebCore.gypi

    r61985 r62092  
    317317            'svg/SVGFEComponentTransferElement.idl',
    318318            'svg/SVGFECompositeElement.idl',
     319            'svg/SVGFEConvolveMatrixElement.idl',
    319320            'svg/SVGFEDiffuseLightingElement.idl',
    320321            'svg/SVGFEDisplacementMapElement.idl',
     
    36063607            'svg/SVGFECompositeElement.cpp',
    36073608            'svg/SVGFECompositeElement.h',
     3609            'svg/SVGFEConvolveMatrixElement.cpp',
     3610            'svg/SVGFEConvolveMatrixElement.h',
    36083611            'svg/SVGFEDiffuseLightingElement.cpp',
    36093612            'svg/SVGFEDiffuseLightingElement.h',
  • trunk/WebCore/WebCore.pri

    r62049 r62092  
    532532    svg/SVGFEComponentTransferElement.idl \
    533533    svg/SVGFECompositeElement.idl \
     534    svg/SVGFEConvolveMatrixElement.idl \
    534535    svg/SVGFEDiffuseLightingElement.idl \
    535536    svg/SVGFEDisplacementMapElement.idl \
  • trunk/WebCore/WebCore.pro

    r61985 r62092  
    19231923    svg/SVGFEComponentTransferElement.h \
    19241924    svg/SVGFECompositeElement.h \
     1925    svg/SVGFEConvolveMatrixElement.h \
    19251926    svg/SVGFEDiffuseLightingElement.h \
    19261927    svg/SVGFEDisplacementMapElement.h \
     
    27212722        svg/SVGFEComponentTransferElement.cpp \
    27222723        svg/SVGFECompositeElement.cpp \
     2724        svg/SVGFEConvolveMatrixElement.cpp \
    27232725        svg/SVGFEDiffuseLightingElement.cpp \
    27242726        svg/SVGFEDisplacementMapElement.cpp \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r61985 r62092  
    1338213382                        </File>
    1338313383                        <File
     13384                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEConvolveMatrixElement.cpp"
     13385                                >
     13386                                <FileConfiguration
     13387                                        Name="Debug|Win32"
     13388                                        ExcludedFromBuild="true"
     13389                                        >
     13390                                        <Tool
     13391                                                Name="VCCLCompilerTool"
     13392                                        />
     13393                                </FileConfiguration>
     13394                                <FileConfiguration
     13395                                        Name="Release|Win32"
     13396                                        ExcludedFromBuild="true"
     13397                                        >
     13398                                        <Tool
     13399                                                Name="VCCLCompilerTool"
     13400                                        />
     13401                                </FileConfiguration>
     13402                                <FileConfiguration
     13403                                        Name="Debug_Internal|Win32"
     13404                                        ExcludedFromBuild="true"
     13405                                        >
     13406                                        <Tool
     13407                                                Name="VCCLCompilerTool"
     13408                                        />
     13409                                </FileConfiguration>
     13410                                <FileConfiguration
     13411                                        Name="Debug_Cairo|Win32"
     13412                                        ExcludedFromBuild="true"
     13413                                        >
     13414                                        <Tool
     13415                                                Name="VCCLCompilerTool"
     13416                                        />
     13417                                </FileConfiguration>
     13418                                <FileConfiguration
     13419                                        Name="Release_Cairo|Win32"
     13420                                        ExcludedFromBuild="true"
     13421                                        >
     13422                                        <Tool
     13423                                                Name="VCCLCompilerTool"
     13424                                        />
     13425                                </FileConfiguration>
     13426                                <FileConfiguration
     13427                                        Name="Debug_All|Win32"
     13428                                        ExcludedFromBuild="true"
     13429                                        >
     13430                                        <Tool
     13431                                                Name="VCCLCompilerTool"
     13432                                        />
     13433                                </FileConfiguration>
     13434                        </File>
     13435                        <File
     13436                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEConvolveMatrixElement.h"
     13437                                >
     13438                        </File>
     13439                        <File
    1338413440                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEDiffuseLightingElement.cpp"
    1338513441                                >
     
    4795048006                        </File>
    4795148007                        <File
     48008                                RelativePath="..\svg\SVGFEConvolveMatrixElement.h"
     48009                                >
     48010                        </File>
     48011                        <File
    4795248012                                RelativePath="..\svg\SVGFEDiffuseLightingElement.h"
    4795348013                                >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r61985 r62092  
    297297                188604B40F2E654A000B6443 /* DOMTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 188604B20F2E654A000B6443 /* DOMTimer.h */; };
    298298                18F831B80FD48C7800D8C56B /* WorkerLoaderProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 18F831B70FD48C7800D8C56B /* WorkerLoaderProxy.h */; };
     299                1921327411C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1921327111C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp */; };
     300                1921327511C0E6BB00456238 /* SVGFEConvolveMatrixElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1921327211C0E6BB00456238 /* SVGFEConvolveMatrixElement.h */; };
     301                19BFF64B11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */; };
     302                19BFF64C11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 19BFF64711C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm */; };
     303                19BFF64D11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */; };
     304                19BFF64E11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 19BFF64911C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.cpp */; };
     305                19BFF64F11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64A11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.h */; };
     306                19BFF6A311C10FDF00B8C04D /* DOMSVGFEConvolveMatrixElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */; };
     307                19BFF6A411C1102D00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */; };
    299308                1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */; };
    300309                1A0D57370A5C77FE007EDD4C /* OverflowEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0D57350A5C77FE007EDD4C /* OverflowEvent.h */; };
     
    53735382                                A8F46AC30CB20A9D003A9670 /* DOMSVGFECompositeElement.h in Copy Generated Headers */,
    53745383                                A80F3B310CCDCE24002DD990 /* DOMSVGFECompositeElementInternal.h in Copy Generated Headers */,
     5384                                19BFF6A311C10FDF00B8C04D /* DOMSVGFEConvolveMatrixElement.h in Copy Generated Headers */,
     5385                                19BFF6A411C1102D00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h in Copy Generated Headers */,
    53755386                                A80F3B430CCDCE24002DD990 /* DOMSVGFEDiffuseLightingElement.h in Copy Generated Headers */,
    53765387                                A80F3B440CCDCE24002DD990 /* DOMSVGFEDiffuseLightingElementInternal.h in Copy Generated Headers */,
     
    58625873                188604B20F2E654A000B6443 /* DOMTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMTimer.h; sourceTree = "<group>"; };
    58635874                18F831B70FD48C7800D8C56B /* WorkerLoaderProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerLoaderProxy.h; path = workers/WorkerLoaderProxy.h; sourceTree = "<group>"; };
     5875                1921327111C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEConvolveMatrixElement.cpp; sourceTree = "<group>"; };
     5876                1921327211C0E6BB00456238 /* SVGFEConvolveMatrixElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEConvolveMatrixElement.h; sourceTree = "<group>"; };
     5877                1921327311C0E6BB00456238 /* SVGFEConvolveMatrixElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGFEConvolveMatrixElement.idl; sourceTree = "<group>"; };
     5878                19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; path = DOMSVGFEConvolveMatrixElement.h; sourceTree = "<group>"; };
     5879                19BFF64711C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGFEConvolveMatrixElement.mm; sourceTree = "<group>"; };
     5880                19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; path = DOMSVGFEConvolveMatrixElementInternal.h; sourceTree = "<group>"; };
     5881                19BFF64911C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEConvolveMatrixElement.cpp; sourceTree = "<group>"; };
     5882                19BFF64A11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFEConvolveMatrixElement.h; sourceTree = "<group>"; };
    58645883                1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OverflowEvent.cpp; sourceTree = "<group>"; };
    58655884                1A0D57350A5C77FE007EDD4C /* OverflowEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OverflowEvent.h; sourceTree = "<group>"; };
     
    1252712546                                8502AB1B0AD438C000378540 /* DOMSVGFECompositeElement.mm */,
    1252812547                                A8E5447F0CA9D1C20097D09B /* DOMSVGFECompositeElementInternal.h */,
     12548                                19BFF64611C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h */,
     12549                                19BFF64711C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm */,
     12550                                19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */,
    1252912551                                8502AB1C0AD438C000378540 /* DOMSVGFEDiffuseLightingElement.h */,
    1253012552                                8502AB1D0AD438C000378540 /* DOMSVGFEDiffuseLightingElement.mm */,
     
    1321913241                                8502AB7A0AD4394E00378540 /* DOMSVGFEComponentTransferElementInternal.h */,
    1322013242                                8502AB7B0AD4394E00378540 /* DOMSVGFECompositeElementInternal.h */,
     13243                                19BFF64811C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h */,
    1322113244                                8502AB7C0AD4394E00378540 /* DOMSVGFEDiffuseLightingElementInternal.h */,
    1322213245                                8502AB7D0AD4394E00378540 /* DOMSVGFEDisplacementMapElementInternal.h */,
     
    1416414187                                B2FA3C880AB75A6E000E5AC4 /* JSSVGFECompositeElement.cpp */,
    1416514188                                B2FA3C890AB75A6E000E5AC4 /* JSSVGFECompositeElement.h */,
     14189                                19BFF64911C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.cpp */,
     14190                                19BFF64A11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.h */,
    1416614191                                B2FA3C8A0AB75A6E000E5AC4 /* JSSVGFEDiffuseLightingElement.cpp */,
    1416714192                                B2FA3C8B0AB75A6E000E5AC4 /* JSSVGFEDiffuseLightingElement.h */,
     
    1476614791                                B222783B0D00BF1F0071B782 /* SVGFECompositeElement.h */,
    1476714792                                B222783C0D00BF1F0071B782 /* SVGFECompositeElement.idl */,
     14793                                1921327111C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp */,
     14794                                1921327211C0E6BB00456238 /* SVGFEConvolveMatrixElement.h */,
     14795                                1921327311C0E6BB00456238 /* SVGFEConvolveMatrixElement.idl */,
    1476814796                                B222783D0D00BF1F0071B782 /* SVGFEDiffuseLightingElement.cpp */,
    1476914797                                B222783E0D00BF1F0071B782 /* SVGFEDiffuseLightingElement.h */,
     
    1761417642                                8502AB910AD4394E00378540 /* DOMSVGFECompositeElementInternal.h in Headers */,
    1761517643                                A8E5457D0CA9D1C20097D09B /* DOMSVGFECompositeElementInternal.h in Headers */,
     17644                                19BFF64B11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.h in Headers */,
     17645                                19BFF64D11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElementInternal.h in Headers */,
    1761617646                                8502AB480AD438C000378540 /* DOMSVGFEDiffuseLightingElement.h in Headers */,
    1761717647                                A8D0C5E10CCB459800B2CDD4 /* DOMSVGFEDiffuseLightingElement.h in Headers */,
     
    1858318613                                B2FA3D6F0AB75A6F000E5AC4 /* JSSVGFEComponentTransferElement.h in Headers */,
    1858418614                                B2FA3D710AB75A6F000E5AC4 /* JSSVGFECompositeElement.h in Headers */,
     18615                                19BFF64F11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.h in Headers */,
    1858518616                                B2FA3D730AB75A6F000E5AC4 /* JSSVGFEDiffuseLightingElement.h in Headers */,
    1858618617                                B2FA3D750AB75A6F000E5AC4 /* JSSVGFEDisplacementMapElement.h in Headers */,
     
    1921819249                                B22279D10D00BF220071B782 /* SVGFECompositeElement.h in Headers */,
    1921919250                                B255997B0D00D8BA00BB825C /* SVGFEConvolveMatrix.h in Headers */,
     19251                                1921327511C0E6BB00456238 /* SVGFEConvolveMatrixElement.h in Headers */,
    1922019252                                B255997D0D00D8BA00BB825C /* SVGFEDiffuseLighting.h in Headers */,
    1922119253                                B22279D40D00BF220071B782 /* SVGFEDiffuseLightingElement.h in Headers */,
     
    2022620258                                8502AB450AD438C000378540 /* DOMSVGFEComponentTransferElement.mm in Sources */,
    2022720259                                8502AB470AD438C000378540 /* DOMSVGFECompositeElement.mm in Sources */,
     20260                                19BFF64C11C0F2AC00B8C04D /* DOMSVGFEConvolveMatrixElement.mm in Sources */,
    2022820261                                8502AB490AD438C000378540 /* DOMSVGFEDiffuseLightingElement.mm in Sources */,
    2022920262                                8502AB4B0AD438C000378540 /* DOMSVGFEDisplacementMapElement.mm in Sources */,
     
    2099521028                                B2FA3D6E0AB75A6F000E5AC4 /* JSSVGFEComponentTransferElement.cpp in Sources */,
    2099621029                                B2FA3D700AB75A6F000E5AC4 /* JSSVGFECompositeElement.cpp in Sources */,
     21030                                19BFF64E11C0F2AC00B8C04D /* JSSVGFEConvolveMatrixElement.cpp in Sources */,
    2099721031                                B2FA3D720AB75A6F000E5AC4 /* JSSVGFEDiffuseLightingElement.cpp in Sources */,
    2099821032                                B2FA3D740AB75A6F000E5AC4 /* JSSVGFEDisplacementMapElement.cpp in Sources */,
     
    2159121625                                B22279D00D00BF220071B782 /* SVGFECompositeElement.cpp in Sources */,
    2159221626                                B255997A0D00D8BA00BB825C /* SVGFEConvolveMatrix.cpp in Sources */,
     21627                                1921327411C0E6BB00456238 /* SVGFEConvolveMatrixElement.cpp in Sources */,
    2159321628                                B255997C0D00D8BA00BB825C /* SVGFEDiffuseLighting.cpp in Sources */,
    2159421629                                B22279D30D00BF220071B782 /* SVGFEDiffuseLightingElement.cpp in Sources */,
  • trunk/WebCore/bindings/objc/DOM.mm

    r55639 r62092  
    166166    addElementClass(SVGNames::feComponentTransferTag, [DOMSVGFEComponentTransferElement class]);
    167167    addElementClass(SVGNames::feCompositeTag, [DOMSVGFECompositeElement class]);
     168    addElementClass(SVGNames::feConvolveMatrixTag, [DOMSVGFEConvolveMatrixElement class]);
    168169    addElementClass(SVGNames::feDiffuseLightingTag, [DOMSVGFEDiffuseLightingElement class]);
    169170    addElementClass(SVGNames::feDisplacementMapTag, [DOMSVGFEDisplacementMapElement class]);
  • trunk/WebCore/bindings/objc/DOMSVG.h

    r49400 r62092  
    6464#import <WebCore/DOMSVGFEComponentTransferElement.h>
    6565#import <WebCore/DOMSVGFECompositeElement.h>
     66#import <WebCore/DOMSVGFEConvolveMatrixElement.h>
    6667#import <WebCore/DOMSVGFEDiffuseLightingElement.h>
    6768#import <WebCore/DOMSVGFEDisplacementMapElement.h>
  • trunk/WebCore/page/DOMWindow.idl

    r61994 r62092  
    710710        attribute SVGFEComponentTransferElementConstructor SVGFEComponentTransferElement;
    711711        attribute SVGFECompositeElementConstructor SVGFECompositeElement;
    712 //      attribute SVGFEConvolveMatrixElementConstructor SVGFEConvolveMatrixElement;
     712        attribute SVGFEConvolveMatrixElementConstructor SVGFEConvolveMatrixElement;
    713713        attribute SVGFEDiffuseLightingElementConstructor SVGFEDiffuseLightingElement;
    714714        attribute SVGFEDisplacementMapElementConstructor SVGFEDisplacementMapElement;
  • trunk/WebCore/svg/SVGAllInOne.cpp

    r59010 r62092  
    5555#include "SVGFEComponentTransferElement.cpp"
    5656#include "SVGFECompositeElement.cpp"
     57#include "SVGFEConvolveMatrixElement.cpp"
    5758#include "SVGFEDiffuseLightingElement.cpp"
    5859#include "SVGFEDisplacementMapElement.cpp"
  • trunk/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp

    r59069 r62092  
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric@webkit.org>
     5                  2009 Dirk Schulze <krit@webkit.org>
     6                  2010 Zoltan Herczeg <zherczeg@webkit.org>
    57
    68    This library is free software; you can redistribute it and/or
     
    2426#if ENABLE(SVG) && ENABLE(FILTERS)
    2527#include "SVGFEConvolveMatrix.h"
     28
     29#include "CanvasPixelArray.h"
    2630#include "Filter.h"
     31#include "ImageData.h"
    2732#include "SVGRenderTreeAsText.h"
    2833
    2934namespace WebCore {
    3035
    31 FEConvolveMatrix::FEConvolveMatrix(FilterEffect* in, FilterEffect* in2, const FloatSize& kernelSize,
    32     const float& divisor, const float& bias, const FloatSize& targetOffset, EdgeModeType edgeMode,
     36FEConvolveMatrix::FEConvolveMatrix(FilterEffect* in, const IntSize& kernelSize,
     37    float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
    3338    const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
    3439    : FilterEffect()
    3540    , m_in(in)
    36     , m_in2(in2)
    3741    , m_kernelSize(kernelSize)
    3842    , m_divisor(divisor)
     
    4650}
    4751
    48 PassRefPtr<FEConvolveMatrix> FEConvolveMatrix::create(FilterEffect* in, FilterEffect* in2, const FloatSize& kernelSize,
    49     const float& divisor, const float& bias, const FloatSize& targetOffset, EdgeModeType edgeMode,
     52PassRefPtr<FEConvolveMatrix> FEConvolveMatrix::create(FilterEffect* in, const IntSize& kernelSize,
     53    float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
    5054    const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
    5155{
    52     return adoptRef(new FEConvolveMatrix(in, in2, kernelSize, divisor, bias, targetOffset, edgeMode, kernelUnitLength,
     56    return adoptRef(new FEConvolveMatrix(in, kernelSize, divisor, bias, targetOffset, edgeMode, kernelUnitLength,
    5357        preserveAlpha, kernelMatrix));
    5458}
    5559
    5660
    57 FloatSize FEConvolveMatrix::kernelSize() const
     61IntSize FEConvolveMatrix::kernelSize() const
    5862{
    5963    return m_kernelSize;
    6064}
    6165
    62 void FEConvolveMatrix::setKernelSize(FloatSize kernelSize)
     66void FEConvolveMatrix::setKernelSize(IntSize kernelSize)
    6367{
    6468    m_kernelSize = kernelSize;
     
    9599}
    96100
    97 FloatSize FEConvolveMatrix::targetOffset() const
     101IntPoint FEConvolveMatrix::targetOffset() const
    98102{
    99103    return m_targetOffset;
    100104}
    101105
    102 void FEConvolveMatrix::setTargetOffset(FloatSize targetOffset)
     106void FEConvolveMatrix::setTargetOffset(IntPoint targetOffset)
    103107{
    104108    m_targetOffset = targetOffset;
     
    145149static TextStream& operator<<(TextStream& ts, const EdgeModeType& type)
    146150{
    147     switch (type)
    148     {
     151    switch (type) {
    149152    case EDGEMODE_UNKNOWN:
    150153        ts << "UNKNOWN";
     
    177180       << "preserveAlpha=\"" << m_preserveAlpha << "\"]\n";
    178181    m_in->externalRepresentation(ts, indent + 1);
    179     m_in2->externalRepresentation(ts, indent + 1);
    180182    return ts;
    181183}
  • trunk/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.h

    r59069 r62092  
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric@webkit.org>
     5                  2010 Zoltan Herczeg <zherczeg@webkit.org>
    56
    67    This library is free software; you can redistribute it and/or
     
    2829#include "FloatSize.h"
    2930#include "Filter.h"
     31#include <wtf/AlwaysInline.h>
    3032#include <wtf/Vector.h>
    3133
    3234namespace WebCore {
    3335
    34     enum EdgeModeType {
    35         EDGEMODE_UNKNOWN   = 0,
    36         EDGEMODE_DUPLICATE = 1,
    37         EDGEMODE_WRAP      = 2,
    38         EDGEMODE_NONE      = 3
    39     };
     36enum EdgeModeType {
     37    EDGEMODE_UNKNOWN   = 0,
     38    EDGEMODE_DUPLICATE = 1,
     39    EDGEMODE_WRAP      = 2,
     40    EDGEMODE_NONE      = 3
     41};
    4042
    41     class FEConvolveMatrix : public FilterEffect {
    42     public:
    43         static PassRefPtr<FEConvolveMatrix> create(FilterEffect*, FilterEffect*, const FloatSize&,
    44                 const float&, const float&, const FloatSize&, EdgeModeType, const FloatPoint&,
    45                 bool, const Vector<float>&);
     43class CanvasPixelArray;
    4644
    47         FloatSize kernelSize() const;
    48         void setKernelSize(FloatSize);
     45class FEConvolveMatrix : public FilterEffect {
     46public:
     47    static PassRefPtr<FEConvolveMatrix> create(FilterEffect*, const IntSize&,
     48            float, float, const IntPoint&, EdgeModeType, const FloatPoint&,
     49            bool, const Vector<float>&);
    4950
    50         const Vector<float>& kernel() const;
    51         void setKernel(const Vector<float>&);
     51    IntSize kernelSize() const;
     52    void setKernelSize(IntSize);
    5253
    53         float divisor() const;
    54         void setDivisor(float);
     54    const Vector<float>& kernel() const;
     55    void setKernel(const Vector<float>&);
    5556
    56         float bias() const;
    57         void setBias(float);
     57    float divisor() const;
     58    void setDivisor(float);
    5859
    59         FloatSize targetOffset() const;
    60         void setTargetOffset(FloatSize);
     60    float bias() const;
     61    void setBias(float);
    6162
    62         EdgeModeType edgeMode() const;
    63         void setEdgeMode(EdgeModeType);
     63    IntPoint targetOffset() const;
     64    void setTargetOffset(IntPoint);
    6465
    65         FloatPoint kernelUnitLength() const;
    66         void setKernelUnitLength(FloatPoint);
     66    EdgeModeType edgeMode() const;
     67    void setEdgeMode(EdgeModeType);
    6768
    68         bool preserveAlpha() const;
    69         void setPreserveAlpha(bool);
     69    FloatPoint kernelUnitLength() const;
     70    void setKernelUnitLength(FloatPoint);
    7071
    71         virtual FloatRect uniteChildEffectSubregions(Filter* filter) { return calculateUnionOfChildEffectSubregions(filter, m_in.get(), m_in2.get()); }
    72         void apply(Filter*);
    73         void dump();
    74         TextStream& externalRepresentation(TextStream&, int indent) const;
     72    bool preserveAlpha() const;
     73    void setPreserveAlpha(bool);
    7574
    76     private:
    77         FEConvolveMatrix(FilterEffect*, FilterEffect*, const FloatSize&, const float&, const float&,
    78                 const FloatSize&, EdgeModeType, const FloatPoint&, bool, const Vector<float>&);
     75    void apply(Filter*);
     76    void dump();
     77    TextStream& externalRepresentation(TextStream&, int indent) const;
    7978
    80         RefPtr<FilterEffect> m_in;
    81         RefPtr<FilterEffect> m_in2;
    82         FloatSize m_kernelSize;
    83         float m_divisor;
    84         float m_bias;
    85         FloatSize m_targetOffset;
    86         EdgeModeType m_edgeMode;
    87         FloatPoint m_kernelUnitLength;
    88         bool m_preserveAlpha;
    89         Vector<float> m_kernelMatrix;
    90     };
     79private:
     80    FEConvolveMatrix(FilterEffect*, const IntSize&, float, float,
     81            const IntPoint&, EdgeModeType, const FloatPoint&, bool, const Vector<float>&);
     82
     83    RefPtr<FilterEffect> m_in;
     84    IntSize m_kernelSize;
     85    float m_divisor;
     86    float m_bias;
     87    IntPoint m_targetOffset;
     88    EdgeModeType m_edgeMode;
     89    FloatPoint m_kernelUnitLength;
     90    bool m_preserveAlpha;
     91    Vector<float> m_kernelMatrix;
     92};
    9193
    9294} // namespace WebCore
  • trunk/WebCore/svg/svgattrs.in

    r60885 r62092  
    142142operator
    143143order
     144orderX
     145orderY
    144146orient
    145147orientation
  • trunk/WebCore/svg/svgtags.in

    r61846 r62092  
    3232feComponentTransfer createWithNew
    3333feComposite createWithNew
    34 #if 0
    3534feConvolveMatrix createWithNew
    36 #endif
    3735feDiffuseLighting createWithNew
    3836feDisplacementMap createWithNew
  • trunk/WebKit/mac/ChangeLog

    r62049 r62092  
     12010-06-29  Zoltan Herczeg  <zherczeg@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Add ConvolveMatrixElement to MigrateHeaders.make
     6        https://bugs.webkit.org/show_bug.cgi?id=5861
     7
     8        * MigrateHeaders.make:
     9
    1102010-06-23  John Gregg  <johnnyg@google.com>
    211
  • trunk/WebKit/mac/MigrateHeaders.make

    r58542 r62092  
    269269    $(PRIVATE_HEADERS_DIR)/DOMSVGFECompositeElement.h \
    270270    $(INTERNAL_HEADERS_DIR)/DOMSVGFECompositeElementInternal.h \
     271    $(PRIVATE_HEADERS_DIR)/DOMSVGFEConvolveMatrixElement.h \
     272    $(INTERNAL_HEADERS_DIR)/DOMSVGFEConvolveMatrixElementInternal.h \
    271273    $(PRIVATE_HEADERS_DIR)/DOMSVGFEDiffuseLightingElement.h \
    272274    $(INTERNAL_HEADERS_DIR)/DOMSVGFEDiffuseLightingElementInternal.h \
Note: See TracChangeset for help on using the changeset viewer.