Commit Graph

1853 Commits

Author SHA1 Message Date
Boris Chiou
c8d7bee5ff Bug 1467277 - Avoid getting zero normalized vector of rotate3d for animations. r=hiro
If we have a rotate axis whose length is extremely large, we will get an
infinite value, and its normalized vector is a zero vector, instead of an
unit vector, i.e. (x/inf, y/inf, z/inf) == (0, 0, 0).
The solution is: we scale the vector, so the length becomes a finite value,
and we could get a valid unit vector. Therefore, we use
a different normalization method, robust_normalize().

MozReview-Commit-ID: L8SteFe09aO

--HG--
extra : rebase_source : 4568c8bf906a9246e4ef13672a9ed541852b974a
2018-07-05 15:41:23 -07:00
Ciure Andrei
2198f99f97 Merge inbound to mozilla-central. a=merge 2018-07-05 12:51:41 +03:00
Hiroyuki Ikezoe
043e18fa29 Bug 1473172 - Call MostRecentRefreshTimeUpdated when we start observering the refresh driver for DocumentTimeline. r=birtles
There seem race conditions that we do a paint process when we started observing
the refresh driver but the first tick hasn't happened yet.

MozReview-Commit-ID: KRP8WR644q1
2018-07-05 10:44:42 +09:00
Hiroyuki Ikezoe
8015da3cef Bug 1472654 - Drop SchedulePaint call in AddAnimationsForProperty. r=birtles
This call was added in bug 929362, but the key factor to fix the bug was just
setting a flag representing that the target frame doesn't allow the animation
running on the compositor and checking the flag in the function whether the
animation can be run on the compositor or not in later ticks.  So the call
wasn't necessary in the first place.

The test case here fails without this fix.  The test case actually doesn't
observe animation restyle count at all, so it might look a bit awkward in
file_restyles.html, if we add other test cases checking SchedulePaint calls
in future, we will move the tests in a different file.
(The reason there is no animation restyles in this case is that we properly
 throttle the animation in this case.)

MozReview-Commit-ID: AyHciRJHM0s

--HG--
extra : rebase_source : f3963336ea9165b0a9c1a662bdac5c645b209219
2018-07-05 07:18:45 +09:00
Hiroyuki Ikezoe
8b30a3dc7b Bug 1354501 - Dispatch web animation events at the same time when CSS animations/transitions events are dispatched. r=birtles
MozReview-Commit-ID: u7lWtAF8Ml

--HG--
extra : rebase_source : 6ce807bc253706483960dade2f2c926fa9821460
2018-07-03 11:05:23 +09:00
Hiroyuki Ikezoe
7db3f93d4a Bug 1354501 - Introduce a new function to queue a single animation event. r=birtles
Web animation event (i.e. finish and cancel event) is solely queued.

MozReview-Commit-ID: h1g3NfcY3c

--HG--
extra : rebase_source : 1a7b09783d193195b886fa3a046198ba3e02dd7b
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe
7374654896 Bug 1354501 - Change event target variable type to EventTarget and rename it to mTarget. r=birtles
That's because the target for web animation events (i.e. finish and cancel)
is an Animation instance.

MozReview-Commit-ID: 5xR325FXUo

--HG--
extra : rebase_source : 9bd0623ece1dc449d52db283882fe236dbc11c6d
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe
1c47aa1edf Bug 1354501 - Factor out calculations for interval start/end times. r=birtles
MozReview-Commit-ID: H9iXX9VLXLr

--HG--
extra : rebase_source : 736d304858cd0a2c5953f9986dd161ebd21c8099
2018-07-03 09:25:02 +09:00
Hiroyuki Ikezoe
92e15ae40f Bug 1472076 - Update animations when the refresh driver's time changed due to the active timer changes. r=birtles
Normally the refresh driver's time changes in nsRefreshDriver::Tick, and then
DocumentTimeline::WillRefresh is called for the change.  But nsRefreshDriver
sometimes updates its own time when their timer changes to the active one.
This patch lets DocumentTimeline update animations in response to the refresh
driver's time updates.  And thus this patch prevents animation state and
relevant stuff inconsistencies such as an animation has been finished without
proper processes, e.g. without invalidating frame for the animation.

MozReview-Commit-ID: 42p5BWITQN0

--HG--
extra : rebase_source : 58cc7d8e203a3632b6934b9d778e82e2fe208adb
2018-07-03 10:59:55 +09:00
Hiroyuki Ikezoe
36993c4e93 Bug 1472601 - Use EnsureInserted to check a key in a hashtable and insert the key into the hashtable. r=boris
As for removing an entry, EnsureRemoved is equal to what Contains && RemoveEntry
do, but for consistency we use EnsureRemoved here.

MozReview-Commit-ID: 9qE3YtvmwC8

--HG--
extra : rebase_source : 1681194cd8b9700d46a07a502f7d2f15580918aa
2018-07-02 15:19:43 +09:00
Hiroyuki Ikezoe
b4fed9e95d Bug 1246045 - Throttle animations in out-of-view iframe. r=birtles
Before this change, we don't acend up frame tree across different documents,
but it's possible that subframe document is scrolled out in the parent document,
if there are animations in such subframes, we should throttle the animations
too.

The test case added here fails without this fix.

MozReview-Commit-ID: EdOEVEwomPc

--HG--
extra : rebase_source : 4d6366cf609d9269ec05b3722f5adb21d940a9e3
2018-06-29 10:01:26 +09:00
Hiroyuki Ikezoe
2eca924126 Bug 1471106 - Set overflow:hidden to body element to avoid accidentally unthrottling animations to update the overflow region. r=birtles
MozReview-Commit-ID: CtcgyUq37W5

--HG--
extra : rebase_source : 84015639f21f2acbb544ea7ab0bed1e78e003549
2018-06-27 15:21:48 +09:00
Dorel Luca
f51c4fa5d9 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-27 13:26:49 +03:00
Hiroyuki Ikezoe
5a526baa41 Bug 1471174 - Drop opacity value that was for preventing the animations run on the compositor and check the animation is NOT running on the compositor. r=birtles
Because now we don't try to send the animations on visibility:hidden element.

MozReview-Commit-ID: IFqIc8ewz5T

--HG--
extra : rebase_source : ed031b3a55fd89f74437b71812f90dfc1825e823
2018-06-27 09:40:55 +09:00
Hiroyuki Ikezoe
5bb979bdfb Bug 1471174 - Don't try to send invisible animations that we already throttled on the main thread. r=birtles
Even if we unthrottled the invisbile animations to update the overflow region,
we don't need to send the animations to the compositor since the scroll bar
updates caused by the overflow should have been finished before sending
animations to the compositor.

MozReview-Commit-ID: GtKdPfBSyRB

--HG--
extra : rebase_source : 3b15f4578ed60740c1409304fe35ecd4f53fbd5b
2018-06-27 09:40:52 +09:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez
b8c809c60e Bug 1430884: followup: Fix some typos in file_restyles.html. r=me
MozReview-Commit-ID: 4P5EC1R1i0z
2018-06-25 21:19:42 +02:00
Hiroyuki Ikezoe
31001ebaf6 Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl

--HG--
extra : rebase_source : a32771f5bb6c6862e483fe36a2060d604ee2413d
2018-06-25 18:29:44 +09:00
Hiroyuki Ikezoe
fbf7fab2f3 Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 7a82246699f3858757dce887e0d2154d165c0da1
2018-06-25 18:29:28 +09:00
Hiroyuki Ikezoe
10960cad13 Bug 1430884 - Throttle nsChangeHint_UpdateContainingBlock on invisible element. r=birtles
When an animation targets a CSS property that could cause a containing block to
be generated for its descendants, this containing block must be generated even
if the particular property values used by the animation would not normally
trigger generation of a containing block (e.g. transform: none).  This is due
to the implicit application of will-change defined in CSS Animations[1] and Web
Animations[2].

