mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make border radii clip their contents.
Needed for browser.html rounded corners.
This commit is contained in:
parent
aea8d8959d
commit
28a71c4820
5 changed files with 70 additions and 7 deletions
|
@ -335,7 +335,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let border_radii = build_border_radius(absolute_bounds, style.get_border());
|
||||
let mut clip = (*clip).clone();
|
||||
if !border_radii.is_square() {
|
||||
clip = clip.intersect_with_rounded_rect(absolute_bounds, &border_radii)
|
||||
clip.intersect_with_rounded_rect(absolute_bounds, &border_radii)
|
||||
}
|
||||
|
||||
// FIXME: This causes a lot of background colors to be displayed when they are clearly not
|
||||
|
@ -1473,6 +1473,12 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let border_radii = build_border_radius(stacking_relative_border_box,
|
||||
self.style.get_border());
|
||||
if !border_radii.is_square() {
|
||||
current_clip.intersect_with_rounded_rect(stacking_relative_border_box, &border_radii)
|
||||
}
|
||||
}
|
||||
|
||||
fn build_display_list_for_text_fragment(&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue