Bug 846908 - Move functions from nsISMILAnimationElement to SVGAnimationElement r=birtles

This commit is contained in:
David Zbarsky 2013-03-18 23:18:45 -04:00
Родитель cdddb24556
Коммит 72ff004e95
66 изменённых файлов: 231 добавлений и 297 удалений

Просмотреть файл

@ -18,7 +18,6 @@ FAIL_ON_WARNINGS = 1
endif # !_MSC_VER
EXPORTS = \
nsISMILAnimationElement.h \
nsISMILAttr.h \
nsISMILType.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 nsISMILType;
class nsISMILAnimationElement;
class nsIContent;
class nsAString;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
////////////////////////////////////////////////////////////////////////
// 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
@ -46,7 +51,7 @@ public:
* @return NS_OK on success or an error code if creation failed.
*/
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const = 0;

Просмотреть файл

@ -10,7 +10,7 @@
#include "nsITimer.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsISMILAnimationElement.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILTimedElement.h"
#include <algorithm>
#include "mozilla/AutoRestore.h"
@ -163,7 +163,7 @@ nsSMILAnimationController::WillRefresh(mozilla::TimeStamp aTime)
void
nsSMILAnimationController::RegisterAnimationElement(
nsISMILAnimationElement* aAnimationElement)
SVGAnimationElement* aAnimationElement)
{
mAnimationElementTable.PutEntry(aAnimationElement);
if (mDeferredStartSampling) {
@ -181,7 +181,7 @@ nsSMILAnimationController::RegisterAnimationElement(
void
nsSMILAnimationController::UnregisterAnimationElement(
nsISMILAnimationElement* aAnimationElement)
SVGAnimationElement* aAnimationElement)
{
mAnimationElementTable.RemoveEntry(aAnimationElement);
}
@ -391,7 +391,7 @@ nsSMILAnimationController::DoSample(bool aSkipUnchangedContainers)
// (ii) Create a table of compositors
//
// (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
// then passed to its time client (nsSMILAnimationFunction).
//
@ -497,7 +497,7 @@ nsSMILAnimationController::RewindNeeded(TimeContainerPtrKey* aKey,
nsSMILAnimationController::RewindAnimation(AnimationElementPtrKey* aKey,
void* aData)
{
nsISMILAnimationElement* animElem = aKey->GetKey();
SVGAnimationElement* animElem = aKey->GetKey();
nsSMILTimeContainer* timeContainer = animElem->GetTimeContainer();
if (timeContainer && timeContainer->NeedsRewind()) {
animElem->TimedElement().Rewind();
@ -566,7 +566,7 @@ nsSMILAnimationController::DoMilestoneSamples()
sampleTime = std::max(nextMilestone.mTime, sampleTime);
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");
nsSMILTimeContainer* container = elem->GetTimeContainer();
if (!container)
@ -669,7 +669,7 @@ nsSMILAnimationController::SampleAnimation(AnimationElementPtrKey* aKey,
NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
nsISMILAnimationElement* animElem = aKey->GetKey();
SVGAnimationElement* animElem = aKey->GetKey();
if (animElem->PassesConditionalProcessingTests()) {
SampleAnimationParams* params = static_cast<SampleAnimationParams*>(aData);
@ -682,7 +682,7 @@ nsSMILAnimationController::SampleAnimation(AnimationElementPtrKey* aKey,
/*static*/ void
nsSMILAnimationController::SampleTimedElement(
nsISMILAnimationElement* aElement, TimeContainerHashtable* aActiveContainers)
SVGAnimationElement* aElement, TimeContainerHashtable* aActiveContainers)
{
nsSMILTimeContainer* timeContainer = aElement->GetTimeContainer();
if (!timeContainer)
@ -709,7 +709,7 @@ nsSMILAnimationController::SampleTimedElement(
/*static*/ void
nsSMILAnimationController::AddAnimationToCompositorTable(
nsISMILAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable)
SVGAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable)
{
// Add a compositor to the hash table if there's not already one there
nsSMILTargetIdentifier key;
@ -753,12 +753,12 @@ IsTransformAttribute(int32_t aNamespaceID, nsIAtom *aAttributeName)
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
// for this target.
/*static*/ bool
nsSMILAnimationController::GetTargetIdentifierForAnimation(
nsISMILAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult)
SVGAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult)
{
// Look up target (animated) element
Element* targetElem = aAnimElem->GetTargetElementContent();
@ -779,7 +779,7 @@ nsSMILAnimationController::GetTargetIdentifierForAnimation(
// animateTransform can only animate transforms, conversely transforms
// can only be animated by animateTransform
if (IsTransformAttribute(attributeNamespaceID, attributeName) !=
aAnimElem->AsElement().IsSVG(nsGkAtoms::animateTransform))
(aAnimElem->Tag() == nsGkAtoms::animateTransform))
return false;
// Look up target (animated) attribute-type

Просмотреть файл

@ -18,9 +18,14 @@
#include "nsRefreshDriver.h"
struct nsSMILTargetIdentifier;
class nsISMILAnimationElement;
class nsIDocument;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
//----------------------------------------------------------------------
// nsSMILAnimationController
//
@ -56,8 +61,8 @@ public:
virtual void WillRefresh(mozilla::TimeStamp aTime);
// Methods for registering and enumerating animation elements
void RegisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
void UnregisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
void RegisterAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
void UnregisterAnimationElement(mozilla::dom::SVGAnimationElement* aAnimationElement);
// Methods for resampling all animations
// (A resample performs the same operations as a sample but doesn't advance
@ -104,7 +109,7 @@ protected:
// Typedefs
typedef nsPtrHashKey<nsSMILTimeContainer> TimeContainerPtrKey;
typedef nsTHashtable<TimeContainerPtrKey> TimeContainerHashtable;
typedef nsPtrHashKey<nsISMILAnimationElement> AnimationElementPtrKey;
typedef nsPtrHashKey<mozilla::dom::SVGAnimationElement> AnimationElementPtrKey;
typedef nsTHashtable<AnimationElementPtrKey> AnimationElementHashtable;
struct SampleTimeContainerParams
@ -121,8 +126,8 @@ protected:
struct GetMilestoneElementsParams
{
nsTArray<nsRefPtr<nsISMILAnimationElement> > mElements;
nsSMILMilestone mMilestone;
nsTArray<nsRefPtr<mozilla::dom::SVGAnimationElement> > mElements;
nsSMILMilestone mMilestone;
};
// Cycle-collection implementation helpers
@ -161,12 +166,12 @@ protected:
TimeContainerPtrKey* aKey, void* aData);
static PLDHashOperator SampleAnimation(
AnimationElementPtrKey* aKey, void* aData);
static void SampleTimedElement(nsISMILAnimationElement* aElement,
static void SampleTimedElement(mozilla::dom::SVGAnimationElement* aElement,
TimeContainerHashtable* aActiveContainers);
static void AddAnimationToCompositorTable(
nsISMILAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable);
mozilla::dom::SVGAnimationElement* aElement, nsSMILCompositorTable* aCompositorTable);
static bool GetTargetIdentifierForAnimation(
nsISMILAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult);
mozilla::dom::SVGAnimationElement* aAnimElem, nsSMILTargetIdentifier& aResult);
// Methods for adding/removing time containers
virtual nsresult AddChild(nsSMILTimeContainer& aChild);

Просмотреть файл

@ -3,11 +3,11 @@
* 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/. */
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILAnimationFunction.h"
#include "nsISMILAttr.h"
#include "nsSMILParserUtils.h"
#include "nsSMILNullType.h"
#include "nsISMILAnimationElement.h"
#include "nsSMILTimedElement.h"
#include "nsAttrValueInlines.h"
#include "nsGkAtoms.h"
@ -21,6 +21,8 @@
#include <math.h>
#include <algorithm>
using namespace mozilla::dom;
//----------------------------------------------------------------------
// Static members
@ -69,7 +71,7 @@ nsSMILAnimationFunction::nsSMILAnimationFunction()
void
nsSMILAnimationFunction::SetAnimationElement(
nsISMILAnimationElement* aAnimationElement)
SVGAnimationElement* 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
// the document
nsIContent& thisContent = mAnimationElement->AsElement();
nsIContent& otherContent = aOther->mAnimationElement->AsElement();
NS_ABORT_IF_FALSE(&thisContent != &otherContent,
NS_ABORT_IF_FALSE(mAnimationElement != aOther->mAnimationElement,
"Two animations cannot have the same animation content element!");
return (nsContentUtils::PositionIsBefore(&thisContent, &otherContent))
return (nsContentUtils::PositionIsBefore(mAnimationElement, aOther->mAnimationElement))
? -1 : 1;
}

Просмотреть файл

@ -18,7 +18,11 @@
#include "nsAttrValue.h"
#include "nsSMILTypes.h"
class nsISMILAnimationElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
//----------------------------------------------------------------------
// nsSMILAnimationFunction
@ -41,7 +45,7 @@ public:
* Sets the owning animation element which this class uses to query attribute
* 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
@ -413,7 +417,7 @@ protected:
// position and for fetching attribute values stored in the element.
// Raw pointer is OK here, because this nsSMILAnimationFunction can't outlive
// its owning animation element.
nsISMILAnimationElement* mAnimationElement;
mozilla::dom::SVGAnimationElement* mAnimationElement;
// Which attributes have been set but have had errors. This is not used for
// all attributes but only those which have specified error behaviour

Просмотреть файл

@ -123,7 +123,7 @@ nsSMILCSSProperty::GetBaseValue() const
nsresult
nsSMILCSSProperty::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -36,7 +36,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -28,7 +28,7 @@ ReleaseStringBufferPropertyValue(void* aObject, /* unused */
nsresult
nsSMILMappedAttribute::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -39,7 +39,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -18,6 +18,7 @@
#include "prlong.h"
#include "nsCharSeparatedTokenizer.h"
using namespace mozilla::dom;
//------------------------------------------------------------------------------
// Helper functions and Constants
@ -520,7 +521,7 @@ nsSMILParserUtils::ParseSemicolonDelimitedProgressList(const nsAString& aSpec,
class SMILValueParser : public nsSMILParserUtils::GenericValueParser
{
public:
SMILValueParser(const nsISMILAnimationElement* aSrcElement,
SMILValueParser(const SVGAnimationElement* aSrcElement,
const nsISMILAttr* aSMILAttr,
nsTArray<nsSMILValue>* aValuesArray,
bool* aPreventCachingOfSandwich) :
@ -547,7 +548,7 @@ public:
return NS_OK;
}
protected:
const nsISMILAnimationElement* mSrcElement;
const SVGAnimationElement* mSrcElement;
const nsISMILAttr* mSMILAttr;
nsTArray<nsSMILValue>* mValuesArray;
bool* mPreventCachingOfSandwich;
@ -555,7 +556,7 @@ protected:
nsresult
nsSMILParserUtils::ParseValues(const nsAString& aSpec,
const nsISMILAnimationElement* aSrcElement,
const SVGAnimationElement* aSrcElement,
const nsISMILAttr& aAttribute,
nsTArray<nsSMILValue>& aValuesArray,
bool& aPreventCachingOfSandwich)

Просмотреть файл

@ -11,12 +11,17 @@
#include "nsString.h"
class nsISMILAttr;
class nsISMILAnimationElement;
class nsSMILTimeValue;
class nsSMILValue;
class nsSMILRepeatCount;
class nsSMILTimeValueSpecParams;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
/**
* 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
@ -40,7 +45,7 @@ public:
nsTArray<double>& aArray);
static nsresult ParseValues(const nsAString& aSpec,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
const nsISMILAttr& aAttribute,
nsTArray<nsSMILValue>& aValuesArray,
bool& aPreventCachingOfSandwich);

Просмотреть файл

@ -206,7 +206,7 @@ nsSMILTimeContainer::SetParent(nsSMILTimeContainer* aParent)
bool
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
// 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();
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(*aCallback, "mTimebase");
aCallback->NoteXPCOMChild(p->mTimebase.get());
aCallback->NoteXPCOMChild(static_cast<nsIContent*>(p->mTimebase.get()));
++p;
}
}
@ -311,7 +311,7 @@ nsSMILTimeContainer::NotifyTimeChange()
uint32_t queueLength = mMilestoneEntries.Length();
#endif
while (p < mMilestoneEntries.Elements() + mMilestoneEntries.Length()) {
nsISMILAnimationElement* elem = p->mTimebase.get();
mozilla::dom::SVGAnimationElement* elem = p->mTimebase.get();
elem->TimedElement().HandleContainerTimeChange();
NS_ABORT_IF_FALSE(queueLength == mMilestoneEntries.Length(),
"Call to HandleContainerTimeChange resulted in a change to the "

Просмотреть файл

@ -6,11 +6,11 @@
#ifndef NS_SMILTIMECONTAINER_H_
#define NS_SMILTIMECONTAINER_H_
#include "mozilla/dom/SVGAnimationElement.h"
#include "nscore.h"
#include "nsSMILTypes.h"
#include "nsTPriorityQueue.h"
#include "nsAutoPtr.h"
#include "nsISMILAnimationElement.h"
#include "nsSMILMilestone.h"
class nsSMILTimeValue;
@ -170,7 +170,7 @@ public:
* @return true if the element was successfully added, false otherwise.
*/
bool AddMilestone(const nsSMILMilestone& aMilestone,
nsISMILAnimationElement& aElement);
mozilla::dom::SVGAnimationElement& aElement);
/*
* Resets the list of milestones.
@ -188,7 +188,7 @@ public:
*/
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
@ -272,7 +272,7 @@ protected:
struct MilestoneEntry
{
MilestoneEntry(nsSMILMilestone aMilestone,
nsISMILAnimationElement& aElement)
mozilla::dom::SVGAnimationElement& aElement)
: mMilestone(aMilestone), mTimebase(&aElement)
{ }
@ -282,7 +282,7 @@ protected:
}
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

Просмотреть файл

@ -3,6 +3,7 @@
* 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/. */
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILTimeValueSpec.h"
#include "nsSMILInterval.h"
#include "nsSMILTimeContainer.h"
@ -10,7 +11,6 @@
#include "nsSMILTimedElement.h"
#include "nsSMILInstanceTime.h"
#include "nsSMILParserUtils.h"
#include "nsISMILAnimationElement.h"
#include "nsEventListenerManager.h"
#include "nsGUIEvent.h"
#include "nsIDOMTimeEvent.h"
@ -279,14 +279,8 @@ nsSMILTimeValueSpec::UnregisterFromReferencedElement(Element* aElement)
nsSMILTimedElement*
nsSMILTimeValueSpec::GetTimedElement(Element* aElement)
{
if (!aElement)
return nullptr;
nsCOMPtr<nsISMILAnimationElement> animElement = do_QueryInterface(aElement);
if (!animElement)
return nullptr;
return &animElement->TimedElement();
return aElement && aElement->IsNodeOfType(nsINode::eANIMATION) ?
&static_cast<SVGAnimationElement*>(aElement)->TimedElement() : nullptr;
}
// Indicates whether we're allowed to register an event-listener

Просмотреть файл

@ -5,6 +5,7 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILTimedElement.h"
#include "nsAttrValueInlines.h"
#include "nsSMILAnimationFunction.h"
@ -29,6 +30,7 @@
#include <algorithm>
using namespace mozilla;
using namespace mozilla::dom;
//----------------------------------------------------------------------
// Helper class: InstanceTimeComparator
@ -263,7 +265,7 @@ nsSMILTimedElement::~nsSMILTimedElement()
}
void
nsSMILTimedElement::SetAnimationElement(nsISMILAnimationElement* aElement)
nsSMILTimedElement::SetAnimationElement(SVGAnimationElement* aElement)
{
NS_ABORT_IF_FALSE(aElement, "NULL owner element");
NS_ABORT_IF_FALSE(!mAnimationElement, "Re-setting owner");
@ -276,6 +278,14 @@ nsSMILTimedElement::GetTimeContainer()
return mAnimationElement ? mAnimationElement->GetTimeContainer() : nullptr;
}
dom::Element*
nsSMILTimedElement::GetTargetElement()
{
return mAnimationElement ?
mAnimationElement->GetTargetElementContent() :
nullptr;
}
//----------------------------------------------------------------------
// nsIDOMElementTimeControl methods
//
@ -763,13 +773,13 @@ nsSMILTimedElement::Rewind()
if (mAnimationElement->HasAnimAttr(nsGkAtoms::begin)) {
nsAutoString attValue;
mAnimationElement->GetAnimAttr(nsGkAtoms::begin, attValue);
SetBeginSpec(attValue, &mAnimationElement->AsElement(), RemoveNonDynamic);
SetBeginSpec(attValue, mAnimationElement, RemoveNonDynamic);
}
if (mAnimationElement->HasAnimAttr(nsGkAtoms::end)) {
nsAutoString attValue;
mAnimationElement->GetAnimAttr(nsGkAtoms::end, attValue);
SetEndSpec(attValue, &mAnimationElement->AsElement(), RemoveNonDynamic);
SetEndSpec(attValue, mAnimationElement, RemoveNonDynamic);
}
mPrevRegisteredMilestone = sMaxMilestone;
@ -2260,7 +2270,7 @@ nsSMILTimedElement::FireTimeEventAsync(uint32_t aMsg, int32_t aDetail)
return;
nsCOMPtr<nsIRunnable> event =
new AsyncTimeEventRunner(&mAnimationElement->AsElement(), aMsg, aDetail);
new AsyncTimeEventRunner(mAnimationElement, aMsg, aDetail);
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
}

Просмотреть файл

@ -6,7 +6,6 @@
#ifndef NS_SMILTIMEDELEMENT_H_
#define NS_SMILTIMEDELEMENT_H_
#include "nsISMILAnimationElement.h"
#include "nsSMILInterval.h"
#include "nsSMILInstanceTime.h"
#include "nsSMILMilestone.h"
@ -24,6 +23,12 @@ class nsSMILTimeContainer;
class nsSMILTimeValue;
class nsIAtom;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
//----------------------------------------------------------------------
// nsSMILTimedElement
@ -39,7 +44,7 @@ public:
* Sets the owning animation element which this class uses to convert between
* 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
@ -51,12 +56,7 @@ public:
* Returns the element targeted by the animation element. Needed for
* registering event listeners against the appropriate element.
*/
mozilla::dom::Element* GetTargetElement()
{
return mAnimationElement ?
mAnimationElement->GetTargetElementContent() :
nullptr;
}
mozilla::dom::Element* GetTargetElement();
/**
* Methods for supporting the nsIDOMElementTimeControl interface.
@ -535,8 +535,8 @@ protected:
//
// Members
//
nsISMILAnimationElement* mAnimationElement; // [weak] won't outlive
// owner
mozilla::dom::SVGAnimationElement* mAnimationElement; // [weak] won't outlive
// owner
TimeValueSpecList mBeginSpecs; // [strong]
TimeValueSpecList mEndSpecs; // [strong]

Просмотреть файл

@ -156,9 +156,12 @@ include $(topsrcdir)/config/config.mk
FORCE_STATIC_LIB = 1
EXPORTS = \
nsSVGClass.h \
nsSVGElement.h \
nsSVGFeatures.h \
nsSVGRect.h \
SVGAttrValueWrapper.h \
SVGStringList.h \
$(NULL)
EXPORTS_NAMESPACES = mozilla/dom

Просмотреть файл

@ -38,7 +38,6 @@ SVGAnimateElement::SVGAnimateElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateElement)
//----------------------------------------------------------------------
// nsISMILAnimationElement methods
nsSMILAnimationFunction&
SVGAnimateElement::AnimationFunction()

Просмотреть файл

@ -39,7 +39,7 @@ public:
// nsIDOMNode
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
// nsISMILAnimationElement
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
virtual nsIDOMNode* AsDOMNode() { return this; }

Просмотреть файл

@ -37,7 +37,6 @@ SVGAnimateMotionElement::SVGAnimateMotionElement(already_AddRefed<nsINodeInfo> a
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateMotionElement)
//----------------------------------------------------------------------
// nsISMILAnimationElement methods
nsSMILAnimationFunction&
SVGAnimateMotionElement::AnimationFunction()

Просмотреть файл

@ -39,10 +39,10 @@ public:
// nsIDOMNode specializations
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
// nsISMILAnimationElement
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
nsIAtom **aLocalName) const;
nsIAtom **aLocalName) const;
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
// nsSVGElement

Просмотреть файл

@ -64,7 +64,6 @@ SVGAnimateTransformElement::ParseAttribute(int32_t aNamespaceID,
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAnimateTransformElement)
//----------------------------------------------------------------------
// nsISMILAnimationElement methods
nsSMILAnimationFunction&
SVGAnimateTransformElement::AnimationFunction()

Просмотреть файл

@ -45,7 +45,7 @@ public:
const nsAString& aValue,
nsAttrValue& aResult);
// nsISMILAnimationElement
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
virtual nsIDOMNode* AsDOMNode() { return this; }

Просмотреть файл

@ -128,7 +128,7 @@ SVGAnimatedLengthList::ToSMILAttr(nsSVGElement *aSVGElement,
nsresult
SVGAnimatedLengthList::
SMILAnimatedLengthList::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -10,12 +10,15 @@
#include "nsISMILAttr.h"
#include "SVGLengthList.h"
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* Class SVGAnimatedLengthList
*
@ -109,7 +112,7 @@ private:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -128,7 +128,7 @@ SVGAnimatedNumberList::ToSMILAttr(nsSVGElement *aSVGElement,
nsresult
SVGAnimatedNumberList::
SMILAnimatedNumberList::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -10,12 +10,15 @@
#include "nsISMILAttr.h"
#include "SVGNumberList.h"
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* Class SVGAnimatedNumberList
*
@ -111,7 +114,7 @@ private:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -150,7 +150,7 @@ SVGAnimatedPathSegList::ToSMILAttr(nsSVGElement *aElement)
nsresult
SVGAnimatedPathSegList::
SMILAnimatedPathSegList::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -10,12 +10,15 @@
#include "nsISMILAttr.h"
#include "SVGPathData.h"
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* Class SVGAnimatedPathSegList
*
@ -111,7 +114,7 @@ private:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -153,7 +153,7 @@ SVGAnimatedPointList::ToSMILAttr(nsSVGElement *aElement)
nsresult
SVGAnimatedPointList::
SMILAnimatedPointList::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -10,12 +10,15 @@
#include "nsISMILAttr.h"
#include "SVGPointList.h"
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* Class SVGAnimatedPointList
*
@ -111,7 +114,7 @@ private:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -313,7 +313,7 @@ typedef SVGAnimatedPreserveAspectRatio::SMILPreserveAspectRatio
nsresult
SMILPreserveAspectRatio::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -14,12 +14,12 @@
#include "SVGPreserveAspectRatio.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class DOMSVGAnimatedPreserveAspectRatio;
class SVGAnimationElement;
}
class SVGAnimatedPreserveAspectRatio MOZ_FINAL
@ -102,7 +102,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -6,7 +6,7 @@
#include "SVGAnimatedTransformList.h"
#include "DOMSVGAnimatedTransformList.h"
#include "nsISMILAnimationElement.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILValue.h"
#include "prdtoa.h"
#include "SVGContentUtils.h"
@ -146,7 +146,7 @@ SVGAnimatedTransformList::ToSMILAttr(nsSVGElement* aSVGElement)
nsresult
SVGAnimatedTransformList::SMILAnimatedTransformList::ValueFromString(
const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -12,12 +12,15 @@
#include "SVGTransformList.h"
class nsIAtom;
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* Class SVGAnimatedTransformList
*
@ -96,7 +99,7 @@ private:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -20,7 +20,6 @@ NS_IMPL_ADDREF_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
NS_IMPL_RELEASE_INHERITED(SVGAnimationElement, SVGAnimationElementBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimationElement)
NS_INTERFACE_MAP_ENTRY(nsISMILAnimationElement)
NS_INTERFACE_MAP_ENTRY(mozilla::dom::SVGTests)
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
SVGAnimationElement::PassesConditionalProcessingTests()

Просмотреть файл

@ -7,7 +7,6 @@
#define mozilla_dom_SVGAnimationElement_h
#include "mozilla/dom/SVGTests.h"
#include "nsISMILAnimationElement.h"
#include "nsReferencedElement.h"
#include "nsSMILTimedElement.h"
#include "nsSVGElement.h"
@ -17,9 +16,14 @@ typedef nsSVGElement SVGAnimationElementBase;
namespace mozilla {
namespace dom {
enum nsSMILTargetAttrType {
eSMILTargetAttrType_auto,
eSMILTargetAttrType_CSS,
eSMILTargetAttrType_XML
};
class SVGAnimationElement : public SVGAnimationElementBase,
public SVGTests,
public nsISMILAnimationElement
public SVGTests
{
protected:
SVGAnimationElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@ -51,19 +55,17 @@ public:
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
const nsAttrValue* aValue, bool aNotify);
// nsISMILAnimationElement interface
virtual const Element& AsElement() const;
virtual Element& AsElement();
virtual bool PassesConditionalProcessingTests();
virtual const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
virtual bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const;
virtual bool HasAnimAttr(nsIAtom* aAttName) const;
virtual Element* GetTargetElementContent();
bool PassesConditionalProcessingTests();
const nsAttrValue* GetAnimAttr(nsIAtom* aName) const;
bool GetAnimAttr(nsIAtom* aAttName, nsAString& aResult) const;
bool HasAnimAttr(nsIAtom* aAttName) const;
Element* GetTargetElementContent();
virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
nsIAtom** aLocalName) const;
nsIAtom** aLocalName) const;
virtual nsSMILTargetAttrType GetTargetAttributeType() const;
virtual nsSMILTimedElement& TimedElement();
virtual nsSMILTimeContainer* GetTimeContainer();
nsSMILTimedElement& TimedElement();
nsSMILTimeContainer* GetTimeContainer();
virtual nsSMILAnimationFunction& AnimationFunction() = 0;
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;

Просмотреть файл

@ -4,12 +4,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SVGMotionSMILAnimationFunction.h"
#include "nsISMILAnimationElement.h"
#include "nsSMILParserUtils.h"
#include "nsSVGAngle.h"
#include "SVGMotionSMILType.h"
#include "SVGMotionSMILPathUtils.h"
#include "nsSVGPathDataParser.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "mozilla/dom/SVGPathElement.h" // for nsSVGPathList
#include "mozilla/dom/SVGMPathElement.h"
#include "nsAttrValueInlines.h"
@ -127,7 +127,7 @@ SVGMotionSMILAnimationFunction::GetCalcMode() const
*/
static SVGMPathElement*
GetFirstMpathChild(nsIContent* aElem)
GetFirstMPathChild(nsIContent* aElem)
{
for (nsIContent* child = aElem->GetFirstChild();
child;
@ -272,8 +272,7 @@ SVGMotionSMILAnimationFunction::
// 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.
SVGMPathElement* firstMpathChild =
GetFirstMpathChild(&mAnimationElement->AsElement());
SVGMPathElement* firstMpathChild = GetFirstMPathChild(mAnimationElement);
if (firstMpathChild) {
RebuildPathAndVerticesFromMpathElem(firstMpathChild);
@ -361,7 +360,7 @@ SVGMotionSMILAnimationFunction::IsToAnimation() const
// attribute, because they'll override any 'to' attr we might have.
// NOTE: We can't rely on mPathSourceType, because it might not have been
// set to a useful value yet (or it might be stale).
return !GetFirstMpathChild(&mAnimationElement->AsElement()) &&
return !GetFirstMPathChild(mAnimationElement) &&
!HasAttr(nsGkAtoms::path) &&
nsSMILAnimationFunction::IsToAnimation();
}

Просмотреть файл

@ -7,7 +7,7 @@
#include "SVGMotionSMILAttr.h"
#include "SVGMotionSMILType.h"
#include "nsISMILAnimationElement.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "nsSMILValue.h"
#include "nsDebug.h"
#include "nsSVGElement.h"
@ -16,7 +16,7 @@ namespace mozilla {
nsresult
SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -11,12 +11,15 @@
#include "nsISMILAttr.h"
class nsIContent;
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
/**
* SVGMotionSMILAttr: Implements the nsISMILAttr interface for SMIL animations
* from <animateMotion>.
@ -32,7 +35,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -38,7 +38,6 @@ SVGSetElement::SVGSetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSetElement)
//----------------------------------------------------------------------
// nsISMILAnimationElement methods
nsSMILAnimationFunction&
SVGSetElement::AnimationFunction()

Просмотреть файл

@ -39,7 +39,7 @@ public:
// nsIDOMNode
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
// nsISMILAnimationElement
// SVGAnimationElement
virtual nsSMILAnimationFunction& AnimationFunction();
virtual nsIDOMNode* AsDOMNode() { return this; }

Просмотреть файл

@ -372,7 +372,7 @@ nsSVGAngle::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGAngle::SMILOrient::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -12,7 +12,6 @@
#include "mozilla/Attributes.h"
class nsISupports;
class nsISMILAnimationElement;
class nsSMILValue;
class nsSVGElement;
@ -29,6 +28,7 @@ namespace dom {
class nsSVGOrientType;
class SVGAngle;
class SVGAnimatedAngle;
class SVGAnimationElement;
}
}
@ -116,7 +116,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -132,7 +132,7 @@ nsSVGBoolean::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGBoolean::SMILBool::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -11,11 +11,16 @@
#include "mozilla/Attributes.h"
class nsIAtom;
class nsISMILAnimationElement;
class nsISupports;
class nsSMILValue;
class nsSVGElement;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
class nsSVGBoolean
{
@ -64,7 +69,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -88,7 +88,7 @@ nsSVGClass::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGClass::SMILString::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -87,7 +87,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement *aSrcElement,
const mozilla::dom::SVGAnimationElement *aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -156,7 +156,7 @@ nsSVGEnum::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGEnum::SMILEnum::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -15,9 +15,14 @@
#include "mozilla/Attributes.h"
class nsIAtom;
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
typedef uint8_t nsSVGEnumValue;
struct nsSVGEnumMapping {
@ -108,7 +113,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -140,7 +140,7 @@ nsSVGInteger::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGInteger::SMILInteger::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -14,9 +14,14 @@
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
class nsSVGInteger
{
@ -103,7 +108,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -213,7 +213,7 @@ nsSVGIntegerPair::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGIntegerPair::SMILIntegerPair::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -14,9 +14,14 @@
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
class nsSVGIntegerPair
{
@ -117,7 +122,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -505,7 +505,7 @@ nsSVGLength2::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGLength2::SMILLength::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -18,12 +18,12 @@
#include "SVGContentUtils.h"
class nsIFrame;
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimatedLength;
class SVGAnimationElement;
class SVGSVGElement;
}
}
@ -260,7 +260,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue &aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -184,7 +184,7 @@ nsSVGNumber2::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGNumber2::SMILNumber::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const mozilla::dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -15,9 +15,14 @@
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
class nsSVGNumber2
{
@ -111,7 +116,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -204,7 +204,7 @@ nsSVGNumberPair::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGNumberPair::SMILNumberPair::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -15,9 +15,14 @@
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
class nsSVGNumberPair
{
@ -118,7 +123,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -106,7 +106,7 @@ nsSVGString::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGString::SMILString::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -91,7 +91,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement *aSrcElement,
const mozilla::dom::SVGAnimationElement *aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;

Просмотреть файл

@ -325,7 +325,7 @@ nsSVGViewBox::ToSMILAttr(nsSVGElement *aSVGElement)
nsresult
nsSVGViewBox::SMILViewBox
::ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* /*aSrcElement*/,
const dom::SVGAnimationElement* /*aSrcElement*/,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{

Просмотреть файл

@ -15,9 +15,14 @@
#include "nsSVGElement.h"
#include "mozilla/Attributes.h"
class nsISMILAnimationElement;
class nsSMILValue;
namespace mozilla {
namespace dom {
class SVGAnimationElement;
}
}
struct nsSVGViewBoxRect
{
float x, y;
@ -197,7 +202,7 @@ public:
// nsISMILAttr methods
virtual nsresult ValueFromString(const nsAString& aStr,
const nsISMILAnimationElement* aSrcElement,
const mozilla::dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const;
virtual nsSMILValue GetBaseValue() const;