Since this containing block is generated at the start of the animations, we can
throttle animations that produce the UpdateContainingBlock change hint for
animations that are not visible since they shouldn't have any further side
effects beyond the generation of containing blocks (which have already happened).

[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section


Unfortunately perspective animations starting with 'none' and transform
animations from 'none' to 'none' don't create a containing block (bug 1470349
and bug 1470370).  That doesn't block the optimization in this patch, however,
since those bugs occur regardless of element visibility.

MozReview-Commit-ID: 8rTl8dShHrD

--HG--
extra : rebase_source : 886b003d0f3c555a12baf0de81b4130ef2d71e82
2018-06-25 18:29:09 +09:00
Hiroyuki Ikezoe
50273c0888 Bug 1430884 - Flatten CanThrottleIfNotVisible function with early returns. r=birtles
MozReview-Commit-ID: 3JQ0sG2oWfN

--HG--
extra : rebase_source : d8b9406c6b30f47efbcb5a6ab0d1e2464385f527
2018-06-25 11:51:05 +09:00
Hiroyuki Ikezoe
110106dfc4 Bug 1430884 - Factor out checking the animation on the given frame can be throttled if the frame is not visible. r=birtles
MozReview-Commit-ID: Kl7qYFXiVqr

--HG--
extra : rebase_source : af488bb27899001bbafcace79f321d12ace0f382
2018-06-25 11:51:05 +09:00
Hiroyuki Ikezoe
636e9381d5 Bug 1430884 - Throttle animations producing nsChangeHint_UpdateOverflow change hint if the target element is not visible. r=birtles
In the case where the target element is scrolled out or visibility:hidden and
has no visible descendants, we can treat nsChangeHint_UpdateOverflow just like
transform animations which produce nsChangeHint_UpdatePostTransformOverflow,
i.e. unthrottle the animations periodically if the target element is inside a
scrollable element.  Some transform animations produce UpdateOverflow hint,
so it would be really nice to optimize the hint.

MozReview-Commit-ID: E1MgPZRi8mW

--HG--
extra : rebase_source : d29a29e137742f88a64b3b18a5a7d4e64e76f54f
2018-06-25 11:50:56 +09:00
Hiroyuki Ikezoe
f0ecedfe01 Bug 1430884 - Rename unthrottling transform animations stuff. r=birtles
In the next patch, we are going to unthrottle UpdateOverflow change hint which
is also produced by non-transform properties.

MozReview-Commit-ID: BrJxo32uBJO

--HG--
extra : rebase_source : daeb91bc4ce44a120ce4092f9f113c78f0553326
2018-06-25 09:12:21 +09:00
Hiroyuki Ikezoe
79b444cd26 Bug 1430884 - Use const/let in file_restyles.html. r=birtles
MozReview-Commit-ID: F2o2y33KV75

--HG--
extra : rebase_source : c390b70fe8ee9bf55b0fb718818467da95fe3c85
2018-06-25 06:07:15 +09:00
Margareta Eliza Balazs
e1ea59be60 Backed out 9 changesets (bug 1430884) for frequently failing dom/animation/test/mozilla/test_restyles.html on android-em-4-3-armv7-api16 debug
Backed out changeset 262dbc8daac1 (bug 1430884)
Backed out changeset c3f9f3f66a98 (bug 1430884)
Backed out changeset 39e1c4e3c8c9 (bug 1430884)
Backed out changeset 4505e3f87b2e (bug 1430884)
Backed out changeset e7e8977e0e92 (bug 1430884)
Backed out changeset 6dbae2b8957d (bug 1430884)
Backed out changeset 1e047fbcae2a (bug 1430884)
Backed out changeset 52be07f10eaa (bug 1430884)
Backed out changeset cec68a5b01da (bug 1430884)

--HG--
extra : rebase_source : 9877dce2438d42eca99898b22c95ecc04dbd748f
2018-06-25 12:23:59 +03:00
Hiroyuki Ikezoe
ba1228b549 Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl

--HG--
extra : rebase_source : 5ea5b101fff03cb2a834e218f4e6df0a0527dfdb
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
6d104540fb Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 424a94ace113c3383fd91300802973ba60da5f7d
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
2ae0dce721 Bug 1430884 - Throttle nsChangeHint_UpdateContainingBlock on invisible element. r=birtles
When an animation targets a CSS property that could cause a containing block to
be generated for its descendants, this containing block must be generated even
if the particular property values used by the animation would not normally
trigger generation of a containing block (e.g. transform: none).  This is due
to the implicit application of will-change defined in CSS Animations[1] and Web
Animations[2].

Since this containing block is generated at the start of the animations, we can
throttle animations that produce the UpdateContainingBlock change hint for
animations that are not visible since they shouldn't have any further side
effects beyond the generation of containing blocks (which have already happened).

[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section


Unfortunately perspective animations starting with 'none' and transform
animations from 'none' to 'none' don't create a containing block (bug 1470349
and bug 1470370).  That doesn't block the optimization in this patch, however,
since those bugs occur regardless of element visibility.

MozReview-Commit-ID: 8rTl8dShHrD

--HG--
extra : rebase_source : f2f89c8ad074f1ad73ebd5652311d22e71cf7344
2018-06-25 11:51:06 +09:00
Hiroyuki Ikezoe
3e2e6757bd Bug 1430884 - Flatten CanThrottleIfNotVisible function with early returns. r=birtles
MozReview-Commit-ID: 3JQ0sG2oWfN

--HG--
extra : rebase_source : d8b9406c6b30f47efbcb5a6ab0d1e2464385f527
2018-06-25 11:51:05 +09:00
Hiroyuki Ikezoe
1144a8a312 Bug 1430884 - Factor out checking the animation on the given frame can be throttled if the frame is not visible. r=birtles
MozReview-Commit-ID: Kl7qYFXiVqr

--HG--
extra : rebase_source : af488bb27899001bbafcace79f321d12ace0f382
2018-06-25 11:51:05 +09:00
Hiroyuki Ikezoe
72d2033486 Bug 1430884 - Throttle animations producing nsChangeHint_UpdateOverflow change hint if the target element is not visible. r=birtles
In the case where the target element is scrolled out or visibility:hidden and
has no visible descendants, we can treat nsChangeHint_UpdateOverflow just like
transform animations which produce nsChangeHint_UpdatePostTransformOverflow,
i.e. unthrottle the animations periodically if the target element is inside a
scrollable element.  Some transform animations produce UpdateOverflow hint,
so it would be really nice to optimize the hint.

MozReview-Commit-ID: E1MgPZRi8mW

--HG--
extra : rebase_source : d29a29e137742f88a64b3b18a5a7d4e64e76f54f
2018-06-25 11:50:56 +09:00
Hiroyuki Ikezoe
da72e00592 Bug 1430884 - Rename unthrottling transform animations stuff. r=birtles
In the next patch, we are going to unthrottle UpdateOverflow change hint which
is also produced by non-transform properties.

MozReview-Commit-ID: BrJxo32uBJO

--HG--
extra : rebase_source : daeb91bc4ce44a120ce4092f9f113c78f0553326
2018-06-25 09:12:21 +09:00
Hiroyuki Ikezoe
ba3a54d369 Bug 1430884 - Use const/let in file_restyles.html. r=birtles
MozReview-Commit-ID: F2o2y33KV75

