commit | d02f975002dc84d8c69124e9f18943e35be3b54e | [log] [tgz] |
---|---|---|
author | Ian Kilpatrick <ikilpatrick@chromium.org> | Tue Feb 15 17:33:45 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 15 17:33:45 2022 |
tree | 66a6a15eb93c6f533602d4d7dc32e47e04148e71 | |
parent | 3b4b829b4ed529c4cb1f296db59f3ba29454be5c [diff] |
[aspect-ratio] Use continued fraction algorithm for LayoutUnit conversion Previously we'd directly convert the float aspect-ratio to LayoutUnit. This wasn't correct as we'd potentially lose a lot of precision in the process. Instead of this use the continued fraction algorithm to find a precise representation. This mitigates the current problem, but likely isn't the best end scenario. We likely want to represent aspect-ratios as either a LayoutUnit ratio, or float ratio, depending on the source. (Specifically the LayoutUnit ratio is far better for the replaced element case, except for aspect-ratio only SVGs, a float ratio may be better for aspect-ratio only elements). Bug: 1296175 Change-Id: I1a1f62fdfdb27785eb076ccaa2d5a4e81566fd46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3459264 Reviewed-by: David Grogan <dgrogan@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#971292}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.