Commit Graph

245 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
0867d625ea Bug 1634943 - Cleanup header inclusions in AnimationCollection.{cpp,h} and AnimationCommon.h. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D73567
2020-05-05 22:39:21 +00:00
Razvan Maries
0a5bb478ea Backed out 8 changesets (bug 1634943) for build bustages on AnimationInfo.h. CLOSED TREE
Backed out changeset 2ee9c0fc07bf (bug 1634943)
Backed out changeset 812f8cfff1b2 (bug 1634943)
Backed out changeset c446c1edc943 (bug 1634943)
Backed out changeset 6ef1fcc1d428 (bug 1634943)
Backed out changeset 5e4ccd0bffac (bug 1634943)
Backed out changeset bf3c4e7b4691 (bug 1634943)
Backed out changeset 8f310f49a366 (bug 1634943)
Backed out changeset 421cd778da3d (bug 1634943)
2020-05-05 13:50:47 +03:00
Hiroyuki Ikezoe
7ae05217ba Bug 1634943 - Cleanup header inclusions in AnimationCollection.{cpp,h} and AnimationCommon.h. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D73567
2020-05-05 10:00:08 +00:00
Mats Palmgren
9e5f85edc2 Bug 1538618 - [css-pseudo] implement animation support for ::marker pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25003

--HG--
extra : rebase_source : 999373f16c816cdd0dd64b1cc3f9f3f30bb12003
extra : amend_source : 829c0fc25afc55d50b70aebc1f3b9f0e8f06c458
2019-03-26 05:48:26 +01:00
Emilio Cobos Álvarez
dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

Differential Revision: https://phabricator.services.mozilla.com/D19002

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Brian Birtles
928d88aabb Bug 1433705 - Rename GetCurrentTime to GetCurrentTimeAsDuration; r=hiro
To avoid having to always work around conflicts with winbase.h.

Differential Revision: https://phabricator.services.mozilla.com/D13951

--HG--
extra : moz-landing-system : lando
2018-12-06 22:16:48 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Olli Pettay
57b81277a0 bug 1483963, cache the index of a child node when ordering animations for event dispatch, r=hiro,ehsan
--HG--
extra : rebase_source : f98586625b199e7b2d0eb7db8dc9c1c5235289fe
2018-09-05 00:31:57 +03:00
Hiroyuki Ikezoe
39dc128652 Bug 1320608 - Add forward declaration for nsIFrame in AnimationCollection.h. r=birtles
And drop an unnecessary forward declaration for nsIFrame from AnimationCommon.h.

MozReview-Commit-ID: IYroCrg1rtq

--HG--
extra : rebase_source : f41fc19e2cff4ef0dba26192b2f19edfb57189d6
2018-05-09 05:53:46 +09:00
Boris Zbarsky
a0b6e32bba Bug 1449631 part 12. Remove the Nullable smuggling from nsIDOMEventTarget. r=smaug
MozReview-Commit-ID: 73qhRSCpr3S
2018-04-05 13:42:42 -04:00
Hiroyuki Ikezoe
7828b6be59 Bug 1415780 - Let nsPresContext have AnimationEventDispatcher. r=birtles
Now we sort CSS animation/transition events by scheduled event time prior
to compositor order.

SortEvents() will be a private method in the next patch in this patch
series.

MozReview-Commit-ID: ICkOayquN0f

--HG--
extra : rebase_source : 405c8232e93c54a073c722a4332873af02daa870
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
21a53275cd Bug 1415780 - Make AnimationEventDispatcher refcountable. r=birtles
In a subsequent patch in this patch series, we want to make nsPresContext
have an AnimationEventDispatcher as RefPtr<>.

Instead, if we were trying to make nsPresContext have the
AnimationEventDispatcher as data object (not RefPtr<>) just like we did in
CommonAnimationManager, we will fall into header inclusion hell since Element.h
includes nsPresContext.h and AnimationEventDispatcher.h ends up including
Element.h.  Even if we could solve the inclusion hell, we will suffer from Rust
bindgen issues for some reasons.

MozReview-Commit-ID: B0nX2JzIRJD

--HG--
extra : rebase_source : 4eb998876b2fc39de8d09cac09c19e1a51cd382e
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
75fc208a71 Bug 1415780 - De-templatize AnimationEventDispatcher. r=birtles,masayuki
Now single AnimationEventDispatcher can handle both CSS animation/transition
events simultaneously.  To do this we had to change AnimationEventInfo and
TransitionEventInfo into a single struct, the struct is also named
AnimationEventInfo.

It results we can sort both CSS animation/transition events altogether.  Thus
we make sure CSS animation/transition events are sorted by scheduled event time
prior to their composite order (i.e. transitions is prior to animations).