--HG--
extra : rebase_source : c390b70fe8ee9bf55b0fb718818467da95fe3c85
2018-06-25 06:07:15 +09:00
Dan Glastonbury
143a0b32a3 Bug 1467621 - P4: Fix distance for drop-shadow with currentcolor. r=hiro
MozReview-Commit-ID: 9L9rkPAROqG

--HG--
extra : rebase_source : 683a390502658b79e85fe129b6f364ad66b50cf6
2018-06-22 11:17:04 +10:00
Xidorn Quan
ad0d10644f Bug 1418874 part 2 - Move ctor and dtor of AnimationEffect into cpp file. r=hiro
They require destructor of Animation, but that is an incomplete type in
AnimationEffect.h, and AnimationEffect.h cannot include Animation.h
because the latter already includes the former.

MozReview-Commit-ID: AunD7dI1QN5

--HG--
extra : rebase_source : c9331eb5186b09666419e0b7ab12517beb07793f
2018-06-14 20:00:20 -07:00
Andi-Bogdan Postelnicu
7f7f0a2300 Bug 1453795 - Dom/Animation - Initialize member fields in classes/ structures. r=bbirtles 2018-06-13 23:24:56 +03:00
Hiroyuki Ikezoe
7cd41518c9 Bug 1468294 - Double f64::EPSILON for calculation error. r=birtles
It's possible that both this_weight and other_weght have calculation errors
which are approximately equal to f64::EPSILON.

MozReview-Commit-ID: 8OddG9rI3qd

--HG--
extra : rebase_source : 9c22d17dcfb8efea7276864502344dc4981c358a
2018-06-13 06:42:14 +09:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Hiroyuki Ikezoe
c1fc73bb2d Bug 1253164 - Make nsIFrame allow running async animations once the frame is able able to run animations on the compositor again. r=birtles
For example, we don't run transform animations on large frames but once
the frame size is small enough we should run transform animations on the frame.

MozReview-Commit-ID: DkfB9g2Gcdi

--HG--
extra : rebase_source : 93a884c3063d4a6c2626e6695583664b24fe11c8
2018-06-07 09:30:33 +09:00
Hiroyuki Ikezoe
cdbb8485ee Bug 1466990 - s/StartOnNextTick/TriggerOnNextTick/ in comments. r=birtles DONTBUILD
The function was renamed in bug 1109390.

MozReview-Commit-ID: Bb7pDRXdhvv

--HG--
extra : rebase_source : 8a46e78ef6b78831bd6e7bf60f3d0b05440a3512
2018-06-06 09:53:13 +09:00
Dorel Luca
746fbfe0a7 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-04 21:11:34 +03:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Cosmin Sabou
1bc774a842 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 12:44:57 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Hiroyuki Ikezoe
ad0bca6be5 Bug 1395971 - Wait for animation being ready to restyle. r=birtles
MozReview-Commit-ID: LqZGaxs4UIB

--HG--
extra : rebase_source : b3b1cfe3ff5bb9c858bc0c3f77e57b557c8e536e
2018-06-01 07:35:52 +09:00
Hiroyuki Ikezoe
352bf6d239 Bug 1395971 - Use await/async in file_deferred_start.html. r=birtles
MozReview-Commit-ID: GkbZ9R0LXL2

--HG--
extra : rebase_source : c302077d62da69f0e78b068ad8c0100e74d3921a
2018-06-01 05:21:22 +09:00
Hiroyuki Ikezoe
e08f3b2a13 Bug 1395971 - Use arrow function in file_deferred_start.html. r=birtles
MozReview-Commit-ID: 9o1M78IOB1c

--HG--
extra : rebase_source : 1b5c22eede3822cf3a05ad8ab2611f77d9e3ad99
2018-06-01 05:21:22 +09:00
Hiroyuki Ikezoe
1d990aba9c Bug 1413370 - Drop isAndroid variable in file_restyles.html. r=birtles,boris
It's no longer used since bug 1458841.

MozReview-Commit-ID: 38UlQjtOVvo

--HG--
extra : rebase_source : 30ba69a8bad21c619b3f9ce139bd5a882bdf98b1
2018-05-30 18:21:18 +09:00
Hiroyuki Ikezoe
fa97dda579 Bug 1458841 - Use waitForAnimationReadyToRestyle wherever we wait for animation.ready right after animation creation. r=birtles
Previously we used the tweakExpectedRestyleCount function (replaced by the
waitForAnimationReadyToRestyle function in the previous patch) only in cases
where we were actually expecting restyles to happen.  For cases where we don't
expect restyles, i.e. cases where we assert the restyle count is zero, we
didn't use this method meaning we didn't bother checking if there was a restyle
expected for the current frame or not.

Since we normally wait for 5 frames anyway before checking that there have been
no restyles, failing to count the number of frames and waiting only 4 frames is
not a problem.  However, if a new test were added that just copied this code and
only waited one frame, it might fail to test what it intended.  So, to avoid
possible future bugs and in order to be more consistent with tests that do
expect restyles, this patch replaces a number of uses animation.ready with
waitForAnimationReadyToRestyle.

MozReview-Commit-ID: 7qBmobTKolh

--HG--
extra : rebase_source : baa272102fed7a66cc4fc89f6d63ba0333087a2d
2018-05-30 09:48:10 +09:00
Hiroyuki Ikezoe
272b797238 Bug 1458841 - Introduce a utility function that waits for a given animation being ready to be restyle. r=birtles
And replace tweakExpectedRestyleCount with the function.

MozReview-Commit-ID: 96jC9looyZq

--HG--
extra : rebase_source : 7dae8b258b874a9b366767a6e49de83bf2caccc9
2018-05-30 09:41:47 +09:00
Hiroyuki Ikezoe
6d4ad6222a Bug 1458841 - Remove test code for the old microtask behavior. r=birtles
MozReview-Commit-ID: ACNgQ0EWrKI

--HG--
extra : rebase_source : 8b628a7e80fa3d0e8d8de53e492eb521d112d0e6
2018-05-30 09:39:18 +09:00
Hiroyuki Ikezoe
a28e0be181 Bug 1463605 - Call MarkNeedsDisplayItemRebuild() for IB split siblings too. r=mattwoodrow
MozReview-Commit-ID: 4vN69YLUbIy

--HG--
extra : rebase_source : dfb73c8d92395a18bbaeb1e68b60ea715e0ecbb4
2018-05-23 18:15:12 +09:00
Hiroyuki Ikezoe
452c7f0e9a Bug 1463605 - Set mMayHaveOpacityAnimation and mMayHaveTransformAnimation flag to continuation or IB split sibling frames too. r=birtles
Without this fix layout/reftests/css-animations/ib-split-sibling-opacity.html
would have failed if the next change in this patch series is applied.

MozReview-Commit-ID: CFNXePkXuOs

--HG--
extra : rebase_source : 48df6bf107e1a14dd2b2ae7c23d38d29581aabcb
2018-05-23 18:15:12 +09:00
Brian Birtles
b6222ec571 Bug 1466031 - Move CSS animations / Web animation integration tests to web-platform-tests; r=hiro
--HG--
rename : dom/animation/test/css-animations/test_cssanimation-animationname.html => testing/web-platform/tests/css/css-animations/CSSAnimation-animationName.tentative.html
rename : dom/animation/test/css-animations/test_animation-cancel.html => testing/web-platform/tests/css/css-animations/CSSAnimation-canceling.tentative.html
rename : dom/animation/test/css-animations/test_setting-effect.html => testing/web-platform/tests/css/css-animations/CSSAnimation-effect.tentative.html
rename : dom/animation/test/css-animations/test_animation-finished.html => testing/web-platform/tests/css/css-animations/CSSAnimation-finished.tentative.html
rename : dom/animation/test/css-animations/test_animation-computed-timing.html => testing/web-platform/tests/css/css-animations/CSSAnimation-getComputedTiming.tentative.html
rename : dom/animation/test/css-animations/test_animation-currenttime.html => testing/web-platform/tests/css/css-animations/CSSAnimation-getCurrentTime.tentative.html
rename : dom/animation/test/css-animations/test_animation-id.html => testing/web-platform/tests/css/css-animations/CSSAnimation-id.tentative.html
rename : dom/animation/test/css-animations/test_animation-pausing.html => testing/web-platform/tests/css/css-animations/CSSAnimation-pausing.tentative.html
rename : dom/animation/test/css-animations/test_animation-playstate.html => testing/web-platform/tests/css/css-animations/CSSAnimation-playState.tentative.html
rename : dom/animation/test/css-animations/test_animation-ready.html => testing/web-platform/tests/css/css-animations/CSSAnimation-ready.tentative.html
rename : dom/animation/test/css-animations/test_animation-starttime.html => testing/web-platform/tests/css/css-animations/CSSAnimation-startTime.tentative.html
rename : dom/animation/test/css-animations/test_pseudoElement-get-animations.html => testing/web-platform/tests/css/css-animations/CSSPseudoElement-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_document-get-animations.html => testing/web-platform/tests/css/css-animations/Document-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_animations-dynamic-changes.html => testing/web-platform/tests/css/css-animations/Element-getAnimations-dynamic-changes.tentative.html
rename : dom/animation/test/css-animations/test_element-get-animations.html => testing/web-platform/tests/css/css-animations/Element-getAnimations.tentative.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html => testing/web-platform/tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
rename : dom/animation/test/css-animations/test_effect-target.html => testing/web-platform/tests/css/css-animations/KeyframeEffect-target.tentative.html
rename : dom/animation/test/css-animations/test_event-dispatch.html => testing/web-platform/tests/css/css-animations/event-dispatch.tentative.html
rename : dom/animation/test/css-animations/test_event-order.html => testing/web-platform/tests/css/css-animations/event-order.tentative.html
rename : dom/animation/test/testcommon.js => testing/web-platform/tests/css/css-animations/support/testcommon.js
extra : rebase_source : 87f112f3018504414a7d6d17d66c4980b58017d0
2018-06-04 10:20:58 +09:00
Brian Birtles
11ca5452f9 Bug 1466031 - Update test_setting-effect.html; r=hiro
Apart from whitespace / test description tests this patch also drops an
assertion about the animation playState since it seems unrelated to the purpose
of that particular test.

--HG--
extra : rebase_source : 73be030dd1dc98ae1facd9c2b80dd1b5bcbf04eb
2018-06-04 10:20:57 +09:00
Brian Birtles
260853229a Bug 1466031 - Update test description in test_pseudoElement-get-animations.html; r=hiro
--HG--
extra : rebase_source : 3db36e712c7b002e01c15443cef31ed004fac19d
2018-06-04 10:20:57 +09:00
Brian Birtles
2509ef01f9 Bug 1466031 - Update test_element-get-animations.html; r=hiro
As well as addressing a few FIXMEs this patch drops the checking of start times
since that seems out of scope for this file and is covered elsewhere (I believe
we only added it at first to bootstrap this work).

--HG--
extra : rebase_source : daa067147d6833880deb59b3d270ca122999a64f
2018-06-04 10:20:57 +09:00
Brian Birtles
141d6a3152 Bug 1466031 - Update test_animations-dynamic-changes.html; r=hiro
--HG--
extra : rebase_source : 946d2c211e466a5abc05810ab5717b881875c768
2018-06-04 10:20:57 +09:00
Brian Birtles
284e3445aa Bug 1466031 - Update test_animation-starttime.html; r=hiro
This patch updates the tests in this file as follows:

* startTime of a newly created (play-pending) animation is unresolved
  -> Covered by 'startTime of a play-pending animation is unresolved'
     in wpt/web-animations/interfaces/Animation/startTime.html

     However, it would be useful to have a test a new CSS animation is
     play-pending so I have extended the test in test_animation-playstate.html
     to cover this.

* startTime of a newly created (pause-pending) animation is unresolved
  -> Covered by 'startTime of a pause-pending animation is unresolved'
     in wpt/web-animations/interfaces/Animation/startTime.html

* startTime is resolved when running
  -> Covered by 'startTime is resolved when running'
     in wpt/web-animations/interfaces/Animation/startTime.html

* startTime is unresolved when paused
  -> Moved to wpt/web-animations/timing-model/animations/pausing-an-animation.html

* startTime while pause-pending and play-pending
  -> Moved to wpt/web-animations/timing-model/animations/pausing-an-animation.html

* startTime while play-pending from finished state,
  startTime while play-pending from finished state using finish()
  -> Merged and moved to wpt/web-animations/timing-model/animations/playing-an-animation.html

* Pausing should make the startTime become null
  -> Simplified and merged into the test for 'startTime is unresolved when
     paused' / 'Pausing clears the start time' test in
     wpt/web-animations/timing-model/animations/pausing-an-animation.html

* Sanity test to check round-tripping assigning to a new animation's startTime
  -> Updated and left.

* Skipping forward through animation
  -> This is really testing two things:
     (a) That you can seek a CSS animation using the start time.
         For this it makes sense to have a separate test that also checks that
         the computed style is updated (like we have for current time).
     (b) That seeking a CSS animation using the start time triggers
         dispatching events.

     This patch splits the above into two separate tests.

* Skipping backwards through animation,
  Redundant change, before -> active, then back,
  Redundant change, before -> after, then back,
  Redundant change, active -> before, then back,
  Redundant change, active -> after, then back,
  Redundant change, after -> before, then back,
  Redundant change, after -> active, then back
  -> All these tests are really just exercising event dispatch which is
     already covered by test_event-dispatch.html.

     Provided we have a test that checks that events are dispatched when
     setting the startTime we don't need to test each combination again since
     we have tests for each of these combinations already when using the
     currentTime to seek and we can assume UAs are following the same code
     path at this point.

     As a result this patch drops these tests.

* Setting startTime to null
  -> Covered by 'Setting an unresolved start time sets the hold time'
     in wpt/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html

* Animation.startTime after pausing
  -> Covered by the new 'Pausing clears the start time' test in
     wpt/web-animations/timing-model/animations/pausing-an-animation.html

* Animation.startTime after canceling
  -> Merged into
     wpt/web-animations/timing-model/animations/canceling-an-animation.html
     and made it follow the spec a little more closely (which requires
     clearing the start time and hold time).

--HG--
extra : rebase_source : 9bb3d82e18e5c2d9654576502a1d4263a1e46daa
2018-06-04 10:20:57 +09:00
Brian Birtles
3a94426531 Bug 1466031 - Move the reversing test to Web Animations web-platform-tests; r=hiro
--HG--
extra : rebase_source : f2d1fda92736cc07d2535e06dd7f35673a7d3562
2018-06-04 10:20:56 +09:00
Brian Birtles
4dfeec9f3c Bug 1466031 - Tidy up test_animation-ready.html; r=hiro
Although many of these tests are similar to tests in the Web Animations
web-platform-tests test suite they focus on the interaction with
animation-play-state and so are probably worth keeping.

