Bug 1922339 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Hi Emilio,

The root cause is here: https://searchfox.org/mozilla-central/rev/7e0ae4372c52b8183d1178132dd6493edb576738/servo/components/style/values/computed/length.rs#256

The `unzoom` function did `0/0` because the effective zoom is zero as well. Does this (In reply to Emilio Cobos Álvarez (:emilio) from comment #7)
> (In reply to Boris Chiou [:boris] from comment #2)
> > So it seems like the parameter of perspective() is affected by zoom property. However, I suspect it shouldn't because changing the length of perspective may result in an entire different projection.
> 
> That's how zoom works tho, it just multiplies all lengths.

Perhaps we could add an error handle here: https://searchfox.org/mozilla-central/rev/ce404cd26e52d09e6a48d664c1986da25df50484/servo/components/style/values/computed/box.rs#410 to avoid NaN, e.g. return `value` if `self.0` is 0?
The `unzoom` function did `0/0` because the effective zoom is zero as well. Does this (In reply to Emilio Cobos Álvarez (:emilio) from comment #7)
> (In reply to Boris Chiou [:boris] from comment #2)
> > So it seems like the parameter of perspective() is affected by zoom property. However, I suspect it shouldn't because changing the length of perspective may result in an entire different projection.
> 
> That's how zoom works tho, it just multiplies all lengths.

Perhaps we could add an error handle here: https://searchfox.org/mozilla-central/rev/ce404cd26e52d09e6a48d664c1986da25df50484/servo/components/style/values/computed/box.rs#410 to avoid NaN, e.g. return `value` if `self.0` is 0?

Back to Bug 1922339 Comment 8