At this moment, we don't sort both events altogether since nsAnimationManager
and nsTransitionManager has an AnimationEventDispatcher respectively.  In the
next patch we move AnimationEventDispatcher into nsPresContext, i.e. each
document has an AnimationEventDispatcher without the distinction between
CSS animations and transitions.

Note that, after this patch, we copy all members in InternalTransitionEvent and
InternalAnimationEvent in the copy-constructor of AnimationEventInfo, this
will be fixed once WidgetEvent has move-constructor and move-assignment
(bug 1433008).

MozReview-Commit-ID: 5JAh6N7C6ee

--HG--
extra : rebase_source : 50da76f51cf65cdd1245d93d8b48aaf0ae0ec94b
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
45ef4d82a6 Bug 1415780 - Split AnimationEventDipatcher into an independent file. r=birtles
MozReview-Commit-ID: Fcqtu7G400Z

--HG--
extra : rebase_source : 50de08148dcd4e4db0ea9a9ad1b501718852ca78
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
7fd0af8304 Bug 1415780 - Rename DelayedEventsDispatcher to AnimationEventDispatcher. r=birtles
We plan to use this class to dispatch web animation API events as well
(bug 1354501).

MozReview-Commit-ID: 7DMmc0aJzJ5

--HG--
extra : rebase_source : 445428771238ad31697cede8afbab35c1144a422
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
f4d1fdc0b1 Bug 1415780 - Undef GetCurrentTime in the template function that uses Animation::GetCurrentTime. r=birtles
MozReview-Commit-ID: DaOZtYRx4Ud

--HG--
extra : rebase_source : 40f4465e39e5cc0d846989ab25bf264547778aac
2018-01-27 21:17:26 +09:00
Cosmin Sabou
887d9fa276 Backed out 12 changesets (bug 1415780) for build bustages nsRefreshDriver.cpp:1606:1 and AnimationCommon.h:168:51 on a CLOSED TREE
Backed out changeset 1fa2f138319e (bug 1415780)
Backed out changeset 6bad89a17566 (bug 1415780)
Backed out changeset a88250ad7a3e (bug 1415780)
Backed out changeset 43d42ca7308f (bug 1415780)
Backed out changeset 79e980195ee8 (bug 1415780)
Backed out changeset f0cc29e7ccd7 (bug 1415780)
Backed out changeset c6567e4196f6 (bug 1415780)
Backed out changeset ae7be65f3c88 (bug 1415780)
Backed out changeset 621b9aaf4a8f (bug 1415780)
Backed out changeset e298f242ce7c (bug 1415780)
Backed out changeset 027a7ed3c948 (bug 1415780)
Backed out changeset 433a6f0d0ac3 (bug 1415780)
2018-01-27 12:47:29 +02:00
Hiroyuki Ikezoe
99f98b1bd6 Bug 1415780 - Let nsPresContext have AnimationEventDispatcher. r=birtles
Now we sort CSS animation/transition events by scheduled event time prior
to compositor order.

SortEvents() will be a private method in the next patch in this patch
series.

MozReview-Commit-ID: ICkOayquN0f

--HG--
extra : rebase_source : 52226c33a511451c31d4c3fef94ff02de8462256
2018-01-27 16:55:45 +09:00
Hiroyuki Ikezoe
f61cc0132a Bug 1415780 - Make AnimationEventDispatcher refcountable. r=birtles
In a subsequent patch in this patch series, we want to make nsPresContext
have an AnimationEventDispatcher as RefPtr<>.

Instead, if we were trying to make nsPresContext have the
AnimationEventDispatcher as data object (not RefPtr<>) just like we did in
CommonAnimationManager, we will fall into header inclusion hell since Element.h
includes nsPresContext.h and AnimationEventDispatcher.h ends up including
Element.h.  Even if we could solve the inclusion hell, we will suffer from Rust
bindgen issues for some reasons.

MozReview-Commit-ID: B0nX2JzIRJD

--HG--
extra : rebase_source : cd010ca5fe5b1f9fa8f519fdab0dc47d6e519bef
2018-01-27 16:55:44 +09:00
Hiroyuki Ikezoe
f2ce7c4704 Bug 1415780 - De-templatize AnimationEventDispatcher. r=birtles,masayuki
Now single AnimationEventDispatcher can handle both CSS animation/transition
events simultaneously.  To do this we had to change AnimationEventInfo and
TransitionEventInfo into a single struct, the struct is also named
AnimationEventInfo.

It results we can sort both CSS animation/transition events altogether.  Thus
we make sure CSS animation/transition events are sorted by scheduled event time
prior to their composite order (i.e. transitions is prior to animations).

