Commit Graph

2117 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
3f5ea943fb Bug 1618446 - Clear runningOnCompositor flag in the case where WebRenderAnimationData is destroyed. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D80341
2020-06-22 20:46:31 +00:00
Emilio Cobos Álvarez
ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Andi-Bogdan Postelnicu
c46fedc85f Bug 1626532 - Make dom/animation buildable outside of unified-build environment. r=birtles
Differential Revision: https://phabricator.services.mozilla.com/D69161
2020-06-02 10:31:46 +00:00
Masatoshi Kimura
b9a2ffc214 Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-31 03:41:03 +00:00
Mihai Alexandru Michis
37ef8a125d Backed out changeset a845717e4d10 (bug 1482279) for causing multiple failures.
CLOSED TREE
2020-05-23 02:22:20 +03:00
Masatoshi Kimura
0701e89b7e Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-22 21:46:25 +00:00
Emilio Cobos Álvarez
e485c5c372 Bug 1630919 - Do not throttle an effect due to opacity if the frame is animating opacity itself. r=hiro
When transitioning visibility and opacity at the same time, we create
two effects, one animating opacity, and one visibility.

We're incorrectly throttling the visibility animation due to opacity,
because _that_ effect is not animating opacity, but the other one is and
thus doesn't get throttled.

Use HasAnimationOfOpacity() to check for this case. This is slightly
sketchy, because the first time we get through there we may not even
have started the opacity animation yet. However it kinda works, because
the fact that there's a (non-throttled, because of the
aEffect.HasOpacityChange()) opacity animation means that we'll tick both
of them, and unthrottle them next frame.

This seems better than the alternative which is never throttling
animations in opacity: 0 roots.

Differential Revision: https://phabricator.services.mozilla.com/D76405
2020-05-21 23:12:26 +00:00
Emily McDonough
0ee5c5dc91 Bug 1626794 - Add strong ref to document and MOZ_CAN_RUN_SCRIPT annotation to Animation::CommitStyles r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D75418
2020-05-17 20:47:37 +00:00
Emily McDonough
c161bb67d3 Bug 1564128 part 2 - Copy animations to static document clones r=emilio,hiro
This also requires changing the EffectCompositor to allow animations in print
and print preview, and setting up a document timeline for the cloned document

Differential Revision: https://phabricator.services.mozilla.com/D69069
2020-05-14 19:41:03 +00:00
Emily McDonough
fe1836fe09 Bug 1564128 part 1 - Add clone function for Animation and constructor for KeyframeEffect to copy properties but not the target. r=hiro
This is needed for copying animations from an original document to a static
clone during printing/print preview.

Differential Revision: https://phabricator.services.mozilla.com/D73139
2020-05-14 19:41:01 +00:00
Hiroyuki Ikezoe
36521ffc0f Bug 1332588 - Drop explicit setting of dom.animations.mainthread-synchronization-with-geometric-animations. r=boris
Since we no longer see the "Unexpected UpdateTransformLayer hint" assertion
on those tests.

Differential Revision: https://phabricator.services.mozilla.com/D75052
2020-05-13 21:36:44 +00:00
Hiroyuki Ikezoe
a6cd6e17ee Bug 1332588 - Drop nsChangeHint_UpdateTransformLayer on the frame that we don't support transform. r=boris
Depends on D75049

