mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Auto merge of #9171 - pcwalton:linear-gradients-background-clip, r=mbrubeck
Fix `linear_gradients_lengths_a.html` and fix Servo's use of "background-clip" to actually make it work. See the commit messages for details. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9171) <!-- Reviewable:end -->
This commit is contained in:
commit
a0d26445c0
3 changed files with 6 additions and 4 deletions
|
@ -335,7 +335,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
Some(computed::Image::LinearGradient(ref gradient)) => {
|
Some(computed::Image::LinearGradient(ref gradient)) => {
|
||||||
self.build_display_list_for_background_linear_gradient(display_list,
|
self.build_display_list_for_background_linear_gradient(display_list,
|
||||||
level,
|
level,
|
||||||
absolute_bounds,
|
&bounds,
|
||||||
&clip,
|
&clip,
|
||||||
gradient,
|
gradient,
|
||||||
style)
|
style)
|
||||||
|
@ -345,7 +345,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
||||||
display_list,
|
display_list,
|
||||||
layout_context,
|
layout_context,
|
||||||
level,
|
level,
|
||||||
absolute_bounds,
|
&bounds,
|
||||||
&clip,
|
&clip,
|
||||||
image_url)
|
image_url)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,10 @@ section {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border: solid black 1px;
|
border: solid black 1px;
|
||||||
|
background-clip: content-box;
|
||||||
}
|
}
|
||||||
#a {
|
#a {
|
||||||
background: linear-gradient(to right, white, white 30px, black 30px, black);
|
background-image: linear-gradient(to right, white, white 30px, black 30px, black);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -8,9 +8,10 @@ section {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border: solid black 1px;
|
border: solid black 1px;
|
||||||
|
background-clip: content-box;
|
||||||
}
|
}
|
||||||
#a {
|
#a {
|
||||||
background: linear-gradient(to right, white, white 30%, black 30%, black);
|
background-image: linear-gradient(to right, white, white 30%, black 30%, black);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue