Movatterモバイル変換


[0]ホーム

URL:


Bugzilla

ClosedBug 1496619Opened7 years agoClosed7 years ago

Implement steps(jump-*) timing functions and drop frames() timing function

Implement steps(jump-*) timing functions and drop frames() timing function

Categories

(Core :: DOM: Animation, enhancement, P3)

enhancement
Points:
---

Tracking

()

RESOLVED FIXED
RESOLVED
FIXED
mozilla65
Iteration:
---
Webcompat Score
Performance Impact
a11y-review
Webcompat Priority
Accessibility Severity
Size Estimate
TrackingStatus
firefox64---wontfix
firefox65---fixed
TrackingStatus
relnote-firefox
thunderbird_esr115
thunderbird_esr140
firefox-esr115
firefox-esr140
firefox64
firefox65
firefox145
firefox146
firefox147

People

(Reporter: birtles, Assigned: boris, NeedInfo)

References

Details

(Keywords: dev-doc-complete)

---
QA Whiteboard:
---
Has STR:
---
Change Request:
---
Bug Flags:
in-testsuite+

Crash Data

Signature:
None

Security

(public)

This bug is publicly visible.

User Story

Attachments

(8 files)

46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
46 bytes, text/x-phabricator-request
Details |Review
Reporter

Description

7 years ago
The CSS Timing spec has finally been updated to include the replacement to the previously specced frames() timing function:https://drafts.csswg.org/css-timing-1/#step-timing-functionsBasically it consists of four new step position keywords: jump-start jump-end jump-none jump-bothThe first two are mostly aliases but at least 'jump-start' will need to be preserved as a separate keyword to 'start' so that they serialize differently. Both 'jump-end' and 'end' are not serialized so we don't need to preserve that distinction.We should drop our implementation of frames() and add these keywords instead.
Assignee

Comment 1

7 years ago
Maybe I have time to work on this, given my other bugs have some spec issues.
Assignee

Updated

7 years ago
Assignee: nobody → boris.chiou
Reporter

Comment 2

7 years ago
Note that the CSS Timing Functions spec has just been renamed to CSS Easing Functions so if there are links to css-timing in tests and so on, it might be worthwhile to update them to css-easing while we're touching those files.https://drafts.csswg.org/css-easing/

Updated

7 years ago
Assignee

Comment 3

