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

1774 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter ba2d560b34 Bug 1430841 Re-enable the Reduce Timer Precision pref for CSS Animations tests r=birtles
Currently CSS Animations are exempted from Reduce Timer Precision, so this isn't needed.
Additionally, when we test by overriding that restriction, these tests aren't run, which
leads to confusion.

MozReview-Commit-ID: Gv6T3oGO475

--HG--
extra : rebase_source : 6bd70341fe5d047b685cae0db2965bf86116b4a0
2018-02-16 15:45:33 -06:00
Hiroyuki Ikezoe ad663efa0b Bug 1439428 - Call UpdateCascadeResults() directly instead of RestyleRestyle() at the end of Gecko_UpdateAnimations(). r=birtles
Calling RequestRestyle() for update cascade results is weird since in general
RequestRestyle() is a result of updating cascade results (e.g. when an
!important style is changed).  In the case where we already know that we need
to update cascade results we can do it right after all the other processes that
may need to update cascade results has done so that we don't need to worry about
the cases additional cascade results update happens.

MozReview-Commit-ID: 6lh0NgTPF9j

--HG--
extra : rebase_source : 4dbec85f55a14776907b677f2876421abc141384
2018-02-23 09:05:26 +09:00
Hiroyuki Ikezoe 77efac4019 Bug 1439428 - Make EffectCompositor::UpdateCascadeResults public. r=birtles
We will call the function directly in a sequential task in the case where we
already detected that !important styles for animations has been changed in
parallel traversal.

MozReview-Commit-ID: 7j6CfONYD08

--HG--
extra : rebase_source : 5ac29124cefbc8e57231d0acb9b1749b2c9587c0
2018-02-23 09:05:26 +09:00
Hiroyuki Ikezoe 8f3060510e Bug 1439269 - Call RequestRestyle() if the display property is changed from 'none' in the case the element has script animations. r=birtles
MozReview-Commit-ID: 1anUTbvw3k4

--HG--
extra : rebase_source : 68ca22f8db7112ac3d73c5331ff39b0780cece6e
2018-02-22 09:10:00 +09:00
Hiroyuki Ikezoe 467ed67c74 Bug 1388557 - Call RequestRestyle(Layer) in the case where we attach orphaned animating element to the document. r=birtles
MozReview-Commit-ID: IIcyYFROqDx

--HG--
extra : rebase_source : f096635d400528660d5243d2884d125e7b623db2
2018-02-21 10:13:13 +09:00
Hiroyuki Ikezoe 4606fafb88 Bug 1417354 - Clear pending restyle requests for the element and its pseudos where the element is detached from the document. r=hiro
MozReview-Commit-ID: GLHjtHNusuB

--HG--
extra : rebase_source : aaf05c7773d11cf61a28803d4ba70546c2b98e27
2018-02-21 07:00:20 +09:00
Hiroyuki Ikezoe 0ca9f2c309 Bug 1417354 - Add a method to clear all pending restyle requests for a given element and its pseudos. r=birtles
MozReview-Commit-ID: DZkbwUPiPTd

--HG--
extra : rebase_source : b1993ea863a261841be1edfc3b2dee7655123fe8
2018-02-21 07:00:20 +09:00
Hiroyuki Ikezoe 1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Tooru Fujisawa 9a81f2437f Bug 1414674 - Do not enter the compartment of the target window when calling KeyframeEffect and KeyframeEffectReadOnly constructor via Xray. r=bz,birtles
KeyframeEffect and KeyframeEffectReadOnly constructors can run in the caller
compartment, which is okay because the current compartment is used in the
following places and all of them are safe:

1. GlobalObject::CallerType(), that is ultimately passed to
   nsDocument::IsWebAnimationsEnabled in KeyframeEffectParamsFromUnion,
   to decide whether to copy mIterationComposite/mComposite to
   KeyframeEffectParams.

   GlobalObject::CallerType() can now be different than the target window's one,
   if the caller has the system principal and the target is web content, and
   in that case nsDocument::IsWebAnimationsEnabled there always returns true
   while Web Animations can be disabled on web content.

   honoring the mIterationComposite/mComposite properties is OK, since it just
   changes the animation behavior, and this is disabled by default until
   remaining spec issues are resolved.

2. GlobalObject::Context(), that is ultimately passed to
   KeyframeUtils::GetKeyframesFromObject and used while extracting information
   from passed-in keyframe object, with iterable/iterator protocols.

   Performing that operation in the caller side is okay, since the same thing
   can be done on caller, and the operation doesn't perform any GCThing
   allocation on the target window global.
2018-02-17 17:21:13 +09:00
Tooru Fujisawa d70a10cbd8 Backed out changeset c3f16a179c93 (bug 1414674) 2018-02-18 01:24:08 +09:00
Tooru Fujisawa d58a217b1c Bug 1414674 - Do not enter the compartment of the target window when calling KeyframeEffect and KeyframeEffectReadOnly constructor via Xray. r=bz,birtles
KeyframeEffect and KeyframeEffectReadOnly constructors can run in the caller
compartment, which is okay because of the following reasons:

1. The target window global is used for most operation:
     * KeyframeEffectReadOnly::ConstructKeyframeEffect uses the target window
       global instead of current global.
     * KeyframeEffectParamsFromUnion which receives `aGlobal.CallerType()`

   In Xray case, Web Animations API can be disabled on web content
   (currently disabled on beta/release by default), and in that case some API
   won't work even it's triggered from WebExtensions, but it should be fine.

2. GetKeyframesFromObject is executed in the caller's compartment to access
   the passed-in JSObject that is keyframe, with iterable/iterator protocols.
   This operation doesn't perform any GCThing allocation on the target window
   global.
2018-02-17 17:21:13 +09:00
Brian Birtles 691e8bbafc Bug 1436659 - Implement pending playback rate mechanism; r=hiro
This reflects the following changes to the Web Animations specification:

  1. 5af5e276ba
  2. 673f6fc126

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

MozReview-Commit-ID: 3DoaWUkxBTo

--HG--
extra : rebase_source : 032d768b35e3189cd41c38fb4d85a644781a6e33
2018-02-13 15:04:18 +09:00
Brian Birtles 2d967bae1b Bug 1436659 - Add Animation::GetCurrentTimeForHoldTime helper; r=hiro
We will use this to calculate the unconstrained current time when we implement
pending playback rate changes.

MozReview-Commit-ID: 7GlmHiGeXF6

--HG--
extra : rebase_source : 32c0c4d86293bf11220017fa1b126ae239b0301d
2018-02-13 15:04:18 +09:00
Brian Birtles bb7f299f94 Bug 1436659 - Factor out static time calculation methods on Animation; r=hiro
We will re-use these methods to perform various calculations once we introduce
the pending playback rate.

MozReview-Commit-ID: 2HV44TTNxHg

--HG--
extra : rebase_source : 19e32b13c6fee9cfe9993918557f2433aa687e11
2018-02-13 15:04:18 +09:00
Brian Birtles 6255f94834 Bug 1436659 - Add Animation.updatePlaybackRate WebIDL definition; r=bz
This is the IDL added to the Web Animations specification:

  5af5e276ba

Note that some of the changes in the above commit were reverted in the following
commit:

  673f6fc126

A folded version of the changes:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

MozReview-Commit-ID: CJV7bzizXg4

--HG--
extra : rebase_source : 3b168e779883ba91c8f572478185b55013952d1a
2018-02-13 15:04:18 +09:00
arthur.iakab 4139c1f914 Backed out 14 changesets (bug 1436659) for Eslint failures on devtools/server/actors/animation.js:876:12 on a CLOSED TREE
Backed out changeset a2890507d13a (bug 1436659)
Backed out changeset c653d7a1b3ef (bug 1436659)
Backed out changeset 4ae911f19aee (bug 1436659)
Backed out changeset e9381081ab6a (bug 1436659)
Backed out changeset 7301bfeeb65c (bug 1436659)
Backed out changeset 607dccfa8387 (bug 1436659)
Backed out changeset 8f61bf3de90a (bug 1436659)
Backed out changeset 920aa51ae3a2 (bug 1436659)
Backed out changeset bfa0d1a4bf1c (bug 1436659)
Backed out changeset 467dd218d3d3 (bug 1436659)
Backed out changeset 737ff1676ff0 (bug 1436659)
Backed out changeset 071666b6c7e9 (bug 1436659)
Backed out changeset c2932cd4839f (bug 1436659)
Backed out changeset a9777027b7ad (bug 1436659)

--HG--
rename : testing/web-platform/tests/web-animations/timing-model/animations/setting-the-playback-rate-of-an-animation.html => testing/web-platform/tests/web-animations/interfaces/Animation/playbackRate.html
rename : testing/web-platform/tests/web-animations/timing-model/animations/the-current-time-of-an-animation.html => testing/web-platform/tests/web-animations/timing-model/animations/current-time.html
rename : testing/web-platform/tests/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html => testing/web-platform/tests/web-animations/timing-model/animations/set-the-animation-start-time.html
rename : testing/web-platform/tests/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html => testing/web-platform/tests/web-animations/timing-model/animations/set-the-target-effect-of-an-animation.html
rename : testing/web-platform/tests/web-animations/timing-model/animations/setting-the-timeline-of-an-animation.html => testing/web-platform/tests/web-animations/timing-model/animations/set-the-timeline-of-an-animation.html
2018-02-14 22:40:07 +02:00
Brian Birtles c8299638c0 Bug 1436659 - Implement pending playback rate mechanism; r=hiro
This reflects the following changes to the Web Animations specification:

  1. 5af5e276ba
  2. 673f6fc126

which can be viewed as a merged diff at:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

MozReview-Commit-ID: 3DoaWUkxBTo

--HG--
extra : rebase_source : a131054cc0d31a5db6b01ad288cf3b2cb0cc7016
2018-02-13 15:04:18 +09:00
Brian Birtles 70013cea9d Bug 1436659 - Add Animation::GetCurrentTimeForHoldTime helper; r=hiro
We will use this to calculate the unconstrained current time when we implement
pending playback rate changes.

MozReview-Commit-ID: 7GlmHiGeXF6

--HG--
extra : rebase_source : 82280cdd62c0426c114ce54bb92fcd7ed766d85a
2018-02-13 15:04:18 +09:00
Brian Birtles 37e9e76ea5 Bug 1436659 - Factor out static time calculation methods on Animation; r=hiro
We will re-use these methods to perform various calculations once we introduce
the pending playback rate.

MozReview-Commit-ID: 2HV44TTNxHg

--HG--
extra : rebase_source : dcc883fb6db897a799900d709ca9c182dc149764
2018-02-13 15:04:18 +09:00
Brian Birtles 31272ef315 Bug 1436659 - Add Animation.updatePlaybackRate WebIDL definition; r=bz
This is the IDL added to the Web Animations specification:

  5af5e276ba

Note that some of the changes in the above commit were reverted in the following
commit:

  673f6fc126

A folded version of the changes:

  https://gist.github.com/birtles/d147eb2e0e2d4d37fadf217abd709411

MozReview-Commit-ID: CJV7bzizXg4

--HG--
extra : rebase_source : 6dc6819e158bcdd094962769096a17da6cd2026a
2018-02-13 15:04:18 +09:00
Hiroyuki Ikezoe 665b294c28 Bug 1237454 - Unthrottle transform animations in visibility:hidden element periodically only if the element is scrolled out. r=birtles
In the case where we throttle transform animations in visibility:hidden
element, we just need to unthrottle only if the element is scrolled out since
unlike the scrolled out element, visibility:hidden element keeps invisible
even after the element moved into view.

MozReview-Commit-ID: 7X2SsOLz4Y5

--HG--
extra : rebase_source : ca7210f7ed637f858127c4008fe98fbeec874a10
2018-02-09 19:00:19 +09:00
Hiroyuki Ikezoe 54a0194045 Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio
This patch does basically throttle animations on visibility:hidden element
and unthrottle it once the animating element became visible or a child of the
animating element became visible.  But still there are some cases that we don't
throttle such animations perfectly.  For example;

  div.style.visibility = 'hidden'; // the 'div' has no children at this moment
  div.animate(..);
  // The animation is throttled

  div.appendChild(visibleChild);
  // The animation isn't throttled

  visibleChild.style.visibility = 'hidden';
  // Now the animation should be throttled again, but actually it's not.

To throttle this case properly, when the |visibleChild|'s visibility changed
to hidden, we would need to do either

 1) Check all siblings of the |visibleChild| have no visible children

or

 2) The parent element stores visible children count somewhere and decrease it
    and check whether the count is zero

To achieve 1) we need to walk up ancestors and their siblings, actually it's
inefficient.

2) is somewhat similar to what we already do for animating images but it's hard
to reuse it for CSS animations since it does not take into account that
descendants' visibilities.

Another example that this patch does not optimize is the the case where
animating element has children whose visibility is inherited and the element
itself initially visible something like this;

  let child = document.createElement('div'); // child visibility is 'inherit'
  div.appendChild(child);

  div.animate(..); // the 'div' is visible
  // The animation isn't throttled since the animating element is visible

  div.style.visiblily = 'hidden';
  // Now the animation should be throttled, but it's not since this patch does
  // not descend down all descendants to check they are invisible or not when the
  // animating element visibility changed to hidden.

This patch adds a test case for this case introduced with todo_is().

Another test case added in this patch fails if we don't use
nsPlaceholderFrame::GetRealFrameFor() in HasNoVisibleDescendants().

MozReview-Commit-ID: BJwzQvP9Yc4

--HG--
extra : rebase_source : e56505706bb2799b59bbfb3bbcce4a9ce86892f4
2018-02-09 10:43:10 +09:00
Hiroyuki Ikezoe 024e9bf76c Bug 1237454 - Test for an animation on visibility: hidden element which has grandchild. r=boris
MozReview-Commit-ID: C0yLy4clwbY

--HG--
extra : rebase_source : f535ab7c981ae4574cbd4ae5e4cf92f08f43679a
2018-02-09 10:43:10 +09:00
Hiroyuki Ikezoe 2b3923c536 Bug 1237454 - Test for an animation on a visibility:hidden element which has a child. r=boris
MozReview-Commit-ID: AfmQJThhp8d

--HG--
extra : rebase_source : b693600cee1ed166b8a4104bd0566c425abbc2ab
2018-02-09 10:43:10 +09:00
Hiroyuki Ikezoe b9fbc876db Bug 1237454 - Test for an animation in the parent element whose visibility is changed. r=boris
MozReview-Commit-ID: BBMOuPimlPH

