Commit Graph

376 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
Boris Zbarsky
0dbc444246 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 20:30:22 +00:00
Boris Chiou
73f98d78b8 Bug 1619276 - Fix the order of the setting of Keyframe options. r=smaug,birtles
Besides, we add the pref setup in the webidl, so if we turn it off,
iterationComposite and composite will always be the default values.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 09:42:55 +00:00
Hiroyuki Ikezoe
f0b17ecc30 Bug 1510120 - Block running background-color animation on the compositor if there is any current-color keyframe. r=boris,flod
Differential Revision: https://phabricator.services.mozilla.com/D63629

--HG--
extra : moz-landing-system : lando
2020-03-03 21:48:01 +00:00
Brian Birtles
ca0cb641eb Bug 1292001 - Move transition start value replacing behavior to the CSSTransition; r=boris
This is needed so that later we can make the effect of transitions replaceable.

Note that the test added in this patch will fail without the code changes in
this patch.

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

--HG--
rename : layout/style/test/test_transitions_replacement_on_busy_frame.html => layout/style/test/test_transitions_replacement_with_setKeyframes.html
extra : moz-landing-system : lando
2020-03-02 06:38:36 +00:00
Oana Pop Rus
feeffe566a Backed out 7 changesets (bug 1292001) for devtools failures in browser_animation_playerState.js on a CLOSED TREE
Backed out changeset 7ecffcc58457 (bug 1292001)
Backed out changeset 111e88a3f2a9 (bug 1292001)
Backed out changeset 851b689f6593 (bug 1292001)
Backed out changeset a94cb2c7e518 (bug 1292001)
Backed out changeset 4f12b279af44 (bug 1292001)
Backed out changeset f35daa06e7b6 (bug 1292001)
Backed out changeset 9dbefe504221 (bug 1292001)
2020-03-02 08:16:58 +02:00
Brian Birtles
cace4bbef4 Bug 1292001 - Move transition start value replacing behavior to the CSSTransition; r=boris
This is needed so that later we can make the effect of transitions replaceable.

Note that the test added in this patch will fail without the code changes in
this patch.

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

--HG--
rename : layout/style/test/test_transitions_replacement_on_busy_frame.html => layout/style/test/test_transitions_replacement_with_setKeyframes.html
extra : moz-landing-system : lando
2020-03-02 00:40:05 +00:00
Emilio Cobos Álvarez
63ca81fcba Bug 1427033 - Throttle animations in opacity: 0 subtrees. r=hiro
I hope you can help me figure out writing tests for this and figuring whether
the reasoning here is correct / I'm missing something else :)

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

--HG--
extra : moz-landing-system : lando
2020-02-27 01:36:14 +00:00
Hiroyuki Ikezoe
28121ce9e6 Bug 1510030 - Enable background color animimations on WebRender. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D63605

--HG--
extra : moz-landing-system : lando
2020-02-27 08:43:09 +00:00
Bogdan Tara
0ed6b9ff60 Backed out 6 changesets (bug 1510030) for test_running_on_compositor.html failures CLOSED TREE
Backed out changeset a14a131ca731 (bug 1510030)
Backed out changeset a75359516fec (bug 1510030)
Backed out changeset a2be11cbe3f2 (bug 1510030)
Backed out changeset b37ce2b87ac7 (bug 1510030)
Backed out changeset 781cd96dd9a2 (bug 1510030)
Backed out changeset b3dfa17c6305 (bug 1510030)
2020-02-27 06:28:31 +02:00
Hiroyuki Ikezoe
a81564902a Bug 1510030 - Enable background color animimations on WebRender. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D63605

--HG--
extra : moz-landing-system : lando
2020-02-27 03:47:39 +00:00
Bogdan Tara
a6ca41945c Backed out 6 changesets (bug 1510030) for webrender bustages CLOSED TREE
Backed out changeset 28a2fba71977 (bug 1510030)
Backed out changeset 1700b3a416cd (bug 1510030)
Backed out changeset 087518046b0c (bug 1510030)
Backed out changeset 6b3af91a7ce6 (bug 1510030)
Backed out changeset 737f4bc3afd3 (bug 1510030)
Backed out changeset 921116ca67a5 (bug 1510030)
2020-02-27 04:45:04 +02:00
Hiroyuki Ikezoe
d452f81282 Bug 1510030 - Enable background color animimations on WebRender. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D63605

--HG--
extra : moz-landing-system : lando
2020-02-27 02:05:30 +00:00
Cosmin Sabou
074eb7c67b Backed out 6 changesets (bug 1510030) for causing build bustages. CLOSED TREE
Backed out changeset 1bf2a082ca62 (bug 1510030)
Backed out changeset 8b0fd12a063b (bug 1510030)
Backed out changeset ec9c6b79ea42 (bug 1510030)
Backed out changeset cd729f8b0220 (bug 1510030)
Backed out changeset c3e6c17ba7b0 (bug 1510030)
Backed out changeset edc3c212be1f (bug 1510030)
2020-02-27 02:50:40 +02:00
Hiroyuki Ikezoe
adf689fcd9 Bug 1510030 - Enable background color animimations on WebRender. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D63605

