Bug 1638583 [wpt PR 23657] - Fix missing borders on narrow elements, a=testonly
commit10424427ee3709b2dbb84d8bbe8a5418a8cb7e2f
authorStephen Chenney <schenney@chromium.org>
Tue, 26 May 2020 11:21:30 +0000 (26 11:21 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 27 May 2020 11:40:01 +0000 (27 11:40 +0000)
tree6397adb55bb4d706b8058e020213ebb3846e5b83
parente78421ac4c22e417278745c21ba2e63b53aadeac
Bug 1638583 [wpt PR 23657] - Fix missing borders on narrow elements, a=testonly

Automatic update from web-platform-tests
Fix missing borders on narrow elements

A recent change for painting narrow elements whose widths falls below
0.5 under zoom has caused problems when such elements have a single
pixel border. In such cases, the element size, including the border, is
greater than 1 and snaps normally, but the inner border rect has non
zero size below 0.5 and snaps up to size 1, instead of zero. As a result
the inner border rects is the same as the outer border rect and the
border is clipped out.

Here we change the rounding for inner border rect to not enforce the
non-zero-width constraint, as it is inappropriate in this case.

Bug: 1070091
Change-Id: Ia368ca00375fe5d8a060b88c2d9e314f25679b07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204362
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769828}

--

wpt-commits: 70abf62abfa74a05a4abc326a9708d0fe59e1be7
wpt-pr: 23657
testing/web-platform/tests/css/css-borders/borders-on-sub-unit-sized-elements.html [new file with mode: 0644]
testing/web-platform/tests/css/css-borders/reference/borders-on-sub-unit-sized-elements-ref.html [new file with mode: 0644]