--HG--
extra : rebase_source : 68f045fbe4e72b3ce8cc344058f3ae561637468d
2018-02-09 10:43:10 +09:00
Hiroyuki Ikezoe ed45df9024 Bug 1237454 - An additional check that an animation on visibility: hidden element starts restyling when the element gets visible. r=boris
MozReview-Commit-ID: 2Lvk2IqEaXY

--HG--
extra : rebase_source : 710553c6e404afe8a948171d1263c03b9d79e21e
2018-02-09 10:43:10 +09:00
Hiroyuki Ikezoe 40907715ce Bug 1237454 - Add VisibilityChange change hint. r=emilio
This new change hint doesn't influence layout so that it can be regarded
as nsChangeHint_Hints_CanIgnoreIfNotVisible.  Note that if visibility changed
from collapse or to collapse, we set NS_STYLE_HINT_REFLOW separetely.

MozReview-Commit-ID: AirDWeBYVKG

--HG--
extra : rebase_source : a462845ac2d8280986bb8db5e6482bf401f65322
2018-02-09 10:43:10 +09:00
Tom Ritter aa82f54ab6 Bug 1435296 Address test failures caused by bumping timer precision to 2 ms r=baku
There are a few different reasons why tests needed updating (not an exhaustive list):

- Tests assume that successive operations take place at different times.
- Tests assume that an operation took a minimum amount of time.
- Tests hardcodes a specific delay.

In most cases we hardcode the preference off. In some cases this is the best approach,
in others, we would like to improve. The bug for tracking those improvements is Bug 1429648

An improvement that is present in some tests is to hardcode a specific precision reduction
that is acceptable based on the confides of the test. (Obviously this needs to be a fix for
the test framework and not a requirement on the feature being tested.)

In a few places, the test itself can be fixed, for example to no longer require the end
time of an operation to be strictly greater than the start time, and allows it to be equal
to it.

MozReview-Commit-ID: J59c7xQtZZJ

--HG--
extra : rebase_source : df8a03e76eaf9cdc9524dbb3eb9035af237e534b
2018-02-12 11:39:41 -06:00
Tom Ritter 8184fa2b43 Bug 1435296 Do not apply timer clamping to CSS animations. r=birtles
This patch creates the capability to have callsites specify if timestamps
should be clamped only in Resist Fingerprinting Mode, or in the more expansive
Timer PRecision Reduction Mode.

Then it changes the CSS Animation callsite to only apply in RFP Mode.

This avoids regressing RFP.

MozReview-Commit-ID: B1pSri0kRk6

--HG--
extra : rebase_source : f3d8c1f9561fbb19d1ca8594ba2b69cffd25445b
2018-02-07 16:50:57 -06:00
Hiroyuki Ikezoe d72d0dee6b Bug 1436642 - Make target element size larger to be unable to send transform animations to the compositor. r=jaws
The original value were too small for Android.

MozReview-Commit-ID: 4V6qC8orYNJ

--HG--
extra : rebase_source : 55ea0525bfaafa60d8e5d711cc70dd29d21acc78
2018-02-10 06:52:23 +09:00
Hiroyuki Ikezoe f22da31267 Bug 1437248 - Disable privacy.reduceTimerPrecision on test_restyles.html. r=arai
In this test we need to know precise time for checking that we unthrottle
throttled transform animations periodically.

MozReview-Commit-ID: ICLf448KFLr

--HG--
extra : rebase_source : 26128735231679031bd1e727cf9d9016054e7664
2018-02-10 15:31:05 +09:00
Csoregi Natalia 7f21ecd2bf Backed out 4 changesets (bug 1435296) for for failing devtools' browser_webconsole_check_stubs_console_api.js and mochitest's dom/smil/test/test_smilTimeEvents.xhtml. CLOSED TREE
Backed out changeset 1f07c08daa41 (bug 1435296)
Backed out changeset 89c121b45b30 (bug 1435296)
Backed out changeset be9496eff7b8 (bug 1435296)
Backed out changeset 2f94f155318e (bug 1435296)
2018-02-09 17:20:53 +02:00
Tom Ritter b5eec93654 Bug 1435296 Do not apply timer clamping to CSS animations. r=birtles
This patch creates the capability to have callsites specify if timestamps
should be clamped only in Resist Fingerprinting Mode, or in the more expansive
Timer PRecision Reduction Mode.

Then it changes the CSS Animation callsite to only apply in RFP Mode.

This avoids regressing RFP.

MozReview-Commit-ID: B1pSri0kRk6

--HG--
extra : rebase_source : 5c1a3a1bb7cb10cd5c4a608f30bf097bd7e119b9
2018-02-07 16:50:57 -06:00
Hiroyuki Ikezoe fff9e9f366 Bug 1419339 - Unthrottle transform animations periodically if there is any IntersectionObservers. r=birtles
MozReview-Commit-ID: CBFQva02HUc

--HG--
extra : rebase_source : 123a26e7ab77ba40abd918e91e7f323300b2aae7
2018-02-07 10:46:15 +09:00
Narcis Beleuzu b0e8772dcd Backed out 6 changesets (bug 1237454) for bc failures on /browser_toolbariconcolor_restyles.js. CLOSED TREE
Backed out changeset f8d771835fd2 (bug 1237454)
Backed out changeset 2dbbfc331bdf (bug 1237454)
Backed out changeset c481f409feaa (bug 1237454)
Backed out changeset 0b9872865f0e (bug 1237454)
Backed out changeset 43ca55e7c93b (bug 1237454)
Backed out changeset 027b0c65d944 (bug 1237454)
2018-02-06 11:19:56 +02:00
Hiroyuki Ikezoe 835e2883de Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio
This patch does basically throttle animations on visibility:hidden element
and unthrottle it once the animating element became visible or a child of the
animating element became visible.  But still there are some cases that we don't
throttle such animations perfectly.  For example;

  div.style.visibility = 'hidden'; // the 'div' has no children at this moment
  div.animate(..);
  // The animation is throttled

  div.appendChild(visibleChild);
  // The animation isn't throttled

  visibleChild.style.visibility = 'hidden';
  // Now the animation should be throttled again, but actually it's not.

To throttle this case properly, when the |visibleChild|'s visibility changed
to hidden, we would need to do either

 1) Check all siblings of the |visibleChild| have no visible children

or

 2) The parent element stores visible children count somewhere and decrease it
    and check whether the count is zero

To achieve 1) we need to walk up ancestors and their siblings, actually it's
inefficient.

2) is somewhat similar to what we already do for animating images but it's hard
to reuse it for CSS animations since it does not take into account that
descendants' visibilities.

Another example that this patch does not optimize is the the case where
animating element has children whose visibility is inherited and the element
itself initially visible something like this;

  let child = document.createElement('div'); // child visibility is 'inherit'
  div.appendChild(child);

  div.animate(..); // the 'div' is visible
  // The animation isn't throttled since the animating element is visible

  div.style.visiblily = 'hidden';
  // Now the animation should be throttled, but it's not since this patch does
  // not descend down all descendants to check they are invisible or not when the
  // animating element visibility changed to hidden.

This patch adds a test case for this case introduced with todo_is().

Another test case added in this patch fails if we don't use
nsPlaceholderFrame::GetRealFrameFor() in HasNoVisibleDescendants().

MozReview-Commit-ID: BJwzQvP9Yc4

--HG--
extra : rebase_source : ceb95bdce1042cbfc16751d6d023fc6feee5845e
2018-02-06 08:43:53 +09:00
Hiroyuki Ikezoe dd32a9658a Bug 1237454 - Test for an animation on visibility: hidden element which has grandchild. r=boris
MozReview-Commit-ID: C0yLy4clwbY

--HG--
extra : rebase_source : 0203237cf1bc45941188393e7d9ed7e96072ae91
2018-02-06 08:43:52 +09:00
Hiroyuki Ikezoe 6b8d6a0897 Bug 1237454 - Test for an animation on a visibility:hidden element which has a child. r=boris
MozReview-Commit-ID: AfmQJThhp8d

--HG--
extra : rebase_source : ed4abf7fb865cf8459294f086a63b13bf0d57373
2018-02-06 08:43:52 +09:00
Hiroyuki Ikezoe 3f041debf1 Bug 1237454 - Test for an animation in the parent element whose visibility is changed. r=boris
MozReview-Commit-ID: BBMOuPimlPH

--HG--
extra : rebase_source : b73d6890ddf11f58cd7b623f92a73d7e4bd26e08
2018-02-06 08:43:52 +09:00
Hiroyuki Ikezoe 862a7ba92f Bug 1237454 - An additional check that an animation on visibility: hidden element starts restyling when the element gets visible. r=boris
MozReview-Commit-ID: 2Lvk2IqEaXY

--HG--
extra : rebase_source : 39cea20c92996b6a785576ded71b5c17f61d3457
2018-02-06 08:43:52 +09:00
Hiroyuki Ikezoe 0de04971ef Bug 1237454 - Add VisibilityChange change hint. r=emilio
This new change hint doesn't influence layout so that it can be regarded
as nsChangeHint_Hints_CanIgnoreIfNotVisible.  Note that if visibility changed
from collapse or to collapse, we set NS_STYLE_HINT_REFLOW separetely.

MozReview-Commit-ID: AirDWeBYVKG

--HG--
extra : rebase_source : 1cd03a78a522b1a6965ba73ebf002ddacb0ab4f2
2018-02-06 08:43:52 +09:00
Boris Zbarsky 7a9f022f1a Bug 1434819 part 7. Remove the SHOW_* constants from nsIDOMNodeFilter. r=qdot
MozReview-Commit-ID: 7E2KZkLfbSI
2018-02-01 14:26:12 -05:00
Cameron McCormack 2cea1ba7c1 Bug 1430014 - Part 6: #ifdef out a bit more animation-related code. r=hiro
MozReview-Commit-ID: B9TaVJFak26

--HG--
extra : source : 820eed2682b6a6cda892d091ee037ff1eeacd69f
2018-02-01 15:04:04 +11:00
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
cku af86c724c9 Bug 1207734 - Part 4.c. Temporarily disable async-transform for individual-transform. r=birtles
Since we do not support async-transform for individual-transform yet.

MozReview-Commit-ID: gfOzHpjOnQ
(grafted from dd508458f70d5473256a4bfe5a2f6bc665bbac9d)

--HG--
extra : source : dd508458f70d5473256a4bfe5a2f6bc665bbac9d
2018-01-05 14:45:05 +08:00
Hiroyuki Ikezoe eeefe00d01 Bug 1433008 - Make AnimationEventInfo, InternalTransitionEvent and InternalAnimationEvent movable. r=masayuki
And disallow using copy constructor and copy assignment for the structs.

MozReview-Commit-ID: 7jSktlu1SqN

--HG--
extra : rebase_source : cc8bcb1f95843a2a46a044e226c299a6196ef2a2
2018-01-30 09:26:48 +09:00
Hiroyuki Ikezoe 4d9188d86d Bug 1433846 - Drop nsComputedDOMStyle::GetPresShellForContent(), use nsContentUtils::GetPresShellForContent(). r=xidorn
MozReview-Commit-ID: JcpEpqP32Yi

--HG--
extra : rebase_source : dc3649c882f7edd36f9dbc3463d186517b18bdc1
2018-01-29 14:19:25 +09:00
Hiroyuki Ikezoe 0bb119e341 Bug 1428692 - Don't use tweakExpectedRestyleCount in the case where we don't use the returned count for observeStyling called right after. r=birtles
tweakExpectedRestyleCount() is supposed to work with observeStyle() which is
called right after tweakExpectedRestyleCount().  That's because
tweakExpectedRestyleCount() adjusts the expected restyle count which will
happen in continuous frames that begins from the startsRightNow() call,
especially a redundant restyle might be observed in the last frame if the
animation did not begin at the current timeline time and if the Promise inside
the last requestAnimationFrame is fulfilled after restyling happened.

Instead of using tweakExpectedRestyleCount(), we need to check whether the
animation begun at the current timeline time when the animation started, and if
the animation begun at the current timeline time, we don't observe the
superfluous restyle in a frame after the animation element was re-attached.

MozReview-Commit-ID: 6TLQERSSbjU

--HG--
extra : rebase_source : 1a1dcb56b889bebedb44346bbc315ec01870cf79
2018-01-30 06:41:31 +09:00
Hiroyuki Ikezoe fedb7434fb Bug 1415780 - Call UpdateTiming() prior to remove the animtion from the timeline in Animation::CancelNoUpdate. r=birtles
Now AnimationEventDispatcher ensures that the refresh driver's next tick
happens for cancel event, so we don't need to re-observe the timeline
(it happens in UpdateTiming) once after removing the animation from the
timeline.

MozReview-Commit-ID: 7ivclmYIkPa

--HG--
extra : rebase_source : 286b3d5d29208496bfe8405819b44b5f52f6671c
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe 175bc2d176 Bug 1415780 - Let AnimationEventDispatcher observe nsRefreshDriver. r=birtles
So that we can now ensure nsRefreshDriver ticks (i.e. nsRefreshDriver doesn't
stop its timer) for all queued events.
Before this patch, dispatching CSS animation/transition events relied on the
fact that DocumentTimeline observes nsRefreshDriver.  For this fact,
animationcancel or transitioncancel event did not dispatch properly in some
cases, i.e. the case where the animation was dropped from the DocumentTimeline.

MozReview-Commit-ID: 7JYro0MY2U2

--HG--
extra : rebase_source : 28c8e2a50d29c5344e2c5ca3c43af41f4692fa0f
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe 7061542dd0 Bug 1415780 - Make AnimationEventDispatcher::SortEvents() private. r=birtles
Now we sort pending events only when dispatching the events, i.e.
only inside DispatchEvent().

MozReview-Commit-ID: BZbuF8gD39b

--HG--
extra : rebase_source : 2a90697356d980b1fd1329d34936eaef1179d12f
2018-01-27 21:17:27 +09: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
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 2046465f79 Bug 1415780 - Call UpdateTiming() prior to remove the animtion from the timeline in Animation::CancelNoUpdate. r=birtles
Now AnimationEventDispatcher ensures that the refresh driver's next tick
happens for cancel event, so we don't need to re-observe the timeline
(it happens in UpdateTiming) once after removing the animation from the
timeline.

MozReview-Commit-ID: 7ivclmYIkPa

--HG--
extra : rebase_source : d111c63baac0ad3005723c1c76bad08e975555ec
2018-01-27 16:55:46 +09:00
Hiroyuki Ikezoe 51d411f1b6 Bug 1415780 - Let AnimationEventDispatcher observe nsRefreshDriver. r=birtles
So that we can now ensure nsRefreshDriver ticks (i.e. nsRefreshDriver doesn't
stop its timer) for all queued events.
Before this patch, dispatching CSS animation/transition events relied on the
fact that DocumentTimeline observes nsRefreshDriver.  For this fact,
animationcancel or transitioncancel event did not dispatch properly in some
cases, i.e. the case where the animation was dropped from the DocumentTimeline.

