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

529 Коммитов

Автор SHA1 Сообщение Дата
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
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