commit | d1b0fc8e45dcbe00e9060a3dba87c398425ae178 | [log] [tgz] |
---|---|---|
author | Manuel Rego Casasnovas <rego@igalia.com> | Tue May 19 10:23:27 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 19 10:23:27 2020 |
tree | aea7e15575c629554eb2b65c228797ddf9c7e4dd | |
parent | 3f6afe9ca55b041f9080fa6b4597471403ed2733 [diff] |
Use floor instead of round for decimal border widths Chromium started to support subpixel borders 3 years ago (see https://codereview.chromium.org/2640143005). At that time it was decided to round decimal values (as Edge was also doing it). But edge rounded decimal values for both borders and outlines, however Chromium only did it for borders (while flooring outlines). Now that Edge uses Chromium, it has the same inconsistency too. The other browsers Firefox and WebKit floor both borders and outlines, so this patch is moving towards improving interoperability between browsers on border pixel snapping. This behavior is not defined in the spec, but if all browsers behave the same that would simplify web author's lives. The patch is basically changing roundf() calls by floorf(), and then updating and rebaselining tests according to the new behavior. It also adds two WPT tests to ensure that pixel snapping works the same in all browsers. BUG=1081246 TEST=fast/sub-pixel/sub-pixel-border-2.html TEST=external/wpt/css/css-backgrounds/border-width-pixel-snapping-001-a.html TEST=external/wpt/css/css-backgrounds/border-width-pixel-snapping-002-a.html Change-Id: I14adfc78d2c9b7df697c7ce041dcbf1fe869e652 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199140 Commit-Queue: Manuel Rego <rego@igalia.com> Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#770064}
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.
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.