At this moment, we don't sort both events altogether since nsAnimationManager
and nsTransitionManager has an AnimationEventDispatcher respectively.  In the
next patch we move AnimationEventDispatcher into nsPresContext, i.e. each
document has an AnimationEventDispatcher without the distinction between
CSS animations and transitions.

Note that, after this patch, we copy all members in InternalTransitionEvent and
InternalAnimationEvent in the copy-constructor of AnimationEventInfo, this
will be fixed once WidgetEvent has move-constructor and move-assignment
(bug 1433008).

MozReview-Commit-ID: 5JAh6N7C6ee

--HG--
extra : rebase_source : 06ef844f41cfe81b9a629340b5a328c1bed80e8e
2018-01-27 16:55:44 +09:00
Hiroyuki Ikezoe
cd43017099 Bug 1415780 - Split AnimationEventDipatcher into an independent file. r=birtles
MozReview-Commit-ID: Fcqtu7G400Z

--HG--
extra : rebase_source : e90a03ef74a7c53a068227672f9e727d31d11707
2018-01-27 16:55:44 +09:00
Hiroyuki Ikezoe
d3f99e5f1a Bug 1415780 - Rename DelayedEventsDispatcher to AnimationEventDispatcher. r=birtles
We plan to use this class to dispatch web animation API events as well
(bug 1354501).

MozReview-Commit-ID: 7DMmc0aJzJ5

--HG--
extra : rebase_source : 9e68c251a9677fb5429a4a6c00898ae4b3bd35fc
2018-01-27 16:55:43 +09:00
Hiroyuki Ikezoe
5b7a247462 Bug 1430924 - Queue a bunch of animation events at once. r=boris
MozReview-Commit-ID: BjRjohOFA7V

--HG--
extra : rebase_source : c235d5394f1a724913415f170aab194564443316
2018-01-17 08:13:01 +09:00
Hiroyuki Ikezoe
089161c4d1 Bug 1430924 - AnimationEventInfo and TransitionEventInfo take NonOwningAnimationTarget instead of Element and CSSPseudoElementType pair. r=boris
MozReview-Commit-ID: HYN9AWuyjem

--HG--
extra : rebase_source : 3d63272c2ff62a82ccde641a6765ed2faf4d28f9
2018-01-17 08:13:01 +09:00
Hiroyuki Ikezoe
906b83a978 Bug 1430924 - Move mEventDispatcher in nsAnimationManager and nsTransitionManager into the common template class. r=boris
DispatchEvents() couldn't be moved since the function holds a reference of
nsAnimationManager or nsTransitionManager, but the common template class
is not ref-countable.

MozReview-Commit-ID: FfiJtzSZWn

--HG--
extra : rebase_source : 30d1cdcebf8e06696f28ba5c0968a90797976f06
2018-01-17 08:13:01 +09:00
Daniel Holbert
680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Hiroyuki Ikezoe
2f471b7a63 Bug 1374882 - Add a TimingParams ctor for CSS animations/transitions. r=birtles
MozReview-Commit-ID: CZbrAJlqNJ1

--HG--
extra : rebase_source : 9360731a79e8416e429f1d2b008ac5f85d6061c3
2017-06-22 12:12:42 +09:00
Christopher Bathgate
8a23013745 Bug 1318223 - Use NonOwningAnimationTarget in OwningElementRef. r=boris, r=birtles
--HG--
extra : amend_source : efe698c05bcee0c34d99b8242d8f147373cf2584
2017-03-26 16:46:00 -04:00
Hiroyuki Ikezoe
d28fbf09bc Bug 1344603 - Make Stop{Animations|Transitions}ForElement as a member function of CommonAnimationManager. r=boris
MozReview-Commit-ID: LSSpWYjoPn9

--HG--
extra : rebase_source : c87ec78281b37f1cb32e38969c22fddc228d28f8
2017-03-06 13:19:09 +09:00
Hiroyuki Ikezoe
21e340c4fc Bug 1344533 - Replace OwningElementRef::GetRenderedPresContext with nsContentUtils::GetContextForContext(). r=boris
MozReview-Commit-ID: HaAvgNcORQb

--HG--
extra : rebase_source : 2571541c3274fa1eb9233c8c01128190b94d108c
2017-03-05 17:28:49 +09:00
Hiroyuki Ikezoe
48e5e75277 Bug 1340916 - Part 3: Add a helper function to create TimingParams CSS animation/transition properties. r=birtles
MozReview-Commit-ID: 3CmCc44FhvA

