Open Bug 1379908 Opened 7 years ago Updated 2 years ago

The serialized animation value of stroke-width / stroke-dashoffset / stroke-dasharray will lost the unit information.

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: mantaroh, Unassigned)

References

Details

(Keywords: dev-doc-complete)

+++ This bug was initially created as a clone of Bug #1369614 +++

The gecko will convert length to float when property has 'CSS_PROPERTY_NUMBERS_ARE_PIXELS' flag[1]. So we will lost the unit information if we animate these properties.

[1] http://searchfox.org/mozilla-central/rev/972b7a5149bbb2eaab48aafa87678c33d5f2f045/layout/style/StyleAnimationValue.cpp#4635

We need to add unit(px) when serializing computed value and animation value.
Importantly, the reason why we want to add px when serializing these is to match the output of Blink and Webkit here, as I understand it.
Moving this to CSS Parsing and Computation since I believe the plan here is that this will affect the result of getComputedStyle for non-animated properties too (to match Blink and WebKit).
Component: DOM: Animation → CSS Parsing and Computation
See Also: → 1390367
Marking as part of documentation plan for intentional stylo differences
Keywords: dev-doc-needed
I'm sorry, it appears this bug has been incorrectly marked as blocking stylo-behavior-changes. Apparently this bug was supposed to reflect the need to make Gecko include unit information in the computed style for these properties when they are animated. However, Stylo currently matches Gecko for nearly all cases:

  https://jsfiddle.net/duqqub08/

The only case it does not is when there is a frozen SMIL animation and the last SMIL animation value include unit information. However, I don't believe it is worth documenting that case. (Bug 1390367 has some further background on this, for what it's worth.)

Long-term, however, we *should* introduce a behavior change here to always include px (to match other browsers) but we won't be doing that in 57.

Chris, I think we can drop this item from the Quantum CSS notes.
No longer blocks: stylo-behavior-changes
Flags: needinfo?(cmills)
(In reply to Brian Birtles (:birtles) from comment #5)
> I'm sorry, it appears this bug has been incorrectly marked as blocking
> stylo-behavior-changes. Apparently this bug was supposed to reflect the need
> to make Gecko include unit information in the computed style for these
> properties when they are animated. However, Stylo currently matches Gecko
> for nearly all cases:
> 
>   https://jsfiddle.net/duqqub08/
> 
> The only case it does not is when there is a frozen SMIL animation and the
> last SMIL animation value include unit information. However, I don't believe
> it is worth documenting that case. (Bug 1390367 has some further background
> on this, for what it's worth.)
> 
> Long-term, however, we *should* introduce a behavior change here to always
> include px (to match other browsers) but we won't be doing that in 57.
> 
> Chris, I think we can drop this item from the Quantum CSS notes.

OK, no problem. I've deleted it.
Flags: needinfo?(cmills)
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.