There are two exceptions that I felt were worth changing:

* The test for the handling of a ready promise on an aborted pause. I could not
  find a similar test in the Web Animations wpt and the test is not really
  particular to CSS animations so this patch moves it to Web Animations wpt.

* The test for the resolution value of the ready promise for a paused animation
  is covered by the "A pending ready promise should be resolved and not replaced
  when the animation is paused" in pausing-an-animation.html in the Web
  Animations wpt (although peripherally) and that seems like the better place
  for this test anyway (it is not specific to CSS animations) so I have simply
  deleted it from this file.

--HG--
extra : rebase_source : b803572692c70fced551d4343ac241068b6f0057
2018-06-04 10:20:56 +09:00
Brian Birtles
e8003d01b4 Bug 1466031 - Tidy up test_animations-playstate.html; r=hiro
--HG--
extra : rebase_source : e0b70521af1f0faa292d4d46e22d0c870bacde45
2018-06-04 10:20:56 +09:00
Brian Birtles
4c2ded77b8 Bug 1466031 - Tweak whitespace in test_animation-id.html; r=hiro
This just makes the grouping a little more clear I think.

--HG--
extra : rebase_source : 67749506b5befd705cd29331383066e5fe25afef
2018-06-04 10:20:55 +09:00
Brian Birtles
5becd5775e Bug 1466031 - Tidy up test_animation-finished.html; r=hiro
This mostly just involves using promise_rejects to simplify some test code.

The change to the test description of the last test might seem like it is giving
it the opposite meaning but the original test name was "Test finished promise
changes when animationPlayState set to running"[1], and it is about testing
that there are NO changes but that got lost when the "Test" part of the
description was dropped.


[1] https://searchfox.org/mozilla-central/rev/cb846d13d3f9ec5d38ace93a74f749a18e9c67f5/dom/animation/test/css-animations/test_animation-player-finished.html#287

--HG--
extra : rebase_source : e318bd236f522e612a8717c4b7b871b1dd74ed54
2018-06-04 10:20:55 +09:00
Brian Birtles
3c5785da47 Bug 1466031 - Drop test_animation-finish.html; r=hiro
These tests are all covered elsewhere:

* The "Test exceptions when finishing infinite animation" test is covered by
  the "Finishing an infinite animation throws" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.
* The "Test finish() while paused" test is covered by the "Finishing a paused
  animation resolves the start time" test in finishing-an-animation.html in
  the Web Animations web-platform-tests.
* The "Test finish() while pause-pending with positive playbackRate" test is
  covered by the "Finishing a pause-pending animation resolves the pending
  task immediately and update the start time" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.
* The 'Test finish() while pause-pending with negative playbackRate" test is
  covered by the "Finishing a pause-pending animation with negative playback
  rate resolves the pending task immediately" test in
  finishing-an-animation.html in the Web Animations web-platform-tests.

In fact, it very much looks like these tests were copied to Web Animations'
web-platform-tests at some point without deleting the original.

--HG--
extra : rebase_source : d63b1c3ca7548e7f4f27c607e4671691094ddd86
2018-06-04 10:20:55 +09:00
Brian Birtles
8f39ae4272 Bug 1466031 - Re-arrange tests in test_animations-currenttime.html; r=hiro
A number of these tests are redundant with other tests or are otherwise
unnecessary. Other tests should be moved to a more appropriate file.

Some notable examples:

* A number of the tests relate to dispatching events in various phases and have
  been moved to test_event-dispatch.html.
* The "Seeking finished -> paused dispatches animationstart" test is covered
  by the "After -> Active" test in test_event-dispatch.html (which also
  operates on a paused animation).
