Closed Bug 1346655 Opened 8 years ago Closed 8 years ago

stylo: Fill animation/transition properties that the length of the property is less than the length of animation-name

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

I did miss below part of the spec. https://drafts.csswg.org/css-animations-1/#animation-name If one of the other properties doesn’t have enough comma-separated values to match the number of values of animation-name, the UA must calculate its used value by repeating the list of values until there are enough. https://treeherder.mozilla.org/#/jobs?repo=try&revision=c9354ec277a30276c4de8e3bf8e4f863b4db646d
Comment on attachment 8846442 [details] Bug 1346655 - Don't set transition properties to mAnimations array. https://reviewboard.mozilla.org/r/119466/#review121346
Attachment #8846442 - Flags: review?(cam) → review+
Comment on attachment 8846443 [details] Bug 1346655 - Cascade animation-name property ealier than other animation properties. https://reviewboard.mozilla.org/r/119468/#review121348 ::: commit-message-9bc2b:1 (Diff revision 1) > +Bug 1346655 - Cascade animation-name property ealier than other animation properties. r?heycam s/ealier/earlier/ ::: commit-message-9bc2b:5 (Diff revision 1) > +Bug 1346655 - Cascade animation-name property ealier than other animation properties. r?heycam > + > +As per the CSS Animations spec, in the case when multiple values for an > +animation property are set, if the value length is less than the length > +of animation name property, then shortage values are filled up. Because s/animation name/animation-name/
Attachment #8846443 - Flags: review?(cam) → review+
Comment on attachment 8846444 [details] Bug 1346655 - Fill shortage values for animation/transition properties. https://reviewboard.mozilla.org/r/119470/#review121354 ::: servo/components/style/properties/gecko.mako.rs:1317 (Diff revision 1) > pub fn set_${type}_${ident}(&mut self, v: longhands::${type}_${ident}::computed_value::T) { > debug_assert!(!v.0.is_empty()); > unsafe { self.gecko.m${type.capitalize()}s.ensure_len(v.0.len()) }; > > + let input_len = v.0.len(); > self.gecko.m${type.capitalize()}${gecko_ffi_name}Count = v.0.len() as u32; Replace |v.0.len()| with |input_len| here. ::: servo/components/style/properties/gecko.mako.rs:1338 (Diff revision 1) > pub fn set_${type}_timing_function(&mut self, v: longhands::${type}_timing_function::computed_value::T) { > debug_assert!(!v.0.is_empty()); > unsafe { self.gecko.m${type.capitalize()}s.ensure_len(v.0.len()) }; > > + let input_len = v.0.len(); > self.gecko.m${type.capitalize()}TimingFunctionCount = v.0.len() as u32; And here. ::: servo/components/style/properties/gecko.mako.rs:1390 (Diff revision 1) > debug_assert!(!v.0.is_empty()); > unsafe { self.gecko.mAnimations.ensure_len(v.0.len()) }; > > self.gecko.mAnimation${gecko_ffi_name}Count = v.0.len() as u32; > > - for (servo, gecko) in v.0.into_iter().zip(self.gecko.mAnimations.iter_mut()) { > + let input_len = v.0.len(); Move this earlier, and re-use input_len where you can. ::: servo/components/style/properties/gecko.mako.rs:1855 (Diff revision 1) > use properties::longhands::animation_iteration_count::single_value::SpecifiedValue as AnimationIterationCount; > > debug_assert!(!v.0.is_empty()); > unsafe { self.gecko.mAnimations.ensure_len(v.0.len()) }; > > + let input_len = v.0.len(); And here.
Attachment #8846444 - Flags: review?(cam) → review+
Attachment #8846445 - Flags: review?(cam) → review+
Attachment #8846442 - Attachment is obsolete: true
Attachment #8846443 - Attachment is obsolete: true
Attachment #8846444 - Attachment is obsolete: true
Thank you Cameron. https://github.com/servo/servo/pull/15923 I will land the patch here after our servo's vsync service gets back to work.
At this moment, autoland looks like orange field, but I did land the patch to reduce some of oranges.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: