Commit 40701cbd authored by antti@apple.com's avatar antti@apple.com

2008-03-26 Antti Koivisto <antti@apple.com>

        Reviewed by Adam.

        Add ElementTimeControl interface to SVGAnimationElement.
        Passes Acid3 test 75.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * svg/ElementTimeControl.h: Added.
        (WebCore::ElementTimeControl::~ElementTimeControl):
        * svg/ElementTimeControl.idl: Added.
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::beginElement):
        (WebCore::SVGAnimationElement::beginElementAt):
        (WebCore::SVGAnimationElement::endElement):
        (WebCore::SVGAnimationElement::endElementAt):
        * svg/SVGAnimationElement.h:
        * svg/SVGAnimationElement.idl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 76e8c5cb
2008-03-26 Antti Koivisto <antti@apple.com>
Reviewed by Adam.
Add ElementTimeControl interface to SVGAnimationElement.
Passes Acid3 test 75.
* DerivedSources.make:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/ElementTimeControl.h: Added.
(WebCore::ElementTimeControl::~ElementTimeControl):
* svg/ElementTimeControl.idl: Added.
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::beginElement):
(WebCore::SVGAnimationElement::beginElementAt):
(WebCore::SVGAnimationElement::endElement):
(WebCore::SVGAnimationElement::endElementAt):
* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.idl:
2008-03-26 Kevin McCullough <kmccullough@apple.com>
- LayoutTest fix. Null check.
......@@ -77,6 +77,7 @@ DOM_CLASSES = \
DocumentFragment \
DocumentType \
Element \
ElementTimeControl \
Entity \
EntityReference \
Event \
......
......@@ -1302,7 +1302,8 @@ contains(DEFINES, ENABLE_SVG=1) {
XLINK_NAMES = $$PWD/svg/xlinkattrs.in
IDL_BINDINGS += svg/SVGZoomEvent.idl \
IDL_BINDINGS += svg/ElementTimeControl.idl \
svg/SVGZoomEvent.idl \
svg/SVGAElement.idl \
svg/SVGAltGlyphElement.idl \
svg/SVGAngle.idl \
......
......@@ -10410,6 +10410,10 @@
RelativePath="..\svg\ColorDistance.h"
>
</File>
<File
RelativePath="..\svg\ElementTimeControl.h"
>
</File>
<File
RelativePath="..\svg\SVGAElement.cpp"
>
......
......@@ -3832,6 +3832,8 @@
E1EE793A0D6C9B2700FEA3BA /* MainThreadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1EE79390D6C9B2700FEA3BA /* MainThreadMac.mm */; };
E1F1E82F0C3C2BB9006DB391 /* XSLTExtensions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1F1E82D0C3C2BB9006DB391 /* XSLTExtensions.cpp */; };
E1F1E8300C3C2BB9006DB391 /* XSLTExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = E1F1E82E0C3C2BB9006DB391 /* XSLTExtensions.h */; };
E415F1690D9A165D0033CE97 /* DOMElementTimeControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */; };
E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E415F1830D9A1A830033CE97 /* ElementTimeControl.h */; };
E44613A10CD6331000FADA75 /* HTMLAudioElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */; };
E44613A20CD6331000FADA75 /* HTMLAudioElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E44613900CD6331000FADA75 /* HTMLAudioElement.h */; };
E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44613920CD6331000FADA75 /* HTMLMediaElement.cpp */; };
......@@ -8050,6 +8052,9 @@
E1EE79390D6C9B2700FEA3BA /* MainThreadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MainThreadMac.mm; sourceTree = "<group>"; };
E1F1E82D0C3C2BB9006DB391 /* XSLTExtensions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTExtensions.cpp; sourceTree = "<group>"; };
E1F1E82E0C3C2BB9006DB391 /* XSLTExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTExtensions.h; sourceTree = "<group>"; };
E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ElementTimeControl.idl; sourceTree = "<group>"; };
E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMElementTimeControl.h; sourceTree = "<group>"; };
E415F1830D9A1A830033CE97 /* ElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementTimeControl.h; sourceTree = "<group>"; };
E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAudioElement.cpp; sourceTree = "<group>"; };
E44613900CD6331000FADA75 /* HTMLAudioElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAudioElement.h; sourceTree = "<group>"; };
E44613910CD6331000FADA75 /* HTMLAudioElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAudioElement.idl; sourceTree = "<group>"; };
......@@ -8953,6 +8958,7 @@
85A0F98E0AC716F400161FDC /* SVG */ = {
isa = PBXGroup;
children = (
E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */,
B27B282D0CEF0C3500D39D54 /* DOMSVGFontElement.h */,
B27B282E0CEF0C3500D39D54 /* DOMSVGFontElement.mm */,
B27B282F0CEF0C3500D39D54 /* DOMSVGFontElementInternal.h */,
......@@ -10957,6 +10963,8 @@
B25598860D00D8B800BB825C /* graphics */,
B22277CB0D00BF1F0071B782 /* ColorDistance.cpp */,
B22277CC0D00BF1F0071B782 /* ColorDistance.h */,
E415F1830D9A1A830033CE97 /* ElementTimeControl.h */,
E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */,
B22277CD0D00BF1F0071B782 /* GradientAttributes.h */,
B22277CE0D00BF1F0071B782 /* LinearGradientAttributes.h */,
B22277DB0D00BF1F0071B782 /* PatternAttributes.h */,
......@@ -14643,6 +14651,8 @@
65653F2E0D9727D200CA9723 /* SVGAltGlyphElement.h in Headers */,
65AA6BAF0D974A00000541AE /* DOMSVGAltGlyphElement.h in Headers */,
65AA6BB10D974A00000541AE /* DOMSVGAltGlyphElementInternal.h in Headers */,
E415F1690D9A165D0033CE97 /* DOMElementTimeControl.h in Headers */,
E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -54,7 +54,8 @@ my %implIncludes = ();
my %protocolTypeHash = ("XPathNSResolver" => 1, "EventListener" => 1, "EventTarget" => 1, "NodeFilter" => 1,
"SVGLocatable" => 1, "SVGTransformable" => 1, "SVGStylable" => 1, "SVGFilterPrimitiveStandardAttributes" => 1,
"SVGTests" => 1, "SVGLangSpace" => 1, "SVGExternalResourcesRequired" => 1, "SVGURIReference" => 1,
"SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1, "SVGAnimatedPoints" => 1);
"SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1, "SVGAnimatedPoints" => 1,
"ElementTimeControl" => 1);
my %nativeObjCTypeHash = ("URL" => 1, "Color" => 1);
# FIXME: this should be replaced with a function that recurses up the tree
......
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
*
* 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 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 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.
*/
#ifndef ElementTimeControl_h
#define ElementTimeControl_h
#if ENABLE(SVG)
#include "ExceptionCode.h"
namespace WebCore {
class ElementTimeControl {
public:
virtual ~ElementTimeControl() {}
virtual bool beginElement(ExceptionCode&) = 0;
virtual bool beginElementAt(float offset, ExceptionCode&) = 0;
virtual bool endElement(ExceptionCode&) = 0;
virtual bool endElementAt(float offset, ExceptionCode&) = 0;
};
}
#endif
#endif
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
*
* 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 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 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, ObjCProtocol] ElementTimeControl {
boolean beginElement()
raises(DOMException);
boolean beginElementAt(in float offset)
raises(DOMException);
boolean endElement()
raises(DOMException);
boolean endElementAt(in float offset)
raises(DOMException);
};
}
......@@ -739,6 +739,26 @@ bool SVGAnimationElement::updateAnimatedValueForElapsedSeconds(double elapsedSec
return true; // value was updated, need to apply
}
bool SVGAnimationElement::beginElement(ExceptionCode& ec)
{
return false;
}
bool SVGAnimationElement::beginElementAt(float offset, ExceptionCode& ec)
{
return false;
}
bool SVGAnimationElement::endElement(ExceptionCode& ec)
{
return false;
}
bool SVGAnimationElement::endElementAt(float offset, ExceptionCode& ec)
{
return false;
}
}
......
......@@ -25,6 +25,7 @@
#define SVGAnimationElement_h
#if ENABLE(SVG)
#include "ElementTimeControl.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGStringList.h"
#include "SVGTests.h"
......@@ -77,7 +78,8 @@ namespace WebCore {
class SVGAnimationElement : public SVGElement,
public SVGTests,
public SVGExternalResourcesRequired
public SVGExternalResourcesRequired,
public ElementTimeControl
{
public:
SVGAnimationElement(const QualifiedName&, Document*);
......@@ -114,6 +116,13 @@ namespace WebCore {
double repeations() const;
static bool isIndefinite(double value);
// ElementTimeControl
virtual bool beginElement(ExceptionCode&);
virtual bool beginElementAt(float offset, ExceptionCode&);
virtual bool endElement(ExceptionCode&);
virtual bool endElementAt(float offset, ExceptionCode&);
protected:
mutable SVGElement* m_targetElement;
......
......@@ -27,7 +27,8 @@ module svg {
interface [Conditional=SVG] SVGAnimationElement : SVGElement,
SVGTests,
SVGExternalResourcesRequired {
SVGExternalResourcesRequired,
ElementTimeControl {
readonly attribute SVGElement targetElement;
float getStartTime();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment