mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #26215 - dralley:fix-image-border, r=jdm
Fix combination of border and border-radius being drawn incorrectly fixes #20922 Manual testcase in the attached issue - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #20922 <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___
This commit is contained in:
commit
73abf56e99
6 changed files with 52 additions and 2 deletions
|
@ -1733,8 +1733,18 @@ impl Fragment {
|
|||
build_border_radius_for_inner_rect(stacking_relative_border_box, &self.style);
|
||||
|
||||
if !radii.is_zero() {
|
||||
let clip_id =
|
||||
state.add_late_clip_node(stacking_relative_border_box.to_layout(), radii);
|
||||
// This is already calculated inside of build_border_radius_for_inner_rect(), it would be
|
||||
// nice if it were only calculated once.
|
||||
let border_widths = self
|
||||
.style
|
||||
.logical_border_width()
|
||||
.to_physical(self.style.writing_mode);
|
||||
let clip_id = state.add_late_clip_node(
|
||||
stacking_relative_border_box
|
||||
.inner_rect(border_widths)
|
||||
.to_layout(),
|
||||
radii,
|
||||
);
|
||||
state.current_clipping_and_scrolling = ClippingAndScrolling::simple(clip_id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue