Rename Animation to KeyframeEffect (and merge in AnimationEffect)

RESOLVED FIXED in Firefox 40

Status

()

Core
DOM
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: birtles, Assigned: birtles)

Tracking

({dev-doc-needed})

Trunk
mozilla40
dev-doc-needed
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(5 attachments, 2 obsolete attachments)

Comment hidden (empty)
(Assignee)

Comment 1

3 years ago
Created attachment 8591523 [details] [diff] [review]
part 1 - Remove AnimationEffect
(Assignee)

Updated

3 years ago
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
(Assignee)

Comment 2

3 years ago
Created attachment 8591525 [details] [diff] [review]
part 2 - Rename Animation to KeyframeEffectReadonly
(Assignee)

Comment 3

3 years ago
Just WIP at the moment. Still need:

  Part 3 - Add AnimationEffectReadonly as an abstract interface for KeyframeEffectReadonly
  Part 4 - Rename 'source' member of AnimationPlayer to 'effect'
(Assignee)

Comment 4

3 years ago
Created attachment 8592105 [details] [diff] [review]
part 1 - Remove AnimationEffect

Most of this is fairly obvious. However, the addition of 'override' to
ElementPropertyTransition::Name() is not strictly necessary. It was simply added
because while making these changes I accidentally dropped the 'virtual' keyword
from the method in the superclass and the compiler didn't complain. Adding this
will hopefully make it harder to create the same bug in the future.
Attachment #8592105 - Flags: review?(bugs)
(Assignee)

Updated

3 years ago
Attachment #8591523 - Attachment is obsolete: true
(Assignee)

Comment 5

3 years ago
Created attachment 8592114 [details] [diff] [review]
part 2 - Rename Animation to KeyframeEffectReadonly

We define KeyframeEffectReadonly in KeyframeEffect.cpp since Web Animations also
defines KeyframeEffect and when we come to implement that I expect we'll define
it in the same class, maybe even using the same object.

This patch also adds a few missing includes in places where
KeyframeEffectReadonly is used so that we're not just cargo-culting it in.
Attachment #8592114 - Flags: review?(bugs)
(Assignee)

Updated

3 years ago
Attachment #8591525 - Attachment is obsolete: true
(Assignee)

Comment 6

3 years ago
Created attachment 8592117 [details] [diff] [review]
part 3 - Rename AnimationPlayer.source to AnimationPlayer.effect

There are still some other references to "source" in AnimationPlayer such as
HasInPlayerSource and UpdateSourceContent. These are renamed in a subsequent
patch (that doesn't require DOM peer review).
Attachment #8592117 - Flags: review?(bugs)
(Assignee)

Comment 7

3 years ago
Created attachment 8592118 [details] [diff] [review]
part 4 - Rename other uses of 'source' and 'source content'

This patch also tightens up a one or two references to 'target effect' replacing
them with just 'effect'. This is because 'target effect' is longer and easily
confused with 'target element'. 'effect' should be sufficient. 'target element'
is a term from the Web Animations specification and in that context, simply
referring to the 'effect' would sound a little odd.
Attachment #8592118 - Flags: review?(jwatt)
(Assignee)

Comment 8

3 years ago
Created attachment 8592122 [details] [diff] [review]
part 5 - Add AnimationEffectReadonly as a superinterface of KeyframeEffectReadonly

This patch also replaces some tabs with spaces in KeyframeEffect.h because I was
in the area.

REVIEW: Please let me know if there's a more lightweight way of doing this.
Simply in order order to add this superinterface which does nothing I seem to
have to drop the native refcounting, inherit from nsISupports.

I ran into the same problem when adding AnimationTimeline as a superinterface of
DocumentTimeline.
Attachment #8592122 - Flags: review?(bugs)

Updated

3 years ago
Attachment #8592118 - Flags: review?(jwatt) → review+
Comment on attachment 8592105 [details] [diff] [review]
part 1 - Remove AnimationEffect

>+  void GetName(nsString& aRetVal) const {
{ goes to its own line


>+  // Alternative to GetName that returns a reference to the member for
>+  // more efficient internal usage.
>+  virtual const nsString& Name() const {
ditto
Attachment #8592105 - Flags: review?(bugs) → review+
Comment on attachment 8592114 [details] [diff] [review]
part 2 - Rename Animation to KeyframeEffectReadonly

https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#HeaderFile
works too, and might be nicer than to add anything to Bindings.conf
Attachment #8592114 - Flags: review?(bugs) → review+

Updated

3 years ago
Attachment #8592117 - Flags: review?(bugs) → review+

Updated

3 years ago
Attachment #8592122 - Flags: review?(bugs) → review+

Updated

3 years ago
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.