Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSerialization of specified length and time value should perserve their original unit #15346
Comments
|
Ok, I will do this! |
|
Hi @dpyro, did you manage to make any progress on this? |
|
Nope @emilio, I am not able to do it right now. Please unassign me. Hopefully I will be able to contribute again later! |
|
No worries, and thanks for replying! |
|
This is still a problem for time unit. |
|
@luisbg, you mentioned you were interested on stylo, would you like to take this one? |
|
@emilio sure! I am currently traveling for work but I can start looking into this issue on Sunday. Any advice on how to reproduce this bug? |
<!DOCTYPE html>
<style>
div { animation-delay: 1ms; }
</style>
<script>
alert(document.styleSheets[0].cssRules[0].style.animationDelay);
</script>Other browsers show "1ms", while Stylo and Servo would show "0.001s". |
|
@upsuper I just reproduced it, thanks for sharing. Will investigate soon. |
|
I think what you basically need to do is to extend |
|
@luisbg Hi! Have you made any progress here? Is there anything that we can help? |
|
@canaltinova Hi! I got very busy at work. But I think I will have time this weekend to play with this code and figure out a solution. Apologies for the delay. Give me a few more days and if not somebody else can take it Thanks for offering to help |
|
@luisbg No problem, thanks for letting us know. You can ping me or probably other team members on IRC if you need to ask anything! |
Preserve unit in specified time value This fixes #15346. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17970) <!-- Reviewable:end -->
e.g.
width: 1inshould be serialized as1inrather than96px. The units should dropped during computing, not parsing.(I'm not sure whether we have a spec for this behavior... but this behavior seems to match all major browsers. Probably worth a spec issue.)