Differential Revision: https://phabricator.services.mozilla.com/D75050
2020-05-13 21:52:08 +00:00
Hiroyuki Ikezoe
34c6fd1e8c Bug 1636838 - Undef CurrentTime and define X11CurrentTime instead. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D74585
2020-05-11 19:34:02 +00:00
Hiroyuki Ikezoe
381be17fdb Bug 1608194 - Add a test case for a visible animation on a position:fixed element in an iframe. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D73974
2020-05-11 20:35:50 +00:00
Boris Chiou
bfdb4fb6ed Bug 1540906 - Disable the pref of synchronizing transform animations with geometric animations on nightly. r=hiro
The original site issue (https://trello.com/) seems not obvious on nightly
now. (See Bug 1301305 for more details.) So perhaps we could give this a
trial to disable this pref, for the better performance in other cases.

Differential Revision: https://phabricator.services.mozilla.com/D74278
2020-05-11 20:40:48 +00:00
Hiroyuki Ikezoe
5a1043dcb9 Bug 1634943 - Split CSSAnimation and CSSAnimationKeyframe classes into a new file in dom/animation/. r=boris
For consistency with CSSTransition class.

Depends on D73571

Differential Revision: https://phabricator.services.mozilla.com/D73572
2020-05-05 22:41:04 +00:00
Hiroyuki Ikezoe
dce9d89e6d Bug 1634943 - Split CSSTransition class into a new file in dom/animation/. r=boris
The motivation here is that we will want to call CSSTransition specific
functions, e.g. updating the start value of a given CSSTransition with
the latest value of the CSSTransition on the compositor, from somewhere
not in layout/style.  Unfotunately nsTransitionManager.h is not exposed
and we will never want to expose it since it's purely for layout/style
stuff.

Depends on D73570

Differential Revision: https://phabricator.services.mozilla.com/D73571
2020-05-05 22:41:02 +00:00
Hiroyuki Ikezoe
26c4d2e45b Bug 1634943 - Fix non-unified build in dom/animation/. r=boris
Depends on D73569

Differential Revision: https://phabricator.services.mozilla.com/D73570
2020-05-05 22:40:57 +00:00
Hiroyuki Ikezoe
f6eb134152 Bug 1634943 - Include nsPrintfCString.h in TimingParams.h. r=boris
Depends on D73568

Differential Revision: https://phabricator.services.mozilla.com/D73569
2020-05-05 22:39:44 +00:00
Simon Giesecke
b4ec5fcde8 Bug 1626570 - Improve handling of copying arrays in dom/animation/. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D73642
2020-05-05 10:42:23 +00:00
Razvan Maries
0a5bb478ea Backed out 8 changesets (bug 1634943) for build bustages on AnimationInfo.h. CLOSED TREE
Backed out changeset 2ee9c0fc07bf (bug 1634943)
Backed out changeset 812f8cfff1b2 (bug 1634943)
Backed out changeset c446c1edc943 (bug 1634943)
Backed out changeset 6ef1fcc1d428 (bug 1634943)
Backed out changeset 5e4ccd0bffac (bug 1634943)
Backed out changeset bf3c4e7b4691 (bug 1634943)
Backed out changeset 8f310f49a366 (bug 1634943)
Backed out changeset 421cd778da3d (bug 1634943)
2020-05-05 13:50:47 +03:00
Hiroyuki Ikezoe
05122f238f Bug 1634943 - Split CSSAnimation and CSSAnimationKeyframe classes into a new file in dom/animation/. r=boris
For consistency with CSSTransition class.

Differential Revision: https://phabricator.services.mozilla.com/D73572
2020-05-05 10:01:38 +00:00
Hiroyuki Ikezoe
eee4796cb1 Bug 1634943 - Split CSSTransition class into a new file in dom/animation/. r=boris
The motivation here is that we will want to call CSSTransition specific
functions, e.g. updating the start value of a given CSSTransition with
the latest value of the CSSTransition on the compositor, from somewhere
not in layout/style.  Unfotunately nsTransitionManager.h is not exposed
and we will never want to expose it since it's purely for layout/style
stuff.

Differential Revision: https://phabricator.services.mozilla.com/D73571
2020-05-05 10:01:33 +00:00
Hiroyuki Ikezoe
6d7f47890b Bug 1634943 - Fix non-unified build in dom/animation/. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D73570
2020-05-05 10:01:24 +00:00
Hiroyuki Ikezoe
d90042d013 Bug 1634943 - Include nsPrintfCString.h in TimingParams.h. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D73569
2020-05-05 10:00:29 +00:00
Hiroyuki Ikezoe
cff00579e3 Bug 1633442 - Check the current keyframe's properties instead of checking mTransitionProperty. r=boris
Since mTransitionProperty keep holding the original transition property even if
the target effect or keyframe was replaced by others. We need to make sure the
current transition is runnable on the compositor, i.e. having the effect and
keyframes and one of the properties is runnable on the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D73586
2020-05-05 01:29:44 +00:00
Boris Chiou
3ceed5d372 Bug 1633486 - Add ::marker when checking may_have_animations() during traversal. r=emilio
When unhidding a ::marker element, we construct its generated item, and
then call StyleNewSubtree() on this generated item. During traversal, we
may update any animation related values in Gecko_UpdateAnimations(), which
may update the base styles for animation properties.

The test case is an animation segment from "null" to "inital" value. We
replace the "null" value with the base style value for the specific animation
property, so we can do interpolation properly.
(e.g. opacity: "null => initial" becomes "1.0 => initial")
If we don't update the animation related values in
Gecko_UpdateAnimations after generating ::marker, we may do
interpolation from "null" to "initial", which causes a panic.

Differential Revision: https://phabricator.services.mozilla.com/D73408
2020-05-04 19:15:43 +00:00
Simon Giesecke
c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Tom Tung
b34fac17ed Bug 1586761 - P7 - Revert a few incorrect changes on P2; r=tjr
P2 removed IsTimerPrecisionReductionEnabled and thus removed the check for RFP
pref. While most ReduceTimePrecision* functions are fine with that because
GetTimerPrecisionType checks that, the two ReduceTimePrecision*RFP functions
miss the check.

This patch mainly cover the check for that two functions and rename them to
*RFPOnly since they only use RFP when the pref is on.

Depends on D64324

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

--HG--
extra : moz-landing-system : lando
2020-04-07 07:36:52 +00:00
Tom Tung
94183661ac Bug 1586761 - P2 - Introduce new TimerPrecisionTypes and a set of new Reduce methods to decide the TimerPrecisionType in the nsRFPService; r=tjr
To support checking CrossOriginIsolated in performance.now(), we need to:
- Add new types to TimerPrecisionType for nsRFPService
  - System, HighResAllowed are added
  - All is renamed to Normal
- Introduce a set of Reduce methods which require isSystemPrincipal and
CrossOriginIsolated to be passed and decide the TimerPrecisionType later
  - Original Reduce methods should only be called when callsites know the
  TimerPrecisionType. Otherwise, they should call the new methods.
- The following patches will use new methods

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

--HG--
extra : moz-landing-system : lando
2020-03-25 14:09:55 +00:00
Sylvestre Ledru
0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Emilio Cobos Álvarez
c8bd3df8c2 Bug 1625608 - Improve some web-animations error messages. r=birtles
Differential Revision: https://phabricator.services.mozilla.com/D68695

--HG--
extra : moz-landing-system : lando
2020-03-30 09:48:06 +00:00
André Bargull
14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
Boris Chiou
2eaf9ee039 Bug 1621007 - Rewrite the checking for PrerenderDecision and reset mAllowAsyncAnimation if needed in 3d context. r=mattwoodrow
The basic idea is:
  In the same 3d context (note: we use AutoPreserves3DContext to keep
  this info), and we block the async animations of the ancestors of the ones
  who don't prerender. Of course, and its later silbing frames and child
  frames.

In order to to this, we keep a flag in Preserves3DContext, and set it
to false if the decision is No prerender, so we could force to block
async animations on its ancestors and descendants (and later silbings).

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

--HG--
extra : moz-landing-system : lando
2020-03-27 18:47:16 +00:00
Kristen Wright
dbfec5d2b0 Bug 1622111 - Convert dom.animations.offscreen-throttling to static pref. r=njn
Converts dom.animations.offscreen-throttling to a static pref and removes the static function used to create the varcache pref.

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

--HG--
extra : moz-landing-system : lando
2020-03-23 19:43:34 +00:00
Hiroyuki Ikezoe
1387af13ab Bug 1623469 - Add a pref to disable synchronization transform animations with geometric animations. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D67391

--HG--
extra : moz-landing-system : lando
2020-03-19 03:36:54 +00:00
Stefan Hindli
5f419e4b50 Backed out 9 changesets (bug 1622111) for causing mochitest failures in dom/animation/test/mozilla/test_restyles.html CLOSED TREE
Backed out changeset c244160797f8 (bug 1622111)
Backed out changeset dd9209f6bd8b (bug 1622111)
Backed out changeset d694c9e7061f (bug 1622111)
Backed out changeset 486aae809f6d (bug 1622111)
Backed out changeset 709266168c41 (bug 1622111)
Backed out changeset ca0d47bb86a8 (bug 1622111)
Backed out changeset caa735c8bb91 (bug 1622111)
Backed out changeset 12397711ab25 (bug 1622111)
Backed out changeset b66002fd1480 (bug 1622111)
2020-03-19 02:47:51 +02:00
Kristen Wright
e29d6cd395 Bug 1622111 - Convert dom.animations.offscreen-throttling to static pref. r=njn
Converts dom.animations.offscreen-throttling to a static pref and removes the static function used to create the varcache pref.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 20:46:07 +00:00
Brian Birtles
5903ac3094 Bug 1622184 - Mark Animation.finished and Animation.ready as handled when they are rejected; r=boris
As per spec change: 7bcad3219c

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

--HG--
extra : moz-landing-system : lando
2020-03-18 02:22:36 +00:00
Boris Chiou
014b6a5b9e Bug 1621174 - Fix error handling for setting KeyframeEffect.pseudoElement. r=birtles,smaug
We should throw a DOMException SyntaxError when setting pseudoElement a
syntactically invalid string or an unsupported pseudo.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 00:34:46 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Boris Zbarsky
00cd5d4380 Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 21:08:02 +00:00
Boris Zbarsky
c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Boris Zbarsky
0082f55dee Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:16 +00:00
Boris Zbarsky
61e0515f43 Bug 1618011 part 6. Pass a BindingCallContext (if neded) and source description to primitive conversions. r=peterv
The BindingCallContext tracks what method the conversion is for, and the source
description is how the primitive is involved in that method (e.g. "argument 5").

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

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:16 +00:00
Boris Zbarsky
e322a9eb2f Bug 1618011 part 4. Pass a BindingCallContext to dictionary Init() methods. r=peterv
Dictionaries always need a BindingCallContext, because they can throw
MSG_NOT_DICTIONARY from Init().

We allow non-binding callsites to pass JSContext*, in which case they will not
get quite-as-nice error reporting.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:15 +00:00
Boris Zbarsky
f612519949 Bug 1618011 part 2. Add a BindingCallContext class. r=peterv
We instantiate this class in various binding methods.  Future patches will make
use of it to throw errors.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:15 +00:00
Boris Chiou
0a08960bb5 Bug 1612891 - Use IgnoredErrorResult as the parsing easing error result. r=bzbarsky
IgnoredErrorResult works well as the auto suppressor class and it's
cleaner.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:07 +00:00
Arthur Iakab
14247fb057 Backed out 11 changesets (bug 1618011)for Linting failure.
CLOSED TREE

Backed out changeset 8b11ddd8999f (bug 1618011)
Backed out changeset 11df2f359473 (bug 1618011)
Backed out changeset c50121035d50 (bug 1618011)
Backed out changeset 8b8c4c60c34b (bug 1618011)
Backed out changeset b01f8c66110b (bug 1618011)
Backed out changeset 433fdf04058c (bug 1618011)
Backed out changeset 29a9227d08ac (bug 1618011)
Backed out changeset b2dfa2e66d24 (bug 1618011)
Backed out changeset 85650ee945c4 (bug 1618011)
Backed out changeset 278a213e5304 (bug 1618011)
Backed out changeset 9119aeb72ea4 (bug 1618011)
2020-03-07 00:15:57 +02:00
Boris Zbarsky
bc068d0e54 Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 20:39:10 +00:00