7 years ago
(In reply to Brian Birtles (:birtles) fromcomment #2)> Note that the CSS Timing Functions spec has just been renamed to CSS Easing> Functions so if there are links to css-timing in tests and so on, it might> be worthwhile to update them to css-easing while we're touching those files.> >https://drafts.csswg.org/css-easing/One of my patch will rename this. Besides, I'm start to think is it possible to drop/simplify the conversion between computed::TimingFunction and nsTimingFunction (i.e. gecko_bindings/sugar/ns_timing_function.rs)? Maybe we could do that after [1] is merged into cbindgen.[1]https://github.com/eqrion/cbindgen/pull/219
Assignee

Updated

7 years ago
Assignee

Comment 4

7 years ago
frames() timing function was removed from the spec, so we drop it.Besides, some devtool tests are removed because they use frame(). I willadd them back by using new step function later.
Assignee

Comment 5

7 years ago
Rename css-timing to css-easing according to the spec update.Depends on D9309
Assignee

Comment 6

7 years ago
TimingFunction is defined in a separate spec (i.e. css-easing), insteadof transform, so we move it into a different file.Depends on D9310
Assignee

Comment 7

7 years ago
So we can generate generic enum by cbindgen (for TimingFunction).Depends on D9311
Assignee

Comment 8

7 years ago
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and useit in nsTimingFunction, so we could copy it directly without handlingthe different memory layout. However, we have to rewrite thensTimingFunction and mozilla::ComputedTimingFunction for this.Second, the rust-bindgen seems cannot generate the correct generic membersfrom complex C++ templates, especially for the nested template struct:e.g.template<A, B>union Foo { struct Bar1 { A mA; }; struct Bar2 { B mB; }; Bar1 bar1; Bar2 bar2;};The generated rust code may look like:pub struct Foo<A, B> { // Foo_Bar1_Body should have one template parameter. pub bar1: root::__BindgenUnionField<root::Foo_Bar1_Body>, // Foo_Bar2_Body should have one template parameter. pub bar2: root::__BindgenUnionField<root::Foo_Bar2_Body>,}pub struct Foo_Bar1_Body<A> { ... }pub struct Foo_Bar2_Body<B> { ... }So we have to hide StyleTimingFunction to avoid the compilation errors.Depends on D9312
Assignee

Comment 9

7 years ago
1. Add a new preference, layout.css.step-position-jump.enabled, for step(_, jump-*) timing functions.2. We still keep Start and End tags, even though there is no difference between them. Therefore, we could disable the preference if needed.3. Update the calculation of StepTiming to match the algorithm in the spec.Depends on D9313
Assignee

Comment 10

7 years ago
Add new mochitests, and web-platform tests, and devtool tests.Depends on D9314
Assignee

Updated

7 years ago
Status: NEW → ASSIGNED
Assignee

Comment 11

7 years ago
We make sure the step number is always positive, so usingcomputed::Integer is safe and can derive ToComputedValue.Depends on D9311

Updated

7 years ago
Attachment #9018748 - Attachment description: Bug 1496619 - Part 4: Bump cbindgen to 0.6.6 → Bug 1496619 - Part 5: Bump cbindgen to 0.6.6

Updated

7 years ago
Attachment #9018749 - Attachment description: Bug 1496619 - part 5: Generate StyleTimingFunction and drop ns_timing_function.rs → Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs

Updated

7 years ago
Attachment #9018750 - Attachment description: Bug 1496619 - part 6: Implement steps(jump-*) functions → Bug 1496619 - part 7: Implement steps(jump-*) functions

Updated

7 years ago
Attachment #9018751 - Attachment description: Bug 1496619 - part 7: Tests → Bug 1496619 - part 8: Tests
Assignee

Comment 12

7 years ago
obsolete
Comment hidden (obsolete)
try:https://treeherder.mozilla.org/#/jobs?repo=try&revision=9efcc34814539f4650d38625dacd9baaae212e59
Assignee

Comment 13

7 years ago
try:https://treeherder.mozilla.org/#/jobs?repo=try&revision=b2d7e0457825aa9843a5cb85948daa66a490984c

Comment 14

7 years ago
Pushed bybchiou@mozilla.com:https://hg.mozilla.org/integration/autoland/rev/b46aa2883e42Part 1: Drop frames() timing function r=birtleshttps://hg.mozilla.org/integration/autoland/rev/e9bf605e24a2Part 2: Rename css-timing to css-easing r=birtleshttps://hg.mozilla.org/integration/autoland/rev/dca7e62232c1Part 3: Split TimingFunction into a separate file to match spec r=emiliohttps://hg.mozilla.org/integration/autoland/rev/d6e5970c62bePart 4: Replace u32 with computed::Integer for computed::TimingFunction r=emiliohttps://hg.mozilla.org/integration/autoland/rev/5b744b960fe0Part 5: Bump cbindgen to 0.6.6 r=emiliohttps://hg.mozilla.org/integration/autoland/rev/79675a8112d6part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtleshttps://hg.mozilla.org/integration/autoland/rev/77d9e79ed3b9part 7: Implement steps(jump-*) functions r=birtleshttps://hg.mozilla.org/integration/autoland/rev/24936aee7543part 8: Tests r=birtles

Comment 15

7 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b46aa2883e42https://hg.mozilla.org/mozilla-central/rev/e9bf605e24a2https://hg.mozilla.org/mozilla-central/rev/dca7e62232c1https://hg.mozilla.org/mozilla-central/rev/d6e5970c62behttps://hg.mozilla.org/mozilla-central/rev/5b744b960fe0https://hg.mozilla.org/mozilla-central/rev/79675a8112d6https://hg.mozilla.org/mozilla-central/rev/77d9e79ed3b9https://hg.mozilla.org/mozilla-central/rev/24936aee7543
Status: ASSIGNED → RESOLVED
Closed:7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65

Comment 16

7 years ago
Pushed byemilio@crisal.io:https://hg.mozilla.org/integration/mozilla-inbound/rev/cd47bdbd4efaUpdate min cbindgen version in osx.py.

Comment 17

7 years ago
Pushed byrgurzau@mozilla.com:https://hg.mozilla.org/mozilla-central/rev/6771e96bb376Update min cbindgen version in osx.py. a=emilio
Assignee

Comment 18

7 years ago
(In reply to Pulsebot fromcomment #16)> Pushed byemilio@crisal.io:>https://hg.mozilla.org/integration/mozilla-inbound/rev/cd47bdbd4efa> Update min cbindgen version in osx.pyThanks for this!

Comment 19

7 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cd47bdbd4efa
Reporter

Updated

7 years ago
Depends on:1502788
Reporter

Comment 20

7 years ago
Looks like the test changes didn't get upstreamed. Filedbug 1502788 for that.

Updated

7 years ago
Flags: in-testsuite+

Comment 21

7 years ago
Created web-platform-tests PRhttps://github.com/web-platform-tests/wpt/pull/13868 for changes under testing/web-platform/tests

Comment 22

7 years ago
Upstream PR merged

Updated

7 years ago
See Also: →1504602

Comment 23

6 years ago
Note to MDN writers:I have added a note to the Fx65 rel notes to cover this (two actually):https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#CSSIn terms of the documentation, there are a number of places this is mentioned that will need to be updated to remove mention of frames(), and add in description of the new keywords and how they are used:https://developer.mozilla.org/en-US/docs/Web/CSS/transition-timing-functionhttps://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-functionhttps://developer.mozilla.org/en-US/docs/Web/CSS/single-transition-timing-functionhttps://developer.mozilla.org/en-US/docs/Web/CSS/animationhttps://developer.mozilla.org/en-US/docs/Web/CSS/transitionSyntax in the MDN data repo and browser compat data will also need updating.For the spec definitions, see:https://drafts.csswg.org/css-easing-1/#step-timing-functions

Comment 24

6 years ago

https://github.com/mdn/sprints/issues/800 lists most of the tasks and PRs for dev-doc-complete. Updates included updating BCD, syntax, and examples for:

it will take a bit before the csssyntax and bcd are reflected directly on MDN

Reporter

Comment 25

6 years ago

(In reply to Estelle Weyl fromcomment #24)

https://github.com/mdn/sprints/issues/800 lists most of the tasks and PRs for dev-doc-complete. Updates included updating BCD, syntax, and examples for:

it will take a bit before the csssyntax and bcd are reflected directly on MDN

Thanks for doing this.

Would you mind updatinghttps://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing too?

Flags: needinfo?(eweyl)

Comment 26

6 years ago

Steps has been added tohttps://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing too. Was done a bit ago - and BCD is live.

Reporter

Comment 27

6 years ago

(In reply to Estelle Weyl fromcomment #26)

Steps has been added tohttps://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing too. Was done a bit ago - and BCD is live.

That page doesn't cover the new jump keywords however (e.g. jump-both etc.). I mean, the diagram does, but the prose doesn't.

You need tolog in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size:


[8]ページ先頭

©2009-2025 Movatter.jp