* The "Animation.currentTime clamping" is really just testing finishing
  behavior and is covered by the updating-the-finished-state.html tests in the
  Web Animations web-platform-tests (specifically the "Updating the finished
  state when playing past end" test).
* Likewise for the "Animation.currentTime clamping for reversed animation"
  test.

--HG--
extra : rebase_source : 949ec7e12396fa97c741c7cc90abb3ff64cc7ab7
2018-06-04 10:20:55 +09:00
Brian Birtles
a07b093a4b Bug 1466031 - Apply various whitespace tweaks to test_animation-computed-timing.html; r=hiro
--HG--
extra : rebase_source : 93a14e6329309f8ef09614c62ad57b7941235dcc
2018-06-04 10:20:55 +09:00
Brian Birtles
0d0f48e374 Bug 1466031 - Update the titles of each test file; r=hiro
Some of these names will make more sense after the renaming of files towards the
end of this patch series.

Also a couple of files do not have titles added since they will be subsequently
removed.

--HG--
extra : rebase_source : 6ba046f9c1cc2e062d5aa7f7a49b791ef7ee7e83
2018-06-04 10:20:55 +09:00
Brian Birtles
3b45943212 Bug 1466031 - Fix the spelling of canceled/canceling in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 63090a905d293df990f69ab434aab8c5f08e4c08
2018-06-04 10:20:55 +09:00
Brian Birtles
5f1c559e1f Bug 1466031 - Use for ... of instead of forEach in a few places in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 625bbff718339ae0943664dd26d8ca693b8eb02a
2018-06-04 10:20:54 +09:00
Brian Birtles
d0fae9ac7e Bug 1466031 - Use async/await in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : aa428787355384b9dc01f8c312adc03aeadb6b28
2018-06-04 10:20:54 +09:00
Brian Birtles
cd3afc3d8a Bug 1466031 - Replace var with const/let in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : e6d69231e8825491a6f2b6713ce6ad0655658aee
2018-06-04 10:20:54 +09:00
Brian Birtles
e190516708 Bug 1466031 - Use arrow functions in dom/animation/test/css-animations/; r=hiro
--HG--
extra : rebase_source : 2446c48d66750142e5c3a544f115beb859043ac8
2018-06-04 10:20:54 +09:00
Brian Birtles
af7674e36b Bug 1456394 - Drop AnimationEffectTiming(ReadOnly) interfaces; r=bz,hiro
MozReview-Commit-ID: KKqAWemDXwv

--HG--
extra : rebase_source : 22541fef1d5286510a44591ec0eb4b43832a76a0
2018-05-07 12:58:37 +09:00
Brian Birtles
3c006b6e4c Bug 1456394 - Use updateTiming() in animation tests; r=hiro
We will remove animation.effect.timing in the next patch.

MozReview-Commit-ID: EyeFNM81NbN

--HG--
extra : rebase_source : 9fe5eb0e5d141ffffa017db255328c742a059611
2018-05-07 12:58:37 +09:00
Brian Birtles
f8118acf9a Bug 1456394 - Make TimingParameters::operator== compare end delay values; r=hiro
MozReview-Commit-ID: 5frk5APUTDd

--HG--
extra : rebase_source : 4d9d88963e3590ac14d8a243c4494c71e723a6f1
2018-05-07 12:42:24 +09:00
Brian Birtles
8dc6ef2391 Bug 1456394 - Add AnimationEffect.updateTiming(); r=bz,hiro
https://drafts.csswg.org/web-animations-1/#dom-animationeffect-updatetiming

MozReview-Commit-ID: ISgksSpH8yH

--HG--
extra : rebase_source : 0b9c03adba9c9068fa3ec1ff06541d587576a29f
2018-05-07 12:37:11 +09:00
Brian Birtles
4ab18a6435 Bug 1456394 - Factor out TimingParams::FromEffectTiming; r=hiro
Factoring out this method makes the code a little easier to read, particularly
when in the next patch in this series we add
a TimingParams::MergeOptionalEffectTiming method.

MozReview-Commit-ID: 5AU6IfN2grZ

--HG--
extra : rebase_source : f90614c7dd03413b4ce05d62d3ac73f0ba0e7dc3
2018-05-07 12:34:47 +09:00
Brian Birtles
79bd9b3a55 Bug 1456394 - Add AnimationEffect.getTiming(); r=bz,hiro
https://drafts.csswg.org/web-animations-1/#dom-animationeffect-gettiming

MozReview-Commit-ID: 8gnd5Gl0UkK

--HG--
extra : rebase_source : 12d28eac599bb2462ef8e6b32cf75e8bd14262eb
2018-05-07 12:32:38 +09:00
Brian Birtles
516b224d43 Bug 1456394 - Rename animation timing dictionaries; r=bz
As per the changes in:

  d4519d9bba (diff-4c9f5c055fb219a7fcad23a9a7a80b64R4206)

MozReview-Commit-ID: Iwvbp0H6jlg

--HG--
extra : rebase_source : 2c8bbab7aee617b65e5a7647ed146abdb0dde2d6
2018-05-07 12:09:54 +09:00
Brian Birtles
f8c518344a Bug 1456394 - Rename AnimationEffectReadOnly to AnimationEffect; r=bz,hiro
MozReview-Commit-ID: 8jzJiCWt5vs

--HG--
rename : dom/animation/AnimationEffectReadOnly.cpp => dom/animation/AnimationEffect.cpp
rename : dom/animation/AnimationEffectReadOnly.h => dom/animation/AnimationEffect.h
rename : dom/webidl/AnimationEffectReadOnly.webidl => dom/webidl/AnimationEffect.webidl
extra : rebase_source : 2bd6490fe9be47cfb760bda81a63c33ba0b0397d
2018-05-07 11:15:16 +09:00
Brian Birtles
3184f30162 Bug 1456394 - Merge KeyframeEffectReadOnly and KeyframeEffect; r=bz,hiro
MozReview-Commit-ID: FvTMGjxfRXk

--HG--
extra : rebase_source : 8f7fd0903c9ca2f545dce2633eb797345a7517f8
2018-05-07 11:08:59 +09:00
Brian Birtles
9622b88217 Bug 1456394 - Rename KeyframeEffectReadOnly.{h,cpp} to KeyframeEffect.{h,cpp}; r=bz,hiro
MozReview-Commit-ID: 5Q7oQV8vmgS

--HG--
rename : dom/animation/KeyframeEffectReadOnly.cpp => dom/animation/KeyframeEffect.cpp
rename : dom/animation/KeyframeEffectReadOnly.h => dom/animation/KeyframeEffect.h
extra : rebase_source : cdc8448e7d07376691ef9187f7d6f4424800b690
2018-05-07 11:07:06 +09:00
Brian Birtles
81725f45de Bug 1456394 - Move KeyframeEffect constructors to KeyframeEffectReadOnly.{h,cpp}; r=bz,hiro
By doing this we will have all the KeyframeEffect* related code in
KeyframeEffectReadOnly.{h,cpp} so we can rename them to KeyframeEffect.{h,cpp}
in the next patch and make it easier to examine the history for the bulk of this
code.

The added [HeaderFile] annotation will be removed in a subsequent patch in this
series.

MozReview-Commit-ID: Fxk6fPukgAS

--HG--
extra : rebase_source : 0bb0f846aba69e2b79724adb3148948317667eae
2018-05-07 11:07:01 +09:00
Brian Birtles
faad139012 Bug 1456394 - Moving timing updates to KeyframeEffectReadOnly; r=hiro
This might seem a bit odd but later in this patch series we will rename
KeyframeEffectReadOnly to KeyframeEffect.

MozReview-Commit-ID: H9b8brtA36W

--HG--
extra : rebase_source : 9e34d583c087733b3fa05d99a67def55653c4556
2018-05-07 11:02:12 +09:00
Brian Birtles
d6adea94b0 Bug 1456394 - Move KeyframeEffect attribute setters to KeyframeEffectReadOnly; r=bz,hiro
It might seem a bit odd to move the setters to the read-only class that we are
ultimately planning to drop but the reason for doing this is that
KeyframeEffectReadOnly.cpp has a *lot* more code than KeyframeEffect.cpp.

In order to simplify code archaeology we take the following approach:

  1. Move code from KeyframeEffect.{h,cpp} to KeyframeEffectReadOnly.{h,cpp}.
  2. Delete KeyframeEffect.{h,cpp}.
  3. Rename KeyframeEffectReadOnly.{h,cpp} to KeyframeEffect.{h,cpp}.

Note that at least steps 2 and 3 must be performed in separate patches as
mercurial does not successfully track renames when the target name already
exists.

MozReview-Commit-ID: LwJoxGJitKR

--HG--
extra : rebase_source : ae437c6e74435b983c7390df301055472fa3c4ff
2018-05-07 10:48:48 +09:00
Hiroyuki Ikezoe
481c14a322 Bug 1459533 - Use GetPrimaryFrame() to get correct nsIFrame for the animation on pseudo elements. r=mattwoodrow
In pseudo element cases mTarget->mElement is the parent element of the pseudo,
thus we inefficiently use the parent frame and walked through parent
continuations.

MozReview-Commit-ID: DsNRXaM346D

--HG--
extra : rebase_source : e62eeff02897ca08e800c1d807f81a0d4cf38dd1
2018-05-08 07:02:23 +09:00
Hiroyuki Ikezoe
8e0dec0d90 Bug 1320608 - Make sure we wait for the next frame in the case where the animation started at the current frame. r=birtles
MozReview-Commit-ID: 2j2yEzPHUJI

--HG--
extra : rebase_source : cd8e8aa1c7181f87cae0100c3a5ae5ce5e498878
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
0a785d3998 Bug 1320608 - Test case for transform animation on table element. r=birtles
MozReview-Commit-ID: v9aNWucikJ

--HG--
extra : rebase_source : 4d7aeeb5427abe0f063412b467ae0c74e14012ca
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
13307bd629 Bug 1320608 - Drop the check for return value of EffectCompositor::GetAnimationElementAndPseudoForFrame. r=birtles
In FindAnimationsForCompositor(), we can ensure
EffectCompositor::GetAnimationElementAndPseudoForFrame doesn't return nullptr
since EffectSet::GetEffectSet(const nsIFrame*) at the top of
FindAnimationsForCompositor() also uses GetAnimationElementAndPseudoForFrame.

MozReview-Commit-ID: CtWdUt40Zyx

--HG--
extra : rebase_source : 7ea1058f4fb740ca35c2ebdc8d2f69d7b634a257
2018-05-09 05:54:15 +09:00
Hiroyuki Ikezoe
3d8cc990a6 Bug 1320608 - Use the primary frame for AnimationInfo::GetGenerationFromFrame. r=birtles
For table element nsDisplayTransform's mFrame is the primary frame not style
frame.

MozReview-Commit-ID: 9BMSpuGE7lC

--HG--
extra : rebase_source : 19edd8978165cfa3904dcabea3e382e9b7c16ee3
2018-05-09 05:53:47 +09:00
Hiroyuki Ikezoe
715ced6dc3 Bug 1320608 - Rename GetAnimationFrame to GetStyleFrame. r=birtles
GetAnimationFrame is bit ambiguous, the name should match what we call it.

MozReview-Commit-ID: GuyhVrUFgiW

--HG--
extra : rebase_source : 1120e34aa3fdd20cf26552fda01d1a473e3ffff0
2018-05-09 05:53:46 +09:00
Olli Pettay
ed65a2bfc8 bug 1457867, store DOMEventTargetHelper objects in global object as a linked list, r=bkelly
--HG--
extra : rebase_source : 415c03249bae1edc4313bcf15f91716a748565f9
2018-05-04 19:25:05 +03:00
Emilio Cobos Álvarez
da45aa5fed Bug 1458927: Fix perspective squared distance computation. r=hiro
MozReview-Commit-ID: YwjTheRonB

--HG--
extra : rebase_source : d3734aad5d37dda1ccaf24f1f84e2f0972e45f5d
2018-05-03 17:43:30 +02:00
Hiroyuki Ikezoe
b9b117f2da Bug 1457107 - Don't throttle visibility change animations if the animation element isn't on out-of-view element. r=birtles
In bug 1237454, we introduced a new change hint that is produced when
visibility property is changed from 'visible' to 'hidden' or from 'hidden'
to 'visible'.  Animations producing this new change hint can be throttled
if the animation element is out-of-view, but can not be throttled in the case
where the element is in-view. In the bug, a test case for a visibility change
animation on out-of-view element was added, but no test for in-view case was
added.

MozReview-Commit-ID: BhiRm13rfRr

--HG--
extra : rebase_source : 264954ff349d5a9c5a00b940b2eaf2045f0952ae
2018-05-03 14:14:11 +09:00
Hiroyuki Ikezoe
b3cda193ed Bug 1450881 - Hold a reference of the target element when we get style for the element. r=birtles 2018-05-02 06:17:41 +09:00
Xidorn Quan
43eb5c8140 Bug 1456364 part 4 - Convert CSS_PROPERTY_* flags to a typed enum flags. r=emilio
MozReview-Commit-ID: 4mLPe5cH80N
2018-04-26 16:24:33 +02:00
Gurzau Raul
d4fd165bfc Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-04-25 12:38:44 +03:00
Emilio Cobos Álvarez
f8233b4454 Bug 1456471: Remove nsCSSParser.h. r=xidorn
MozReview-Commit-ID: 4qa7llzCXeR
2018-04-25 10:38:37 +02:00
Brian Birtles
e0ea50192f Bug 1456688 - Set easing member in result of getComputedTiming(); r=hiro
The test added in this patch fails without the corresponding code changes
(specifically the second gGetComputedTimingTests test fails the comparison of
the 'easing' member).

MozReview-Commit-ID: 9eyXruVrPuN

--HG--
extra : rebase_source : 927f55c0670bf770e03d38eb876202efbb700c1e
2018-04-25 12:25:26 +09:00
Hiroyuki Ikezoe
2cc7ec0f68 Bug 1455999 - Enable animation tests on WebRender. r=kats
MozReview-Commit-ID: xtQbHwAHXT

--HG--
extra : rebase_source : 435fc55c368e0a059175c927d192c768e863c745
2018-04-24 15:25:52 +09:00
Hiroyuki Ikezoe
dd8b403ed7 Bug 1455999 - Skip the visibility hidden test case on WebRender. r=birtles
On WebRender, the animation on the visibility hidden element runs on the
compositor somehow.

MozReview-Commit-ID: 77dVlIeFQ3u

--HG--
extra : rebase_source : 2b93833e9bf5ed17f3e4ee5306bdcfd57e3c87a4
2018-04-24 15:25:41 +09:00
Hiroyuki Ikezoe
374e5b3e07 Bug 1455999 - Drop isStyleByServo() in dom/animation/. r=birtles
We have already dropped the old style sytem.

MozReview-Commit-ID: I4RUlLHLAxr

--HG--
extra : rebase_source : d2f1bacd0c938da760ee37288c5df331de489f40
2018-04-24 08:50:12 +09:00
Hiroyuki Ikezoe
df02c10b40 Bug 1454324 - Skip calculating animation value if animation's progress value hasn't been changed since the last composition and if there are no other animations on the same element. r=birtles,kats
Note that we have to calculate animation values if there is another animation
since the other animation might be 'accumulate' or 'add', or might have a
missing keyframe (i.e. the calculated animation values will be used in the
missing keyframe).

MozReview-Commit-ID: rQyS9nuVJi

--HG--
extra : rebase_source : 6ddc70308e223a709eba9c4c2f05e42bbc0f3160
2018-04-24 09:27:54 +09:00
Kris Maglione
219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Xidorn Quan
8b8f269e56 Bug 1454524 - Remove some unused comparator code in KeyframeUtils. r=hiro
MozReview-Commit-ID: 6LZHGoEQcM5

--HG--
extra : rebase_source : 4ea22904c9dfe83f12f56d0de58e49cd8229124d
2018-04-17 10:28:33 +10:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Hiroyuki Ikezoe
1a43163be4 Bug 1443427 - Don't flush throttled animations in Animation::FlushStyle(). r=birtles
Animation::FlushStyle() gets called only for CSS animations/transitions'
playState changes in JS or ready Promise for CSS animations.  In either case
throttled animation state, which is, to be precise, transformed position or
opacity value on the compositor, doesn't affect those results.

The first test case for CSS animations and the first test case for CSS
transitions in this patch fail without this fix.

MozReview-Commit-ID: EVym4qputL4

--HG--
extra : rebase_source : 12524c7db1d59da69687bb123fc65ad4301f5527
2018-04-11 18:01:14 +09:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Emilio Cobos Álvarez
014cbed7df No bug: Update expectations for minor serialization changes. r=me
MozReview-Commit-ID: 3nq9Qbwy9td
2018-04-11 01:49:58 +02:00
Hiroyuki Ikezoe
e38ae704a5 Bug 1412716 - Drop forward declarations of GeckoComputedStyle. r=emilio
MozReview-Commit-ID: CeI958wmdPE

--HG--
extra : rebase_source : 36b7fcb8dbcaaef118dc07cd691da1fb1199115f
2018-04-10 07:03:05 +09:00
Hiroyuki Ikezoe
437d6b5387 Bug 1412716 - De-templatize EffectCompositor::UpdateEffectProperties and relevant stuff. r=emilio
MozReview-Commit-ID: K8yb8Kw16Mr

--HG--
extra : rebase_source : b5153f46ecd0352496b6222c847ef5663aff6ab7
2018-04-09 20:15:59 +09:00
Hiroyuki Ikezoe
4ac31f33e0 Bug 1412716 - Drop KeyframeEffectReadOnly::mIsComposingStyle. r=emilio
The flag was introduced in bug 1322291 to prevent recursive calls of
KeyframeEffectReadOnly::ComposeStyle() on the old style system.  On the
new style system we never call the function recursively.

MozReview-Commit-ID: L5gb8G3bl4M

--HG--
extra : rebase_source : 3b01c2c3ff97b8890bf13095dd32b834270d00df
2018-04-09 20:15:59 +09:00
Hiroyuki Ikezoe
71f08a9c46 Bug 1412716 - De-templatize Animation::ComposeStyle and relevant stuff. r=emilio
MozReview-Commit-ID: AoDRzqG8hET

--HG--
extra : rebase_source : 4de6b09e38373117a7268aaefd83acdb82a67741
2018-04-09 20:15:59 +09:00
Hiroyuki Ikezoe
a71696b6c8 Bug 1412716 - Rewrite a comment without using |aStyle|. r=emilio
MozReview-Commit-ID: 2OGLDBa31P

--HG--
extra : rebase_source : 8f49803dee5446cf0864f682dca5191794c82514
2018-04-09 20:15:59 +09:00
Emilio Cobos Álvarez
cfbc602521 Bug 1452080: Remove ComputedStyle::PresContext usage in animation code. r=hiro
MozReview-Commit-ID: HwooTF9PGnq
2018-04-09 11:19:49 +02:00
Noemi Erli
5d9588e156 Backed out 3 changesets (bug 1452080) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp on a CLOSED TREE
Backed out changeset 7f5104c7a242 (bug 1452080)
Backed out changeset 806a9c95a243 (bug 1452080)
Backed out changeset bffebe8aa254 (bug 1452080)
2018-04-09 11:18:12 +03:00
Emilio Cobos Álvarez
7e3aa4e075 Bug 1452080: Remove ComputedStyle::PresContext usage in animation code. r=hiro
MozReview-Commit-ID: HwooTF9PGnq
2018-04-09 09:56:32 +02:00
Hiroyuki Ikezoe
1343e69351 Bug 1323119 - Add a test case that had caused an assertion on the old style system. r=daisuke
Note that on the new style system (a.k.a stylo) the test case hasn't caused
any assertions.

MozReview-Commit-ID: AALHnuW48Rb

--HG--
extra : rebase_source : 8253507eff2522bcc4ccc155aae5c1307a81421d
2018-04-09 09:56:04 +09:00
Emilio Cobos Álvarez
e128bf7b1a Bug 1447827: Remove ServoRestyleManager. r=xidorn
MozReview-Commit-ID: CFafQsb4rQn
2018-04-07 15:50:06 +02:00
Emilio Cobos Álvarez
b508e66696 Bug 1447827: Move members from ServoRestyleManager to RestyleManager. r=xidorn
This leaves ServoRestyleManager as just a typedef.

MozReview-Commit-ID: 5wfTkiDc2Nr
2018-04-07 15:40:00 +02:00
Andreea Pavel
eed7d2803f Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-04-06 17:54:45 +03:00
Kartikaya Gupta
fce60f9567 Bug 1419851 - Handle OMTA throttling for webrender. r=jrmuizel
Original patch by Ethan Lin <ethlin@mozilla.com>.

MozReview-Commit-ID: AAIaskIsz9x

--HG--
extra : rebase_source : 879144b98467f47867d66f2806d7d31dbcf2bc7b
2018-04-06 10:06:54 -04: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
Ben Kelly
79bfa1d9c8 Bug 1450358 P3 Verify that Animation does not leak via event listeners. r=baku 2018-04-04 11:25:43 -07:00
Hiroyuki Ikezoe
2b9a5049f3 Bug 1443358 - Consider that the target frame is scrolled out if scrollable parent frame size is empty. r=birtles
This patch adds three test cases;

1) Animation on position:absolute element in a zero-height iframe
  This animation should be throttled.
