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

Sync changes from mozilla-central #3824

Merged
merged 1 commit into from Jan 8, 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

Bug 1606827 - A corner is not rounded when the radius is zero in eith…

…er dimension (not necessarily both) r=nical

Differential Revision: https://phabricator.services.mozilla.com/D58615

[wrupdater] From https://hg.mozilla.org/mozilla-central/rev/5105e62fbbe6cb144a7a7a756128da326d724004
  • Loading branch information
SimonSapin authored and moz-gfx committed Jan 7, 2020
commit d4bf9516f5bb188c321e4f1e46f461dcc14426d8
@@ -1302,12 +1302,14 @@ impl BorderRadius {
}
}

/// Return whether, in each corner, the radius in *either* direction is zero.
/// This means that none of the corners are rounded.
pub fn is_zero(&self) -> bool {
if let Some(radius) = self.is_uniform() {
radius == 0.0
} else {
false
}
let corner_is_zero = |corner: &LayoutSize| corner.width == 0.0 || corner.height == 0.0;
corner_is_zero(&self.top_left) &&
corner_is_zero(&self.top_right) &&
corner_is_zero(&self.bottom_right) &&
corner_is_zero(&self.bottom_left)
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.