MozReview-Commit-ID: 7JYro0MY2U2

--HG--
extra : rebase_source : e1963d9eef996cdf5d64c64f80eb1b93ac6fd18a
2018-01-27 16:55:45 +09:00
Hiroyuki Ikezoe 9e4cc95a63 Bug 1415780 - Make AnimationEventDispatcher::SortEvents() private. r=birtles
Now we sort pending events only when dispatching the events, i.e.
only inside DispatchEvent().

MozReview-Commit-ID: IRqH56BEnKb

--HG--
extra : rebase_source : dd2b8528fdc36d1371815feaf07ead0b258fe453
2018-01-27 16:55:45 +09: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 3dc42221b8 Bug 1432104 - KeyframeUtils::GetAnimationPropertiesFromKeyframes needs specializations both for GeckoStyleContext* and const ServoStyleContext*. r=birtles
The implementation of the template function is defined in KeyframeUtils.cpp,
whereas the caller is inside KeyframeEffectReadOnly.cpp.  I guess it's been
compiled accidentally because of unified builds.

MozReview-Commit-ID: 9GeIT7nDpLG

--HG--
extra : rebase_source : ce58ac6a013ff45d402c51994eb4f0bc28a2c671
2018-01-22 19:19:41 +09:00
Hiroyuki Ikezoe 2529df076a Bug 1430654 - Use assert_times_equal for comparing timing values. r=birtles
MozReview-Commit-ID: CUn1f8M0jo5

--HG--
extra : rebase_source : 1ac203d28022707f1b34757a1613e6f201a1f706
2018-01-22 14:57:57 +09:00
Hiroyuki Ikezoe 0a91cefd01 Bug 1430654 - Double epsilon value for assert_times_equal. r=birtles
Since the function assumes that both of actual and expected values
have the same precision requirements.

MozReview-Commit-ID: 4C3TAH6mUVg

--HG--
extra : rebase_source : 1e40e489745b0d9047d34e851a5f043db616323e
2018-01-22 14:57:57 +09:00
Hiroyuki Ikezoe fae9243927 Bug 1430654 - Introduce assert_time_equals_literal and use it. r=birtles
This assertion is supposed to be used where the first argument has a tolerance
but the second argument doesn't have such tolerance.  Whereas
assert_times_equal() is supposed to be used for the case both arguments have
the same tolerance, actually it hasn't, it will be fixed in a subsequent patch
in this patch series.

MozReview-Commit-ID: FEDHilbX2rm

--HG--
extra : rebase_source : e773902b474bd9a411e7bb3f234702a93547ebba
2018-01-22 14:55:16 +09:00
Hiroyuki Ikezoe 5c74787c9b Bug 1431295 - Drop 'undef None' macro in dom/animation/. r=boris
MozReview-Commit-ID: BkV6vCc4rmt

--HG--
extra : rebase_source : 9a1ef446045adeb7bbab6814c147947e30626b29
2018-01-18 14:12:51 +09:00
Wei-Cheng Pan e8f46bbec4 Bug 1425213 - Unthrottle transform animations regardless in overflowable frames or not. r=hiro
Because we don't know whether the transformed position will be visible or not.
2018-01-17 22:44:00 +02:00
Hiroyuki Ikezoe fa8cb05830 Bug 1430975 - Don't pass a copy of StickyTimeDuration. r=boris
MozReview-Commit-ID: HlQlMB1FBRi

--HG--
extra : rebase_source : 19888f1aa8cb98ecb1ee0aeaa46c8e4015e12867
2018-01-17 18:05:03 +09:00
Hiroyuki Ikezoe ddaf0ef84e Bug 1419079 - Don't bail out from CalculateCumulativeChangeHint() in the case of opacity property even if there is a missing keyframe or composite operation is not 'replace'. r=birtles
For opacity property, we only generate nsChangeHint_UpdateUsesOpacity,
nsChangeHint_UpdateOpacityLayer and nsChangeHint_RepaintFrame.  All of them are
included in nsChangeHint_Hints_CanIgnoreIfNotVisible.  So we can throttle
opacity animations on out-of-view elements whatever underlying opacity value is.

MozReview-Commit-ID: FdQJbItAndG

--HG--
extra : rebase_source : d011270e4e3e1adc1782665a592fb3fac60f9174
2018-01-17 11:48:20 +09:00
Hiroyuki Ikezoe b72cfe5bff Bug 1419079 - Add a test case for additive animation with a missing keyframe. r=birtles
MozReview-Commit-ID: 5UWfDIx7RVi

--HG--
extra : rebase_source : 17c9e62f66c7fef101a6b2a4f93e4348e94721cf
2018-01-17 08:55:00 +09:00
Hiroyuki Ikezoe cb10669b24 Bug 1419079 - Revise a comment for a test case for missing keyframes. r=birtles
The animation in the test case is not actually additive animation, it's just a
missing keyframe animation and its composite operation is actually 'replace'.

MozReview-Commit-ID: 4A29V5Ke2hF

--HG--
extra : rebase_source : 63b6c7f52943786d06c52b9baa7e0f4f151781ac
2018-01-17 08:55:00 +09:00
Hiroyuki Ikezoe c5899c8bd2 Bug 1419079 - Drop checking the pref for offscreen throttling. r=birtles
The pref has been enabled by default since firefox 49, so it's not worth
checking the pref in test.

MozReview-Commit-ID: 5ADIFaV1ue

--HG--
extra : rebase_source : 8490cc7988cc1e7fe3a650c4f1334b4ed11c7105
2018-01-17 08:55:00 +09:00
Hiroyuki Ikezoe 65c0f821c8 Bug 1419079 - Drop checking the pref for animations-api core in file_restyles.html. r=birtles
It's already specified to true in test_restyles.html.

MozReview-Commit-ID: JMItunKYwIs

--HG--
extra : rebase_source : d54368a93857d8d2a86220be55091735caa074e9
2018-01-17 08:55:00 +09:00
Brian Birtles 5a753e5e80 Bug 1429671 - Make composite member of Keyframe dictionary objects accept null values; r=bz
This patch reflects the following change to the Web Animations spec:

  abf76745b5

MozReview-Commit-ID: A2GD1igUf5f

--HG--
extra : rebase_source : 8129f6386b144adebc3bf0320ca7d6bfbba7a2e9
2018-01-11 16:20:49 +09:00
Tom Ritter 3af00498bc Bug 1429668 Turn off the reduceTimerPrecision pref for one more test r=hiro
MozReview-Commit-ID: J7F502Oz3Uc

--HG--
extra : rebase_source : 6b9883e72fad25d985ba61a999a4bdd2468784b0
2018-01-10 23:06:04 -06:00
Tom Ritter 2eeb5f801e Bug 1424341 Turn the pref off for existing tests that perform fine-grained timing comparisons r=mrbkap
MozReview-Commit-ID: 4ZyE4ebaCaB

--HG--
extra : rebase_source : 80a138ba722c64885a5f6811d862bdc76389a000
2018-01-10 14:46:34 -06:00
Hiroyuki Ikezoe 606a9e9a90 Bug 1421507 - Throttle animations in position:fixed element that the element is out of view. r=boris,tnikkel
MozReview-Commit-ID: jLvrcVhTKW

--HG--
extra : rebase_source : e2ff1e0158aa5207f86c47088283c22febe84197
2018-01-05 10:30:46 +09:00
Hiroyuki Ikezoe 9b4b9f9e65 Bug 1421507 - Test cases for position:absolute element. r=boris
MozReview-Commit-ID: IRPsvJ5WAQF

--HG--
extra : rebase_source : 5c6988a9af8392cc5abf54e56060dcf9653edffb
2018-01-05 10:30:17 +09:00
Hiroyuki Ikezoe 68625f879b Bug 1427868 - Run skipped test cases for scrolled-out elements on Android. r=birtles
These tests can be passed now, I don't know what fixed them, presumably
bug 1421476 and bug 1379515 fixed it.

MozReview-Commit-ID: 2srFKTWWvK

--HG--
extra : rebase_source : 418d366ade78d5a9994cb9bbbab39c4c0b42a2a4
2018-01-04 15:22:34 +09:00
Hiroyuki Ikezoe b47d85dec0 Bug 1425009 - Take into account the possibility that the animation begins at the moment when the animation was detached from the document. r=birtles
MozReview-Commit-ID: wbM5JW7v76

--HG--
extra : rebase_source : c7ec443f86c6be573ac443f05fdf38a1ed97eefd
2018-01-04 10:19:08 +09:00
Csoregi Natalia 12c47a01be Merge inbound to mozilla-central r=merge a=merge 2017-12-21 12:01:59 +02:00
Brian Birtles 235c83fc0c Bug 1414000 - Assert that either the pres context is nullptr OR that there are no properties when filling in base styles; r=hiro
The call stack where this assertion would otherwise fail is as follows:

 KeyframeEffectReadOnly::UpdateProperties
   KeyframeEffectReadOnly::DoUpdateProperties
     KeyframeEffectReadOnly::BuildProperties
       KeyframeUtils::GetAnimationPropertiesFromKeyframes
         KeyframeUtils.cpp::GetComputedKeyframeValues
     KeyframeEffectReadOnly::EnsureBaseStyles

In bug 1407898 we made GetComputedKeyframes return an empty list when the pres
context is nullptr so if we get a null pres context in EnsureBaseStyles (which
uses the same method for getting the pres context:
nsContentUtils::GetContextForContent) we know that |aProperties| will be empty.
Also, if |aProperties| is empty we're not going to dereferences |presContext| so
we don't need to assert that it is non-null.

I have not included the crashtest in this patch for the same reason as described
in bug 1407898 comment 6.

MozReview-Commit-ID: 6OZ2yJfRLMV

--HG--
extra : rebase_source : b2a711a54623ea177560cf1b69b3c332654bc938
2017-12-20 17:34:57 +09:00
Hiroyuki Ikezoe faa768c4fa Bug 1309198 - Test case that document is discarded while Document.getAnimations(). r=smaug 2017-12-21 11:40:23 +09:00
Hiroyuki Ikezoe 76f404fa5c Bug 1425771 - Add a branch in only_one_restyling_after_finish_is_called for the conformant Promise handling. r=birtles
Animation.finish() in a micro task for Animation.ready leads to a restyle and
a redundant restyle due to bug 1415457.  The redundant restyle has been observed
in a single frame without the conformant Promise handling.  But once we have the
conformant Promise handling we can tell it in a later frame.
(see https://bugzilla.mozilla.org/show_bug.cgi?id=1415457#c1 to know what's
going on there)

MozReview-Commit-ID: FoojunfYZ6k

--HG--
extra : rebase_source : 2820dce4513329fb648ef387d58cac469f680a6d
2017-12-18 14:19:39 +09:00
Hiroyuki Ikezoe 263cb0e605 Bug 1425771 - Tweak expected restyle count for the case where the animation begins at the current time. r=birtles
The expected restyle count depends both on animation state and micro task
handling.

If we have the conformant Promise handling and if the animation begins at the
current time, we will observe 1 less restyles than observed frames since we
skip the first restyle in the initial frame.  This represents correctly what
we do and what we *should* do.

If we don't have the conformant Promise handling and if the animation doesn't
begin at the current time, we will observe 1 more restyles than obsered frames
since the Promise in observeStyling (precisely the Promise is inside the
callback for requestAnimationFrame) is fulfilled once after a restyling process
followed by the requestAnimationFrame.

MozReview-Commit-ID: FLhSRx4y1V7

--HG--
extra : rebase_source : 59e2bb2439f69bc1415a441c0b84a81463d8229f
2017-12-18 14:19:26 +09:00
Hiroyuki Ikezoe 605f3607fa Bug 1425771 - Add a another variant of restyling_transform_animations_in_scrolled_out_element for the conformant Promise handling. r=birtles
The test case checks document timeline's currentTime to make sure that we are
in the first frame which happened after 200ms since the animation started.  It
is unfortunate for us from the point of view of restyling that the first frame
includes the restyling process in the frame without the conformant Promise
handling, doesn't include the process with the Promise handling.  So we need
to tweak there depends on the Promise handling.

I did intentionally add the forked version of the function with the same name
since branching depending on the conformant flag inside the original function
will be hard to understand and also we can easily remove the original version
once we have the conformant Promise handling.

FWIW, here is the diff between them:

