mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Partial fix for background images on wikipedia pages.
This fixes the visual artifacts seen at the top of wikipedia pages by: - Setting clipping rect to avoid images going outside their bounds. - Handling case of background-position being >= 100% such that wrapping is required. However, the gradient is not currently visible on wikipedia. This relies on bug #1997 being fixed.
This commit is contained in:
parent
1124430eea
commit
29c3819246
5 changed files with 102 additions and 25 deletions
24
tests/ref/background_image_position_a.html
Normal file
24
tests/ref/background_image_position_a.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'ahem';
|
||||
src: url(fonts/ahem/ahem.ttf);
|
||||
}
|
||||
body {
|
||||
font-family: 'ahem';
|
||||
margin: 0;
|
||||
}
|
||||
span {
|
||||
background-image:url(line.png);
|
||||
background-position:0% 100%;
|
||||
font-size: 20px;
|
||||
color: rgba(255, 255, 0, 0);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<span>X</span>
|
||||
</body>
|
||||
</html>
|
18
tests/ref/background_image_position_ref.html
Normal file
18
tests/ref/background_image_position_ref.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div></div>
|
||||
</body>
|
||||
</html>
|
|
@ -112,3 +112,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
|
|||
== fixed_width_overrides_child_intrinsic_width_a.html fixed_width_overrides_child_intrinsic_width_ref.html
|
||||
== abs_float_pref_width_a.html abs_float_pref_width_ref.html
|
||||
== alpha_png_a.html alpha_png_b.html
|
||||
== background_image_position_a.html background_image_position_ref.html
|
||||
|
|
BIN
tests/ref/line.png
Normal file
BIN
tests/ref/line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 135 B |
Loading…
Add table
Add a link
Reference in a new issue