Automatic update from web-platform-tests
Make commitStyles use computed values instead of resolved values
Add new CSSAnimationUtils class with a static method
KeyframeValueFromComputedStyle() which returns the true computed value
for all properties. This mostly calls CSSValueForComputedStyle() without
a LayoutObject, but the cases where this does not return the computed
value (line-height and transform) are handles separately, similarly
to the implementation of ComputedStyleMap.
This method does take a LayoutObject, but it is only used to resolve
matrix interpolation of box-size-dependent transform values, which
produces a deferred compilation which cannot be serialized directly in
the current spec.
Make Animation.commitStyles() use this new function instead of
committing the resolved value using CSSValueFromComputedStyle().
Add additional WPT tests for commitStyles() adding tests for
special-case properties and splitting the logical properties case.
Bug: 1056197, 1057307
Change-Id: Ic823f96f257d4c6b010dfee758d4ac0b5cd4148c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2118765
Commit-Queue: George Steel <gtsteel@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765297}
--
wpt-commits: c7c25c159ab2cc3d308c2cb033d31573c87854ef
wpt-pr: 22452
Automatic update from web-platform-tests
Initialize start time of scroll animations to zero.
Implemented web-animations-1 spec changes introduces in [1].
- Update play and pause procedures to initialize start time of scroll
animations to zero.
- Updated calculate play state procedure to return "running" state for
animations that has start time resolved.
- Added/modified tests reflecting spec changes.
[1] https://github.com/w3c/csswg-drafts/pull/4842
Bug: 1070637
Change-Id: Ic83995899b2f3f8d8f985f84b8a2b438bbad7c35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150687
Commit-Queue: Olga Gerchikov <gerchiko@microsoft.com>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761974}
--
wpt-commits: 46978682c5d3e2ff08468be05564307a9a75e06b
wpt-pr: 23145
Automatic update from web-platform-tests
Initialize start time of scroll animations to zero.
Implemented web-animations-1 spec changes introduces in [1].
- Update play and pause procedures to initialize start time of scroll
animations to zero.
- Updated calculate play state procedure to return "running" state for
animations that has start time resolved.
- Added/modified tests reflecting spec changes.
[1] https://github.com/w3c/csswg-drafts/pull/4842
Bug: 1070637
Change-Id: Ic83995899b2f3f8d8f985f84b8a2b438bbad7c35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150687
Commit-Queue: Olga Gerchikov <gerchiko@microsoft.com>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761974}
--
wpt-commits: 46978682c5d3e2ff08468be05564307a9a75e06b
wpt-pr: 23145
It's easy to get time out on mac if we don't await the async function.
The async functions return an implicit Promise. If the caller doesn't await
it, any async steps inside the function will not be blocked.
Differential Revision: https://phabricator.services.mozilla.com/D68448
--HG--
extra : moz-landing-system : lando
Automatic update from web-platform-tests
Fix timeout in update-and-send-events-replacment.html
The handling of iframe load events is finicky as indicated in the open
WHATWG issue:
https://github.com/whatwg/html/issues/490
This patch switches the wait mechanism to one that is well behaved
across browsers. The new process arms the listener before inserting the
iframe into the document.
Bug: 1059963
Change-Id: I372d4fdae3b270699aedf2c5a4de4429e62f42a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096782
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748853}
--
wpt-commits: ee5cfa46292bdcdd576e698503f4a4a9ffa977c0
wpt-pr: 22160
Automatic update from web-platform-tests
Support getAnimations() for ShadowRoot
This patch makes Webanimation to support getAnimations() whose target
element is a shadow root on which this method is called.
Spec: https://drafts.csswg.org/web-animations/#extensions-to-the-documentorshadowroot-interface-mixin
Bug: 1046916
Change-Id: Ibb201fe3a8a21f3852d4f5135ce344238b1476c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2051768
Commit-Queue: Hao Sheng <haozhes@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749222}
--
wpt-commits: 3a555dbaa99c26825758f7a3c6b38b7aa965f275
wpt-pr: 22093
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
Automatic update from web-platform-tests
Sync on style when creating a pseudo-element animation from script
Sync on style before evaluating a pseudo-element selector other than null.
Remove manual style syncs from pseudo-element animation wpt tests.
Bug: 1057101
Change-Id: I8a1184221f40c7546ac5179615f0d6541e8729e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083715
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747333}
--
wpt-commits: b15e954c41e6d98122ea8e4b4515bb6c6e43cf62
wpt-pr: 22048
Automatic update from web-platform-tests
Adding phase to AnimationTimeline
This change adds phase to animation timeline. Phase currently only holds its
read-only initial value of "inactive". Later updates will implement the
full functionality for timeline states.
Test verifies that animation.timeline.phase is accessible and equals
initial value. It also verifies that the phase is readonly.
Bug: 1046833
Change-Id: I1d887080f17692151ac97c7e89589dfefa185686
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048943
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Commit-Queue: Jordan Taylor <jortaylo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#746026}
--
wpt-commits: 216d5a68f63728a9c44e7d6f841b63c4c31c144a
wpt-pr: 21733
We add a stack based class and supress the exception of parsing easing
in the destructor, to avoid hitting the potential assertions.
Differential Revision: https://phabricator.services.mozilla.com/D64268
--HG--
extra : moz-landing-system : lando
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
Automatic update from web-platform-tests
getAnimations from the Document instead of from Timeline
Per the spec, Document::getAnimations() must report all Animations whose
target effect is the given document.
Spec:
https://drafts.csswg.org/web-animations/#extensions-to-the-documentorshadowroot-interface-mixin
Bug: 828585
Change-Id: I92a5cab69d0b9869fea0238e2cfb8e98d995a3b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024539
Commit-Queue: Hao Sheng <haozhes@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741473}
--
wpt-commits: e617314c6aa4b7c0fb83627d47063d00106b47a1
wpt-pr: 21518
Automatic update from web-platform-tests
Implement commitStyles for web animations.
CommitStyles provides a convenient way to update the style of an
element, avoiding the need to keep finished animations persistent
in order to stack effects.
A typical use case is:
const anim = elem.animate(keyframes, {..., fill: 'forward'});
anim.finished.then(() => {
anim.commitStyles();
anim.cancel();
});
Spec:
https://drafts.csswg.org/web-animations-1/#dom-animation-commitstyles
Intent:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/H5sz_dg6fKc/1X7K7U4XCgAJ
Bug: 981905
Change-Id: I37f61960480517e0a8f3427938cf799de4c6e9c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2017673
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735948}
--
wpt-commits: 44e7759ce47e1b16994aac592202939db85e2750
wpt-pr: 21438
Automatic update from web-platform-tests
Add a commitStyles test which composites on top of underlying style.
The other commitStyles tests are not affected by the underlying style.
This test verifies that applying a partial composite: add stack
correctly applies to the underlying style.
Bug: 981905
Change-Id: Ia32a51a50e5c537b29c4848248ab94e7de56f19e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2021741
Commit-Queue: Robert Flack <flackr@chromium.org>
Auto-Submit: Robert Flack <flackr@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735417}
--
wpt-commits: 5f08c5a7f6c335fcb20f611ea988cf7f0646edb2
wpt-pr: 21434
Automatic update from web-platform-tests
Fixup indentation from PR 21353
https://github.com/web-platform-tests/wpt/pull/21353 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21354
https://github.com/web-platform-tests/wpt/pull/21354 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21378
https://github.com/web-platform-tests/wpt/pull/21378 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21379
https://github.com/web-platform-tests/wpt/pull/21379 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21377
https://github.com/web-platform-tests/wpt/pull/21377 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21390
https://github.com/web-platform-tests/wpt/pull/21390 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
Fixup indentation from PR 21392
https://github.com/web-platform-tests/wpt/pull/21392 used an approach
which was known to cause indentation problems in some cases. This commit
is an attempt to fixup any indentation issues, by running a (hacky)
script to parse the diff and locate places where indentation was broken.
--
wpt-commits: e4499c8ff1ecf603ecbda020102ec9c956d594f6, 88ab2f0e4965b8e6ea61d3ff4f90ff5215de8a4e, 21578f29a8e82eff91c0fd43ad709fbf3fbe9e72, e836541f46abbd9272233578ad4e8ac0867bde15, f2961a22018844dae808cb12af6774ba8b435773, 597c0519c494486d18ab81a32a7206014ee23b5a, 63c2f7190b779112aa79d28a51cc29b98ca381dc
wpt-pr: 21422
Automatic update from web-platform-tests
Remove assert_throws use in various remaining tests.
--
wpt-commits: 9e1d3cb7050a339f574e7d4b0650542847b7eaa5
wpt-pr: 21389
In this particular case where we're paused, we don't need to repaint or
synchronize animations on layers, but we do need to update the effect set so
that getAnimations() returns the correct result.
Differential Revision: https://phabricator.services.mozilla.com/D61258
--HG--
extra : moz-landing-system : lando
Automatic update from web-platform-tests
Replace some assert_throws('Something', stuff) calls with assert_throws_dom. (#21392)
This diff was generated by running:
find . -type f -print0 | xargs -0 perl -pi -e "BEGIN { \$/ = undef; } s/assert_throws\(([ \n]*'[A-Za-z_]*') *(, *.)/assert_throws_dom(\1\2/gs"
in bash (doesn't work in tcsh, due to the $ inside "").
This does affect indentation poorly in cases when the first arg was on the same
line as the assert_throws, there was a newline after the ',' after the first
arg, and the following args were lined up with the first arg. Fixing that,
especially when there are multiple lines after the first arg, is not trivial
with a regexp.
Co-authored-by: Boris Zbarsky <bzbarsky@mit.edu>
--
wpt-commits: d5103044974ae41deb6e099649d7520c374aa36b
wpt-pr: 21392
Automatic update from web-platform-tests
Replace some "assert_throws({'name': 'jserror'}, stuff)" with assert_throws_js. (#21379)
This diff was generated by running:
find . -type f -print0 | xargs -0 perl -pi -e "BEGIN { \$/ = undef; } s/assert_throws\(([ \n]*)\{ *[\"']?name[\"']? *: *['\"](TypeError|Error)[\"'] *\} *(, *.)/assert_throws_js(\1\2\3/gs"
in bash (doesn't work in tcsh, due to the $ inside "") and then manually
changing service-workers/service-worker/ServiceWorkerGlobalScope/resources/extendable-message-event-constructor-worker.js
to use assert_throws_exactly in a few places where we want to verify that
specific exception values are propagated out.
Co-authored-by: Boris Zbarsky <bzbarsky@mit.edu>
--
wpt-commits: b0daaa6b86c3dc2f9c16aa362136655c0db7308b
wpt-pr: 21379
Automatic update from web-platform-tests
Replace some "assert_throws(new FooError, stuff)" calls with assert_throws_js.
This diff was generated by running:
find . -type f -print0 | xargs -0 perl -pi -e 'BEGIN { $/ = undef; } s/assert_throws\(([ \n]*)new ([A-Za-z]*Error) *(, *.)/assert_throws_js(\1\2\3/gs'
and then manually adjusting url/failure.html to use the TypeError from the right
global when doing cross-global things.
This does affect indentation poorly in cases when the first arg was on the same
line as the assert_throws, there was a newline after the ',' after the first
arg, and the following args were lined up with the first arg. Fixing that,
especially when there are multiple lines after the first arg, is not trivial
with a regexp.
--
wpt-commits: a3cddf04f127ef7f14556bd0326c804c2e72fb2d
wpt-pr: 21353
Automatic update from web-platform-tests
Implement new pseudoElement interface on KeyframeEffect
Make target() return the originating element if target_ is a
PseudoElement (EventTarget still returns the layout object).
Add pseudoElement() property which returns the target pseudo-selector
if the target is a pseudo-element (null otherwise).
Invalid and unsupported pseudo-elements will still return a selector
and the originating element (from target()) but will not animated
(EventTarget returns null).
Add pseudoElement option to KeyframeEffect constructor.
Change-Id: Id7d16ea6966c533e56d1170462ff60a79b277fd5
Bug: 981894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1921343
Commit-Queue: George Steel <gtsteel@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726506}
--
wpt-commits: 084d8726a0cde51d0fdd1e4bc375fa8788b6835b
wpt-pr: 20373
Automatic update from web-platform-tests
Add additional WPT tests for new cases of KeyframeEffect.target and .pseudoElement
Goes with spec CL https://github.com/w3c/csswg-drafts/pull/4437 (merged)
Follows up on https://crrev.com/c/1894477
Change-Id: I9f50739cb4dac68d3c9002c0f3ed509f6b379380
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949405
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721752}
--
wpt-commits: 6439c341d31a4a4695cec8a90ac18f5365547c79
wpt-pr: 20597
Automatic update from web-platform-tests
update WPT tests to eliminate CSSPseudoElement from animations (#20040)
Goes with spec CL https://github.com/w3c/csswg-drafts/pull/4437 (merged)
Eliminated the use of CSSPseudoElement from WebAnimations to coincide with
recent spec changes. JeyframeEffect targets now use an Element reference
and pseudo-element selector like getComputedStyle and css-animations events.
Change-Id: Ib6957a7b764eac3b4372ad35c1b79b139c356a19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894477
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714541}
--
wpt-commits: 2f837d2e318b64f66ee8da1f3b798b03b697d4d7
wpt-pr: 20040
This updates the Gecko implementation to match the following change to
the Web Animations spec:
792453b952 (diff-4c9f5c055fb219a7fcad23a9a7a80b64)
Differential Revision: https://phabricator.services.mozilla.com/D50768
--HG--
rename : testing/web-platform/tests/web-animations/interfaces/Document/getAnimations.html => testing/web-platform/tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html
extra : moz-landing-system : lando
Automatic update from web-platform-tests
Fix interfaces/Document/getAnimations.html test
This test was assuming that the iframe load event could not fire during
appendChild, which it does on Chrome. To fix this, setup the promise
before calling appendChild, but only await on it afterwards.
Bug: None
Change-Id: Ie5ebdd7cec0fe0c276621033afaa8e8a5699dad1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833902
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702037}
--
wpt-commits: 4786b7387504f691ead311c58c2da512ced8472d
wpt-pr: 19448
Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.
Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in https://github.com/w3c/csswg-drafts/issues/4331.
--
wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239
I believe these intermittents are caused by double imprecision. When unconditional clamping is enabled
it gets multiplied out and causes animation.currentTime to occasionally go to 50000.02 which causes
the test to fail. We can reduce the precision back down to ignore that. We do so using some WPT
overrides.
Differential Revision: https://phabricator.services.mozilla.com/D38810
Depends on D38809
--HG--
extra : rebase_source : 923172b3e7fd34458d6ee153ef33c0f830c954e3
Automatic update from web-platform-tests
[web-animations] Make handling of keyframes more spec compliant
WebAnimations spec has two keyframe concepts:
A) keyframes [1]
B) computed keyframes [2]
A key difference is that in A property values remain unresolved while in
B these properties are resolved (e.g., shorthands expand to long hands
etc.)
KeyframeEffect.getKeyframes() is expected to return (A) but our current
implementation only keeps around (B).
This CL introduces the following changes to bring us closer to the
specified behavior:
1. Introduce a new map <property, value> in StringKeyframe
representing (A)
2. CSS property pairs are added to this map as long as they parse
correctly [3]
3. Use the new map to produce the result of getKeyframes()
There is some additional special handling required for shorthand
properties because Blink CSS parser does not really produce any
shorthand values. As a shortcut this patch introduces a new type
of css value (`CSSKeyframeShorthandValue`) which represents a
shorthand by encapsulating all its relevant longhand property/value
pairs.
Note that we continue our old behavior for SVG and Presentation attrs
which will be switch over in follow up patch.
[1] https://drafts.csswg.org/web-animations/#keyframes-section
[2] https://drafts.csswg.org/web-animations/#calculating-computed-keyframes
[3] https://drafts.csswg.org/web-animations/#process-a-keyframes-argument step 8
TEST:
- web-animations/interfaces/{Animatable, Keyframes} => PASS previously failing tests
- Added two new test cases in above covering animated custom props
- external/wpt/web-animations/interfaces/KeyframeEffect/getKeyframes.html => New test to cover serialization
Bug: 816956
Change-Id: Icc8e0bc4a0ee3019ad7d2c566aacb9d3aee0ffe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1634393
Commit-Queue: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675665}
--
wpt-commits: 631824bf82ea23e59604b443ab62c9b123eb25d5
wpt-pr: 17083
The tests added in this patch do not fail any of their assertions with or
without the code changes in this patch. However, without the code changes in
this patch they will both fail due to reported memory leaks.
Differential Revision: https://phabricator.services.mozilla.com/D31577
--HG--
extra : moz-landing-system : lando
In the next patch in this series, we will add another test to
web-animations/interfaces/Document/getAnimations.html. Doing so would cause an
existing async_test to fail since it will affect the result of
Document.getAnimations() because async_tests run in parallel. To avoid that,
this patch converts the async_test to a promise_test since promise_tests, unlike
async_tests, wait for the previous promise_tests to finish before running.
Differential Revision: https://phabricator.services.mozilla.com/D20240
--HG--
extra : moz-landing-system : lando
As per the following spec change:
4ec1deb76a
Spec issue:
https://github.com/w3c/csswg-drafts/issues/3193
Of the added test cases, only the last one, "Returns reversed animations yet to
reach their active phase" fails without this code change. The others pass
because the animation is finished at that point but I added them for consistency
with the previous tests.
Differential Revision: https://phabricator.services.mozilla.com/D16001
--HG--
extra : moz-landing-system : lando