зеркало из https://github.com/mozilla/gecko-dev.git
Bug 846908 - Move functions from nsISMILAnimationElement to SVGAnimationElement r=birtles
This commit is contained in:
Родитель
cdddb24556
Коммит
72ff004e95
|
@ -18,7 +18,6 @@ FAIL_ON_WARNINGS = 1
|
||||||
endif # !_MSC_VER
|
endif # !_MSC_VER
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
nsISMILAnimationElement.h \
|
|
||||||
nsISMILAttr.h \
|
nsISMILAttr.h \
|
||||||
nsISMILType.h \
|
nsISMILType.h \
|
||||||
nsSMILAnimationController.h \
|
nsSMILAnimationController.h \
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#ifndef NS_ISMILANIMATIONELEMENT_H_
|
|
||||||
#define NS_ISMILANIMATIONELEMENT_H_
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
// nsISMILAnimationElement: Interface for elements that control the animation of
|
|
||||||
// some property of another element, e.g. <animate>, <set>.
|
|
||||||
|
|
||||||
#define NS_ISMILANIMATIONELEMENT_IID \
|
|
||||||
{ 0x29792cd9, 0x0f96, 0x4ba6, \
|
|
||||||
{ 0xad, 0xea, 0x03, 0x0e, 0x0b, 0xfe, 0x1e, 0xb7 } }
|
|
||||||
|
|
||||||
class nsISMILAttr;
|
|
||||||
class nsSMILAnimationFunction;
|
|
||||||
class nsSMILTimeContainer;
|
|
||||||
class nsSMILTimedElement;
|
|
||||||
class nsIAtom;
|
|
||||||
class nsAttrValue;
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
namespace dom {
|
|
||||||
class Element;
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
|
||||||
|
|
||||||
enum nsSMILTargetAttrType {
|
|
||||||
eSMILTargetAttrType_auto,
|
|
||||||
eSMILTargetAttrType_CSS,
|
|
||||||
eSMILTargetAttrType_XML
|
|
||||||
};
|
|
||||||
|
|
||||||
class nsISMILAnimationElement : public nsISupports
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISMILANIMATIONELEMENT_IID)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns this element as a mozilla::dom::Element.
|
|
||||||
*/
|
|
||||||
virtual const mozilla::dom::Element& AsElement() const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Non-const version of Element()
|
|
||||||
*/
|
|
||||||
virtual mozilla::dom::Element& AsElement() = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns true if the element passes conditional processing
|
|
||||||
*/
|
|
||||||
virtual bool PassesConditionalProcessingTests() = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the source attribute as an nsAttrValue. The global namespace will
|
|
||||||
* be used.
|
|
||||||
*
|
|
||||||
* (The 'Anim' here and below is largely to avoid conflicts for subclasses
|
|
||||||
* that derive from Element)
|
|
||||||
*
|
|
||||||
* @param aName the name of the attr
|
|
||||||
* @returns true if the attribute was set (even when set to empty string)
|
|
||||||
* false when not set.
|
|
||||||
*/
|
|
||||||
virtual const nsAttrValue* GetAnimAttr(nsIAtom* aName) const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the current value of an attribute as a string. The global namespace
|
|
||||||
* will be used.
|
|
||||||
*
|
|
||||||
* @param aName the name of the attr
|
|
||||||
* @param aResult the value (may legitimately be the empty string) [OUT]
|
|
||||||
* @returns true if the attribute was set (even when set to empty string)
|
|
||||||
* false when not set.
|
|
||||||
*/
|
|
||||||
virtual bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check for the presence of an attribute in the global namespace.
|
|
||||||
*/
|
|
||||||
virtual bool HasAnimAttr(nsIAtom* aAttName) const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the target (animated) element.
|
|
||||||
*/
|
|
||||||
virtual mozilla::dom::Element* GetTargetElementContent() = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the name of the target (animated) attribute or property.
|
|
||||||
*/
|
|
||||||
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
|
|
||||||
nsIAtom** aLocalName) const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the type of the target (animated) attribute or property.
|
|
||||||
*/
|
|
||||||
virtual nsSMILTargetAttrType GetTargetAttributeType() const = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the SMIL animation function associated with this animation element.
|
|
||||||
*
|
|
||||||
* The animation function is owned by the animation element.
|
|
||||||
*/
|
|
||||||
virtual nsSMILAnimationFunction& AnimationFunction() = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the SMIL timed element associated with this animation element.
|
|
||||||
*
|
|
||||||
* The timed element is owned by the animation element.
|
|
||||||
*/
|
|
||||||
virtual nsSMILTimedElement& TimedElement() = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns the SMIL timed container root with which this animation element is
|
|
||||||
* associated (if any).
|
|
||||||
*/
|
|
||||||
virtual nsSMILTimeContainer* GetTimeContainer() = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsISMILAnimationElement,
|
|
||||||
NS_ISMILANIMATIONELEMENT_IID)
|
|
||||||
|
|
||||||
#endif // NS_ISMILANIMATIONELEMENT_H_
|
|
|
@ -10,10 +10,15 @@
|
||||||
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsISMILType;
|
class nsISMILType;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsIContent;
|
class nsIContent;
|
||||||
class nsAString;
|
class nsAString;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// nsISMILAttr: A variable targeted by SMIL for animation and can therefore have
|
// nsISMILAttr: A variable targeted by SMIL for animation and can therefore have
|
||||||
// an underlying (base) value and an animated value For example, an attribute of
|
// an underlying (base) value and an animated value For example, an attribute of
|
||||||
|
@ -46,7 +51,7 @@ public:
|
||||||
* @return NS_OK on success or an error code if creation failed.
|
* @return NS_OK on success or an error code if creation failed.
|
||||||
*/
|
*/
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const = 0;
|
bool& aPreventCachingOfSandwich) const = 0;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILTimedElement.h"
|
#include "nsSMILTimedElement.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "mozilla/AutoRestore.h"
|
#include "mozilla/AutoRestore.h"
|
||||||
|
@ -163,7 +163,7 @@ nsSMILAnimationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSMILAnimationController::RegisterAnimationElement(
|
nsSMILAnimationController::RegisterAnimationElement(
|
||||||
nsISMILAnimationElement* aAnimationElement)
|
SVGAnimationElement* aAnimationElement)
|
||||||
{
|
{
|
||||||
mAnimationElementTable.PutEntry(aAnimationElement);
|
mAnimationElementTable.PutEntry(aAnimationElement);
|
||||||
if (mDeferredStartSampling) {
|
if (mDeferredStartSampling) {
|
||||||
|
@ -181,7 +181,7 @@ nsSMILAnimationController::RegisterAnimationElement(
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSMILAnimationController::UnregisterAnimationElement(
|
nsSMILAnimationController::UnregisterAnimationElement(
|
||||||
nsISMILAnimationElement* aAnimationElement)
|
SVGAnimationElement* aAnimationElement)
|
||||||
{
|
{
|
||||||
mAnimationElementTable.RemoveEntry(aAnimationElement);
|
mAnimationElementTable.RemoveEntry(aAnimationElement);
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ nsSMILAnimationController::DoSample(bool aSkipUnchangedContainers)
|
||||||
// (ii) Create a table of compositors
|
// (ii) Create a table of compositors
|
||||||
//
|
//
|
||||||
// (i) Here we sample the timed elements (fetched from the
|
// (i) Here we sample the timed elements (fetched from the
|
||||||
// nsISMILAnimationElements) which determine from the active time if the
|
// SVGAnimationElements) which determine from the active time if the
|
||||||
// element is active and what its simple time etc. is. This information is
|
// element is active and what its simple time etc. is. This information is
|
||||||
// then passed to its time client (nsSMILAnimationFunction).
|
// then passed to its time client (nsSMILAnimationFunction).
|
||||||
//
|
//
|
||||||
|
@ -497,7 +497,7 @@ nsSMILAnimationController::RewindNeeded(TimeContainerPtrKey* aKey,
|
||||||
nsSMILAnimationController::RewindAnimation(AnimationElementPtrKey* aKey,
|
nsSMILAnimationController::RewindAnimation(AnimationElementPtrKey* aKey,
|
||||||
void* aData)
|
void* aData)
|
||||||
{
|
{
|
||||||
nsISMILAnimationElement* animElem = aKey->GetKey();
|
SVGAnimationElement* animElem = aKey->GetKey();
|
||||||
nsSMILTimeContainer* timeContainer = animElem->GetTimeContainer();
|
nsSMILTimeContainer* timeContainer = animElem->GetTimeContainer();
|
||||||
if (timeContainer && timeContainer->NeedsRewind()) {
|
if (timeContainer && timeContainer->NeedsRewind()) {
|
||||||
animElem->TimedElement().Rewind();
|
animElem->TimedElement().Rewind();
|
||||||
|
@ -566,7 +566,7 @@ nsSMILAnimationController::DoMilestoneSamples()
|
||||||
sampleTime = std::max(nextMilestone.mTime, sampleTime);
|
sampleTime = std::max(nextMilestone.mTime, sampleTime);
|
||||||
|
|
||||||
for (uint32_t i = 0; i < length; ++i) {
|
for (uint32_t i = 0; i < length; ++i) {
|
||||||
nsISMILAnimationElement* elem = params.mElements[i].get();
|
SVGAnimationElement* elem = params.mElements[i].get();
|
||||||
NS_ABORT_IF_FALSE(elem, "NULL animation element in list");
|
NS_ABORT_IF_FALSE(elem, "NULL animation element in list");
|
||||||
nsSMILTimeContainer* container = elem->GetTimeContainer();
|
nsSMILTimeContainer* container = elem->GetTimeContainer();
|
||||||
if (!container)
|
if (!container)
|
||||||
|
@ -669,7 +669,7 @@ nsSMILAnimationController::SampleAnimation(AnimationElementPtrKey* aKey,
|
||||||
NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
|
NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
|
||||||
NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
|
NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
|
||||||
|
|
||||||
nsISMILAnimationElement* animElem = aKey->GetKey();
|
SVGAnimationElement* animElem = aKey->GetKey();
|
||||||
if (animElem->PassesConditionalProcessingTests()) {
|
if (animElem->PassesConditionalProcessingTests()) {
|
||||||
SampleAnimationParams* params = static_cast<SampleAnimationParams*>(aData);
|
SampleAnimationParams* params = static_cast<SampleAnimationParams*>(aData);
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ nsSMILAnimationController::SampleAnimation(AnimationElementPtrKey* aKey,
|
||||||
|
|
||||||
/*static*/ void
|
/*static*/ void
|
||||||
nsSMILAnimationController::SampleTimedElement(
|
nsSMILAnimationController::SampleTimedElement(
|
||||||
nsISMILAnimationElement* aElement, TimeContainerHashtable* aActiveContainers)
|
SVGAnimationElement* aElement, TimeContainerHashtable* aActiveContainers)
|
||||||
{
|
{
|
||||||
nsSMILTimeContainer* timeContainer = aElement->GetTimeContainer();
|
nsSMILTimeContainer* timeContainer = aElement->GetTimeContainer();
|
||||||
if (!timeContainer)
|
if (!timeContainer)
|
||||||
|
@ -709,7 +709,7 @@ nsSMILAnimationController::SampleTimedElement(
|
||||||
|
|
||||||
/*static*/ void
|
/*static*/ void
|
||||||
nsSMILAnimationController::AddAnimationToCompositorTable(
|
nsSMILAnimationController::AddAnimationToCompositorTable(
|
||||||
nsISMILAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable)
|
SVGAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable)
|
||||||
{
|
{
|
||||||
// Add a compositor to the hash table if there's not already one there
|
// Add a compositor to the hash table if there's not already one there
|
||||||
nsSMILTargetIdentifier key;
|
nsSMILTargetIdentifier key;
|
||||||
|
@ -753,12 +753,12 @@ IsTransformAttribute(int32_t aNamespaceID, nsIAtom *aAttributeName)
|
||||||
aAttributeName == nsGkAtoms::gradientTransform);
|
aAttributeName == nsGkAtoms::gradientTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function that, given a nsISMILAnimationElement, looks up its target
|
// Helper function that, given a SVGAnimationElement, looks up its target
|
||||||
// element & target attribute and populates a nsSMILTargetIdentifier
|
// element & target attribute and populates a nsSMILTargetIdentifier
|
||||||
// for this target.
|
// for this target.
|
||||||
/*static*/ bool
|
/*static*/ bool
|
||||||
nsSMILAnimationController::GetTargetIdentifierForAnimation(
|
nsSMILAnimationController::GetTargetIdentifierForAnimation(
|
||||||
nsISMILAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult)
|
SVGAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult)
|
||||||
{
|
{
|
||||||
// Look up target (animated) element
|
// Look up target (animated) element
|
||||||
Element* targetElem = aAnimElem->GetTargetElementContent();
|
Element* targetElem = aAnimElem->GetTargetElementContent();
|
||||||
|
@ -779,7 +779,7 @@ nsSMILAnimationController::GetTargetIdentifierForAnimation(
|
||||||
// animateTransform can only animate transforms, conversely transforms
|
// animateTransform can only animate transforms, conversely transforms
|
||||||
// can only be animated by animateTransform
|
// can only be animated by animateTransform
|
||||||
if (IsTransformAttribute(attributeNamespaceID, attributeName) !=
|
if (IsTransformAttribute(attributeNamespaceID, attributeName) !=
|
||||||
aAnimElem->AsElement().IsSVG(nsGkAtoms::animateTransform))
|
(aAnimElem->Tag() == nsGkAtoms::animateTransform))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Look up target (animated) attribute-type
|
// Look up target (animated) attribute-type
|
||||||
|
|
|
@ -18,9 +18,14 @@
|
||||||
#include "nsRefreshDriver.h"
|
#include "nsRefreshDriver.h"
|
||||||
|
|
||||||
struct nsSMILTargetIdentifier;
|
struct nsSMILTargetIdentifier;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsIDocument;
|
class nsIDocument;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsSMILAnimationController
|
// nsSMILAnimationController
|
||||||
//
|
//
|
||||||
|
@ -56,8 +61,8 @@ public:
|
||||||
virtual void WillRefresh(mozilla::TimeStamp aTime);
|
virtual void WillRefresh(mozilla::TimeStamp aTime);
|
||||||
|
|
||||||
// Methods for registering and enumerating animation elements
|
// Methods for registering and enumerating animation elements
|
||||||
void RegisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
|
void RegisterAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
|
||||||
void UnregisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
|
void UnregisterAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
|
||||||
|
|
||||||
// Methods for resampling all animations
|
// Methods for resampling all animations
|
||||||
// (A resample performs the same operations as a sample but doesn't advance
|
// (A resample performs the same operations as a sample but doesn't advance
|
||||||
|
@ -104,7 +109,7 @@ protected:
|
||||||
// Typedefs
|
// Typedefs
|
||||||
typedef nsPtrHashKey<nsSMILTimeContainer> TimeContainerPtrKey;
|
typedef nsPtrHashKey<nsSMILTimeContainer> TimeContainerPtrKey;
|
||||||
typedef nsTHashtable<TimeContainerPtrKey> TimeContainerHashtable;
|
typedef nsTHashtable<TimeContainerPtrKey> TimeContainerHashtable;
|
||||||
typedef nsPtrHashKey<nsISMILAnimationElement> AnimationElementPtrKey;
|
typedef nsPtrHashKey<mozilla::dom::SVGAnimationElement> AnimationElementPtrKey;
|
||||||
typedef nsTHashtable<AnimationElementPtrKey> AnimationElementHashtable;
|
typedef nsTHashtable<AnimationElementPtrKey> AnimationElementHashtable;
|
||||||
|
|
||||||
struct SampleTimeContainerParams
|
struct SampleTimeContainerParams
|
||||||
|
@ -121,8 +126,8 @@ protected:
|
||||||
|
|
||||||
struct GetMilestoneElementsParams
|
struct GetMilestoneElementsParams
|
||||||
{
|
{
|
||||||
nsTArray<nsRefPtr<nsISMILAnimationElement> > mElements;
|
nsTArray<nsRefPtr<mozilla::dom::SVGAnimationElement> > mElements;
|
||||||
nsSMILMilestone mMilestone;
|
nsSMILMilestone mMilestone;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cycle-collection implementation helpers
|
// Cycle-collection implementation helpers
|
||||||
|
@ -161,12 +166,12 @@ protected:
|
||||||
TimeContainerPtrKey* aKey, void* aData);
|
TimeContainerPtrKey* aKey, void* aData);
|
||||||
static PLDHashOperator SampleAnimation(
|
static PLDHashOperator SampleAnimation(
|
||||||
AnimationElementPtrKey* aKey, void* aData);
|
AnimationElementPtrKey* aKey, void* aData);
|
||||||
static void SampleTimedElement(nsISMILAnimationElement* aElement,
|
static void SampleTimedElement(mozilla::dom::SVGAnimationElement* aElement,
|
||||||
TimeContainerHashtable* aActiveContainers);
|
TimeContainerHashtable* aActiveContainers);
|
||||||
static void AddAnimationToCompositorTable(
|
static void AddAnimationToCompositorTable(
|
||||||
nsISMILAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable);
|
mozilla::dom::SVGAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable);
|
||||||
static bool GetTargetIdentifierForAnimation(
|
static bool GetTargetIdentifierForAnimation(
|
||||||
nsISMILAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult);
|
mozilla::dom::SVGAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult);
|
||||||
|
|
||||||
// Methods for adding/removing time containers
|
// Methods for adding/removing time containers
|
||||||
virtual nsresult AddChild(nsSMILTimeContainer& aChild);
|
virtual nsresult AddChild(nsSMILTimeContainer& aChild);
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILAnimationFunction.h"
|
#include "nsSMILAnimationFunction.h"
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "nsSMILParserUtils.h"
|
#include "nsSMILParserUtils.h"
|
||||||
#include "nsSMILNullType.h"
|
#include "nsSMILNullType.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsSMILTimedElement.h"
|
#include "nsSMILTimedElement.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
@ -21,6 +21,8 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Static members
|
// Static members
|
||||||
|
|
||||||
|
@ -69,7 +71,7 @@ nsSMILAnimationFunction::nsSMILAnimationFunction()
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSMILAnimationFunction::SetAnimationElement(
|
nsSMILAnimationFunction::SetAnimationElement(
|
||||||
nsISMILAnimationElement* aAnimationElement)
|
SVGAnimationElement* aAnimationElement)
|
||||||
{
|
{
|
||||||
mAnimationElement = aAnimationElement;
|
mAnimationElement = aAnimationElement;
|
||||||
}
|
}
|
||||||
|
@ -301,13 +303,10 @@ nsSMILAnimationFunction::CompareTo(const nsSMILAnimationFunction* aOther) const
|
||||||
|
|
||||||
// Animations that appear later in the document sort after those earlier in
|
// Animations that appear later in the document sort after those earlier in
|
||||||
// the document
|
// the document
|
||||||
nsIContent& thisContent = mAnimationElement->AsElement();
|
NS_ABORT_IF_FALSE(mAnimationElement != aOther->mAnimationElement,
|
||||||
nsIContent& otherContent = aOther->mAnimationElement->AsElement();
|
|
||||||
|
|
||||||
NS_ABORT_IF_FALSE(&thisContent != &otherContent,
|
|
||||||
"Two animations cannot have the same animation content element!");
|
"Two animations cannot have the same animation content element!");
|
||||||
|
|
||||||
return (nsContentUtils::PositionIsBefore(&thisContent, &otherContent))
|
return (nsContentUtils::PositionIsBefore(mAnimationElement, aOther->mAnimationElement))
|
||||||
? -1 : 1;
|
? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,11 @@
|
||||||
#include "nsAttrValue.h"
|
#include "nsAttrValue.h"
|
||||||
#include "nsSMILTypes.h"
|
#include "nsSMILTypes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsSMILAnimationFunction
|
// nsSMILAnimationFunction
|
||||||
|
@ -41,7 +45,7 @@ public:
|
||||||
* Sets the owning animation element which this class uses to query attribute
|
* Sets the owning animation element which this class uses to query attribute
|
||||||
* values and compare document positions.
|
* values and compare document positions.
|
||||||
*/
|
*/
|
||||||
void SetAnimationElement(nsISMILAnimationElement* aAnimationElement);
|
void SetAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets animation-specific attributes (or marks them dirty, in the case
|
* Sets animation-specific attributes (or marks them dirty, in the case
|
||||||
|
@ -413,7 +417,7 @@ protected:
|
||||||
// position and for fetching attribute values stored in the element.
|
// position and for fetching attribute values stored in the element.
|
||||||
// Raw pointer is OK here, because this nsSMILAnimationFunction can't outlive
|
// Raw pointer is OK here, because this nsSMILAnimationFunction can't outlive
|
||||||
// its owning animation element.
|
// its owning animation element.
|
||||||
nsISMILAnimationElement* mAnimationElement;
|
mozilla::dom::SVGAnimationElement* mAnimationElement;
|
||||||
|
|
||||||
// Which attributes have been set but have had errors. This is not used for
|
// Which attributes have been set but have had errors. This is not used for
|
||||||
// all attributes but only those which have specified error behaviour
|
// all attributes but only those which have specified error behaviour
|
||||||
|
|
|
@ -123,7 +123,7 @@ nsSMILCSSProperty::GetBaseValue() const
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSMILCSSProperty::ValueFromString(const nsAString& aStr,
|
nsSMILCSSProperty::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -28,7 +28,7 @@ ReleaseStringBufferPropertyValue(void* aObject, /* unused */
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSMILMappedAttribute::ValueFromString(const nsAString& aStr,
|
nsSMILMappedAttribute::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "prlong.h"
|
#include "prlong.h"
|
||||||
#include "nsCharSeparatedTokenizer.h"
|
#include "nsCharSeparatedTokenizer.h"
|
||||||
|
|
||||||
|
using namespace mozilla::dom;
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Helper functions and Constants
|
// Helper functions and Constants
|
||||||
|
|
||||||
|
@ -520,7 +521,7 @@ nsSMILParserUtils::ParseSemicolonDelimitedProgressList(const nsAString& aSpec,
|
||||||
class SMILValueParser : public nsSMILParserUtils::GenericValueParser
|
class SMILValueParser : public nsSMILParserUtils::GenericValueParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SMILValueParser(const nsISMILAnimationElement* aSrcElement,
|
SMILValueParser(const SVGAnimationElement* aSrcElement,
|
||||||
const nsISMILAttr* aSMILAttr,
|
const nsISMILAttr* aSMILAttr,
|
||||||
nsTArray<nsSMILValue>* aValuesArray,
|
nsTArray<nsSMILValue>* aValuesArray,
|
||||||
bool* aPreventCachingOfSandwich) :
|
bool* aPreventCachingOfSandwich) :
|
||||||
|
@ -547,7 +548,7 @@ public:
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
const nsISMILAnimationElement* mSrcElement;
|
const SVGAnimationElement* mSrcElement;
|
||||||
const nsISMILAttr* mSMILAttr;
|
const nsISMILAttr* mSMILAttr;
|
||||||
nsTArray<nsSMILValue>* mValuesArray;
|
nsTArray<nsSMILValue>* mValuesArray;
|
||||||
bool* mPreventCachingOfSandwich;
|
bool* mPreventCachingOfSandwich;
|
||||||
|
@ -555,7 +556,7 @@ protected:
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSMILParserUtils::ParseValues(const nsAString& aSpec,
|
nsSMILParserUtils::ParseValues(const nsAString& aSpec,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const SVGAnimationElement* aSrcElement,
|
||||||
const nsISMILAttr& aAttribute,
|
const nsISMILAttr& aAttribute,
|
||||||
nsTArray<nsSMILValue>& aValuesArray,
|
nsTArray<nsSMILValue>& aValuesArray,
|
||||||
bool& aPreventCachingOfSandwich)
|
bool& aPreventCachingOfSandwich)
|
||||||
|
|
|
@ -11,12 +11,17 @@
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
|
|
||||||
class nsISMILAttr;
|
class nsISMILAttr;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILTimeValue;
|
class nsSMILTimeValue;
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSMILRepeatCount;
|
class nsSMILRepeatCount;
|
||||||
class nsSMILTimeValueSpecParams;
|
class nsSMILTimeValueSpecParams;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common parsing utilities for the SMIL module. There is little re-use here; it
|
* Common parsing utilities for the SMIL module. There is little re-use here; it
|
||||||
* simply serves to simplify other classes by moving parsing outside and to aid
|
* simply serves to simplify other classes by moving parsing outside and to aid
|
||||||
|
@ -40,7 +45,7 @@ public:
|
||||||
nsTArray<double>& aArray);
|
nsTArray<double>& aArray);
|
||||||
|
|
||||||
static nsresult ParseValues(const nsAString& aSpec,
|
static nsresult ParseValues(const nsAString& aSpec,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
const nsISMILAttr& aAttribute,
|
const nsISMILAttr& aAttribute,
|
||||||
nsTArray<nsSMILValue>& aValuesArray,
|
nsTArray<nsSMILValue>& aValuesArray,
|
||||||
bool& aPreventCachingOfSandwich);
|
bool& aPreventCachingOfSandwich);
|
||||||
|
|
|
@ -206,7 +206,7 @@ nsSMILTimeContainer::SetParent(nsSMILTimeContainer* aParent)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsSMILTimeContainer::AddMilestone(const nsSMILMilestone& aMilestone,
|
nsSMILTimeContainer::AddMilestone(const nsSMILMilestone& aMilestone,
|
||||||
nsISMILAnimationElement& aElement)
|
mozilla::dom::SVGAnimationElement& aElement)
|
||||||
{
|
{
|
||||||
// We record the milestone time and store it along with the element but this
|
// We record the milestone time and store it along with the element but this
|
||||||
// time may change (e.g. if attributes are changed on the timed element in
|
// time may change (e.g. if attributes are changed on the timed element in
|
||||||
|
@ -275,7 +275,7 @@ nsSMILTimeContainer::Traverse(nsCycleCollectionTraversalCallback* aCallback)
|
||||||
const MilestoneEntry* p = mMilestoneEntries.Elements();
|
const MilestoneEntry* p = mMilestoneEntries.Elements();
|
||||||
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
|
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
|
||||||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(*aCallback, "mTimebase");
|
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(*aCallback, "mTimebase");
|
||||||
aCallback->NoteXPCOMChild(p->mTimebase.get());
|
aCallback->NoteXPCOMChild(static_cast<nsIContent*>(p->mTimebase.get()));
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ nsSMILTimeContainer::NotifyTimeChange()
|
||||||
uint32_t queueLength = mMilestoneEntries.Length();
|
uint32_t queueLength = mMilestoneEntries.Length();
|
||||||
#endif
|
#endif
|
||||||
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
|
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
|
||||||
nsISMILAnimationElement* elem = p->mTimebase.get();
|
mozilla::dom::SVGAnimationElement* elem = p->mTimebase.get();
|
||||||
elem->TimedElement().HandleContainerTimeChange();
|
elem->TimedElement().HandleContainerTimeChange();
|
||||||
NS_ABORT_IF_FALSE(queueLength == mMilestoneEntries.Length(),
|
NS_ABORT_IF_FALSE(queueLength == mMilestoneEntries.Length(),
|
||||||
"Call to HandleContainerTimeChange resulted in a change to the "
|
"Call to HandleContainerTimeChange resulted in a change to the "
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
#ifndef NS_SMILTIMECONTAINER_H_
|
#ifndef NS_SMILTIMECONTAINER_H_
|
||||||
#define NS_SMILTIMECONTAINER_H_
|
#define NS_SMILTIMECONTAINER_H_
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "nsSMILTypes.h"
|
#include "nsSMILTypes.h"
|
||||||
#include "nsTPriorityQueue.h"
|
#include "nsTPriorityQueue.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsSMILMilestone.h"
|
#include "nsSMILMilestone.h"
|
||||||
|
|
||||||
class nsSMILTimeValue;
|
class nsSMILTimeValue;
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
* @return true if the element was successfully added, false otherwise.
|
* @return true if the element was successfully added, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool AddMilestone(const nsSMILMilestone& aMilestone,
|
bool AddMilestone(const nsSMILMilestone& aMilestone,
|
||||||
nsISMILAnimationElement& aElement);
|
mozilla::dom::SVGAnimationElement& aElement);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resets the list of milestones.
|
* Resets the list of milestones.
|
||||||
|
@ -188,7 +188,7 @@ public:
|
||||||
*/
|
*/
|
||||||
bool GetNextMilestoneInParentTime(nsSMILMilestone& aNextMilestone) const;
|
bool GetNextMilestoneInParentTime(nsSMILMilestone& aNextMilestone) const;
|
||||||
|
|
||||||
typedef nsTArray<nsRefPtr<nsISMILAnimationElement> > AnimElemArray;
|
typedef nsTArray<nsRefPtr<mozilla::dom::SVGAnimationElement> > AnimElemArray;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Removes and returns the timebase elements from the start of the list of
|
* Removes and returns the timebase elements from the start of the list of
|
||||||
|
@ -272,7 +272,7 @@ protected:
|
||||||
struct MilestoneEntry
|
struct MilestoneEntry
|
||||||
{
|
{
|
||||||
MilestoneEntry(nsSMILMilestone aMilestone,
|
MilestoneEntry(nsSMILMilestone aMilestone,
|
||||||
nsISMILAnimationElement& aElement)
|
mozilla::dom::SVGAnimationElement& aElement)
|
||||||
: mMilestone(aMilestone), mTimebase(&aElement)
|
: mMilestone(aMilestone), mTimebase(&aElement)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
nsSMILMilestone mMilestone; // In container time.
|
nsSMILMilestone mMilestone; // In container time.
|
||||||
nsRefPtr<nsISMILAnimationElement> mTimebase;
|
nsRefPtr<mozilla::dom::SVGAnimationElement> mTimebase;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Queue of elements with registered milestones. Used to update the model with
|
// Queue of elements with registered milestones. Used to update the model with
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILTimeValueSpec.h"
|
#include "nsSMILTimeValueSpec.h"
|
||||||
#include "nsSMILInterval.h"
|
#include "nsSMILInterval.h"
|
||||||
#include "nsSMILTimeContainer.h"
|
#include "nsSMILTimeContainer.h"
|
||||||
|
@ -10,7 +11,6 @@
|
||||||
#include "nsSMILTimedElement.h"
|
#include "nsSMILTimedElement.h"
|
||||||
#include "nsSMILInstanceTime.h"
|
#include "nsSMILInstanceTime.h"
|
||||||
#include "nsSMILParserUtils.h"
|
#include "nsSMILParserUtils.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsEventListenerManager.h"
|
#include "nsEventListenerManager.h"
|
||||||
#include "nsGUIEvent.h"
|
#include "nsGUIEvent.h"
|
||||||
#include "nsIDOMTimeEvent.h"
|
#include "nsIDOMTimeEvent.h"
|
||||||
|
@ -279,14 +279,8 @@ nsSMILTimeValueSpec::UnregisterFromReferencedElement(Element* aElement)
|
||||||
nsSMILTimedElement*
|
nsSMILTimedElement*
|
||||||
nsSMILTimeValueSpec::GetTimedElement(Element* aElement)
|
nsSMILTimeValueSpec::GetTimedElement(Element* aElement)
|
||||||
{
|
{
|
||||||
if (!aElement)
|
return aElement && aElement->IsNodeOfType(nsINode::eANIMATION) ?
|
||||||
return nullptr;
|
&static_cast<SVGAnimationElement*>(aElement)->TimedElement() : nullptr;
|
||||||
|
|
||||||
nsCOMPtr<nsISMILAnimationElement> animElement = do_QueryInterface(aElement);
|
|
||||||
if (!animElement)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
return &animElement->TimedElement();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Indicates whether we're allowed to register an event-listener
|
// Indicates whether we're allowed to register an event-listener
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "mozilla/DebugOnly.h"
|
#include "mozilla/DebugOnly.h"
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILTimedElement.h"
|
#include "nsSMILTimedElement.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
#include "nsSMILAnimationFunction.h"
|
#include "nsSMILAnimationFunction.h"
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Helper class: InstanceTimeComparator
|
// Helper class: InstanceTimeComparator
|
||||||
|
@ -263,7 +265,7 @@ nsSMILTimedElement::~nsSMILTimedElement()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSMILTimedElement::SetAnimationElement(nsISMILAnimationElement* aElement)
|
nsSMILTimedElement::SetAnimationElement(SVGAnimationElement* aElement)
|
||||||
{
|
{
|
||||||
NS_ABORT_IF_FALSE(aElement, "NULL owner element");
|
NS_ABORT_IF_FALSE(aElement, "NULL owner element");
|
||||||
NS_ABORT_IF_FALSE(!mAnimationElement, "Re-setting owner");
|
NS_ABORT_IF_FALSE(!mAnimationElement, "Re-setting owner");
|
||||||
|
@ -276,6 +278,14 @@ nsSMILTimedElement::GetTimeContainer()
|
||||||
return mAnimationElement ? mAnimationElement->GetTimeContainer() : nullptr;
|
return mAnimationElement ? mAnimationElement->GetTimeContainer() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dom::Element*
|
||||||
|
nsSMILTimedElement::GetTargetElement()
|
||||||
|
{
|
||||||
|
return mAnimationElement ?
|
||||||
|
mAnimationElement->GetTargetElementContent() :
|
||||||
|
nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIDOMElementTimeControl methods
|
// nsIDOMElementTimeControl methods
|
||||||
//
|
//
|
||||||
|
@ -763,13 +773,13 @@ nsSMILTimedElement::Rewind()
|
||||||
if (mAnimationElement->HasAnimAttr(nsGkAtoms::begin)) {
|
if (mAnimationElement->HasAnimAttr(nsGkAtoms::begin)) {
|
||||||
nsAutoString attValue;
|
nsAutoString attValue;
|
||||||
mAnimationElement->GetAnimAttr(nsGkAtoms::begin, attValue);
|
mAnimationElement->GetAnimAttr(nsGkAtoms::begin, attValue);
|
||||||
SetBeginSpec(attValue, &mAnimationElement->AsElement(), RemoveNonDynamic);
|
SetBeginSpec(attValue, mAnimationElement, RemoveNonDynamic);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mAnimationElement->HasAnimAttr(nsGkAtoms::end)) {
|
if (mAnimationElement->HasAnimAttr(nsGkAtoms::end)) {
|
||||||
nsAutoString attValue;
|
nsAutoString attValue;
|
||||||
mAnimationElement->GetAnimAttr(nsGkAtoms::end, attValue);
|
mAnimationElement->GetAnimAttr(nsGkAtoms::end, attValue);
|
||||||
SetEndSpec(attValue, &mAnimationElement->AsElement(), RemoveNonDynamic);
|
SetEndSpec(attValue, mAnimationElement, RemoveNonDynamic);
|
||||||
}
|
}
|
||||||
|
|
||||||
mPrevRegisteredMilestone = sMaxMilestone;
|
mPrevRegisteredMilestone = sMaxMilestone;
|
||||||
|
@ -2260,7 +2270,7 @@ nsSMILTimedElement::FireTimeEventAsync(uint32_t aMsg, int32_t aDetail)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsCOMPtr<nsIRunnable> event =
|
nsCOMPtr<nsIRunnable> event =
|
||||||
new AsyncTimeEventRunner(&mAnimationElement->AsElement(), aMsg, aDetail);
|
new AsyncTimeEventRunner(mAnimationElement, aMsg, aDetail);
|
||||||
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
|
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#ifndef NS_SMILTIMEDELEMENT_H_
|
#ifndef NS_SMILTIMEDELEMENT_H_
|
||||||
#define NS_SMILTIMEDELEMENT_H_
|
#define NS_SMILTIMEDELEMENT_H_
|
||||||
|
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsSMILInterval.h"
|
#include "nsSMILInterval.h"
|
||||||
#include "nsSMILInstanceTime.h"
|
#include "nsSMILInstanceTime.h"
|
||||||
#include "nsSMILMilestone.h"
|
#include "nsSMILMilestone.h"
|
||||||
|
@ -24,6 +23,12 @@ class nsSMILTimeContainer;
|
||||||
class nsSMILTimeValue;
|
class nsSMILTimeValue;
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsSMILTimedElement
|
// nsSMILTimedElement
|
||||||
|
|
||||||
|
@ -39,7 +44,7 @@ public:
|
||||||
* Sets the owning animation element which this class uses to convert between
|
* Sets the owning animation element which this class uses to convert between
|
||||||
* container times and to register timebase elements.
|
* container times and to register timebase elements.
|
||||||
*/
|
*/
|
||||||
void SetAnimationElement(nsISMILAnimationElement* aElement);
|
void SetAnimationElement(mozilla::dom::SVGAnimationElement* aElement);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the time container with which this timed element is associated or
|
* Returns the time container with which this timed element is associated or
|
||||||
|
@ -51,12 +56,7 @@ public:
|
||||||
* Returns the element targeted by the animation element. Needed for
|
* Returns the element targeted by the animation element. Needed for
|
||||||
* registering event listeners against the appropriate element.
|
* registering event listeners against the appropriate element.
|
||||||
*/
|
*/
|
||||||
mozilla::dom::Element* GetTargetElement()
|
mozilla::dom::Element* GetTargetElement();
|
||||||
{
|
|
||||||
return mAnimationElement ?
|
|
||||||
mAnimationElement->GetTargetElementContent() :
|
|
||||||
nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods for supporting the nsIDOMElementTimeControl interface.
|
* Methods for supporting the nsIDOMElementTimeControl interface.
|
||||||
|
@ -535,8 +535,8 @@ protected:
|
||||||
//
|
//
|
||||||
// Members
|
// Members
|
||||||
//
|
//
|
||||||
nsISMILAnimationElement* mAnimationElement; // [weak] won't outlive
|
mozilla::dom::SVGAnimationElement* mAnimationElement; // [weak] won't outlive
|
||||||
// owner
|
// owner
|
||||||
TimeValueSpecList mBeginSpecs; // [strong]
|
TimeValueSpecList mBeginSpecs; // [strong]
|
||||||
TimeValueSpecList mEndSpecs; // [strong]
|
TimeValueSpecList mEndSpecs; // [strong]
|
||||||
|
|
||||||
|
|
|
@ -156,9 +156,12 @@ include $(topsrcdir)/config/config.mk
|
||||||
FORCE_STATIC_LIB = 1
|
FORCE_STATIC_LIB = 1
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
|
nsSVGClass.h \
|
||||||
|
nsSVGElement.h \
|
||||||
nsSVGFeatures.h \
|
nsSVGFeatures.h \
|
||||||
nsSVGRect.h \
|
nsSVGRect.h \
|
||||||
SVGAttrValueWrapper.h \
|
SVGAttrValueWrapper.h \
|
||||||
|
SVGStringList.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS_NAMESPACES = mozilla/dom
|
EXPORTS_NAMESPACES = mozilla/dom
|
||||||
|
|
|
@ -38,7 +38,6 @@ SVGAnimateElement::SVGAnimateElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateElement)
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateElement)
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISMILAnimationElement methods
|
|
||||||
|
|
||||||
nsSMILAnimationFunction&
|
nsSMILAnimationFunction&
|
||||||
SVGAnimateElement::AnimationFunction()
|
SVGAnimateElement::AnimationFunction()
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
// nsIDOMNode
|
// nsIDOMNode
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||||
|
|
||||||
// nsISMILAnimationElement
|
// SVGAnimationElement
|
||||||
virtual nsSMILAnimationFunction& AnimationFunction();
|
virtual nsSMILAnimationFunction& AnimationFunction();
|
||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||||
|
|
|
@ -37,7 +37,6 @@ SVGAnimateMotionElement::SVGAnimateMotionElement(already_AddRefed<nsINodeInfo> a
|
||||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateMotionElement)
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateMotionElement)
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISMILAnimationElement methods
|
|
||||||
|
|
||||||
nsSMILAnimationFunction&
|
nsSMILAnimationFunction&
|
||||||
SVGAnimateMotionElement::AnimationFunction()
|
SVGAnimateMotionElement::AnimationFunction()
|
||||||
|
|
|
@ -39,10 +39,10 @@ public:
|
||||||
// nsIDOMNode specializations
|
// nsIDOMNode specializations
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||||
|
|
||||||
// nsISMILAnimationElement
|
// SVGAnimationElement
|
||||||
virtual nsSMILAnimationFunction& AnimationFunction();
|
virtual nsSMILAnimationFunction& AnimationFunction();
|
||||||
virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
|
virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
|
||||||
nsIAtom **aLocalName) const;
|
nsIAtom **aLocalName) const;
|
||||||
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
|
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
|
||||||
|
|
||||||
// nsSVGElement
|
// nsSVGElement
|
||||||
|
|
|
@ -64,7 +64,6 @@ SVGAnimateTransformElement::ParseAttribute(int32_t aNamespaceID,
|
||||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateTransformElement)
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateTransformElement)
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISMILAnimationElement methods
|
|
||||||
|
|
||||||
nsSMILAnimationFunction&
|
nsSMILAnimationFunction&
|
||||||
SVGAnimateTransformElement::AnimationFunction()
|
SVGAnimateTransformElement::AnimationFunction()
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
nsAttrValue& aResult);
|
nsAttrValue& aResult);
|
||||||
|
|
||||||
// nsISMILAnimationElement
|
// SVGAnimationElement
|
||||||
virtual nsSMILAnimationFunction& AnimationFunction();
|
virtual nsSMILAnimationFunction& AnimationFunction();
|
||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||||
|
|
|
@ -128,7 +128,7 @@ SVGAnimatedLengthList::ToSMILAttr(nsSVGElement *aSVGElement,
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedLengthList::
|
SVGAnimatedLengthList::
|
||||||
SMILAnimatedLengthList::ValueFromString(const nsAString& aStr,
|
SMILAnimatedLengthList::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,12 +10,15 @@
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "SVGLengthList.h"
|
#include "SVGLengthList.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SVGAnimatedLengthList
|
* Class SVGAnimatedLengthList
|
||||||
*
|
*
|
||||||
|
@ -109,7 +112,7 @@ private:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -128,7 +128,7 @@ SVGAnimatedNumberList::ToSMILAttr(nsSVGElement *aSVGElement,
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedNumberList::
|
SVGAnimatedNumberList::
|
||||||
SMILAnimatedNumberList::ValueFromString(const nsAString& aStr,
|
SMILAnimatedNumberList::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,12 +10,15 @@
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "SVGNumberList.h"
|
#include "SVGNumberList.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SVGAnimatedNumberList
|
* Class SVGAnimatedNumberList
|
||||||
*
|
*
|
||||||
|
@ -111,7 +114,7 @@ private:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -150,7 +150,7 @@ SVGAnimatedPathSegList::ToSMILAttr(nsSVGElement *aElement)
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedPathSegList::
|
SVGAnimatedPathSegList::
|
||||||
SMILAnimatedPathSegList::ValueFromString(const nsAString& aStr,
|
SMILAnimatedPathSegList::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,12 +10,15 @@
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "SVGPathData.h"
|
#include "SVGPathData.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SVGAnimatedPathSegList
|
* Class SVGAnimatedPathSegList
|
||||||
*
|
*
|
||||||
|
@ -111,7 +114,7 @@ private:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -153,7 +153,7 @@ SVGAnimatedPointList::ToSMILAttr(nsSVGElement *aElement)
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedPointList::
|
SVGAnimatedPointList::
|
||||||
SMILAnimatedPointList::ValueFromString(const nsAString& aStr,
|
SMILAnimatedPointList::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,12 +10,15 @@
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "SVGPointList.h"
|
#include "SVGPointList.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SVGAnimatedPointList
|
* Class SVGAnimatedPointList
|
||||||
*
|
*
|
||||||
|
@ -111,7 +114,7 @@ private:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -313,7 +313,7 @@ typedef SVGAnimatedPreserveAspectRatio::SMILPreserveAspectRatio
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SMILPreserveAspectRatio::ValueFromString(const nsAString& aStr,
|
SMILPreserveAspectRatio::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
#include "SVGPreserveAspectRatio.h"
|
#include "SVGPreserveAspectRatio.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
class DOMSVGAnimatedPreserveAspectRatio;
|
class DOMSVGAnimatedPreserveAspectRatio;
|
||||||
|
class SVGAnimationElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SVGAnimatedPreserveAspectRatio MOZ_FINAL
|
class SVGAnimatedPreserveAspectRatio MOZ_FINAL
|
||||||
|
@ -102,7 +102,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "SVGAnimatedTransformList.h"
|
#include "SVGAnimatedTransformList.h"
|
||||||
#include "DOMSVGAnimatedTransformList.h"
|
#include "DOMSVGAnimatedTransformList.h"
|
||||||
|
|
||||||
#include "nsISMILAnimationElement.h"
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILValue.h"
|
#include "nsSMILValue.h"
|
||||||
#include "prdtoa.h"
|
#include "prdtoa.h"
|
||||||
#include "SVGContentUtils.h"
|
#include "SVGContentUtils.h"
|
||||||
|
@ -146,7 +146,7 @@ SVGAnimatedTransformList::ToSMILAttr(nsSVGElement* aSVGElement)
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
|
SVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
|
||||||
const nsAString& aStr,
|
const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,12 +12,15 @@
|
||||||
#include "SVGTransformList.h"
|
#include "SVGTransformList.h"
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SVGAnimatedTransformList
|
* Class SVGAnimatedTransformList
|
||||||
*
|
*
|
||||||
|
@ -96,7 +99,7 @@ private:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -20,7 +20,6 @@ NS_IMPL_ADDREF_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
|
||||||
NS_IMPL_RELEASE_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
|
NS_IMPL_RELEASE_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimationElement)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimationElement)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISMILAnimationElement)
|
|
||||||
NS_INTERFACE_MAP_ENTRY(mozilla::dom::SVGTests)
|
NS_INTERFACE_MAP_ENTRY(mozilla::dom::SVGTests)
|
||||||
NS_INTERFACE_MAP_END_INHERITING(SVGAnimationElementBase)
|
NS_INTERFACE_MAP_END_INHERITING(SVGAnimationElementBase)
|
||||||
|
|
||||||
|
@ -71,19 +70,6 @@ SVGAnimationElement::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISMILAnimationElement methods
|
|
||||||
|
|
||||||
const Element&
|
|
||||||
SVGAnimationElement::AsElement() const
|
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Element&
|
|
||||||
SVGAnimationElement::AsElement()
|
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SVGAnimationElement::PassesConditionalProcessingTests()
|
SVGAnimationElement::PassesConditionalProcessingTests()
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#define mozilla_dom_SVGAnimationElement_h
|
#define mozilla_dom_SVGAnimationElement_h
|
||||||
|
|
||||||
#include "mozilla/dom/SVGTests.h"
|
#include "mozilla/dom/SVGTests.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsReferencedElement.h"
|
#include "nsReferencedElement.h"
|
||||||
#include "nsSMILTimedElement.h"
|
#include "nsSMILTimedElement.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
|
@ -17,9 +16,14 @@ typedef nsSVGElement SVGAnimationElementBase;
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
|
enum nsSMILTargetAttrType {
|
||||||
|
eSMILTargetAttrType_auto,
|
||||||
|
eSMILTargetAttrType_CSS,
|
||||||
|
eSMILTargetAttrType_XML
|
||||||
|
};
|
||||||
|
|
||||||
class SVGAnimationElement : public SVGAnimationElementBase,
|
class SVGAnimationElement : public SVGAnimationElementBase,
|
||||||
public SVGTests,
|
public SVGTests
|
||||||
public nsISMILAnimationElement
|
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
SVGAnimationElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
SVGAnimationElement(already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
|
@ -51,19 +55,17 @@ public:
|
||||||
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
|
||||||
const nsAttrValue* aValue, bool aNotify);
|
const nsAttrValue* aValue, bool aNotify);
|
||||||
|
|
||||||
// nsISMILAnimationElement interface
|
bool PassesConditionalProcessingTests();
|
||||||
virtual const Element& AsElement() const;
|
const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
|
||||||
virtual Element& AsElement();
|
bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const;
|
||||||
virtual bool PassesConditionalProcessingTests();
|
bool HasAnimAttr(nsIAtom* aAttName) const;
|
||||||
virtual const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
|
Element* GetTargetElementContent();
|
||||||
virtual bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const;
|
|
||||||
virtual bool HasAnimAttr(nsIAtom* aAttName) const;
|
|
||||||
virtual Element* GetTargetElementContent();
|
|
||||||
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
|
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
|
||||||
nsIAtom** aLocalName) const;
|
nsIAtom** aLocalName) const;
|
||||||
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
|
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
|
||||||
virtual nsSMILTimedElement& TimedElement();
|
nsSMILTimedElement& TimedElement();
|
||||||
virtual nsSMILTimeContainer* GetTimeContainer();
|
nsSMILTimeContainer* GetTimeContainer();
|
||||||
|
virtual nsSMILAnimationFunction& AnimationFunction() = 0;
|
||||||
|
|
||||||
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
|
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "SVGMotionSMILAnimationFunction.h"
|
#include "SVGMotionSMILAnimationFunction.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
|
||||||
#include "nsSMILParserUtils.h"
|
#include "nsSMILParserUtils.h"
|
||||||
#include "nsSVGAngle.h"
|
#include "nsSVGAngle.h"
|
||||||
#include "SVGMotionSMILType.h"
|
#include "SVGMotionSMILType.h"
|
||||||
#include "SVGMotionSMILPathUtils.h"
|
#include "SVGMotionSMILPathUtils.h"
|
||||||
#include "nsSVGPathDataParser.h"
|
#include "nsSVGPathDataParser.h"
|
||||||
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "mozilla/dom/SVGPathElement.h" // for nsSVGPathList
|
#include "mozilla/dom/SVGPathElement.h" // for nsSVGPathList
|
||||||
#include "mozilla/dom/SVGMPathElement.h"
|
#include "mozilla/dom/SVGMPathElement.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
|
@ -127,7 +127,7 @@ SVGMotionSMILAnimationFunction::GetCalcMode() const
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static SVGMPathElement*
|
static SVGMPathElement*
|
||||||
GetFirstMpathChild(nsIContent* aElem)
|
GetFirstMPathChild(nsIContent* aElem)
|
||||||
{
|
{
|
||||||
for (nsIContent* child = aElem->GetFirstChild();
|
for (nsIContent* child = aElem->GetFirstChild();
|
||||||
child;
|
child;
|
||||||
|
@ -272,8 +272,7 @@ SVGMotionSMILAnimationFunction::
|
||||||
|
|
||||||
// Do we have a mpath child? if so, it trumps everything. Otherwise, we look
|
// Do we have a mpath child? if so, it trumps everything. Otherwise, we look
|
||||||
// through our list of path-defining attributes, in order of priority.
|
// through our list of path-defining attributes, in order of priority.
|
||||||
SVGMPathElement* firstMpathChild =
|
SVGMPathElement* firstMpathChild = GetFirstMPathChild(mAnimationElement);
|
||||||
GetFirstMpathChild(&mAnimationElement->AsElement());
|
|
||||||
|
|
||||||
if (firstMpathChild) {
|
if (firstMpathChild) {
|
||||||
RebuildPathAndVerticesFromMpathElem(firstMpathChild);
|
RebuildPathAndVerticesFromMpathElem(firstMpathChild);
|
||||||
|
@ -361,7 +360,7 @@ SVGMotionSMILAnimationFunction::IsToAnimation() const
|
||||||
// attribute, because they'll override any 'to' attr we might have.
|
// attribute, because they'll override any 'to' attr we might have.
|
||||||
// NOTE: We can't rely on mPathSourceType, because it might not have been
|
// NOTE: We can't rely on mPathSourceType, because it might not have been
|
||||||
// set to a useful value yet (or it might be stale).
|
// set to a useful value yet (or it might be stale).
|
||||||
return !GetFirstMpathChild(&mAnimationElement->AsElement()) &&
|
return !GetFirstMPathChild(mAnimationElement) &&
|
||||||
!HasAttr(nsGkAtoms::path) &&
|
!HasAttr(nsGkAtoms::path) &&
|
||||||
nsSMILAnimationFunction::IsToAnimation();
|
nsSMILAnimationFunction::IsToAnimation();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "SVGMotionSMILAttr.h"
|
#include "SVGMotionSMILAttr.h"
|
||||||
#include "SVGMotionSMILType.h"
|
#include "SVGMotionSMILType.h"
|
||||||
#include "nsISMILAnimationElement.h"
|
#include "mozilla/dom/SVGAnimationElement.h"
|
||||||
#include "nsSMILValue.h"
|
#include "nsSMILValue.h"
|
||||||
#include "nsDebug.h"
|
#include "nsDebug.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
|
@ -16,7 +16,7 @@ namespace mozilla {
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
|
SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,12 +11,15 @@
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
|
|
||||||
class nsIContent;
|
class nsIContent;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SVGMotionSMILAttr: Implements the nsISMILAttr interface for SMIL animations
|
* SVGMotionSMILAttr: Implements the nsISMILAttr interface for SMIL animations
|
||||||
* from <animateMotion>.
|
* from <animateMotion>.
|
||||||
|
@ -32,7 +35,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -38,7 +38,6 @@ SVGSetElement::SVGSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSetElement)
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSetElement)
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISMILAnimationElement methods
|
|
||||||
|
|
||||||
nsSMILAnimationFunction&
|
nsSMILAnimationFunction&
|
||||||
SVGSetElement::AnimationFunction()
|
SVGSetElement::AnimationFunction()
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
// nsIDOMNode
|
// nsIDOMNode
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||||
|
|
||||||
// nsISMILAnimationElement
|
// SVGAnimationElement
|
||||||
virtual nsSMILAnimationFunction& AnimationFunction();
|
virtual nsSMILAnimationFunction& AnimationFunction();
|
||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||||
|
|
|
@ -372,7 +372,7 @@ nsSVGAngle::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGAngle::SMILOrient::ValueFromString(const nsAString& aStr,
|
nsSVGAngle::SMILOrient::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISupports;
|
class nsISupports;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
|
@ -29,6 +28,7 @@ namespace dom {
|
||||||
class nsSVGOrientType;
|
class nsSVGOrientType;
|
||||||
class SVGAngle;
|
class SVGAngle;
|
||||||
class SVGAnimatedAngle;
|
class SVGAnimatedAngle;
|
||||||
|
class SVGAnimationElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -132,7 +132,7 @@ nsSVGBoolean::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGBoolean::SMILBool::ValueFromString(const nsAString& aStr,
|
nsSVGBoolean::SMILBool::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,11 +11,16 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsISupports;
|
class nsISupports;
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class nsSVGBoolean
|
class nsSVGBoolean
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -64,7 +69,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -88,7 +88,7 @@ nsSVGClass::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGClass::SMILString::ValueFromString(const nsAString& aStr,
|
nsSVGClass::SMILString::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement *aSrcElement,
|
const mozilla::dom::SVGAnimationElement *aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -156,7 +156,7 @@ nsSVGEnum::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGEnum::SMILEnum::ValueFromString(const nsAString& aStr,
|
nsSVGEnum::SMILEnum::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,14 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsIAtom;
|
class nsIAtom;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef uint8_t nsSVGEnumValue;
|
typedef uint8_t nsSVGEnumValue;
|
||||||
|
|
||||||
struct nsSVGEnumMapping {
|
struct nsSVGEnumMapping {
|
||||||
|
@ -108,7 +113,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -140,7 +140,7 @@ nsSVGInteger::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGInteger::SMILInteger::ValueFromString(const nsAString& aStr,
|
nsSVGInteger::SMILInteger::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,14 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class nsSVGInteger
|
class nsSVGInteger
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -103,7 +108,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -213,7 +213,7 @@ nsSVGIntegerPair::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGIntegerPair::SMILIntegerPair::ValueFromString(const nsAString& aStr,
|
nsSVGIntegerPair::SMILIntegerPair::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,14 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class nsSVGIntegerPair
|
class nsSVGIntegerPair
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -117,7 +122,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -505,7 +505,7 @@ nsSVGLength2::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGLength2::SMILLength::ValueFromString(const nsAString& aStr,
|
nsSVGLength2::SMILLength::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
#include "SVGContentUtils.h"
|
#include "SVGContentUtils.h"
|
||||||
|
|
||||||
class nsIFrame;
|
class nsIFrame;
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
class SVGAnimatedLength;
|
class SVGAnimatedLength;
|
||||||
|
class SVGAnimationElement;
|
||||||
class SVGSVGElement;
|
class SVGSVGElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue &aValue,
|
nsSMILValue &aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -184,7 +184,7 @@ nsSVGNumber2::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGNumber2::SMILNumber::ValueFromString(const nsAString& aStr,
|
nsSVGNumber2::SMILNumber::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const mozilla::dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,14 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class nsSVGNumber2
|
class nsSVGNumber2
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -111,7 +116,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -204,7 +204,7 @@ nsSVGNumberPair::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGNumberPair::SMILNumberPair::ValueFromString(const nsAString& aStr,
|
nsSVGNumberPair::SMILNumberPair::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,14 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class nsSVGNumberPair
|
class nsSVGNumberPair
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -118,7 +123,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -106,7 +106,7 @@ nsSVGString::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGString::SMILString::ValueFromString(const nsAString& aStr,
|
nsSVGString::SMILString::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement *aSrcElement,
|
const mozilla::dom::SVGAnimationElement *aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
|
@ -325,7 +325,7 @@ nsSVGViewBox::ToSMILAttr(nsSVGElement *aSVGElement)
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGViewBox::SMILViewBox
|
nsSVGViewBox::SMILViewBox
|
||||||
::ValueFromString(const nsAString& aStr,
|
::ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* /*aSrcElement*/,
|
const dom::SVGAnimationElement* /*aSrcElement*/,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const
|
bool& aPreventCachingOfSandwich) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,9 +15,14 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
|
||||||
class nsISMILAnimationElement;
|
|
||||||
class nsSMILValue;
|
class nsSMILValue;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace dom {
|
||||||
|
class SVGAnimationElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct nsSVGViewBoxRect
|
struct nsSVGViewBoxRect
|
||||||
{
|
{
|
||||||
float x, y;
|
float x, y;
|
||||||
|
@ -197,7 +202,7 @@ public:
|
||||||
|
|
||||||
// nsISMILAttr methods
|
// nsISMILAttr methods
|
||||||
virtual nsresult ValueFromString(const nsAString& aStr,
|
virtual nsresult ValueFromString(const nsAString& aStr,
|
||||||
const nsISMILAnimationElement* aSrcElement,
|
const mozilla::dom::SVGAnimationElement* aSrcElement,
|
||||||
nsSMILValue& aValue,
|
nsSMILValue& aValue,
|
||||||
bool& aPreventCachingOfSandwich) const;
|
bool& aPreventCachingOfSandwich) const;
|
||||||
virtual nsSMILValue GetBaseValue() const;
|
virtual nsSMILValue GetBaseValue() const;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче