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

1449 Коммитов

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