2) Animation on a non-zero width and hight position:absolute element but whose
   parent has a zero height
  This animation should NOT be throttled since the animation is visible
3) Animation on a zero-height position:absolute element whose parent also has
   zero height.
  This animation should be throttled since the animation is invisible

The first test fails without this fix and passes with the fix.
The second one passes regardless of the fix
The third one is marked as 'todo' since it doesn't pass with this fix.

MozReview-Commit-ID: 8pNUFQ71ivj

--HG--
extra : rebase_source : d1d37e5324247efc20a39d86a0f8849450cc7533
2018-04-02 13:34:14 +09:00
Hiroyuki Ikezoe
4de76df942 Bug 1443358 - Introduce a new function that is able to count restyle in a given window. r=birtles
This function will be used for checking restyle counts in an iframe
in the next patch.

MozReview-Commit-ID: 2PPjJTzXMXH

--HG--
extra : rebase_source : 4f3b1c37580b0d382ff9c07d81950542d8515bb1
2018-04-02 13:27:59 +09:00
Xidorn Quan
4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Xidorn Quan
0401ef821e Bug 1447828 part 1 - Remove StyleBackendType uses from dom/animation. r=emilio
MozReview-Commit-ID: 3INWUuocNPm

--HG--
extra : rebase_source : 1e024084e325b075b3c1b534b544092d7f792e2e
extra : source : 1bcf22436ced3f5b2afd6a7db4250ff5b79f71c0
2018-03-29 02:29:42 +11:00
Jonathan Watt
68e78b291f Bug 1449321 - Remove the IsServo and IsGecko methods from the style system code. r=emilio
--HG--
extra : source : 763277b299e42d8ee7eafede027ee690b66a7a2a
2018-03-23 16:01:34 +00:00
Hiroyuki Ikezoe
add6bfc043 Bug 1446993 - Observe restyling count in fixed 20 frames instead of tweaked count. r=birtles
In bug 1444177, I did accidentally replace the frame count with the tweaked
count.  The tweaked count represents that animation restyling should happen
the tweaked count times during *not-yet-tweaked* frame count.

