-
Notifications
You must be signed in to change notification settings - Fork 118
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
Question: why layout values are rounded? #77
Comments
This is an inherited code base. Unless I can find directions in the spec to do this or behavior from Chrome that matches, I'm going to call this a bug. |
I also can't find an explanation on why this was implemented in the related commits @mockersf also edited parts of that code once in this commit, maybe they know more? |
Browsers round fractional pixels. Some up, some down. http://www.simonbattersby.com/blog/browsers-and-fractional-pixels/ This lib is made to work like Chrome so it's rounding like it. |
Ah, of course. My instinct is that I'd like the ability to control whether or not we reproduce Chrome's bugs / quirks. But I'm not quite sure what design we should use for that. I'm not super keen on piping a config enum through everything, but a feature flag also seems very iffy. Anyways, I'm going to close this out as "not a bug" for now, and we can open up a more focused issue for the "compatibility mode" question as it comes up. |
Just spent an hour debugging why the leaf node I measured is set to
63.0
when my measure function returned63.375
When I looked at the sources I found the explicit rounding in the algo.rs
I couldn't find any mentions why the rounding is needed, thus I'm curious. It seems to be 100% intentional. Maybe add an explanation in the code annotations?
The text was updated successfully, but these errors were encountered: