Closed Bug 1153734 Opened 10 years ago Closed 10 years ago

Rename Animation to KeyframeEffect (and merge in AnimationEffect)

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: birtles, Assigned: birtles)

Details

(Keywords: dev-doc-needed)

Attachments

(5 files, 2 obsolete files)

No description provided.
Attached patch part 1 - Remove AnimationEffect (obsolete) — Splinter Review
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
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'
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)
Attachment #8591523 - Attachment is obsolete: true
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)
Attachment #8591525 - Attachment is obsolete: true
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)
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)
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)
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+
Attachment #8592117 - Flags: review?(bugs) → review+
Attachment #8592122 - Flags: review?(bugs) → review+
Keywords: dev-doc-needed
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: