Apply optical sizing independent of zoom level or device-pixel ratio Applying optical sizing needs to be done based on specified CSS font size (taking size-adjust into account), without independent of the page zoom factor. If the latter is factored in, with zoom-for-dsf, the device pixel ratio of the screen contributes to what optical size is applied, leading to wrong results. Example: With a device-pixel-ratio of two, at font-size 12px an opsz of 24px would be applied, instead of 12px - leading to unexpected results. Introduce a new getter on FontDescription which can return the unzoomed specified font size, including adjustments through size-adjust. Use that in BinaryFontFaceSource and RemoteFontFaceSource to pass it to the font instantiation and application of opsz in FontCustomPlatformData. Add internal WPT tests as clones of the existing opsz tests + zoom. These can't be external WPT tests as zoom cannot be tested there, see issue https://github.com/web-platform-tests/wpt/issues/12725. Fixed: 1305237 Change-Id: I92f2b7d8dc0ea970c28ad84db067b17845e5d961 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3827422 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1034152}
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.