--HG--
extra : moz-landing-system : lando
2020-02-26 09:26:18 +00:00
Simon Giesecke
aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Boris Chiou
468e3c044e Bug 1616443 - Hide composite memeber from the result of getKeyframes(). r=birtles,bzbarsky
If dom.animations-api.compositing.enabled is false, we have to hide
composite member from getKeyframes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 19:09:34 +00:00
Boris Chiou
4f3959bfee Bug 1610981 - Eliminate usage of CSSPseudoElement from KeyframeEffect. r=birtles,smaug
Replace ElementOrCSSPseudoElement with Element and add PseudoElement (which is
a DOMString) into KeyframeAnimationOptions and KeyframeEffect.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 20:44:14 +00:00
Boris Chiou
cedb507f58 Bug 1610981 - Drop Maybe<> from KeyframeEffect::mTarget. r=birtles
In order to store the different combinations of (Element, PsuedoStyleType)
pairs, including (nullptr, ::before/::after), we drop Maybe<> and use
OwningAnimationTarget directly.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 20:44:12 +00:00
Hiroyuki Ikezoe
11c48a531c Bug 1615156 - Don't return true from KeyframeEffect::ContainsAnimatedScale if there is no base style. r=boris
The base style is not set in cases where there is no additive/accumulative
animation.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 19:13:39 +00:00
Boris Zbarsky
1395be1f23 Bug 1613013 part 3. Annotate TypeErrors and RangeErrors from WebIDL implementations with the method they come from. r=peterv
Please review the changes to Errors.msg very carefully.  I caught a number of
mistakes there in self-review (e.g. not renumbering replacement markers
correctly when I added {0} to the beginnings of strings), and my confidence
that I caught them all is only middling.

A few lines (MSG_USELESS_SETTIMEOUT, MSG_TYPEDARRAY_IS_DETACHED,
MSG_NOT_SUBMIT_BUTTON) were removed from Errors.msg either because they were
already unused or because they either were single-user constant strings or
became such in the new setup and we could just use the string version of
ThrowTypeError.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:22:32 +00:00
Makoto Kato
7574b8612d Bug 1503656 - Part 1. Always use CssEnvironment from media query's device. r=emilio
Although CssEnvironment is in Device of media query implementation, some code
creates CssEnvironment instance without Device. So I would like always to use it from Device of media query.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 11:55:28 +00:00
Boris Chiou
bdd5623ab2 Bug 779598 - Do animations of transforms with preserve-3d at compositor. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D57029

--HG--
extra : moz-landing-system : lando
2019-12-23 09:52:43 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Mirko Brodesser
b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

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

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser
4807f484fc Bug 1593222: part 10) Move Animation* methods to MutationObservers. r=smaug
Depends on D51825

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

--HG--
extra : moz-landing-system : lando
2019-11-05 20:39:22 +00:00
Boris Chiou
d77411c397 Bug 1429305 - Enable OMTA for motion path and add some tests for it. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D50015

--HG--
extra : moz-landing-system : lando
2019-10-31 21:16:35 +00:00
Hiroyuki Ikezoe
e198ba4111 Bug 1585770 - Copy KeyframeEffect::mBaseStyle in the KeyframeEffect copy constructor. r=boris
The original test case doesn't crash reliably but the test case in this commit
crashes 100% locally without this fix.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 20:00:27 +00:00
Boris Chiou
470629b5d3 Bug 1567330 - Add offset shorthand. r=emilio,birtles
Also, update the serialization by the shorter perference because this is
a new feature and using older syntax doesn't make sense.

Besides, use `cssOffset` for web animation IDL attribute name.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 19:56:33 +00:00
Emilio Cobos Álvarez
70b6fda902 Bug 1575926 - Check that we have a target in CalculateCumulativeChangeHint. r=hiro
Seems we'll update the change hint properly via SetTarget if we get a new
target.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 09:08:22 +00:00
kriswright
8c68307d03 Bug 1573268 - Convert two layers.offmainthreadcomposition.* prefs to static prefs. r=njn
Converts layers.offmainthreadcomposition.async-animations and layers.offmainthreadcomposition.log-animations to their respective static prefs. Since all IsAnimationLoggingEnabled() did was create a pref and return the variable sShouldLog, this function is removed and replaced with the static pref.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 00:02:12 +00:00
Boris Chiou
c4f468de6a Bug 1569795 - Block compositor animations of transform-like properties if offset-path is not none. r=hiro
The animations of motion path are not running on the compositor, and the
properties in [motion-1] is not part of transform-like properties (i.e.
nsCSSProperties::TransformLikeProperties()) for now, so we should run
transform animations on the main thread if offset-path is not `none`.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 21:22:49 +00:00