fune/testing/web-platform/tests/css/css-sizing/thin-element-render.html
Stephen Chenney 8981214426 Bug 1605201 [wpt PR 20871] - Never let a non-zero-size pixel snap to zero size, a=testonly
Automatic update from web-platform-tests
Never let a non-zero-size pixel snap to zero size

The logic for LayoutUnit::SnapSizeToPixel maps the size to
the closest pixel align edge given a location. When a size of
width less than 1 happens to straddle a pixel aligned edge this
forces the size to zero.

Force the size to always be non-zero if the input size is non-zero,
and change PhysicalRect to use the LayoutRect snapping to get
correct cull rects.

Bug: 793785
Change-Id: Ia4c30d10c389fb4677006441aac9ee380a7c2f41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948057
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726516}

--

wpt-commits: 30896bb9378b84ffd5583a1088d4e2862f19dc66
wpt-pr: 20871
2019-12-23 11:14:54 +00:00

33 lines
No EOL
825 B
HTML

<!DOCTYPE html>
<title>Thin elements should still paint even at small size.</title>
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#width-height-keywords">
<link rel="match" href="thin-element-render-ref.html">
<html>
<head>
<style>
.disappearing-border {
height:0.25px;
width:100%;
border-top: 0.25px solid black;
}
.disappearing-box {
height:0.25px;
width:100%;
background-color: black;
}
body {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="disappearing-border"></div>
<div style="height:8px;"></div>
<div class="disappearing-box"></div>
</body>
</html>