mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix corner clipping typos in layout-2020
inner_radii() had a minus sign that shouldn't be there. And padding_edge_clip() and content_edge_clip() clearly need to to use the padding_rect() and content_rect() instead of border_rect. Tests: - css/css-backgrounds/background-clip-padding-box-with-border-radius.html - css/css-backgrounds/background-rounded-image-clip.html
This commit is contained in:
parent
7eca93bb7a
commit
88b9ecea3c
3 changed files with 3 additions and 7 deletions
|
@ -374,7 +374,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
.to_physical(self.fragment.style.writing_mode)
|
||||
.to_webrender(),
|
||||
),
|
||||
self.border_rect,
|
||||
*self.padding_rect(),
|
||||
builder,
|
||||
)
|
||||
})
|
||||
|
@ -389,7 +389,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
.to_physical(self.fragment.style.writing_mode)
|
||||
.to_webrender(),
|
||||
),
|
||||
self.border_rect,
|
||||
*self.content_rect(),
|
||||
builder,
|
||||
)
|
||||
})
|
||||
|
@ -662,7 +662,7 @@ fn image_rendering(ir: style::computed_values::image_rendering::T) -> wr::ImageR
|
|||
|
||||
/// Radii for the padding edge or content edge
|
||||
fn inner_radii(mut radii: wr::BorderRadius, offsets: units::LayoutSideOffsets) -> wr::BorderRadius {
|
||||
radii.top_left.width -= -offsets.left;
|
||||
radii.top_left.width -= offsets.left;
|
||||
radii.bottom_left.width -= offsets.left;
|
||||
|
||||
radii.top_right.width -= offsets.right;
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[background-clip-padding-box-with-border-radius.html]
|
||||
expected: FAIL
|
|
@ -1,2 +0,0 @@
|
|||
[background-rounded-image-clip.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue