mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Expand DisplayList layer bounds to whole pixels
Before passing these layers to the paint task, expand them to pixel boundaries. This ensures that subpixel edges of the layer will not be clipped away and helps prevent rounding issues with layer contents. Fixes #8166.
This commit is contained in:
parent
9501564e01
commit
a7a58e47a0
8 changed files with 106 additions and 30 deletions
|
@ -1919,6 +1919,18 @@
|
|||
"url": "/_mozilla/css/last_of_type_pseudo_a.html"
|
||||
}
|
||||
],
|
||||
"css/layerization_layer_size.html": [
|
||||
{
|
||||
"path": "css/layerization_layer_size.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/layerization_layer_size_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/layerization_layer_size.html"
|
||||
}
|
||||
],
|
||||
"css/layerization_z_order_a.html": [
|
||||
{
|
||||
"path": "css/layerization_z_order_a.html",
|
||||
|
|
28
tests/wpt/mozilla/tests/css/layerization_layer_size.html
Normal file
28
tests/wpt/mozilla/tests/css/layerization_layer_size.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<html>
|
||||
<link rel="match" href="/_mozilla/css/layerization_layer_size_ref.html">
|
||||
<style>
|
||||
|
||||
div {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 10.5px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- This div is positioned so should be rendered on top of the following
|
||||
inline iframe. Since the iframe has a layer, the div should also be
|
||||
promoted to a layer. This should not affect its final rendered position. -->
|
||||
<div></div>
|
||||
<iframe></iframe>
|
||||
</body>
|
||||
</html>
|
19
tests/wpt/mozilla/tests/css/layerization_layer_size_ref.html
Normal file
19
tests/wpt/mozilla/tests/css/layerization_layer_size_ref.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<html>
|
||||
<style>
|
||||
|
||||
div {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 10.5px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue