Bug #: 5969
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jan 2006 09:10:04 +0000 (09:10 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jan 2006 09:10:04 +0000 (09:10 +0000)
commit7e56ae1cbab7bc875dd8e7233a3ddb89e2980ceb
tree7581b8dfeac00674da75ccef8c02c0c24bf3ff0c
parent8509f8178674c44c50a051447b348e4ea1602fad
Bug #: 5969
Submitted by: Alexander Kellett  <lypanov@kde.org>
Reviewed by: eseidel
        Basic support for <mask> tag.
        http://bugzilla.opendarwin.org/show_bug.cgi?id=5969
        Still missing attribute support for: maskUnits, maskContentUnits.

        Mask pixel tests do not work in DumpRenderTree due to:
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6327
        Added test cases anyway.

        This also tickles a (known) gradient update issue:
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6052

        * WebCore.xcodeproj/project.pbxproj: added Mask files
        * kcanvas/KCanvasResources.cpp:
        (KCanvasMasker::KCanvasMasker): added.
        (KCanvasMasker::~KCanvasMasker): added.
        (KCanvasMasker::setMask): added.
        (KCanvasMasker::externalRepresentation): added.
        (getMaskerById): added.
        * kcanvas/KCanvasResources.h:
        (KCanvasResource::isMasker): added.
        (KCanvasMasker::isMasker): added.
        (KCanvasMasker::mask): added.
        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
        (KCanvasItemQuartz::paint): added mask support
        * kcanvas/device/quartz/KCanvasMaskerQuartz.h: Added.
        (KCanvasMaskerQuartz::KCanvasMaskerQuartz): added.
        * kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Added.
        (applyLuminanceToAlphaFilter): added.
        (applyExpandAlphatoGrayscaleFilter): added.
        (transformImageIntoGrayscaleMask): added.
        (KCanvasMaskerQuartz::applyMask): added.
        * kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
        (KCanvasContainerQuartz::paint): added mask support.
        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
        (KRenderingDeviceQuartz::createResource): added mask support.
        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
        (KRenderingPaintServerRadialGradientQuartz::draw):
        * kcanvas/device/quartz/QuartzSupport.h:
        * kcanvas/device/quartz/QuartzSupport.mm:
        (debugDumpCGImageToFile): added, debug only.
        (debugDumpCGLayerToFile): added, debug only.
        (debugDumpCIImageToFile): added, debug only.
        * ksvg2/css/SVGCSSStyleSelector.cpp:
        (KDOM::CSSStyleSelector::applySVGProperty): added mask support.
        * ksvg2/css/SVGRenderStyle.cpp:
        (SVGRenderStyle::SVGRenderStyle): added mask support.
        (SVGRenderStyle::operator==): added mask support.
        * ksvg2/css/SVGRenderStyle.h:
        * ksvg2/css/SVGRenderStyleDefs.cpp:
        (StyleMaskData::StyleMaskData): added mask support.
        (StyleMaskData::operator==): added mask support.
        * ksvg2/css/SVGRenderStyleDefs.h:
        (KSVG::StyleMaskData::operator!=): added mask support.
        * ksvg2/ecma/Ecma.cpp:
        (Ecma::inheritedGetDOMNode): added mask support.
        * ksvg2/svg/SVGMaskElementImpl.cpp: Added.
        (KSVG::SVGMaskElementImpl::SVGMaskElementImpl): added.
        (KSVG::SVGMaskElementImpl::~SVGMaskElementImpl): added.
        (KSVG::SVGMaskElementImpl::x): added.
        (KSVG::SVGMaskElementImpl::y): added.
        (KSVG::SVGMaskElementImpl::width): added.
        (KSVG::SVGMaskElementImpl::height): added.
        (KSVG::SVGMaskElementImpl::attributeChanged): added.
        (KSVG::SVGMaskElementImpl::childrenChanged): added.
        (KSVG::SVGMaskElementImpl::parseMappedAttribute): added.
        (KSVG::SVGMaskElementImpl::drawMaskerContent): added.
        (KSVG::SVGMaskElementImpl::createRenderer): added.
        (KSVG::SVGMaskElementImpl::canvasResource): added.
        * ksvg2/svg/SVGMaskElementImpl.h: Added.
        (KSVG::SVGMaskElementImpl::isValid): added.
        (KSVG::SVGMaskElementImpl::rendererIsNeeded): added.
        * ksvg2/svg/svgtags.in: added <mask> support.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@11904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/kcanvas/KCanvasResources.cpp
WebCore/kcanvas/KCanvasResources.h
WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm
WebCore/kcanvas/device/quartz/KCanvasMaskerQuartz.h [new file with mode: 0644]
WebCore/kcanvas/device/quartz/KCanvasMaskerQuartz.mm [new file with mode: 0644]
WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingDeviceQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm
WebCore/kcanvas/device/quartz/QuartzSupport.h
WebCore/kcanvas/device/quartz/QuartzSupport.mm
WebCore/ksvg2/css/SVGCSSStyleSelector.cpp
WebCore/ksvg2/css/SVGRenderStyle.cpp
WebCore/ksvg2/css/SVGRenderStyle.h
WebCore/ksvg2/css/SVGRenderStyleDefs.cpp
WebCore/ksvg2/css/SVGRenderStyleDefs.h
WebCore/ksvg2/ecma/Ecma.cpp
WebCore/ksvg2/svg/SVGMaskElementImpl.cpp [new file with mode: 0644]
WebCore/ksvg2/svg/SVGMaskElementImpl.h [new file with mode: 0644]
WebCore/ksvg2/svg/svgtags.in