floating point math in CalcLineHeight() necessary?
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
People
(Reporter: waterson, Unassigned)
References
Details
(Keywords: perf)
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Updated•24 years ago
|
Comment 1•24 years ago
|
||
Reporter | ||
Updated•23 years ago
|
Updated•23 years ago
|
![]() |
||
Comment 3•22 years ago
|
||
Updated•16 years ago
|
Comment 4•6 years ago
|
||
From looking, ComputeLineHeight generally can't avoid floats in the special cases, since it's dealing with float values and fontInflation.
The primary case of GetFontMetricsForComputedStyle() avoids unneeded float ops as far as is reasonable. I think we can close this.
NSCoords are ints and so the float calcs get rounded, though there's a "we'd like to make them floats someday" comment which likely goes back to the Netscape days and which would probably break a lot...
Comment 5•6 years ago
|
||
Jonathan — Thoughts on closing this?
Comment 6•6 years ago
|
||
:jesup is correct in comment 4, we can't simply remove all floating-point work from here, though we can (and do) avoid it in some cases. I don't think this is useful as it stands.
(I'm interested in more generally re-examining how line height is computed, particularly for 'normal', as this is a perennial source of compat/interop issues, but that's not this bug - and any revision to this will likely still include floating-point math in some way.)
Description
•