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

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
Cameron McCormack f63cdecde2 Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr

--HG--
extra : rebase_source : 13c64026190afe5de25f540adb6deea9f518149f
2017-02-13 11:21:33 +08:00
Boris Chiou efe45f15d3 Bug 1249219 - Part 3: Replace Pair<Element*, CSSPseudoElementType> with NonOwningAnimationTarget. r=birtles
--HG--
extra : rebase_source : 35e69a293cdb7a25ce579dbb453289ed3521e7e2
2016-03-21 16:49:50 +08: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 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