Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix combination of border and border-radius being drawn incorrectly #26215

Merged
merged 2 commits into from May 2, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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);
}

@@ -0,0 +1,2 @@
[border-radius-image.html]
expected: FAIL
@@ -896,6 +896,19 @@
{}
]
],
"border-radius-image.html": [
"2e30ba4bcb40b0fd50ae2c35992e06423720b26e",
[
null,
[
[
"/_mozilla/css/border-radius-image-ref.html",
"=="
]
],
{}
]
],
"border_black_groove.html": [
"49e1647a6f71e320770225ad537b4fd4020bd700",
[
@@ -8670,6 +8683,10 @@
"0dddcf89d26d6ac1efe7b0d65e5607a3ed771b46",
[]
],
"border-radius-image-ref.html": [
"3aa9bea5a48a4d809fabf1108049a24365edb07f",
[]
],
"border_black_solid.html": [
"63ef95bef813b5c3a75c0da4cd7773f35db3c5ff",
[]
@@ -0,0 +1,2 @@
[border-radius-image.html]
fuzzy: /_mozilla/css/border-radius-image-ref.html:63;696
@@ -0,0 +1,10 @@
<style>
#ref {
width: 100px;
height: 100px;
border: 10px solid black;
border-radius: 60px;
background-color: #00ff00;
}
</style>
<div id="ref"></div>
@@ -0,0 +1,9 @@
<link rel="match" href="border-radius-image-ref.html">
<!-- Border-radius should apply to the actual image as well as the border -->
<style>
img {
border: 10px solid black;
border-radius: 60px;
}
</style>
<img src="/images/green-1x1.png" width=100 height=100>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.