mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Snap rectangles to nearest pixels consistently.
Snapping the top-left and bottom-right corners separately can cause a rectangle to change size when offset by a subpixel amount. Instead, this patch snaps the top-left corner, then rounds the size to a whole pixel amount, so any rectangle of a given size will always have the same snapped size. Fixes #7152.
This commit is contained in:
parent
c315404db8
commit
3b6dc09e47
5 changed files with 41 additions and 13 deletions
|
@ -314,6 +314,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
|
|||
== text_decoration_cached.html text_decoration_cached_ref.html
|
||||
# text_decoration_propagation_a.html text_decoration_propagation_b.html
|
||||
!= text_decoration_smoke_a.html text_decoration_smoke_ref.html
|
||||
!= text_decoration_underline_subpx_a.html text_decoration_underline_subpx_ref.html
|
||||
== text_indent_a.html text_indent_ref.html
|
||||
== text_justify_none_a.html text_justify_none_ref.html
|
||||
!= text_overflow_a.html text_overflow_ref.html
|
||||
|
|
16
tests/ref/text_decoration_underline_subpx_a.html
Normal file
16
tests/ref/text_decoration_underline_subpx_a.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Underline test</title>
|
||||
<style>
|
||||
p {
|
||||
font: 14px "Times New Roman";
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello</p>
|
||||
</body>
|
||||
</html>
|
15
tests/ref/text_decoration_underline_subpx_ref.html
Normal file
15
tests/ref/text_decoration_underline_subpx_ref.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Underline test</title>
|
||||
<style>
|
||||
p {
|
||||
font: 14px "Times New Roman";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello</p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,4 @@
|
|||
[position-relative-035.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
expected:
|
||||
if os == "mac": FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue