(In reply to Emilio Cobos Álvarez (:emilio) from comment #2) > In particular, this floating point value when going through a regular length and re-serializing, it gives a subtly different value: Yes. I noticed the [`uncompute()` function](https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties/helpers/animated_properties.mako.rs#246) for the custom properties' case uses `to_css_string()` https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties_and_values/value.rs#359 Basically, at somewhere, the `self` (computed value) is: ``` Value { v: Component(Length(112.24859 px)), url_data: URLExtraData { chrome_rules_enabled: false, base: "...", referrer: "" } } ``` But after calling `to_css_string()`, it becomes `112.249px`.
Bug 1917331 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2) > In particular, this floating point value when going through a regular length and re-serializing, it gives a subtly different value: Yes. I noticed the [`uncompute()` function](https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties/helpers/animated_properties.mako.rs#246) for the custom properties' case uses `to_css_string()` https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties_and_values/value.rs#359 Basically, at somewhere, the `self` (computed value) was: ``` Value { v: Component(Length(112.24859 px)), url_data: URLExtraData { chrome_rules_enabled: false, base: "...", referrer: "" } } ``` But after calling `to_css_string()`, it became `112.249px`.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2) > In particular, this floating point value when going through a regular length and re-serializing, it gives a subtly different value: Yes. I noticed the [`uncompute()` function](https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties/helpers/animated_properties.mako.rs#246) for the custom properties' case uses `to_css_string()` https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties_and_values/value.rs#359 Basically, at somewhere, the `self` (computed value) was: ``` Value { v: Component(Length(112.24859 px)), url_data: URLExtraData { chrome_rules_enabled: false, base: "...", referrer: "" } } ``` But after we called `to_css_string()`, it became `112.249px`.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2) > In particular, this floating point value when going through a regular length and re-serializing, it gives a subtly different value: Yes. I noticed the [`uncompute()` function](https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties/helpers/animated_properties.mako.rs#246) for the custom properties' case uses `to_css_string()` https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties_and_values/value.rs#359 Basically, at [somewhere, e.g. creating a new CSS transition](https://searchfox.org/mozilla-central/rev/1e8cec3727d6e09f4af41bb3d202b7a4c326ed84/layout/style/nsTransitionManager.cpp#186-187), the `self` (computed value) was: ``` Value { v: Component(Length(112.24859 px)), url_data: URLExtraData { chrome_rules_enabled: false, base: "...", referrer: "" } } ``` But after we called `to_css_string()`, it became `112.249px`.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2) > In particular, this floating point value when going through a regular length and re-serializing, it gives a subtly different value: Yes. I noticed the [`uncompute()` function](https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties/helpers/animated_properties.mako.rs#246) for the custom properties' case uses `to_css_string()` https://searchfox.org/mozilla-central/rev/f549a50b1e39b1e6bea19912d92545c4c0a06b7b/servo/components/style/properties_and_values/value.rs#359 Basically, at somewhere, e.g. [creating a new CSS transition](https://searchfox.org/mozilla-central/rev/1e8cec3727d6e09f4af41bb3d202b7a4c326ed84/layout/style/nsTransitionManager.cpp#186-187), the `self` (computed value) was: ``` Value { v: Component(Length(112.24859 px)), url_data: URLExtraData { chrome_rules_enabled: false, base: "...", referrer: "" } } ``` But after we called `to_css_string()`, it became `112.249px`.