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:
bors-servo 2016-01-08 15:10:02 +05:30
commit a0d26445c0
3 changed files with 6 additions and 4 deletions

View file

@ -335,7 +335,7 @@ impl FragmentDisplayListBuilding for Fragment {
Some(computed::Image::LinearGradient(ref gradient)) => {
self.build_display_list_for_background_linear_gradient(display_list,
level,
absolute_bounds,
&bounds,
&clip,
gradient,
style)
@ -345,7 +345,7 @@ impl FragmentDisplayListBuilding for Fragment {
display_list,
layout_context,
level,
absolute_bounds,
&bounds,
&clip,
image_url)
}

View file

@ -9,9 +9,10 @@ section {
width: 100px;
height: 100px;
border: solid black 1px;
background-clip: content-box;
}
#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>
</head>

View file

@ -8,9 +8,10 @@ section {
width: 100px;
height: 100px;
border: solid black 1px;
background-clip: content-box;
}
#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>
</head>