Bug 1239945 part 1 - Drop a number of animation manager/collection-related methods that are unused (and in some cases undefined); r=dholbert

This commit is contained in:
Brian Birtles 2016-02-24 13:41:16 +09:00
Родитель 633a6e61b2
Коммит d06f85599d
4 изменённых файлов: 1 добавлений и 53 удалений

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

@ -35,7 +35,6 @@ class nsPresContext;
namespace mozilla {
struct AnimationCollection;
class AnimValuesStyleRule;
enum class CSSPseudoElementType : uint8_t;
@ -138,7 +137,7 @@ struct AnimationProperty
// If true, the propery is currently being animated on the compositor.
//
// Note that when the owning Animation requests a non-throttled restyle, in
// between calling RequestRestyle on its AnimationCollection and when the
// between calling RequestRestyle on its EffectCompositor and when the
// restyle is performed, this member may temporarily become false even if
// the animation remains on the layer after the restyle.
//
@ -323,8 +322,6 @@ public:
nsIDocument* GetRenderedDocument() const;
nsPresContext* GetPresContext() const;
inline AnimationCollection* GetCollection() const;
protected:
KeyframeEffectReadOnly(nsIDocument* aDocument,
Element* aTarget,

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

@ -187,15 +187,6 @@ AnimationCollection::PropertyDtor(void *aObject, nsIAtom *aPropertyName,
delete collection;
}
void
AnimationCollection::Tick()
{
for (size_t animIdx = 0, animEnd = mAnimations.Length();
animIdx != animEnd; animIdx++) {
mAnimations[animIdx]->Tick();
}
}
void
AnimationCollection::UpdateCheckGeneration(
nsPresContext* aPresContext)

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

@ -62,18 +62,12 @@ public:
nsStyleContext* aStyleContext,
StyleAnimationValue& aComputedValue);
virtual bool IsAnimationManager() {
return false;
}
protected:
virtual ~CommonAnimationManager();
void AddElementCollection(AnimationCollection* aCollection);
void RemoveAllElementCollections();
bool NeedsRefresh() const;
virtual nsIAtom* GetAnimationsAtom() = 0;
virtual nsIAtom* GetAnimationsBeforeAtom() = 0;
virtual nsIAtom* GetAnimationsAfterAtom() = 0;
@ -130,23 +124,7 @@ struct AnimationCollection : public LinkedListElement<AnimationCollection>
static void PropertyDtor(void *aObject, nsIAtom *aPropertyName,
void *aPropertyValue, void *aData);
void Tick();
public:
// True if this animation can be performed on the compositor thread.
//
// Returns whether the state of this element's animations at the current
// refresh driver time contains animation data that can be done on the
// compositor thread. (This is used for determining whether a layer
// should be active, or whether to send data to the layer.)
//
// Note that this does not test whether the element's layer uses
// off-main-thread compositing, although it does check whether
// off-main-thread compositing is enabled as a whole.
bool CanPerformOnCompositorThread(const nsIFrame* aFrame) const;
bool HasCurrentAnimationOfProperty(nsCSSProperty aProperty) const;
bool IsForElement() const { // rather than for a pseudo-element
return mElementProperty == nsGkAtoms::animationsProperty ||
mElementProperty == nsGkAtoms::transitionsProperty;
@ -162,18 +140,6 @@ public:
mElementProperty == nsGkAtoms::transitionsOfAfterProperty;
}
bool IsForTransitions() const {
return mElementProperty == nsGkAtoms::transitionsProperty ||
mElementProperty == nsGkAtoms::transitionsOfBeforeProperty ||
mElementProperty == nsGkAtoms::transitionsOfAfterProperty;
}
bool IsForAnimations() const {
return mElementProperty == nsGkAtoms::animationsProperty ||
mElementProperty == nsGkAtoms::animationsOfBeforeProperty ||
mElementProperty == nsGkAtoms::animationsOfAfterProperty;
}
CSSPseudoElementType PseudoElementType() const
{
if (IsForElement()) {
@ -189,8 +155,6 @@ public:
static nsString PseudoTypeAsString(CSSPseudoElementType aPseudoType);
dom::Element* GetElementToRestyle() const;
dom::Element *mElement;
// the atom we use in mElement's prop table (must be a static atom,

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

@ -320,10 +320,6 @@ public:
void StopAnimationsForElement(mozilla::dom::Element* aElement,
mozilla::CSSPseudoElementType aPseudoType);
bool IsAnimationManager() override {
return true;
}
protected:
virtual ~nsAnimationManager() {}