MozReview-Commit-ID: 1QmH5xaYexL

--HG--
extra : rebase_source : fc32bdccf6cdeafcb178b7f675e88038217f658c
2018-03-28 08:24:38 +09:00
Jonathan Watt
82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Emilio Cobos Álvarez
a4d01fa250 Bug 1448559: Cleanup CalcStyleDifference. r=xidorn
The aSamePointerStructs argument is unused now.

Also, aIgnoreVariables can be true everywhere now, since variable changes can't
generate change hints, and anonymous boxes and such don't care about whether
they really changed or not.

Only one caller cares about struct equality, and that already compares variables
manually as an optimization on the rust side.

We had this optimization inconsistently in some cases but not others.

MozReview-Commit-ID: F2EISKlxR3K
2018-03-26 09:47:33 +02:00
Emilio Cobos Álvarez
87edb889e1 Bug 1448665: Simplify the unanimated style setup in nsComputedDOMStyle. r=xidorn
We never create nsComputedDOMStyle objects with an unanimated computed style, so
this can be much simpler.

MozReview-Commit-ID: 2NyBoErxRtV
2018-03-26 09:43:58 +02:00
Emilio Cobos Álvarez
8fcda0e92d Bug 1448690: Remove IsStyledByServo. r=xidorn
MozReview-Commit-ID: I3MDbo2Yu7d
2018-03-26 09:39:26 +02:00
Emilio Cobos Álvarez
2265ef0801 Bug 1448688: Remove RestyleTracker, ComputedStyle::AsServo, old style system element bits. r=xidorn
MozReview-Commit-ID: ALiOngGqozN
2018-03-26 09:38:07 +02:00
Xidorn Quan
30292048c2 Bug 1448716 - Remove PropertyValuePair::mValue. r=hiro
MozReview-Commit-ID: GLGJuXgontY

--HG--
extra : rebase_source : c4f5ddd641a275a4fbef87cabb8b4d50ac385860
2018-03-26 16:15:56 +11:00
Jonathan Watt
384c345f21 Bug 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio
Reviewers: emilio

Bug #: 1448294

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

MozReview-Commit-ID: KJq2i9nrg7y
2018-03-25 20:49:58 +02:00
Narcis Beleuzu
47581f78e2 Backed out 2 changesets (bug 1448294, bug 1448337) for wpt and reftest failures on /mathml
Backed out changeset 180051cfe357 (bug 1448294)
Backed out changeset c188176f3289 (bug 1448337)
2018-03-25 21:31:08 +03:00
Jonathan Watt
21bff4e120 Summary: Bug 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio
Reviewers: emilio

Bug #: 1448294

Differential Revision: https://phabricator.services.mozilla.com/D796
2018-03-22 13:49:21 +00:00
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
arthur.iakab
abcb47d8cc Merge inbound to mozilla-central. a=merge 2018-03-21 21:13:11 +02:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00