Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 495625f374 Bug 1341985 - GetAnimationCollection() takes const Element*. r=birtles
MozReview-Commit-ID: BPVROi9Ewzc

--HG--
extra : rebase_source : 599efa0aead37874e4e1c43ab793476d4adfe41d
2017-03-10 11:53:19 +09:00
Hiroyuki Ikezoe dee00c217c Bug 1340916 - Part 1: Drop AnimationCollection::PseudoElementType(). r=birtles
No one uses it.

MozReview-Commit-ID: 7CYeuNEN0yY

--HG--
extra : rebase_source : 91e3ab0f98d66cdaca1e74732f6e5721a9854b35
2017-02-20 06:28:40 +09:00
Brian Birtles c9d3c84ee0 Bug 1239945 part 8 - Add GetOrCreateAnimationCollection; r=dholbert
Rather than passing around a bool flag to indicate if we should be creating
an AnimationCollection when none is found, it would be a lot easier to read
if we simply introduce a separate method for this.

MozReview-Commit-ID: 6bg8jGoH5pL
2016-03-09 12:55:39 +09:00
Brian Birtles 065446fdcd Bug 1239945 part 7 - Move GetAnimationCollection to AnimationCollection; r=dholbert
By moving GetAnimationCollection to AnimationCollection itself, we can remove
a bunch of virtual methods on the animation managers, simplify call sites,
and provide better type safety by ensuring a correspondence between element
property names and concrete animation types.

One change in behavior, however, is that in doing this we can no longer
add any newly-created AnimationCollection to the corresponding manager's linked
list of collections inside GetAnimationCollection. Instead we take a bool
outparam to indicate if a new collection was created and leave managing the
linked list to the manager. This is just a temporary measure, however, since
by the end of this patch series will will eliminate this linked list altogether
along with this flag.

MozReview-Commit-ID: 1jsc4QcmVDg
2016-03-09 12:55:39 +09:00
Brian Birtles dd4f27f03e Bug 1239945 part 6 - Templatize AnimationCollection based on the concrete type of Animation stored; r=dholbert
This patch templatizes the type of Animation stored in an AnimationCollection.
This allows us to remove a number AsCSSAnimation() calls in nsAnimationManager.

This patch also removes the AnimationPtrArray typedef. In its place we
introduce OwningCSSAnimationPtrArray and OwningCSSTransitionPtrArray but we
don't use these as widely. There was some comment previously that the typedefs
in animation code make it hard to read, particularly when these typedefs don't
make it clear if the data type is an owning reference or not.

In doing this we need to templatize CommonAnimationManager as well and move the
implementation of its (few) methods to the header file. We may be able to
remove the need for templatizing CommonAnimationManager later in this patch
series depending on how we ultimately decide to handle the lifetime of
AnimationCollection objects.

CommonAnimationManager::GetAnimationCollection is a bit messy but this will be
significantly tidied up in subsequent patches in this series.

MozReview-Commit-ID: 3ywatY53pRR
2016-03-09 12:55:39 +09:00
Brian Birtles f6ce89fead Bug 1239945 part 4 - Remove the pointer from an AnimationCollection to its manager since it is no longer used; r=dholbert 2016-02-24 16:08:56 +09:00
Brian Birtles 5413ebdb9d Bug 1239945 part 3 - Move AnimationCollection to a separate file; r=dholbert
In this bug we will trim off unnecessary functionality from the animation
managers and make AnimationCollection into an independent data type
so in this patch we separate it into its own file.

It is also generally easier to navigate the source code and eliminate
cyclic dependencies between header files when there is a rough
correspondance between class names and file names (e.g. rather than having
#include "AnimationCommon.h" // For mozilla::AnimationCollection).

This patch also makes a few simplifications to include dependencies since
they're a bit of a mess (making it hard to move code around). The changes to
IncrementalClearCOMRuleArray.cpp are due to the changes to the unified build
introduced by adding AnimationCollection.cpp exposing a missing include from
that file.
2016-02-24 16:08:20 +09:00