Commit Graph

1608 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

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

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Jonathan Watt
f3e6656403 Bug 1447367 - Remove files that are not built when MOZ_OLD_STYLE is not defined. r=emilio
MozReview-Commit-ID: D9bEPfTSw61
2018-03-07 18:08:41 +00:00
Emilio Cobos Álvarez
f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Hiroyuki Ikezoe
df1a0e7203 Bug 1444177 - Tweak expected restyle count for the test case where finite animation is unthrottled in out-of-view element. r=birtles
It might be possible that the animation does not start being restyled in the
initial frame.  Eventually we should drop tweakExpectedRestyleCount in bug
1425778 and replace it with a function that waits for animation.ready and waits
to start being restyled something like this;

  async function waitForAnimationReadyToBeRestyled(aAnimation) {
    await aAnimation.ready;

    if (animationStartsRightNow(aAnimation)) {
      await waitForFrame();
    }
  }

MozReview-Commit-ID: ByN25hMAK76

--HG--
extra : rebase_source : 6dd3a44661905ffff7bce748540572df2d40425b
2018-03-19 12:46:23 +09:00
Brian Birtles
ee9982905f Bug 1420320 - Drop dom.animations-api.pending-member.enabled pref; r=bz,hiro
This pref was introduced in case we encountered compatibility issues from
changing the return value of Animation.playState (bug 1412765). Now that the
change to Animation.playState has shipped to release channel without any known
problems we should drop this pref.

MozReview-Commit-ID: CwMWRRtIf6u

--HG--
extra : rebase_source : b26c59a51880406c2b94baad8da2eafeb3ae3202
2018-03-16 12:49:55 +09:00
Tom Ritter
88fc3fb4ea Bug 1440195 Address CSS Animations r=birtles
For now, we are going to make _all_ CSS Animations related timer fuzzing
only applicable in Resist Fingerprinting Mode (addressing the last couple
that had not already been configured that way.)

We hardcode their content mix-ins as zero, but leave comments indicating
how they should behave.

MozReview-Commit-ID: KhmV7wO8Pt5

--HG--
extra : rebase_source : 3b087d40b6332d447b442b435ed6fee8993e0145
2018-03-05 15:58:46 -06:00
Mantaroh Yoshinaga
ce9138a07e Bug 1419226 - Part 2. 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 : ff1ccb0ab155ad7e782ecf43f7768ea67f9b9bcf
2018-03-14 13:27:16 +09:00
Brian Birtles
be4db82113 Bug 1382841 - Rename some test files in dom/animation/test/mozilla to use _ to separate words; r=hiro
This naming convention is described fully in this changeset's grandparent.

MozReview-Commit-ID: 5EBpVrOdxD2

--HG--
rename : dom/animation/test/mozilla/file_discrete-animations.html => dom/animation/test/mozilla/file_discrete_animations.html
rename : dom/animation/test/mozilla/test_discrete-animations.html => dom/animation/test/mozilla/test_discrete_animations.html
rename : dom/animation/test/mozilla/test_moz-prefixed-properties.html => dom/animation/test/mozilla/test_moz_prefixed_properties.html
2018-03-12 16:08:36 +09:00
Brian Birtles
5afe0fbdff Bug 1382841 - Rename test_XXX_to_rename.html files in dom/animation/test to test_XXX.html; r=hiro
See the description in this changeset's parent which describes why we do this in
two steps.

MozReview-Commit-ID: GtO0SCb0UOF

--HG--
rename : dom/animation/test/css-animations/test_animation-cancel_to_rename.html => dom/animation/test/css-animations/test_animation-cancel.html
rename : dom/animation/test/css-animations/test_animation-computed-timing_to_rename.html => dom/animation/test/css-animations/test_animation-computed-timing.html
rename : dom/animation/test/css-animations/test_animation-currenttime_to_rename.html => dom/animation/test/css-animations/test_animation-currenttime.html
rename : dom/animation/test/css-animations/test_animation-finish_to_rename.html => dom/animation/test/css-animations/test_animation-finish.html
rename : dom/animation/test/css-animations/test_animation-finished_to_rename.html => dom/animation/test/css-animations/test_animation-finished.html
rename : dom/animation/test/css-animations/test_animation-id_to_rename.html => dom/animation/test/css-animations/test_animation-id.html
rename : dom/animation/test/css-animations/test_animation-pausing_to_rename.html => dom/animation/test/css-animations/test_animation-pausing.html
rename : dom/animation/test/css-animations/test_animation-playstate_to_rename.html => dom/animation/test/css-animations/test_animation-playstate.html
rename : dom/animation/test/css-animations/test_animation-ready_to_rename.html => dom/animation/test/css-animations/test_animation-ready.html
rename : dom/animation/test/css-animations/test_animation-reverse_to_rename.html => dom/animation/test/css-animations/test_animation-reverse.html
rename : dom/animation/test/css-animations/test_animation-starttime_to_rename.html => dom/animation/test/css-animations/test_animation-starttime.html
rename : dom/animation/test/css-animations/test_animations-dynamic-changes_to_rename.html => dom/animation/test/css-animations/test_animations-dynamic-changes.html
rename : dom/animation/test/css-animations/test_cssanimation-animationname_to_rename.html => dom/animation/test/css-animations/test_cssanimation-animationname.html
rename : dom/animation/test/css-animations/test_document-get-animations_to_rename.html => dom/animation/test/css-animations/test_document-get-animations.html
rename : dom/animation/test/css-animations/test_effect-target_to_rename.html => dom/animation/test/css-animations/test_effect-target.html
rename : dom/animation/test/css-animations/test_element-get-animations_to_rename.html => dom/animation/test/css-animations/test_element-get-animations.html
rename : dom/animation/test/css-animations/test_event-dispatch_to_rename.html => dom/animation/test/css-animations/test_event-dispatch.html
rename : dom/animation/test/css-animations/test_event-order_to_rename.html => dom/animation/test/css-animations/test_event-order.html
rename : dom/animation/test/css-animations/test_keyframeeffect-getkeyframes_to_rename.html => dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-animations/test_pseudoElement-get-animations_to_rename.html => dom/animation/test/css-animations/test_pseudoElement-get-animations.html
rename : dom/animation/test/css-animations/test_setting-effect_to_rename.html => dom/animation/test/css-animations/test_setting-effect.html
rename : dom/animation/test/css-transitions/test_animation-cancel_to_rename.html => dom/animation/test/css-transitions/test_animation-cancel.html
rename : dom/animation/test/css-transitions/test_animation-computed-timing_to_rename.html => dom/animation/test/css-transitions/test_animation-computed-timing.html
rename : dom/animation/test/css-transitions/test_animation-currenttime_to_rename.html => dom/animation/test/css-transitions/test_animation-currenttime.html
rename : dom/animation/test/css-transitions/test_animation-finished_to_rename.html => dom/animation/test/css-transitions/test_animation-finished.html
rename : dom/animation/test/css-transitions/test_animation-pausing_to_rename.html => dom/animation/test/css-transitions/test_animation-pausing.html
rename : dom/animation/test/css-transitions/test_animation-ready_to_rename.html => dom/animation/test/css-transitions/test_animation-ready.html
rename : dom/animation/test/css-transitions/test_animation-starttime_to_rename.html => dom/animation/test/css-transitions/test_animation-starttime.html
rename : dom/animation/test/css-transitions/test_csstransition-transitionproperty_to_rename.html => dom/animation/test/css-transitions/test_csstransition-transitionproperty.html
rename : dom/animation/test/css-transitions/test_document-get-animations_to_rename.html => dom/animation/test/css-transitions/test_document-get-animations.html
rename : dom/animation/test/css-transitions/test_effect-target_to_rename.html => dom/animation/test/css-transitions/test_effect-target.html
rename : dom/animation/test/css-transitions/test_element-get-animations_to_rename.html => dom/animation/test/css-transitions/test_element-get-animations.html
rename : dom/animation/test/css-transitions/test_event-dispatch_to_rename.html => dom/animation/test/css-transitions/test_event-dispatch.html
rename : dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes_to_rename.html => dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
rename : dom/animation/test/css-transitions/test_pseudoElement-get-animations_to_rename.html => dom/animation/test/css-transitions/test_pseudoElement-get-animations.html
rename : dom/animation/test/css-transitions/test_setting-effect_to_rename.html => dom/animation/test/css-transitions/test_setting-effect.html
rename : dom/animation/test/document-timeline/test_document-timeline_to_rename.html => dom/animation/test/document-timeline/test_document-timeline.html
rename : dom/animation/test/mozilla/test_cubic_bezier_limits_to_rename.html => dom/animation/test/mozilla/test_cubic_bezier_limits.html
rename : dom/animation/test/mozilla/test_disabled_properties_to_rename.html => dom/animation/test/mozilla/test_disabled_properties.html
rename : dom/animation/test/mozilla/test_hide_and_show_to_rename.html => dom/animation/test/mozilla/test_hide_and_show.html
rename : dom/animation/test/mozilla/test_restyling_xhr_doc_to_rename.html => dom/animation/test/mozilla/test_restyling_xhr_doc.html
rename : dom/animation/test/mozilla/test_transform_limits_to_rename.html => dom/animation/test/mozilla/test_transform_limits.html
rename : dom/animation/test/style/test_animation-seeking-with-current-time_to_rename.html => dom/animation/test/style/test_animation-seeking-with-current-time.html
rename : dom/animation/test/style/test_animation-seeking-with-start-time_to_rename.html => dom/animation/test/style/test_animation-seeking-with-start-time.html
rename : dom/animation/test/style/test_animation-setting-effect_to_rename.html => dom/animation/test/style/test_animation-setting-effect.html
rename : dom/animation/test/style/test_composite_to_rename.html => dom/animation/test/style/test_composite.html
rename : dom/animation/test/style/test_missing-keyframe-on-compositor_to_rename.html => dom/animation/test/style/test_missing-keyframe-on-compositor.html
rename : dom/animation/test/style/test_missing-keyframe_to_rename.html => dom/animation/test/style/test_missing-keyframe.html
2018-03-12 16:08:35 +09:00
Brian Birtles
d0f7ad72a1 Bug 1382841 - Remove old test_XXX openers from dom/animation/test/**; r=hiro
We rename the file_XXX contents to test_XXX_to_rename so that these tests keep
running (so long as they begin with file_ and not test_ the test harness will
refuse to run them). If we rename these files to test_XXX in the same patch
Mercurial will not treat this as a rename and so we will lose the history
associated with file_XXX.

Instead, we rename test_XXX_to_rename to test_XXX in the next patch in this
series and by doing this Mercurial will treat this as two rename operations and
`hg log -f test_XXX` will show the history file_XXX as well.

One minor exception to this occurs due to the fact that we have two naming
conventions:

  (a) For tests in css-animations, css-transitions, style etc.

      Most of these tests should eventually land in web-platform-tests. However,
      in many cases that's not yet possible because, for example, CSS
      Animations 2 does not yet specify the behavior tested by the
      css-animations tests.

      For tests in web-platform-tests we generally separate words using -.
      However, our mochitest running machinery requires that tests begin with
      test_. Hence we name tests: test_abc-def-ghi.html.

  (b) For tests in mozilla

      These tests are never intended to be part of web-platform-tests and
      generally for mochitests we use _ to separate words (hence the test_
      prefix). Hence we name these tests test_abc_def_ghi.html

Now, there are some tests in the 'mozilla' directory that use the (a) naming
scheme instead of (b). In this case, instead of renaming file_xxx-xxx.html to
test_xxx-xxx_to_rename.html in this patch, and then renaming
test_xxx-xxx_to_rename.html to test_xxx-xxx.html in a second patch, we can just
delete test_xxx-xxx.html and rename file_xxx-xxx.html to test_xxx_xxx.html in
the one patch and Mercurial will recognize this as a rename because the file
names don't overlap.

MozReview-Commit-ID: Etcdmyfx0zf

--HG--
rename : dom/animation/test/css-animations/file_animation-cancel.html => dom/animation/test/css-animations/test_animation-cancel_to_rename.html
rename : dom/animation/test/css-animations/file_animation-computed-timing.html => dom/animation/test/css-animations/test_animation-computed-timing_to_rename.html
rename : dom/animation/test/css-animations/file_animation-currenttime.html => dom/animation/test/css-animations/test_animation-currenttime_to_rename.html
rename : dom/animation/test/css-animations/file_animation-finish.html => dom/animation/test/css-animations/test_animation-finish_to_rename.html
rename : dom/animation/test/css-animations/file_animation-finished.html => dom/animation/test/css-animations/test_animation-finished_to_rename.html
rename : dom/animation/test/css-animations/file_animation-id.html => dom/animation/test/css-animations/test_animation-id_to_rename.html
rename : dom/animation/test/css-animations/file_animation-pausing.html => dom/animation/test/css-animations/test_animation-pausing_to_rename.html
rename : dom/animation/test/css-animations/file_animation-playstate.html => dom/animation/test/css-animations/test_animation-playstate_to_rename.html
rename : dom/animation/test/css-animations/file_animation-ready.html => dom/animation/test/css-animations/test_animation-ready_to_rename.html
rename : dom/animation/test/css-animations/file_animation-reverse.html => dom/animation/test/css-animations/test_animation-reverse_to_rename.html
rename : dom/animation/test/css-animations/file_animation-starttime.html => dom/animation/test/css-animations/test_animation-starttime_to_rename.html
rename : dom/animation/test/css-animations/file_animations-dynamic-changes.html => dom/animation/test/css-animations/test_animations-dynamic-changes_to_rename.html
rename : dom/animation/test/css-animations/file_cssanimation-animationname.html => dom/animation/test/css-animations/test_cssanimation-animationname_to_rename.html
rename : dom/animation/test/css-animations/file_document-get-animations.html => dom/animation/test/css-animations/test_document-get-animations_to_rename.html
rename : dom/animation/test/css-animations/file_effect-target.html => dom/animation/test/css-animations/test_effect-target_to_rename.html
rename : dom/animation/test/css-animations/file_element-get-animations.html => dom/animation/test/css-animations/test_element-get-animations_to_rename.html
rename : dom/animation/test/css-animations/file_event-dispatch.html => dom/animation/test/css-animations/test_event-dispatch_to_rename.html
rename : dom/animation/test/css-animations/file_event-order.html => dom/animation/test/css-animations/test_event-order_to_rename.html
rename : dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html => dom/animation/test/css-animations/test_keyframeeffect-getkeyframes_to_rename.html
rename : dom/animation/test/css-animations/file_pseudoElement-get-animations.html => dom/animation/test/css-animations/test_pseudoElement-get-animations_to_rename.html
rename : dom/animation/test/css-animations/file_setting-effect.html => dom/animation/test/css-animations/test_setting-effect_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-cancel.html => dom/animation/test/css-transitions/test_animation-cancel_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-computed-timing.html => dom/animation/test/css-transitions/test_animation-computed-timing_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-currenttime.html => dom/animation/test/css-transitions/test_animation-currenttime_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-finished.html => dom/animation/test/css-transitions/test_animation-finished_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-pausing.html => dom/animation/test/css-transitions/test_animation-pausing_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-ready.html => dom/animation/test/css-transitions/test_animation-ready_to_rename.html
rename : dom/animation/test/css-transitions/file_animation-starttime.html => dom/animation/test/css-transitions/test_animation-starttime_to_rename.html
rename : dom/animation/test/css-transitions/file_csstransition-transitionproperty.html => dom/animation/test/css-transitions/test_csstransition-transitionproperty_to_rename.html
rename : dom/animation/test/css-transitions/file_document-get-animations.html => dom/animation/test/css-transitions/test_document-get-animations_to_rename.html
rename : dom/animation/test/css-transitions/file_effect-target.html => dom/animation/test/css-transitions/test_effect-target_to_rename.html
rename : dom/animation/test/css-transitions/file_element-get-animations.html => dom/animation/test/css-transitions/test_element-get-animations_to_rename.html
rename : dom/animation/test/css-transitions/file_event-dispatch.html => dom/animation/test/css-transitions/test_event-dispatch_to_rename.html
rename : dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html => dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes_to_rename.html
rename : dom/animation/test/css-transitions/file_pseudoElement-get-animations.html => dom/animation/test/css-transitions/test_pseudoElement-get-animations_to_rename.html
rename : dom/animation/test/css-transitions/file_setting-effect.html => dom/animation/test/css-transitions/test_setting-effect_to_rename.html
rename : dom/animation/test/document-timeline/file_document-timeline.html => dom/animation/test/document-timeline/test_document-timeline_to_rename.html
rename : dom/animation/test/mozilla/file_cubic_bezier_limits.html => dom/animation/test/mozilla/test_cubic_bezier_limits_to_rename.html
rename : dom/animation/test/mozilla/file_disabled_properties.html => dom/animation/test/mozilla/test_disabled_properties_to_rename.html
rename : dom/animation/test/mozilla/file_document-timeline-origin-time-range.html => dom/animation/test/mozilla/test_document_timeline_origin_time_range.html
rename : dom/animation/test/mozilla/file_hide_and_show.html => dom/animation/test/mozilla/test_hide_and_show_to_rename.html
rename : dom/animation/test/mozilla/file_restyling_xhr_doc.html => dom/animation/test/mozilla/test_restyling_xhr_doc_to_rename.html
rename : dom/animation/test/mozilla/file_set-easing.html => dom/animation/test/mozilla/test_set_easing.html
rename : dom/animation/test/mozilla/file_transform_limits.html => dom/animation/test/mozilla/test_transform_limits_to_rename.html
rename : dom/animation/test/mozilla/file_underlying-discrete-value.html => dom/animation/test/mozilla/test_underlying_discrete_value.html
rename : dom/animation/test/style/file_animation-seeking-with-current-time.html => dom/animation/test/style/test_animation-seeking-with-current-time_to_rename.html
rename : dom/animation/test/style/file_animation-seeking-with-start-time.html => dom/animation/test/style/test_animation-seeking-with-start-time_to_rename.html
rename : dom/animation/test/style/file_animation-setting-effect.html => dom/animation/test/style/test_animation-setting-effect_to_rename.html
rename : dom/animation/test/style/file_composite.html => dom/animation/test/style/test_composite_to_rename.html
rename : dom/animation/test/style/file_missing-keyframe-on-compositor.html => dom/animation/test/style/test_missing-keyframe-on-compositor_to_rename.html
rename : dom/animation/test/style/file_missing-keyframe.html => dom/animation/test/style/test_missing-keyframe_to_rename.html
2018-03-12 16:08:35 +09:00
Daniel Holbert
408bfa9bf0 Bug 1444481 part 1: Add some needed #includes to ComputedTimingFunction.h and FrameMetrics.h. r=xidorn
(This is a helper patch -- I'm splitting this into its own patch since it's
changing files in other directories, and also so that the main patches here
can be a bit more direct.)

Without this change, the other patches in this series would cause compile
failures in the headers that I'm fixing up here (because the other patches will
be removing #includes from some headers that these files were inadvertently
depending on).

As of this patch, ComputedTimingFunction.h will now be including:
 - nsDebug.h to provide NS_ASSERTION
 - nsStringFwd.h to provide a forward-declaration for "nsAString&"
 - Assertions.h to provide MOZ_ASSERT
 - Maybe.h to provide Maybe<ComputedTimingFunction>
(I think it's been leaning on nsTimingFunction.h's include of nsString.h to
indirectly provide these.)

FrameMetrics.h will now be including:
 - PLDHashTable.h to provide PLDHashNumber
(I think it's been leaning on nsStyleCoord.h/nsStyleConsts.h to indirectly
provide this.)

MozReview-Commit-ID: AoFoEe9GisK

--HG--
extra : rebase_source : 63c69343acaf42511ebdeb0238f4385a0c6345a5
2018-03-09 11:52:02 -08:00
Hiroyuki Ikezoe
93d38258f6 Bug 1442817 - Don't flush throttled animations on getAnimations(). r=birtles
If the element has throttled animations that will be affected by pending style
changes, the throttled animations will be updated though sequential tasks after
normal styling process.  E.g. UpdateEffectProperties, UpdateCascadeResults etc.
So we don't need to flush them in advance of the sequential tasks.

The first test case in this patch fails without this fix.

MozReview-Commit-ID: GystAqK2bQE

--HG--
extra : rebase_source : c01160e14bb5a2984dcc4d63ec44d4d465b829a2
2018-03-09 09:38:40 +09:00
Hiroyuki Ikezoe
a4c94de97f Bug 1442817 - Introduce a function to observe synchronous restyling easily. r=birtles
In the subsequent patch, we want to observe animation restyles caused by
synchronous styling.  If we used the original asynchronous observer for that,
we will observe restyles in normal scheduled styling, it's bit confusing.

MozReview-Commit-ID: 1V2IavKNECG

--HG--
extra : rebase_source : ee112acf2426ecf54435f77b8801a6228318459c
2018-03-09 06:41:35 +09:00
Hiroyuki Ikezoe
e6806e41d7 Bug 1444221 - #ifdef out some animation related stuff for MOZ_OLD_STYLE. r=xidorn
MozReview-Commit-ID: 9VC4qUbO6uK

--HG--
extra : rebase_source : 79113eb99cd784dc9a591bb9529381a932f07f97
2018-03-09 07:09:44 +09:00
Hiroyuki Ikezoe
6f36308ec8 Bug 1443423 - Drop Animation::PauseNoUpdate(). r=birtles
CSSTransition still uses PlayNoUpdate().

MozReview-Commit-ID: 5RHSXwaKYV2

--HG--
extra : rebase_source : f8edbe2ebf02fbc7e77f99f0064b2a65a5ae3cd4
2018-03-07 11:48:35 +09:00
Hiroyuki Ikezoe
573dfe44a6 Bug 1437272 - Don't throttle finite transform animations in out-of-view element. r=birtles
Transform animation in out-of-view element might move in visible area so if we
throttle it the transform animation might come in view suddenly.  So we don't
throttle transform animations in ouf-of-view element anymore if it's not
infinite.  Finite animations don't last so that they won't consume CPU so much
time.

MozReview-Commit-ID: HaMjmxqXPIK

--HG--
extra : rebase_source : 1c008e4e435bcc9c1ad8fcc84667080247c0b161
2018-03-08 18:22:45 +09:00
Hiroyuki Ikezoe
9e80d1d901 Bug 1437272 - Drop AnimationEffectReadOnly::IsActiveDurationZero(). r=birtles
It's no longer used since bug 1305325.
https://hg.mozilla.org/integration/autoland/rev/60857c37bcfa

MozReview-Commit-ID: JapMYQOTDSv

--HG--
extra : rebase_source : 7b3f9050be93b5f45e236f4001502f11bff86a4e
2018-03-08 18:22:45 +09:00
Hiroyuki Ikezoe
be2fe6bf8c Bug 1437272 - Split nsTimingFunction into an independent header file. r=birtles
So that we don't need to include nsStyleStruct.h in gfx any more.

MozReview-Commit-ID: 6nOaAbssLCz

--HG--
extra : rebase_source : 9c195c90277a4584dc14a6949e9eea53bcd8487c
2018-03-08 18:22:45 +09:00
Hiroyuki Ikezoe
97b67fe961 Bug 1442150 - Re-enable test_running_on_compositor.html on Android. r=birtles
Now the test works fine with the new microtask handling.

MozReview-Commit-ID: EhFcN2XAClw

--HG--
extra : rebase_source : f1066bf09df07c1bcbfe5dc5dcc59596530424d0
2018-03-06 11:01:49 +09:00
Hiroyuki Ikezoe
795bd7d475 Bug 1442150 - Wait for one more frame if the animation starts at the current timeline time in the first test case. r=birtles
MozReview-Commit-ID: DVOiauPDqhM

--HG--
extra : rebase_source : 2e9dfd0b7dbef48e92fbe48a5166ec6f3aafcabf
2018-03-06 10:55:05 +09:00
Hiroyuki Ikezoe
16a0b8373a Bug 1442150 - Move startsRightNow into testcommon.js and rename it to animationStartsRightNow. r=birtles
MozReview-Commit-ID: 58umbOjy4di

--HG--
extra : rebase_source : eb6810658f09c848c38e11f7872fb7326021f1a3
2018-03-06 10:35:26 +09:00
Hiroyuki Ikezoe
4bc9a2e83a Bug 1442150 - Rewrite test_running_on_compositor.html with async/await. r=birtles
MozReview-Commit-ID: Cdk7kQWcbXU

--HG--
extra : rebase_source : cc9b0e753c6b7804c7f0233cab0a2d3135118f28
2018-03-06 10:35:26 +09:00
Hiroyuki Ikezoe
0206c630c9 Bug 1428693 - Use GetOverflowAreasRelativeToSelf() instead of GetOverflowAreas() for scrollable parent. r=mattwoodrow
Because the scrollable parent might be transformed by its ancestors.

MozReview-Commit-ID: FuCPLg54z7h

--HG--
extra : rebase_source : 7c11c5384d2aed6c663b915fcacae7c627052a43
2018-03-05 07:55:32 +09:00
Olli Pettay
2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Csoregi Natalia
1fd0486e23 Backed out 7 changesets (bug 1193394) for browser-chrome failures on browser_ext_popup_background.js. CLOSED TREE
Backed out changeset 9683f24ff8ec (bug 1193394)
Backed out changeset 0e7140a7c841 (bug 1193394)
Backed out changeset a0e26f6b2784 (bug 1193394)
Backed out changeset 29e1fceaf48d (bug 1193394)
Backed out changeset b8632bbbd273 (bug 1193394)
Backed out changeset a54ef2d8f896 (bug 1193394)
Backed out changeset 55c94c05c57f (bug 1193394)
2018-03-01 16:29:02 +02:00
Olli Pettay
b7726493fb Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Hiroyuki Ikezoe
a1d3f36a83 Bug 1442150 - Skip test_running_on_compositor.html on Android. r=arai
It seems that the test starts failing after bug 1193394.
2018-03-01 00:06:00 +09:00
Hiroyuki Ikezoe
6d345d0f0c Bug 1439485 - Don't try to unthrottle transform animations that don't affect overflow region. r=birtles
MozReview-Commit-ID: AtQPiPnsC3z

--HG--
extra : rebase_source : fd9ee5f5a863237c7993d771e30c20921fe86ae2
2018-02-27 14:46:32 +09:00
Nathan Froyd
821df39aef Bug 1439723 - use a temporary in Animation::Tick(); r=mattwoodrow 2018-02-26 11:08:55 -05:00
Emilio Cobos Álvarez
7dffe29d8f Bug 1432490: Make nsComputedDOMStyle::GetStyleContext / GetStyleContextNoFlush not take a presShell. r=bz
Everyone calls them with the shell of the current composed document, and this
allows the multi-presShell stuff to just be in UpdateCurrentStyleSources /
DoGetStyleContextNoFlush.

The only reason we need to use OwnerDoc()->GetShell() instead of the composed
doc in GetStyleContext / GetStyleContextNoFlush is Element::GetBindingURL, which
does expect to get the binding URL for stuff outside of the composed doc (and
changing that gave me a useless browser).

That's technically a behavior change on the cases that used to pass nullptr, but
I think all callers are fine with that. I could also just add a special function
for that particular case, it may be worth it.

MozReview-Commit-ID: 2XlnkgdgDCK
2018-02-25 02:23:59 +01:00
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