@@ -365,6 +365,9 @@ waitForAllPaints(() => {

       await SpecialPowers.pushPrefEnv({ set: [["ui.showHideScrollbars", 1]] });

+      // Make sure we start from the state right after requestAnimationFrame.
+      await waitForFrame();
+
       var parentElement = addDiv(null,
         { style: 'overflow-y: scroll; height: 20px;' });
       var div = addDiv(null,
@@ -379,13 +382,17 @@ waitForAllPaints(() => {
       var markers;
       var now;
       while (true) {
-        markers = await observeStyling(1);
-        // Check restyle markers until 200ms is elapsed.
         now = document.timeline.currentTime;
         if ((now - timeAtStart) >= 200) {
+          // If the current time has elapsed over 200ms since the animation was
+          // created, it means that the animation should have already
+          // unthrottled in this tick, let's see what observes in this tick's
+          // restyling process.
+          markers = await observeStyling(1);
           break;
         }

+        markers = await observeStyling(1);
         is(markers.length, 0,
            'Transform animation running on the element which is scrolled out ' +
            'should be throttled until 200ms is elapsed');

MozReview-Commit-ID: 3WfY6aVnsXk

--HG--
extra : rebase_source : ddf51217f03fc1bfe421c344a7a7811dc591a9af
2017-12-18 14:18:17 +09:00
Hiroyuki Ikezoe 90dcb12748 Bug 1425771 - Add a function to check detect whether have conformant Promise handling and set the flag to represent it. r=birtles
MozReview-Commit-ID: FbzaUBKQ47F

--HG--
extra : rebase_source : ae936432d4ccb3e069608703c586d7134d52d12e
2017-12-18 14:17:44 +09:00
Kartikaya Gupta 4f18e92ffb Bug 1334189 - Enable mochitest-plain for linux64-qr. r=jrmuizel
MozReview-Commit-ID: nbcWhDq5de

--HG--
extra : rebase_source : 25e2c2b8b996ae11cd25dee07d9092ba574a9e40
2017-12-13 18:38:39 -05:00
Cosmin Sabou 4d17a4cc2e Backed out 4 changesets (bug 1425771) for ESlint failure r=backout on a CLOSED TREE
Backed out changeset 984d714aa987 (bug 1425771)
Backed out changeset 848047469b27 (bug 1425771)
Backed out changeset a28293b06afe (bug 1425771)
Backed out changeset 14c5ca99af0c (bug 1425771)
2017-12-18 08:37:10 +02:00
Hiroyuki Ikezoe 83ec4ebbf0 Bug 1425771 - Add a branch in only_one_restyling_after_finish_is_called for the conformant Promise handling. r=birtles
Animation.finish() in a micro task for Animation.ready leads to a restyle and
a redundant restyle due to bug 1415457.  The redundant restyle has been observed
in a single frame without the conformant Promise handling.  But once we have the
conformant Promise handling we can tell it in a later frame.
(see https://bugzilla.mozilla.org/show_bug.cgi?id=1415457#c1 to know what's
going on there)

MozReview-Commit-ID: FoojunfYZ6k

--HG--
extra : rebase_source : 2820dce4513329fb648ef387d58cac469f680a6d
2017-12-18 14:19:39 +09:00
Hiroyuki Ikezoe 8d960ec192 Bug 1425771 - Tweak expected restyle count for the case where the animation begins at the current time. r=birtles
The expected restyle count depends both on animation state and micro task
handling.

If we have the conformant Promise handling and if the animation begins at the
current time, we will observe 1 less restyles than observed frames since we
skip the first restyle in the initial frame.  This represents correctly what
we do and what we *should* do.

If we don't have the conformant Promise handling and if the animation doesn't
begin at the current time, we will observe 1 more restyles than obsered frames
since the Promise in observeStyling (precisely the Promise is inside the
callback for requestAnimationFrame) is fulfilled once after a restyling process
followed by the requestAnimationFrame.

MozReview-Commit-ID: FLhSRx4y1V7

--HG--
extra : rebase_source : 59e2bb2439f69bc1415a441c0b84a81463d8229f
2017-12-18 14:19:26 +09:00
Hiroyuki Ikezoe 71ad758afd Bug 1425771 - Add a another variant of restyling_transform_animations_in_scrolled_out_element for the conformant Promise handling. r=birtles
The test case checks document timeline's currentTime to make sure that we are
in the first frame which happened after 200ms since the animation started.  It
is unfortunate for us from the point of view of restyling that the first frame
includes the restyling process in the frame without the conformant Promise
handling, doesn't include the process with the Promise handling.  So we need
to tweak there depends on the Promise handling.

I did intentionally add the forked version of the function with the same name
since branching depending on the conformant flag inside the original function
will be hard to understand and also we can easily remove the original version
once we have the conformant Promise handling.

FWIW, here is the diff between them:

@@ -365,6 +365,9 @@ waitForAllPaints(() => {

       await SpecialPowers.pushPrefEnv({ set: [["ui.showHideScrollbars", 1]] });

+      // Make sure we start from the state right after requestAnimationFrame.
+      await waitForFrame();
+
       var parentElement = addDiv(null,
         { style: 'overflow-y: scroll; height: 20px;' });
       var div = addDiv(null,
@@ -379,13 +382,17 @@ waitForAllPaints(() => {
       var markers;
       var now;
       while (true) {
-        markers = await observeStyling(1);
-        // Check restyle markers until 200ms is elapsed.
         now = document.timeline.currentTime;
         if ((now - timeAtStart) >= 200) {
+          // If the current time has elapsed over 200ms since the animation was
+          // created, it means that the animation should have already
+          // unthrottled in this tick, let's see what observes in this tick's
+          // restyling process.
+          markers = await observeStyling(1);
           break;
         }

+        markers = await observeStyling(1);
         is(markers.length, 0,
            'Transform animation running on the element which is scrolled out ' +
            'should be throttled until 200ms is elapsed');

MozReview-Commit-ID: 3WfY6aVnsXk

--HG--
extra : rebase_source : ddf51217f03fc1bfe421c344a7a7811dc591a9af
2017-12-18 14:18:17 +09:00
Hiroyuki Ikezoe 25e6b9fd45 Bug 1425771 - Add a function to check detect whether have conformant Promise handling and set the flag to represent it. r=birtles
MozReview-Commit-ID: FbzaUBKQ47F

--HG--
extra : rebase_source : ae936432d4ccb3e069608703c586d7134d52d12e
2017-12-18 14:17:44 +09:00
Brian Birtles 0fec9ac501 Bug 1425548 - Update references to Web Animations spec in dom/animation; r=hiro
MozReview-Commit-ID: 1f2Mz0VhnBm

--HG--
extra : rebase_source : 30c952ed20ee64810d225e5778650dd01791964d
2017-12-15 14:55:08 -06:00
Brian Birtles 22ca1231e8 Bug 1422248 - Don't reject promises of dispatch cancel events when canceling idle animations; r=hiro
MozReview-Commit-ID: EGg6Ntj0loq

--HG--
extra : rebase_source : 8edd6fdd73440fe55fd8be1d524767fdaf55b872
2017-12-14 17:15:28 -06:00
00626c42d9 Bug 1413104 - Drop telemetry probes for layer size; r=botond
MozReview-Commit-ID: FtpTJDC50A8

--HG--
extra : rebase_source : 2e1ba62ae1cb462546ce552efccdde2fe1380a00
2017-12-14 21:36:09 +00:00
Hiroyuki Ikezoe 958d16759c Bug 1424949 - Wait for one more frame before checking animation start time to avoid the situation that the animation just begins at the time when it's ready. r=birtles
MozReview-Commit-ID: 6bNfl10TiT6

--HG--
extra : rebase_source : 095fd007710f8a7af13e2e7331f7326554f32cb7
2017-12-15 01:36:04 +09:00
Hiroyuki Ikezoe c9071bce5c Bug 1424949 - Use assert_greater_than or assert_less_than in file_animations-dynamic-changes.html. r=birtles
MozReview-Commit-ID: I24yopOv51d

--HG--
extra : rebase_source : cd57a9649a3ff1335112f1240e1fcfe694a053d5
2017-12-15 01:24:57 +09:00
Hiroyuki Ikezoe 33d26976c8 Bug 1424948 - Check iteration progress value instead of animating computed style value. r=birtles
It is possible that animating computed style becomes the same value as the
value in the previous tick if Animation.mPendingReadyTime is pretty close
to the timeline current time.

MozReview-Commit-ID: COuur4Wlufx

--HG--
extra : rebase_source : 5dea9ef0bce7cb606dc290277e04b779fe608bbd
2017-12-15 01:10:11 +09:00
Hiroyuki Ikezoe 2a72c4f2f9 Bug 1424948 - Use waitForNextFrame instead of waitForFrame. r=birtles
MozReview-Commit-ID: AZJ7LyeIKq2

--HG--
extra : rebase_source : f42d2b0d4220d3d458093fdc5aed7ff11dcff63e
2017-12-15 00:06:26 +09:00
Hiroyuki Ikezoe 29d095f24f Bug 1416966 - Drop the check for the new micro task checkpoint for animations. r=birtles
MozReview-Commit-ID: HVxDrxV3Qmb

--HG--
extra : rebase_source : 9b29646a35e23c31896ae7458c49a8abd44bacbb
2017-12-12 18:44:05 +09:00
Hiroyuki Ikezoe 280df82ed9 Bug 1416966 - Perform a micro task checkpoint in DocumentTimeline::WillRefresh. r=bevis,birtles
MozReview-Commit-ID: Kd1Il7COZZY

--HG--
extra : rebase_source : 872267be92883ed5f94b2e4dbca7fd7f24941f34
2017-12-12 18:44:05 +09:00
Hiroyuki Ikezoe fedaef24c4 Bug 1416966 - Add an annotation for a test case that will fail once we perform a micro task checkpoint between Animation::Tick and requestAnimationFrame callbacks. r=birtles
The 'is' check there will be replaced 'todo_is' after the commit for the new
micro task checkpoint.

MozReview-Commit-ID: EGFZWy8BD3O

--HG--
extra : rebase_source : 034717a9e7aac0edb82613321ec056ed07cdb996
2017-12-12 18:44:04 +09:00
Hiroyuki Ikezoe 912d3bc83e Bug 1416966 - Count a remaining animation restyle request when animating element was detached from the document. r=birtles
If element which has script animations is detached between Animation::Tick and
styling process, the element persists in EffectCompositor::mElementsToRestyle
(bug 1417354).  When the element is attached to the document again, the element
in mElementsToRestyle is considered as a target element that needs to be
traversed in the first animation-only restyling.  Thus the remaining restyle
request can be observed with the new micro task checkpoint for animations.

MozReview-Commit-ID: F6gs2QXcZ8X

--HG--
extra : rebase_source : 09ccf76e4d28ee55facc5a62f3e8f08e0eeb3e03
2017-12-12 18:44:04 +09:00
Hiroyuki Ikezoe e49eb2dc18 Bug 1416966 - Add todo for checking one restyle after Animation.pause(). r=birtles
Similar to the previous commit, if Animation.pause() is called between
restyling process and the next refresh driver's tick and if we wait for
Animation.ready after the pause(), there should be one restyle that hasn't
yet processed.

MozReview-Commit-ID: JnpwhOuDvPz

--HG--
extra : rebase_source : b6f14e05837754d1bd51c8a50ce8d82a0c7d751a
2017-12-12 18:44:04 +09:00
Hiroyuki Ikezoe cdb5d751e5 Bug 1416966 - Add todo for checking the final restyle after Animation.finished. r=birtles
If Animation.finished promise was fulfilled in Animation::Tick, at the moment we
haven't yet restyled the final animation value.  So once we have new micro task
checkpoint there we can observe a restyle marker after Animation.finished was
fulfilled.

MozReview-Commit-ID: LiEl4Iu2Cbr

--HG--
extra : rebase_source : d88b037eba2fd07d75a3ab429c028e23e5137b52
2017-12-12 18:44:04 +09:00
Hiroyuki Ikezoe e792071575 Bug 1424644 - Check pending state to make sure the animation has been paused or not. r=birtles
'finish_from_pause' supposes that finish() is called after pause pending state
is finished.  Whereas 'finish_from_pause_pending' supposes that finish() is
called during pause pending state.  We should check the state respectively.

MozReview-Commit-ID: DUq2ghK6h9I

--HG--
extra : rebase_source : 2d4ded71387e75efcff9bb184b8e51475bc8bc56
2017-12-11 06:46:46 +09:00
Hiroyuki Ikezoe e8357d3715 Bug 1424115 - Rewrite test_animation_observers_async.html with promise_test. r=boris
With this patch we still use a global MutationObserver and a single target
element and re-use them in all test cases.  Eventually each test should create
a target element and a MutationObserver to avoid explicit cleanup jobs (e.g.
clearing styles and flushing styles for the global target element), but it's
not in the scope of this bug.

MozReview-Commit-ID: IqEjMbTrpAK

--HG--
extra : rebase_source : 7463c21ce946f5c15f2b7bc4a71c90dba784385d
2017-12-08 12:03:30 +09:00
Hiroyuki Ikezoe dc512a2632 Bug 1424115 - Drop EventUtils.js from test_animation_observers_async.html. r=boris
It's no longer used.

MozReview-Commit-ID: 5f4lEP5wAqx

--HG--
extra : rebase_source : 81feae35ee4ee735e2bb3904f0166897c93880ec
2017-12-08 11:50:03 +09:00
Hiroyuki Ikezoe 9e8a926279 Bug 1424115 - Fix indentation in test_animation_observers_sync.html. r=boris
MozReview-Commit-ID: HsYi9ISOVli

--HG--
extra : rebase_source : 05c05478237c1c827f03b070ace8828a43a0474d
2017-12-08 11:50:03 +09:00
Hiroyuki Ikezoe 61db04fabc Bug 1424115 - Drop requestLongerTimeout in test_animation_observers_async.html. r=boris
Most of test cases in the test file has been moved so that the test no longer
takes over default time out (5 minutes).

MozReview-Commit-ID: 9rrr7WrkcFH

--HG--
extra : rebase_source : 44ca3c0e42a389d82185e55b257c1dceb6d407d4
2017-12-08 11:50:03 +09:00
Hiroyuki Ikezoe 49e012c030 Bug 1416693 - Make animation test cases that don't require asynchronous. r=boris
Below list is animation test cases remain in test_animation_observers_async.html

* single_animation : waiting for animationend event
* single_animation_cancelled_fill : waiting for animaitonend event
* tree_ordering : waiting for animationend event
* coalesce_change_cancel : testing a non-cancelling change to an animation
  followed immediately by a cancelling change sends only one removal
  notification, I am concerned that adding explicit style flush
  (e.g. getComputedstyle) might change the test purpose.
* play : redundant play() seems to be affected by asynchronous.
  I haven't dug into detail.
* finish_from_pause : waiting for Animation.ready to make sure pause pending
  state to finish.

MozReview-Commit-ID: HAelOTwSqgv

--HG--
extra : rebase_source : 819e8975028f62580dccd07fedc53d250b71f97a
2017-12-07 10:06:02 +09:00
Hiroyuki Ikezoe 70ec3f1b1b Bug 1416693 - Make transition test cases that don't require asynchronous. r=boris
Below list is transition test cases remain in test_animation_observers_async.html

* single_transition : waiting for transitionend event

MozReview-Commit-ID: 5ecgpJm1W6p

--HG--
extra : rebase_source : d5c77cf77521f62a693897230d73287deab8b6c7
2017-12-07 16:27:32 +09:00
Hiroyuki Ikezoe 6a7d32d971 Bug 1418268 - Tweak expected restyle count for the case where animation start time was clamped. r=birtles
MozReview-Commit-ID: IPxRtRucze4

--HG--
extra : rebase_source : b5c346b38022fa69f0762a5d3149599f41f2414b
2017-12-07 12:57:54 +09:00
Hiroyuki Ikezoe 18bbe2d0b2 Bug 1418268 - Add a function to check whether there is a micro task checkpoint between animation tick and requestAnimationFrame callbacks. r=birtles
MozReview-Commit-ID: 6C9Fbg7SKWU

--HG--
extra : rebase_source : a1e979a2034da2be12348f7916d2a0983c6917c6
2017-12-07 08:43:59 +09:00
Hiroyuki Ikezoe d29d155692 Bug 1418268 - Make sure the animation on scrolled out element is throttled in the first place. r=birtles
In the first frame after the initial paint, we skip restyling if the initial
paint took over vsync refresh rate as an optimization and to avoid jumpy
animations. To avoid checking this skipped restyling that we'd actually expect
a restyle maker there, firstly we check there is no restyle marker after the
initial paint for scrolled out animation for five frames, and we then make the
element visible and check a restyle marker there.

MozReview-Commit-ID: 5XkJhdtUly5

--HG--
extra : rebase_source : 1a441296ad6f6cc42b50d300ebacd66e5dee77a1
2017-12-07 08:43:38 +09:00
Hiroyuki Ikezoe 3fb7e182cc Bug 1423078 - Use waitForNextFrame() instead of waitForFrame() to make sure the next frame. r=birtles
This change is the same as bug 1422995.  With the conformant Promise handling
and performing micro task checkpoint in Animation tick, waitForFrame() inside
the callback for Animation.ready does not make sure that the next frame happens.

MozReview-Commit-ID: KEz4xmHpGlk

--HG--
extra : rebase_source : 6285f2f3df3d5cb617579bb4f449832ff155e34d
2017-12-06 09:19:40 +09:00
Hiroyuki Ikezoe ed3191d521 Bug 1423078 - Use waitForNextFrame() instead of waitForFrame() to make sure the second restyle happen after the initial paint. r=birtles
We clamp animation start time on the second restyling when the initial paint
for the animation took over vsync refresh rate (16.6ms normally as of today).
The clamping leads the animation progress to the same value as the initial one.
Once this clamping happens, the animation value does not change even after
waiting for Animation.ready and a reqeustAnimationFrame.  To make the animation
value change happen we should wait for one more requestAnimationFrame.

MozReview-Commit-ID: 8OTC0xkKBrr

--HG--
extra : rebase_source : 4c0313f3a96ffc85306f5687630abc13d88aed61
2017-12-06 09:19:38 +09:00
Hiroyuki Ikezoe 54e5e36f24 Bug 1423078 - Use assert_greater_than instead of assert_true. r=birtles
MozReview-Commit-ID: C4LZQni43wp

--HG--
extra : rebase_source : 0f68abbd0a1f8cf9e005e2bdecd7e7f267c64cba
2017-12-06 09:19:35 +09:00
Boris Chiou 570057e075 Bug 1408303 - Part 3: Move several Servo parsers into ServoCSSParser helper class. r=heycam
We have ServoCSSParser class, and I think it's better to move those
Servo FFI into this class to avoid including ServoBindings.h everywhere.

MozReview-Commit-ID: 6orXtddp9ZU

--HG--
extra : rebase_source : 6da4158c4fec606aaee49fddee3192f94d6c85a3
2017-12-01 17:35:47 +08:00
Hiroyuki Ikezoe 7257be7a76 Bug 1422995 - Use waitForNextFrame() instead of waitForFrame() to make sure the next requestAnimationFrame callback happen. r=birtles
With the conformant Promise handling (bug 1193394) and performing micro task
checkpoint in Animation tick (bug 1416966), if we call waitForFrame() inside
the callback for Animation.ready.then it will still be done in the same refresh
driver's tick.

MozReview-Commit-ID: GQJiDHHUlyD

--HG--
extra : rebase_source : 55813e6c1fc24193e0b4b1c87934debe80d357b5
2017-12-05 09:13:42 +09:00
Emilio Cobos Álvarez 13a91fa9f6 Bug 1417200: Make -moz-border-colors chrome only. r=xidorn
On a CLOSED TREE, since the servo patch managed to get in.

This also makes the border longhand no longer reset them.

MozReview-Commit-ID: KNais1e5FnE
2017-12-01 23:25:01 +01:00
Hiroyuki Ikezoe 74b350fbd2 Bug 1421476 - Wait for the next frame after waitForWheelEvent(). r=birtles
sendWheelAndPaintNoFlush which calls in waitForWheelEvent()  waits for
MozAfterPaint and calls a given callback function when the MozAfterPaint is
received.  The MozAfterPaint is processed after we did a paint process.
However, observeStyling counts the number of requestAnimationFrame callbacks
and yet there will be no opportunity to process restyles between the
MozAfterPaint callback and the next call to requestAnimationFrame.  As a result,
if we are expecting restyles to happen on every frame, our count will be off by
one.  To avoid this, we wait until the next requestAnimationFrame callback
before calling observeStyling.

Note that we *could* try to adjust observeStyling to automatically do this for
us but sometimes we want observeStyling to observe restyles in the *current*
frame.  Since there's no obvious way to detect what we are trying to do it's
easier to just let each test decide from which point it wants to count restyles.


MozReview-Commit-ID: 1B8EZNozjFj

--HG--
extra : rebase_source : 748f874dbb42e06b72b12582762626a31d1e8d75
2017-11-29 13:05:21 +09:00
Hiroyuki Ikezoe 574cfd5228 Bug 1421476 - Change style before waiting for a single requestAnimationFrame. r=birtles
If we waited for a single requestAnimationFrame and changed the style inside
the callback, we have no chance to process the style change there.

* Before this change:
 - Tick:
   Start observing restyles
     Process restyling but there is no need to do.
 - Next tick:
   Run requestAnimationFrame callbacks
     set the style
     finish observing restyles

* After this change:
 - Tick:
   Set the style
   Start observing restyles
     Process restyling the style
 - Next tick:
   Run requestAnimationFrame callbacks
     finish observing restyles

MozReview-Commit-ID: JNQLjOXz3AZ

--HG--
extra : rebase_source : 68da01d65fcade7137c6a06551438e64cd157d0f
2017-11-29 13:05:21 +09:00
Hiroyuki Ikezoe ffc92e2d66 Bug 1421476 - Use waitForNextFrame() instead of waitForFrame() in file_restyles.html. r=birtles
MozReview-Commit-ID: K5tjO1tgoeN

--HG--
extra : rebase_source : 1b7334f7721f06cd8219a395b96089391f8aa3a2
2017-11-29 13:05:20 +09:00
Hiroyuki Ikezoe 2a187244e9 Bug 1421476 - Make waitForAnimationFrames wait for the correct number of consecutive animation frames for the given count. r=birtles
As mentioned in the previous commit, with the conformant Promise handling there
are cases where a requestAnimationFrame callback can happen in the same tick of
the refresh driver, that is, the same animation frame.  We should only count
callbacks that occur in frames subsequent to the current one.

MozReview-Commit-ID: IEC7uFwGysS

--HG--
extra : rebase_source : 9a0642507c73ce8195145290bb783a3de3f9ba1b
2017-11-29 13:05:07 +09:00
Hiroyuki Ikezoe 7735f38cde Bug 1421476 - Add waitForNextFrame() that ensures the state in the next frame. r=birtles
With the conformant Promise handling, there are cases that we are still in the
same tick even after we got a reqeustAnimationFrame.  For example, if we call
requestAnimationFrame() in the callback for an animationstart event, the
callback is processed just before the callback for requestAnimationFrame is
processed in a tick, so we are still in the same tick even after we got the
requestAnimationFrame.

MozReview-Commit-ID: Cgnu7Mk4Nl8

--HG--
extra : rebase_source : 6adfdef01e1ad1ab0cf5f93f89bc4946f49c0638
2017-11-29 13:04:17 +09:00
Hiroyuki Ikezoe ba70245385 Bug 1421151 - Drop redundant calling start(). r=birtles
We have already start() call at the top of this test file, the start() there
is called after setting 'layout.css.devPixelsPerPx' pref, that should be only
one call for start().

MozReview-Commit-ID: A43vfwfLer3

--HG--
extra : rebase_source : 7cf3157bb781c135c726d252048fe52393ead428
2017-11-28 16:42:27 +09:00
Sebastian Hengst 9dc9b78023 Backed out 3 changesets (bug 1419226) for frequently for frequently timing out in Web reftests in webvtt, e.g. enable_controls_reposition.html. r=backout
Backed out changeset 5a2460c34657 (bug 1419226)
Backed out changeset 8cda3fb3ce1a (bug 1419226)
Backed out changeset 21d9bedcf411 (bug 1419226)
2017-11-27 17:27:27 +02:00
Mantaroh Yoshinaga 10c019403e Bug 1419226 - Part 3.Wait for MozAfterPaint instead of waiting for frames on file_deferred_start.html . r=hiro
This patch will :
 * Create test div element after waiting for document load, then wait for
   painting after it.
 * Change to waiting for MozAfterPaint event without workaround of waiting for
   excessive frames.

MozReview-Commit-ID: 6Ytxln3tJi4

--HG--
extra : rebase_source : 53b5f038ec95dd47b76d4a0bcf8dfd964bff451d
2017-11-27 12:54:49 +09:00
Hiroyuki Ikezoe 23677e6410 Bug 1420774 - Drop unnecessary virtual from Animation methods. r=boris
MozReview-Commit-ID: wRrKFbjsTx

--HG--
extra : rebase_source : 0e29a425d94c9cac01a5ba1f149f48301bcf5cde
2017-11-27 07:44:53 +09:00
Hiroyuki Ikezoe 4937b30bdd Bug 1413370 - Skip the test case that checks transform animation on scrolled-out element is unthrottled periodically on Android. r=boris
It causes intermittent failure.

MozReview-Commit-ID: HDitQV4Yn3P

--HG--
extra : rebase_source : f3a874df1575f903bac3331c9e5cd3454f1f187b
2017-11-27 06:20:06 +09:00
Brian Birtles 06e53a1793 Bug 1412765 - Update more tests to reflect changes to Animation.playState's r=hiro
return value; r?hiro

MozReview-Commit-ID: KvZa7EyzAKj

--HG--
extra : rebase_source : b7721bc34f246c36a22eb4f9acc3fba854dcdec8
2017-11-24 10:53:58 +09:00
Brian Birtles 7ebdac8455 Bug 1412765 - Update tests in dom/animation/tests to use new pending member; r=hiro
MozReview-Commit-ID: 2PDm9NaXChg

--HG--
extra : rebase_source : 6a159137b7fd65a456f799b2323667de8f636542
2017-11-22 14:13:36 +09:00
Brian Birtles e83e1a5e71 Bug 1412765 - Add Animation.pending member; r=bz,hiro
This reflects the change made to the Web Animations specification in:

  9e2053f553
  1c3415f4cc
  (I got it wrong the first time. The second commit fixes the first.)

And discussed in:

  https://github.com/w3c/web-animations/issues/196

In summary, we are splitting the "pending" play state out into a separate
boolean member so that it is possible to distinguish between "play-pending" and
"pause-pending" and because most of the time when you check for
animation.playState === 'running' you also really want to include play-pending
animations.

MozReview-Commit-ID: IJSNoZTKW2I

--HG--
extra : rebase_source : 5d17239fd087cfe3cce1c9697eff97d062b6dd4b
2017-11-21 17:10:59 +09:00
Hiroyuki Ikezoe 33e7b8838f Bug 1418867 - Pass element or pseudo element to Servo_StyleSet_GetBaseComputedValuesForElement(). r=emilio
MozReview-Commit-ID: Ae3iZ6g3x3c

--HG--
extra : rebase_source : 8d07ac08d63cfdb96cb07a73ed86b268d6b5026e
2017-11-22 11:03:40 +09:00
Hiroyuki Ikezoe a2e3c0154c Bug 1418867 - Drop pseudo type argument from KeyframeEffectReadOnly::EnsureBaseStyle(). r=birtles
We have the pseudo type in mTarget.

MozReview-Commit-ID: GoXzoavnwpL

--HG--
extra : rebase_source : 2f46f581b662d7954211776f58b5104fc615486f
2017-11-22 09:56:56 +09:00
Brian Birtles c64d600a96 Bug 1418220 - Drop AnimationUtils::IsCoreAPIEnabled(ForCaller) and use nsContentUtils::AnimationsAPICoreEnabled / nsDocument::IsWebAnimationsEnabled instead; r=hiro
The difference between nsDocument::IsWebAnimationsEnabled and
nsContentUtils::AnimationsAPICoreEnabled is that the former checks the caller
type and treats the preference as set for system callers which is particularly
needed for enabling things like the getProperties() API for DevTools etc.

Generally in API-facing call sites we have a JS context / CallerType and so we
want to distinguish between system callers and non-system callers. However, for
a few internal uses--specifically filling-in missing keyframes--we don't care
about the caller type and always follow the pref setting.

That may or not be quite what we want, but this patch doesn't change that except
for one call site: KeyframeUtils::GetKeyframesFromObject. This patch changes
GetKeyframesFromObject from *not* checking the caller type to checking the
caller type. That seems to be the correct behavior here since this is called
from KeyframeEffectReadOnly::SetKeyframes(JSContext*, JS::Handle<JSObject*>,
ErrorResult&) (i.e. a JS API-facing call site) where we *should* enable the full
API when the caller is chrome code.

MozReview-Commit-ID: FQJBk3zytwd

--HG--
extra : rebase_source : 577bca1e551e39fecfab309f64c993eba110337f
2017-11-20 14:18:43 +09:00
Jonathan Watt ab7efc9dbb Bug 1417365 - Unified build issues in dom/animation. r=baku 2017-10-26 11:55:28 +01:00
Noemi Erli 550148ab69 Merge inbound to mozilla-central r=merge a=merge 2017-11-15 11:57:12 +02:00
Ya-Chieh Wu d2e5bc76eb Bug 1381153 - Part 1: Cache MayHaveOpacityAnimation and MayHaveTransformAnimation in nsIFrame. r=mstange, r=mats
There are two places where I have to cache the status of MayHaveOpacityAnimation
and MayHaveTransformAnimation. First place is in |nsIFrame:init()| where an
element is associated with a frame. Second place is in
|KeyframeEffectReadOnly::UpdateEffectSet()| where the script can add animations
on element.

btw I keep the original two flags of MayHaveOpacityAnimation and
MayHaveTransformAnimation in EffectSet because there is no guarantee that
an element has been associated with a frame when we call to |UpdateEffectSet()|.
But we still want to keep the benefits that we can quickly look up
MayHaveOpacityAnimation or MayHaveTransformAnimation. So I keep them in
EffectSet and transfer the status into nsIFrame when we bind an element
to a frame in nsIFrame:Init().

MozReview-Commit-ID: JDwyAQQTKA7
2017-11-13 18:15:00 -05:00
Hiroyuki Ikezoe 1db8e96c69 Bug 1415729 - Make 'necessary_update_should_be_invoked' test in file_restyles.html more strict. r=birtles
Before this change, the test calls getAnimations() after changing animation
duration.  Unfortunately it was wallpapering what's going on there actually
since getAnimations() flushes pending styles.  This patch drops the
getAnimations() call and makes it clear how many restyles happen there.

MozReview-Commit-ID: A0a5MlTyBnD

--HG--
extra : rebase_source : cc20d2c6945f81f72c753137441b8d84ff52ff63
2017-11-15 13:43:20 +09:00
Hiroyuki Ikezoe 4ed9f9ddff Bug 1415729 - Use arrow function in file_restyles.html. r=birtles
MozReview-Commit-ID: AcjDRK36d9d

--HG--
extra : rebase_source : 2d853c3c4702e775275a49f2eb3552ef00b7d295
2017-11-15 12:30:04 +09:00
Hiroyuki Ikezoe bb3c45d880 Bug 1415399 - Explicitly flush styles to make sure style changes happen in the case where we are in the state just before requestAnimationFrame is handled. r=birtles
MozReview-Commit-ID: FqIoLcJ69tl

--HG--
extra : rebase_source : ab1a1433dadc7c3269df3ca7a8a7e809922ebcdb
2017-11-14 08:38:03 +09:00
Hiroyuki Ikezoe 4b43b78621 Bug 1415399 - Use arrow function in test_animation_observers_{async,sync}.html. r=birtles
MozReview-Commit-ID: 4gSsvjQWBfS

--HG--
extra : rebase_source : 8b3e7791a65adc33d966c4370c4776e430522429
2017-11-14 08:37:09 +09:00
Csoregi Natalia 8f1a81caad Merge inbound to mozilla-central r=merge a=merge 2017-11-14 00:57:47 +02:00
Kartikaya Gupta 87186734ba Bug 1416540 - Convert AnimationValue::GetStyleValue to return a float-based Size. r=mattwoodrow
This follows from the previous patch; these values feed into UpdateMinMaxScale
as well, which explicitly wants to use floats, so there's no point in creating
doubles. The source of this information is also a float-based matrix.

MozReview-Commit-ID: LPk4Xm9AaJJ

--HG--
extra : rebase_source : d7714755fb1078880133d6f044cc9bc7743439ee
2017-11-12 18:37:33 -05:00
Joel Maher 944aa7ec34 Bug 1363957 - Disable dom/animation/test/mozilla/test_deferred_start.html on android/debug and win10 for frequent failures. r=me, a=test-only 2017-11-13 12:20:01 -05:00
Hiroyuki Ikezoe e7e006516c Bug 1415734 - Don't start test refresh mode if there is any suppressed paints. r=birtles
When paintingSuppressed flag is true, paint_listener.waitForPaints() defers the
waiting paint to the next tick.  The paintingSupressed flag is set when pres
shell is initialized and at that time if the document has not been loaded yet,
a timer is created to clear the flag after nglayout.initialpaint.delay
elapsed.  And when the timer is fired, the flag is cleared, but if there is
still pending reflow, it's not cleared.

So what happened in the failure case;

1) In the first promise_test we wait for document load
2) The paintingSuppressed flag is set in the first promise_test and create the
   timer
3) When the document has been loaded but the timer has not yet been fired,
   start test refresh mode and create an element in the subsequent promise_test
4) Creating the element triggers a reflow
5) waitForPaints() is called
6) The timer is fired, but there is a pending reflow, so skip clearing the flag
7) Now it's in the test refresh mode, the pending flow will never be processed
   until some triggers happen (i.e. mouse movement, calling
   advanceTimeAndRefresh, etc.)
8) The test is timed out

MozReview-Commit-ID: 5fLn9SNHp1J

--HG--
extra : rebase_source : 3115a5d5ac1405f18efde7ade1fb9738858c518f
2017-11-10 06:38:15 +09:00
Jan de Mooij 296194e65f Bug 1414340 part 1 - Remove non-standard array/generator comprehensions from browser code. r=mossop 2017-11-10 11:52:22 +01:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Jonathan Watt f10fc1e787 Bug 1413216 - Fix some missing includes in dom code. r=baku
MozReview-Commit-ID: 25hWPkXF0Wj
2017-10-12 13:50:23 +01:00
Hiroyuki Ikezoe 1bd79ec0e6 Bug 1415346 - Bind onxx event handler before creating EventWatcher. r=birtles
MozReview-Commit-ID: 83KwkxBq7pK

--HG--
extra : rebase_source : 1fb4b31a290f9bc354513970a9f48e26130af65f
2017-11-08 12:45:15 +09:00
Hiroyuki Ikezoe db1806bf05 Bug 1415346 - Use const instead of var in file_event-dispatch.html. r=birtles
MozReview-Commit-ID: Al9lYAMDVNZ

--HG--
extra : rebase_source : d5781e66d36b8ad2d6329da5344b5287d465f142
2017-11-08 12:15:00 +09:00
Hiroyuki Ikezoe a4199f041e Bug 1415346 - Remove unused AnimationEventHandler. r=birtles
MozReview-Commit-ID: CKkaow9NNa8

--HG--
extra : rebase_source : 3f9fe8c909a79fdfdc715866537ed4f85cd98e48
2017-11-08 12:15:00 +09:00
Hiroyuki Ikezoe 95f80d8de8 Bug 1415346 - Use single quote in script in file_event-dispatch.html. r=birtles
MozReview-Commit-ID: H7coY2gzxOE

--HG--
extra : rebase_source : 28fb57f48241c4d469197039b35cfd10597e19b7
2017-11-08 12:15:00 +09:00
Hiroyuki Ikezoe abd6474c95 Bug 1415346 - Use arrow function in file_event-dispatch.html. r=birtles
MozReview-Commit-ID: 7bYYDIOLqv6

--HG--
extra : rebase_source : 93c38da7146f8e26e17f1abd06c437106472817a
2017-11-08 12:14:59 +09:00
Hiroyuki Ikezoe 98f28aa386 Bug 1415042 - Wait for two requestAnimationFrames to ensure that animations have been tried to send to the compositor in test_running_on_compositor.html. r=birtles
MozReview-Commit-ID: FhzRLiKiLC

--HG--
extra : rebase_source : 9dbd392bd796a2d9ef7b6a49b4e40f857ead5e1c
2017-11-07 14:50:15 +09:00
Hiroyuki Ikezoe 0e71085270 Bug 1415042 - Use arrow function in test_running_on_compositor.html. r=birtles
MozReview-Commit-ID: 2zAMkTVK9VE

--HG--
extra : rebase_source : 40b8c5247e45dd333e7eeb871aacd88720bb1bf8
2017-11-07 14:50:02 +09:00
Hiroyuki Ikezoe a9c7129658 Bug 1415042 - Wait for two requestAnimationFrames to ensure that animations have been tried to send to the compositor in test_animation_performance_warning.html. r=birtles
To do that, ideally we can wait for MozAfterPaint, but it's sometimes fired
before we do a paint process (bug 1341294), we should avoid using it until
that bug is fixed.
So, we wait for two requestAnimationFrames instead.  The callback for
requestAnimationFrame is called before styling process, so we need to wait for
one more frame there.  For now a Promise in waitForFrame is processed after
paint process, so these tests would have been working fine with waiting for a
single requestAnimationFrame.  But after bug 1193394, the Promise will be
processed right after requestAnimationFrame, thus these tests will fail with a
single requestAnimationFrame.

MozReview-Commit-ID: 4pbofZ3DUm3

--HG--
extra : rebase_source : 133d0a259f81142fb9781d697642e82a577abb6b
2017-11-07 14:49:59 +09:00
Hiroyuki Ikezoe 01732475f9 Bug 1415042 - Use arrow function in test_animation_performance_warning.html. r=birtles
MozReview-Commit-ID: JjrL5Tx6y5F

--HG--
extra : rebase_source : 5219f4f736f52956875b06db21ff1eb5fffb83da
2017-11-07 13:21:01 +09:00
Hiroyuki Ikezoe d96dadbd8a Bug 1415010 - Bind onanimationxx handlers before creating EventWatcher. r=birtles
So that we can surely receive these animation events in the handler before
the EventWatcher receives the events.

MozReview-Commit-ID: 9jVJ3TgwYeq

--HG--
extra : rebase_source : 470b63b35c3a52f48ddd08d4b529c6b1eb957cb2
2017-11-07 10:30:07 +09:00
Hiroyuki Ikezoe fdf597eae9 Bug 1415010 - Use arrow functions. r=birtles
MozReview-Commit-ID: D6gL50giYkO

--HG--
extra : rebase_source : 846871950287ce12560474df9d8ffbf9deff9ecb
2017-11-07 10:30:07 +09:00
Zibi Braniecki 4c3a3ac1fb Bug 1410736 - Replace remaining uses of general.useragent.locale with LocaleService API. r=jfkthame
MozReview-Commit-ID: F0Ofe2lHHEo

--HG--
extra : rebase_source : 420c65111dc5066eb00ef86ddf375db533008bbf
2017-11-03 17:08:34 -07:00
Sebastian Hengst eebc5b65c0 Backed out changeset 0637dca8a971 (bug 1410736) for eslint failure at toolkit/components/extensions/test/xpcshell/test_ext_i18n_css.js:130: Unexpected var, use let or const instead. r=backout on a CLOSED TREE 2017-11-04 00:51:02 +01:00
Zibi Braniecki 5db1dc8a9d Bug 1410736 - Replace remaining uses of general.useragent.locale with LocaleService API. r=jfkthame
MozReview-Commit-ID: CmXBFcKxOkX

--HG--
extra : rebase_source : deeeee81fd187aa9ca4f26f9f5c69633ff405e34
2017-11-02 14:11:41 -07:00
Hiroyuki Ikezoe dba3425d42 Bug 1190721 - Throttle animations that produce any transform change hint if the target element is out-of-view. r=birtles
And unthrottle them on every 200ms just like we do for transform animations on
the compositor.  To unthrottle the transform animations properly, we need to
update UpdateLastTransformSyncTime each time we compose the style for the
animations instead of updating it when we send the transform animation to the
compositor.  That's because display item for transform is built even while we
are throttling the transform animations for some reasons, so if we updated the
last transform sync time there, the time will not match what it should be.

MozReview-Commit-ID: GwMzJqUlzd2

--HG--
extra : rebase_source : 09e379191970687a9f35aead871acf450c63813e
2017-10-31 09:45:41 +09:00
Hiroyuki Ikezoe a6c03dcf96 Bug 1335986 - Run test_restyles.html on Android. r=birtles
Now test_restyles.html runs in content window, so theoretically we no longer
receive unexpected animation restyles in chrome window.

MozReview-Commit-ID: GJq6WTdEBy8

--HG--
extra : rebase_source : cfdbf0b6c709d6a24d6d038ec71f664ccf745317
2017-10-31 08:34:47 +09:00
Hiroyuki Ikezoe 40de7fdd1a Bug 1379564 - Make zeroDuration in AnimationEffectReadOnly::GetComputedTimingAt static const. r=birtles
MozReview-Commit-ID: 1fPRVuH2dCJ

--HG--
extra : rebase_source : 54e1c8ac1101fca13c7eeb4945c8ed1fd69f17f6
2017-07-10 16:36:28 +09:00
Hiroyuki Ikezoe ef7ed06a84 Bug 1379564 - Use BaseTimeDuration::bool() to check the TimeDuration is not zero. r=birtles
In TimingParams::CalcActiveDuration(), we intentionally use IsZero() instead
of the bool() operator since the value |aDuration| is Maybe<StickyTimeDuration>
, it's easily misread as Maybe::bool().

MozReview-Commit-ID: D5Nb7cxh7wi

--HG--
extra : rebase_source : e30fe73c5b02d09ab5116bcfc6ca20a902b13b75
2017-07-10 16:21:30 +09:00
Hiroyuki Ikezoe c3948ad723 Bug 1379515 - Set layout.reflow.synthMouseMove false to avoid synthetic mouse move. r=birtles
The synthetic mouse move flushes animation styles during running test cases on
Linux, it breaks these tests!

MozReview-Commit-ID: DOT7m3fhrZi

--HG--
extra : rebase_source : 6fe04028073277276df9ae4a24ad62f9e4419d5c
2017-10-30 09:50:27 +09:00
Hiroyuki Ikezoe dee2a02766 Bug 1379515 - Run test_restyles.html in content. r=birtles
MozReview-Commit-ID: 7PPYQYBIo5Y

--HG--
rename : dom/animation/test/chrome/test_restyles.html => dom/animation/test/mozilla/file_restyles.html
extra : rebase_source : 24990119842e92362e123b51519bfec773e0a392
2017-10-30 09:49:32 +09:00
Hiroyuki Ikezoe ddb1e94651 Bug 1379515 - Propagate testharness functions only if we use testharness.js. r=birtles
We are going to use SimpleTest.js in the sub window.

MozReview-Commit-ID: HAAMnY7xDNn

--HG--
extra : rebase_source : 3600376a992abf5e1e55baba99bff1a656afdaa6
2017-10-30 09:49:29 +09:00
Hiroyuki Ikezoe 886e45f39e Bug 1379515 - Make test cases that use synthesizeWheelAtPoint proper. r=birtles
We shouldn't call synthesizeWheelAtPoint() in an rAF callback and observe
animation restyle makers there since we might end up observing an animation
restyle maker which is brought by flushing throttled animation styles for
hit-testing caused by the wheel event.  Now we have sendWheelAndPaintNoFlush
which does not flush any styles before sending the wheel event, we use it.

MozReview-Commit-ID: 6WP2ExA7fAv

--HG--
extra : rebase_source : a2a5cea00fbe431dea8096b584a9f82c658158aa
2017-10-30 09:49:23 +09:00
Hiroyuki Ikezoe 1ec24b403d Bug 1379515 - Change a child element position to be able to move into view of the parent by mouse wheel. r=birtles
Before this patch the child element actually did not move into the view and
observed an unrelated restyle maker.  In the next patch we fix the observation
of the unrelated restyle maker.

MozReview-Commit-ID: 1DejqwF6hJg

--HG--
extra : rebase_source : ea6d6a48043f1b2a52ddedcbc41c321624a723d2
2017-10-30 09:43:04 +09:00
Hiroyuki Ikezoe 886e615302 Bug 1379515 - Unify test cases that checks animation are/were in scrolled out elements. r=birtles
It much makes more sense to check the animation in out-of-view is throttled
and unthrottled once it got visible in a single test.

MozReview-Commit-ID: AZY5Xc0cbDF

--HG--
extra : rebase_source : bcdf999ee10283853c7b0bda8f450a53990a0e1c
2017-10-30 09:42:56 +09:00
Andrew McCreight 298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Hiroyuki Ikezoe abef3a3a96 Bug 1409166 - Check whether the target animating frame is scrolled out of each scrollable ancestor. r=birtles,mattwoodrow
Before this patch, we had been checking each scrollable ancestor is scrolled
out of its scrollable ancestor.  So if the target animating frame is at the
bottom of its scrollable parent and if half of the scrollable parent is
scrolled out of its ancestor, the animating frame was considered as 'in-view'.

MozReview-Commit-ID: BDueuF3cT4I

--HG--
extra : rebase_source : de1dead6e67a44691887c8364be23734c3b1adef
2017-10-26 18:09:32 +09:00
Brian Birtles 525200b457 Bug 1411318 - Don't consider an animation playing if its timeline is inactive; r=hiro
When we receive animations on the compositor, we assert that either they're not
playing, or they have a resolved start and origin time.

However, on the main thread we determine if an animation is playing by checking
if it has a timeline, if it's in the correct state, and if it has a non-zero
playback rate.

The problem with this check is that if an animation has a timeline but it is
inactive, that is, its current time is null, we will not be able to get
a resolved origin time -- yet we will still report that is is playing.

This patch fixes this mismatch by treating animations with an inactive timeline
as "not playing".

The IsPlaying() method is used a number of call sites but it appears that they
all would expect an animation with an inactive timeline to be considered "not
playing". Furthermore, this makes IsPlaying() consistent with the check we do
for an active timeline in other functions such as Animation::Tick(),
TriggerNow(), SilentlySetCurrentTime(), UpdateFinishedState(),
and IsPossibleOrphanedPendingAnimation().


MozReview-Commit-ID: BQOBpHHFMoD

--HG--
extra : rebase_source : e84a50a16a61d48553610cb7ea0863f09ba86c60
2017-10-26 10:18:42 +09:00
Emilio Cobos Álvarez f3053729c9 Bug 1406750: Fix detection of animations to avoid flushing. r=hiro,birtles
This fixes multiple things:

 * EffectCompositor was using the light tree instead of the flat tree.

 * When we insert an element inside the document, we may not style it right away
   (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we
   trigger animations and transitions from the traversal, we can't skip flushing
   if we call getComputedStyle on any of those.

MozReview-Commit-ID: DpAhmLH3uJ2
2017-10-25 19:02:01 +02:00
Brian Birtles db9b84ee6c Bug 1407898 - Check if presContext is null before dereferencing in GetComputedKeyframeValues; r=hiro
There are no reliable steps to make this happen but it appears to have happened
at least twice during fuzzing. As a result, it doesn't matter too much what the
behavior here is as long as we don't crash.

MozReview-Commit-ID: 4gdiBL2wngU

--HG--
extra : rebase_source : 54afce721f8b59c2ad038e0c2222f64e71a9b917
2017-10-25 15:34:50 +09:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) 3fa03bb34e Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Hiroyuki Ikezoe be0c3c9792 Bug 1383239 - Don't throttle non-visible changes involved animations on out-of-view elements when they are newly in-effect. r=birtles
MozReview-Commit-ID: G9OL3pPZarr

--HG--
extra : rebase_source : 649211f4054eb3c62e993f0aafbb21a6ddd1a17a
2017-10-20 18:23:44 +09:00
Brian Birtles c38308c79b Bug 1398038 - Implement extended property-indexed keyframe syntax; r=bz,hiro
This implements the changes specified in these three spec changesets:

  8efd180bd9
  f43ecdfbe5
  a4f1ad1a60

MozReview-Commit-ID: KFhgZ5ip6BA

--HG--
extra : rebase_source : aa18f8e3fbcd5d96194ff9a5239a3c415622dc2f
2017-10-18 16:12:21 +09:00
Boris Chiou 22d25c4d73 Bug 1303235 - Part 3: Enable test_restyle.html and remove the early return in CanIgnoreIfNotVisible. r=hiro
MozReview-Commit-ID: LMKSVW2sh5N

--HG--
extra : rebase_source : 96d48acefeedaa5e9510ea51567b87439bb8f48e
2017-10-11 14:39:37 +08:00
Boris Chiou 80e5237e58 Bug 1303235 - Part 2: Templatize CalculateCumulativeChangeHint. r=hiro
MozReview-Commit-ID: JHSn7FoRPpW

--HG--
extra : rebase_source : f79dbf3b65bc20c13976e348cb9d192bd8b4bb4b
2017-10-12 16:12:54 +08:00
Brian Birtles fd4770f818 Bug 1406381 - Update the simple iteration progress calculation to match recent changes to the Web Animations specification; r=hiro
This implements the following change to the Web Animations specification:

  19b6c33cee

The background to that change is described in the corresponding spec issue:

  https://github.com/w3c/web-animations/issues/201

MozReview-Commit-ID: GGA64LG5vT

--HG--
extra : rebase_source : 92c2a60a250071926c2c998dbfadc5979b89cc0c
2017-10-13 12:31:21 +09:00
Brian Birtles 6334b49355 Bug 1282691 - Drop the assertion about an animation that we're making play-pending not already being pause-pending; r=boris
We could handle this case by dropping the animation from the pause-pending table
but that's an extra hashtable lookup that so far seems to be unnecessary.

I have verified that the crashtest added in this patch fails without the code
changes included here.

MozReview-Commit-ID: Ed6u7WRLD2t

--HG--
extra : rebase_source : 8b175ef2d06b4394f3c51f740a1d305aeea9ed04
2017-10-13 14:37:51 +09:00
Hiroyuki Ikezoe 2b54925c5c Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r=heycam
MozReview-Commit-ID: JJ2Jh1I6y4h

--HG--
extra : rebase_source : 99c458dfffee88103e5f2b01f9ff9ae0256b8c62
2017-10-11 10:00:37 +09:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Hiroyuki Ikezoe 9d610320fe Bug 1406284 - Remove unused parent context argument. r=heycam
MozReview-Commit-ID: A1yIOZ1bWjY

--HG--
extra : rebase_source : a4daa3466382b64f50256d1c081f886b98f4f80d
2017-10-06 13:51:02 +09:00
Brian Birtles 3afa921d85 Bug 1291413 - Fix assertion when resuming an Animation with both a start time and hold time; r=hiro
When we set the playback rate to zero on a play-pending animation that is
resuming from an aborted pause we can arrive in a state where both the start
time and hold time are resolved. However, we previously added an assertion that
only one of these is ever set at a time.

Part of the assertion is warranted since that method contains the following
code:

  if (mStartTime.IsNull()) {
    mStartTime = StartTimeFromReadyTime(aReadyTime);
    if (mPlaybackRate != 0) {
      mHoldTime.SetNull();
    }
  }

Here StartTimeFromReadyTime requires a non-null hold time. So either mStartTime
or mHoldTime needs to be non-null. The requirement that only one or the other be
non-null, however, is not in the spec and not necessary (as the test cases in
this bug show).

What this assertion does bring to light, however, is that in the case where we
have *both* the start time and the hold time, we need to consider whether to use
the start time as-is, or calculate it from the hold time.

I have filed the following spec issue for this:

  https://github.com/w3c/web-animations/issues/200



MozReview-Commit-ID: CTCT7Up1E5n

--HG--
extra : rebase_source : 95233f7cd2bc3c4bcc56615d8387fe54852986c1
2017-10-05 10:50:38 +09:00
Brian Birtles 02f8ed3fe4 Bug 1404774 - Defer throwing errors from parsing keyframe easing until after reading off all properties; r=hiro
As required by the recent spec change:

  d696468777

MozReview-Commit-ID: Ev6kUk1uLAY

--HG--
extra : rebase_source : 70f8ca3143a8b3bb4e03016b9989925d5a328049
2017-10-02 12:35:47 +09:00
Hiroyuki Ikezoe 653e15ba32 Bug 1403433 - Add another variant of SchedulePaint that does not call InvalidateRenderingObservers for PendingAnimationTracker. r=birtles
nsFrame::SchedulePaint() invokes InvalidateRenderingObservers, and
InvalidateRenderingObservers ends up posting change hints during we are
processing sequential tasks for animations, but we don't allow posting any
change hints while we are in the middle of restyling process.

Though the change hints posted by InvalidateRenderingObservers are not harmful
in this case since the change hints will be processed in a second post
traversal without problems.  That's said, InvalidateRenderingObservers stuff
should be processed in display list based invalidation anyway (bug 1284053).

MozReview-Commit-ID: GKVRZ98lvEN
2017-09-29 19:42:13 +09:00
Hiroyuki Ikezoe 9e9a01fd49 Bug 1402219 - Compute css variables with custom properties in keyframes for getKeyframes(). r=birtles
MozReview-Commit-ID: 7CMnWbzzemY

--HG--
extra : rebase_source : 977a2d4af632beef45906cb0eb1077fc48ccd4ed
2017-09-27 16:49:21 +09:00
Hiroyuki Ikezoe 56e08ccc96 Bug 1402219 - Check the length of returned keyframes of getKeyframes(). r=birtles
Otherwise, if getKeyframes() returns an empty array, we don't check each keyframes
at all.

MozReview-Commit-ID: LSBIgetZq2G

--HG--
extra : rebase_source : cc24d093a1e0c9223ac696e44d297602016189a2
2017-09-27 12:46:03 +09:00
Wei-Cheng Pan f3f406f76b Bug 1363805 - Part 3: Do lazy flushing if possible. r=heycam
Skips flushing current document if the target of getComputedDOMStyle cannot be
affected by any pending restyles.

MozReview-Commit-ID: C87HDIDvOth

--HG--
extra : rebase_source : 064880493f9aac2599689cdd0749200bb579c60b
2017-05-23 12:02:11 +08:00
Hiroyuki Ikezoe 933ef2c9ba Bug 1401809 - Use Atom::from(nsIAtom) to increment reference count in case of dynamic atom for will-change. r=xidorn
If we don't increment the reference count for the Atom in servo side, it's
possible to try to release the Atom in servo side even if we have already
released in gecko side.  When it happens, nsIAtom::mKind is no longer reliable.

MozReview-Commit-ID: GrxbcYxowRB

--HG--
extra : rebase_source : 94e054e3357b31e398e8e5e81522dab3019c561c
2017-09-21 15:50:37 +09:00
Brian Birtles 3b5522acdc Bug 1314537 - Drop comment reference to SharedKeyframeList; r=comment-only, DONTBUILD
This has been dropped from the spec in:

  17b14a7269

--HG--
extra : rebase_source : f0c824c5bd5bec7aefbc742830520a3a210468ef
2017-09-20 11:56:00 +09:00
Hiroyuki Ikezoe 121662e3ab Bug 1400022 - Crash test. r=hiro
MozReview-Commit-ID: 6voy0F9GwbC

--HG--
extra : rebase_source : 3a93c8ae1b88eab6cbfd4bc67f3e450080da1742
2017-09-19 13:58:31 +09:00
Hiroyuki Ikezoe e077bd95a1 Bug 1400022 - Backed out changeset 610fbd30a6a3 (bug 1397057). r=mattwoodrow
The SchedulePaint() ends up calling
nsSVGEffects::InvalidateDirectRenderingObservers, it doesn't need for retained
display list, and causes harmful restyle events for stylo.

We will call ScheulePaint without involing InvalidateDirectRenderingObservers
later in another bug.

MozReview-Commit-ID: 10V9JLHZmCs

--HG--
extra : rebase_source : 664718eb91e973a4619847e4bfa94327e410f364
2017-09-19 11:14:48 +09:00
Boris Chiou 7d37ae2816 Bug 1388601 - Part 2: Add tests of distance for Filter lists. r=hiro
MozReview-Commit-ID: 1asVvBnV93r

--HG--
extra : rebase_source : 72fe8c006970f8b002b63df982a6f54f773fc6fb
2017-09-14 15:21:47 +08:00
Boris Chiou f5d25a9abd Bug 1388601 - Part 1: Add tests of distance for Basic Shape. r=hiro
MozReview-Commit-ID: 8m5km7hVNvR

--HG--
extra : rebase_source : 513747aadf699fdd827d241d2caef072b5f6742b
2017-09-14 11:25:16 +08:00
Hiroyuki Ikezoe 37c05393f5 Bug 1398661 - Convert target element to the parent if the target element is pseudo in EffectCompositor::PreTraverseInSubtree/PreTraverse. r=emilio
MozReview-Commit-ID: Dl2gvkLpo4k

--HG--
extra : rebase_source : a741b8d1e10e111ab8255e50a56ad11041fe39f9
2017-09-14 06:22:40 +09:00
Boris Chiou 19ef8ca18f Bug 1392161 - Part 2: Update test expectation. r=xidorn
MozReview-Commit-ID: lURbKrREBp

--HG--
extra : rebase_source : 401a346acc551218d082ce47db4c89e984cb3f7f
2017-09-01 15:33:32 +08:00
Matt Woodrow a33c79d3b5 Bug 1397057 - Invalidate frames whenever we toggle an animation on the corresponding Element. r=birtles
MozReview-Commit-ID: GPGaRU9HxY6

--HG--
extra : rebase_source : 9029c46b539acec5206d8e32fad9fbf36e7ee51c
2017-09-12 14:13:10 -04:00
Hiroyuki Ikezoe c30d8acb21 Bug 1334582 - Check whether overall progress exceeds UINT64_MAX. r=boris
The overall progress is factored in iteration start, so even if
TimingParams.mIterations is less than UINT64_MAX, it will exceed UINT64_MAX.

MozReview-Commit-ID: CEOYAGsCoIE

--HG--
extra : rebase_source : 54ed450ebd0218ee2cac9f27125601c6575ee1a5
2017-09-12 08:42:54 +09:00
Hiroyuki Ikezoe b46966f3e8 Bug 1334582 - Use UINT64_MAX instead of IsInfinite() for checking whether TimingParans.mIterations is infinite or not. r=boris
Because our ComputedTiming.mCurrentIteration is uint64_t.

MozReview-Commit-ID: FjbhEvTUMr4

--HG--
extra : rebase_source : d8ba72c914aac6661f0a5a21885505f94844ce38
2017-09-12 08:42:45 +09:00
Hiroyuki Ikezoe eb4460d339 Bug 1397127 - Rewrite a test with async/await. r=birtles
MozReview-Commit-ID: Jdh4G022Gzd

--HG--
extra : rebase_source : d7359d344277ba8109c813a07fbe29b640789a21
2017-09-06 13:51:18 +09:00
Hiroyuki Ikezoe 84aff91995 Bug 1336772 - Request any restyles required by changes to the cascade result. r=birtles
When an animation is newly created while the same property transition is
running, the transition style rule persists until we call RequestRestyle() for
transitions level. That means if user calls getComputedStyle for the property
right after creating animation, the style obtained by getComputedStyle still
included the transitions level rule. As a result, the transitions level style
overrides newly created animation style until the next normal restyling process
happens (i.e. process transition level restyle request). Vice versa, in the
case where an animation is removed, transitions level style does not appear
until the next normal restyling.

This patch fixes this problem by trigerring a resyle of the transitions level
when an animation is created or removed.

MozReview-Commit-ID: HY6amLmDHTi

--HG--
extra : rebase_source : 67e58dc9a6c695299c3eef684bf7357153c5168b
2017-09-05 16:34:24 +09:00
Emilio Cobos Álvarez bf24bd8bc9 Bug 1395351: Use the style flattened tree in EffectCompositor::PreTraverseInSubtree. r=bholley
MozReview-Commit-ID: ATVxx8EXJWY

--HG--
extra : rebase_source : 8652e3f24335e5850ea7abae41e57a2397966d57
2017-09-01 19:28:01 +02:00
J. Ryan Stinnett 37f8066886 Bug 1395762 - Update Stylo check in file_restyling_xhr_doc.html. r=birtles
Automation also uses env vars to change the Stylo mode, so reading the pref is
not enough.  Change the test to `isStyledByServo` which covers all cases.

MozReview-Commit-ID: KLh42b4roF4

--HG--
extra : rebase_source : f77e78694d00489d4e5c7d7f4eaffca0610f128a
2017-08-31 18:57:25 -05:00
Boris Chiou 5a4b83f24b Bug 1393605 - Fix gecko assertion and add one crashtest. r=birtles
MozReview-Commit-ID: 44QIZ8SipWX

--HG--
extra : rebase_source : 764a560a322b9945365929a7bba6eac77f47b554
2017-08-31 11:11:09 +08:00
Boris Chiou f2076b6d4a Bug 1390039 - Add tests for mismatched transform lists and some other corner cases. r=birtles
MozReview-Commit-ID: ESchrGe6h9N

--HG--
extra : rebase_source : 099f3b882e7851519a998c51dde4ef9fdd44a998
2017-08-21 16:36:17 +08:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Mantaroh Yoshinaga c042d7aeea Bug 1366603 - Wait for rAF before waiting the MozAfterPaint in test_deferred_start.html. r=hiro
This test called waitForPaints() after creating an animation, but waitForPaints()
didn't wait for a MozAfterPaint event actually since
DOMWindowUtils.IsMozAfterPaintPending which is checked a MozAfterPaint event has
been queued return false[1]. (i.e. This test didn't wait for a MozAfterPaint)

This is related to bug 1341294. If gecko can receive a MozAfterPaint
corresponded to own paint, waitForPaint() does not need to check for
DOMWindowUtils.IsMozAfterPaintPending.

This patch is a workaround until bug 1341294 is resolved.

[1] http://searchfox.org/mozilla-central/rev/5696c3e525fc8222674eed6a562f5fcbe804c4c7/testing/mochitest/tests/SimpleTest/paint_listener.js#60

MozReview-Commit-ID: 6Rnv8MBP6Se

--HG--
extra : rebase_source : 052f62b01df819961040f6652954e1068f86fc47
2017-08-28 08:01:31 +09:00
Hiroyuki Ikezoe 18bae8b2e9 Bug 1394247 - Enable test_keyframeeffect-getkeyframes.html on stylo. r=birtles
MozReview-Commit-ID: A1Dth4dl87u

--HG--
extra : rebase_source : 6ca648a86d4ce1e159939b6f39bb632e01b0eca5
2017-08-28 05:56:25 +09:00
Tim Huang 5d6e73cb8d Bug 1382545 - Part 1: Rounding the time of Animation API to 100ms when 'privacy.resistFingerprinting'is true. r=arthuredelstein,birtles
Adopt from Tor #16337.

This patch makes Animation API to report a rounded time when 'privacy.resistFingerprinting'
is true. The Animation API uses AnimationUtils::TimeDurationToDouble() to convert
its time duration into a double value and reports it when someone tries to query
time through Animation API. So, we use nsRFPService::ReduceTimePrecisionAsMSecs()
inside this method to round the time in the scope of the millisecond.

MozReview-Commit-ID: 8o01G6AlAu9

--HG--
extra : rebase_source : e2d52f04c1d63accb786f6cf9b1a102607eed517
2017-08-17 22:37:29 +08:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Brian Birtles ac44c390db Bug 1385139 - Expand var() references in keyframes from CSS animations when serializing; r=hiro
This is a temporary step until we implement bug 1391537. It is needed to
maintain consistent behavior with Gecko and provide sensible output,
particularly in the case where we have longhands whose values are drawn from
unparsed shorthands.

MozReview-Commit-ID: 9aD2tsLagBp

--HG--
extra : rebase_source : cdabb26be17b96a574ea8b2e8093e11abb1af430
2017-08-21 12:35:35 +09:00
Boris Chiou 92c6add172 Bug 1389429 - Part 1: Add a test for rotate3d with the non-nomalizable direction vector. r=birtles
MozReview-Commit-ID: 70ZMe0QJbG5

--HG--
extra : rebase_source : f2e4a60cb7e8162ab50d990ccfe295b160bd3393
2017-08-16 11:19:38 +08:00
Hiroyuki Ikezoe 178b49d49e Bug 1390046 - Enable test_transform_limits.html on stylo. r=jdm
MozReview-Commit-ID: C5IJi3q6sLa
2017-08-19 11:15:50 +09:00
Emilio Cobos Álvarez aadc647248 Bug 1341102 - Update test_animation_properties.html after servo/servo#18131. r=bholley
calc() serialization in stylo changed to align to the spec more closely (modulo percentage order).

See the linked issue.

MozReview-Commit-ID: GyzZvdumMSe
2017-08-18 12:33:21 -04:00
Boris Chiou 7c301ac6aa Bug 1362896 - Part 2: Add a test for computation of distance of transform. r=birtles
MozReview-Commit-ID: 4WgZtyNlU4
2017-08-18 22:18:24 +08:00
Daisuke Akatsuka ee774b8c7a Bug 1390046: Fix test fail. r=hiro
In Servo, the max value for 'translate' is different from normal float since
is using Au ( AppUnit ). The value which we introduced as MAX_AU_PX
( 1.78957e+7 ) in this test is calculated by following mechanis.

1. Like this time, if the value is larger than max float, stored into specified
   value as infinity by parsing.
2. Then, when converts to the computed value Au from the specified value
   (infinity), ABSOLUTE_LENGTH_MAX (1 << 30) = 1073741824 stores into the Au.
   [1]
3. Finally, when get the PX value, returns the value which devided by
   AU_PER_PX ( 60 ). This value is 1.78957e+7.

[1] to_au_round() method
    https://searchfox.org/mozilla-central/source/servo/components/style/values/specified/length.rs#249

MozReview-Commit-ID: BVfDhOKXaWw

--HG--
extra : rebase_source : e55be1f42d9198c35bb8f29882ff19ec9de8f2fa
2017-08-18 14:12:54 +09:00
Hiroyuki Ikezoe 5c2f4171c6 Bug 1387951 - Enable test_discrete-animations.html on stylo. r=daisuke
MozReview-Commit-ID: HSUA9yMKC7b

--HG--
extra : rebase_source : 5e004fb78b301b680c6872463cafd07dc600924f
2017-08-15 06:57:40 +09:00
Daisuke Akatsuka 21fe68ef86 Bug 1389439 - Part 2: Enable test_underlying-discrete-value.html on stylo. r=hiro
MozReview-Commit-ID: 8zqUHnoZvee

--HG--
extra : rebase_source : b0c372cc5badb5b2d0661a478c6bc2905cb481d2
2017-08-15 12:38:45 +09:00
Daisuke Akatsuka 0b08d2f34b Bug 1389439 - Part 1: Use computed values as all expected values. r=hiro
The serialization of the value in getKeyframes() on both Gecko and Servo is
different, especially 'initial', 'inherit' and 'unset' on discrete animation.
Gecko returns those value as is, but Servo returns computed value.
We are understanding computed value (Servo) is right, so we change expected
values for them. Also, we skip them if this test is running on Gecko.

MozReview-Commit-ID: 4GFpCpec0eP

--HG--
extra : rebase_source : 8bb9fc670fb7ffd56935cdfb4f038be334782de7
2017-08-15 12:38:41 +09:00
Daisuke Akatsuka d6d4c04b81 Bug 1382138 - Part 2: Add -moz-appearance property to moz prefixed properties test. r=hiro
Since we made -moz-appearance animatable, append to the moz prefixed properties
test.

MozReview-Commit-ID: 9tdouU1umEB

--HG--
extra : rebase_source : 79e9639360461452249ce54ff538294f25b6cd4f
2017-08-14 16:27:05 +09:00
Hiroyuki Ikezoe fb03af5d7d Bug 1388031 - Process normal traversal for throttled animation flush as well. r=bholley
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 20:34:06 -07:00
Hiroyuki Ikezoe d041bd8493 Bug 1389450 - Use a valid value for -moz-force-broken-image test. r=daisuke
From the official link for -moz-force-broken-image:

 A value of 1 means that the broken image icon is even shown if the image has
 an alt attribute. A value of 0 only displays the alt attribute.

It's really ambiguous how we handle other values. Actually stylo's parser
rejects other values.  We should use the valid values for this test.

MozReview-Commit-ID: CzmIvsmauke

--HG--
extra : rebase_source : a6387e07b3578cf811bd17f772d791ec73bfa1e7
2017-08-11 20:19:43 +09:00
Hiroyuki Ikezoe 1cc55be690 Bug 1379516 - A test case that checks animations on the compositor keeps running on the compositor when unrelated style attribute is changed. r=birtles
MozReview-Commit-ID: 7fX6fRiZsw5

--HG--
extra : rebase_source : 8583a4633a7dc61dbfb2cbb4a5c647af7aa1da6e
2017-08-11 08:44:16 +09:00
Hiroyuki Ikezoe 80dfc0d6fb Bug 1379516 - Mark animation timerline marker for stylo. r=birtles
MozReview-Commit-ID: GkPSXEk4xua

--HG--
extra : rebase_source : 3fa0f5029bcfd87e9d6abfec9c6ea5d03a7656e6
2017-08-11 08:44:11 +09:00
Hiroyuki Ikezoe 94c7df914d Bug 1379516 - Add descriptions for re-attaching orphaned animation case for stylo. r=birtles
Unlike Gecko, Stylo currently invokes a needless RequestRestyle(Standard)
for this test case (bug 1388560). For this reason, the check right after
re-attaching the orphaned element passes accidentally.

MozReview-Commit-ID: JUG1dgMUQEX

--HG--
extra : rebase_source : a86d72a41c160edc30f83d82179ebe1226b842de
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe 6c56c62a1c Bug 1379516 - Update the test where an orphaned element is attached to a document. r=birtles
Actually we have a chance to run styling process when we attach an orphaned
element to a document in this test setup. Precisely, we can process a restyle
between rAF callbacks and Promise.then() callback for waitForAnimationFrames().
So if we call RequestRestyle(Layer) when we attach the element to the document
(bug 1388557), the animation starts restyling in the first frame. *BUT* this
behavior will also change once our micro tasks handling becomes the HTML spec
compliance (bug 1193394). When the micro tasks handling changes, we should also
fix a bunch of test cases and test utilities in bug 1388557.

MozReview-Commit-ID: GyH1ofGhXOP

--HG--
extra : rebase_source : 3536c315960150960fd43286b205c03c584d53ca
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe bc0c27d4eb Bug 1379516 - Skip offscreen throttling tests on stylo. r=birtles
MozReview-Commit-ID: F3k3snSRDJG

--HG--
extra : rebase_source : c982236d1871541796d0099b312231a22a9c879d
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe 46ef7fb2b9 Bug 1379516 - Add isStyledByServo(). r=birtles
DOMWindowUtils.isStyledByServo checks not only the preference value but also
STYLO_FORCE_ENABLED value. This is important especially when we run test on
our CI. On our CI, the preference value is false but just STYLO_FORCE_ENABLED
is set.

MozReview-Commit-ID: FKEd5LFwcxf

--HG--
extra : rebase_source : 1ffd8a68a8339babed14f441bf2d69c9ffd9e3ee
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe 393dc8eb24 Bug 1379516 - Get dom.animations.offscreen-throttling preference value just once at startup. r=birtles
MozReview-Commit-ID: KiZ3SRrsCOx

--HG--
extra : rebase_source : e63cd9e2c8c28d3e7c90c3c17fb25ea9844c3fe7
2017-08-11 08:43:45 +09:00
Hiroyuki Ikezoe 1545907066 Bug 1388209 - Enable test_animation_observers_async.html on stylo. r=birtles
It has been able to pass on stylo since bug 1376248.

MozReview-Commit-ID: 142ptKlqrHe

--HG--
extra : rebase_source : 3bb601122b1593d87a520d3585cc84c0868d6ac8
2017-08-08 11:04:02 +09:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Brad Werth d073eb9bda Bug 1383296 Part 1: Remove all uses of the nsCSSValue::Serialization enum, now that it no longer has multiple values. r=heycam
MozReview-Commit-ID: n6px5hNHtB

--HG--
extra : rebase_source : 6269a9d52e0282d0391276dc1b9ee26dbde7b985
2017-07-21 17:26:35 -07:00
Boris Chiou 7c6e2bd80c Bug 1383998 - Enable dom/animation/test/css-transitions/test_element-get-animations.html. r=heycam
MozReview-Commit-ID: Dbr3XpkZk20

--HG--
extra : rebase_source : 8f630e1f0d06c2dddeadcc6ab340989e93914595
2017-08-02 11:54:04 +08:00
Hiroyuki Ikezoe 16b042e1e5 Bug 1367975 - Call RequestRestyle(Layer) when specified timing is changed for CSS animations. r=birtles
Current Gecko does not need this (see bug 1367975 comment 10 for the reason),
but this is the right thing to do for our animation styling machinery
especially for updating animations on the compositor.


MozReview-Commit-ID: H6mgTXMHecG

--HG--
extra : rebase_source : ef2e5127a5c56008771a434cc5c342ebeca1b7be
2017-08-03 06:34:38 +09:00
Mantaroh Yoshinaga 2552a3af16 Bug 1377541 - Change the order of serialized value for mochitest. r=birtles
MozReview-Commit-ID: 1zL93y3Lkxd

--HG--
extra : rebase_source : c49f368e548bafb75474e0d21725c87ddcc453e5
2017-08-01 23:20:35 +09:00
Emilio Cobos Álvarez 1a47c01765 Bug 1384542: Move GetParent and IsLinkContext to GeckoStyleContext. r=heycam
MozReview-Commit-ID: C19yGcphixX
2017-07-31 14:32:59 +02:00
Xidorn Quan c4c6fbf75a Bug 1383980 - Enable animation mochitests in mochitest-style task. r=birtles
MozReview-Commit-ID: 38Ir2MG7IMO

--HG--
extra : rebase_source : 0997b7026a24cc271ad977db5ce233c393554dfa
2017-07-25 14:17:04 +10:00
Cameron McCormack f6934ef88b Bug 1376248 - Part 2: Allow tree_ordering sub-test to generate records in any order when simultaneously starting animations. r=birtles
MozReview-Commit-ID: AHkOA7DrXji

--HG--
extra : rebase_source : da38bba8839fe2743bfca3f96d1604dd0fb9b929
2017-07-24 16:03:42 +08:00