New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stylo: Bug 1362896 - Implement ComputeSquaredDistance for TransformList #18086
Changes from 1 commit
a5433ad
03e1794
3a5cbfb
e8fad23
File filter...
Jump to…
Tweak CalcLengthOrPercentage to use pixel value.
We compute the distance for eCSSUnit_Calc by pixel value in Gecko, so let's follow the same rules.
- Loading branch information
| @@ -78,7 +78,8 @@ impl ComputeSquaredDistance for CalcLengthOrPercentage { | ||
| // FIXME(nox): This looks incorrect to me, to add a distance between lengths | ||
| // with a distance between percentages. | ||
| Ok( | ||
| self.unclamped_length().compute_squared_distance(&other.unclamped_length())? + | ||
| self.unclamped_length().to_f64_px().compute_squared_distance( | ||
| &other.unclamped_length().to_f64_px())? + | ||
BorisChiou
Author
Contributor
|
||
| self.percentage().compute_squared_distance(&other.percentage())?, | ||
| ) | ||
| } | ||
Why is it correct at all to mix lengths and percentages? Cf. the FIXME I left just above that change.