--HG--
extra : rebase_source : a0d1067916a68fc4bc18793b05ae46902fddff41
2017-02-20 11:02:52 +09:00
Mantaroh Yoshinaga
f0550caaae Bug 1302648 part 5 - Queue animationcancel when animation status is idle. r=birtles
MozReview-Commit-ID: DRjWboQwR0A

--HG--
extra : rebase_source : 17a92668519bdf7a4d7c58c97bd8f23b889767a7
2017-02-10 12:32:44 +09:00
Hiroyuki Ikezoe
64599f507d Bug 1223658 - Part 1: Drop ExtractComputedValueForTransition. r=birtles,dholbert
MozReview-Commit-ID: I4SMwcv30YL
2016-05-10 18:39:37 +09:00
Mantaroh Yoshinaga
1a3a4d293d Bug 1259285 - Part1 - Move CSS/Web Animations-specific visibility handling. r=birtles
MozReview-Commit-ID: 5ZYUhvI1cqV

--HG--
extra : transplant_source : %85%01%5C%91%EB%C2%F9%F5a%82%5C%FCZKz%F7%2B%27%F7%9C
2016-04-20 09:05:29 +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
Brian Birtles
a9218457d2 Bug 1239945 part 2 - Drop CommonAnimationManager::ContentOrAncestorHasAnimation; r=dholbert
This was added in bug 780692 to work around assertions that arose due to the
inconsistent state introduced by mini-flushes. However, that workaround
no longer seems necessary. In particular, the crashtest for bug 813372 no
longer reports failed assertions when we remove this method and nor do any
other tests.

I'm not sure exactly what changed about how we do mini-flushes but I suspect
it was bug 960465 or one of the related follow-ups.
2016-02-24 15:42:33 +09:00
Brian Birtles
d06f85599d Bug 1239945 part 1 - Drop a number of animation manager/collection-related methods that are unused (and in some cases undefined); r=dholbert 2016-02-24 13:41:16 +09:00
Boris Chiou
e436478f26 Bug 1244049 - Part 2: Replace nsCSSPseudoElements::Type with CSSPseudoElementType. r=dbaron
Also, try to use forward declaraions for CSSPseudoElementType;

--HG--
extra : rebase_source : c00eb9753e8f618a33aa711538ac45c0132b353c
2016-02-17 21:37:00 +01:00
Boris Chiou
185a769719 Bug 1244049 - Part 1: Define scoped enum for CSSPseudoElement type. r=dbaron
--HG--
extra : rebase_source : e53dd269e47fa97eb259ebd9295d012eacbdb612
2016-02-16 23:07:00 +01:00
Brian Birtles
6fb8992111 Bug 1235112 - Move animation style rule processors to EffectCompositor; r=heycam 2016-01-15 15:15:47 +09:00
Nigel Babu
0ce7a5f39e Backed out 5 changesets (bug 1235112, bug 1237467) for nsRuleNode::Transition crashes
Backed out changeset ac21baf87df2 (bug 1235112)
Backed out changeset c47a6e0a6d95 (bug 1237467)
Backed out changeset 7609ca218902 (bug 1237467)
Backed out changeset d63ca2677bd5 (bug 1237467)
Backed out changeset 5a3d7e16b1e0 (bug 1237467)

--HG--
extra : commitid : LONozKsGtli
2016-01-14 11:35:06 +05:30
Brian Birtles
32bf08d255 Bug 1235112 - Move animation style rule processors to EffectCompositor; r=heycam 2016-01-14 08:02:39 +09:00
Brian Birtles
d549991eb2 Bug 1232577 part 19 - Move ClearIsRunningOnCompositor to EffectCompositor; r=heycam 2016-01-13 07:54:56 +09:00
Brian Birtles
dab2f9c064 Bug 1232577 part 17 - Move AddStyleUpdatesTo to EffectCompositor; r=heycam 2016-01-13 07:54:55 +09:00
Brian Birtles
309027bbe9 Bug 1232577 part 16 - Move GetAnimationRule to EffectCompositor; r=heycam 2016-01-13 07:54:55 +09:00
Brian Birtles
b65c8d2610 Bug 1232577 part 14 - Move FlushAnimations to EffectCompositor; r=heycam 2016-01-13 07:54:55 +09:00
Brian Birtles
c54edbe389 Bug 1232577 part 13 - Move EnsureStyleRuleFor from AnimationCollection to EffectCompositor 2016-01-13 07:54:55 +09:00
Brian Birtles
2a70c0a477 Bug 1232577 part 12 - Move the remainder of RequestRestyle from AnimationCollection to EffectCompositor; r=heycam
This also allows us to remove all references to AnimationCollection and the
animation managers from Animation.
2016-01-13 07:54:54 +09:00