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

Inset box shadows with spread_radius > border_radius explode #1916

Closed
mstange opened this issue Oct 23, 2017 · 0 comments
Closed

Inset box shadows with spread_radius > border_radius explode #1916

mstange opened this issue Oct 23, 2017 · 0 comments

Comments

@mstange
Copy link
Contributor

@mstange mstange commented Oct 23, 2017

https://bugzilla.mozilla.org/show_bug.cgi?id=1411074

Testcase

Expected vs actual results:
screen shot 2017-10-23 at 7 15 51 pm

This seems to be caused by the sharpness_scale adjustment that's done when computing the impact of the spread radius on the corner radius. This adjustment is in the spec, but neither Firefox nor Chrome implement it, so I think we can just drop it again.

<!DOCTYPE html>
<meta charset="utf-8">

<title>Box-shadows with spread radius needs to affect non-zero border-radius</title>

<style>

body {
  margin: 0;
}

div {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin: 20px;
  box-shadow: 0 0 0 10px inset blue;
}
.withRadius {
  border-radius: 20px;
}

</style>

<div style="border-radius: 20px"></div>
<div style="border-radius: 25px"></div>
<div style="border-radius: 10px"></div>
<div style="border-radius: 9px"></div>
<div style="border-radius: 8px"></div>
<div style="border-radius: 7px"></div>
<div style="border-radius: 6px"></div>
<div style="border-radius: 5px"></div>
<div style="border-radius: 4px"></div>
@mstange mstange closed this Oct 23, 2017
@mstange mstange reopened this Oct 23, 2017
glennw pushed a commit to glennw/webrender that referenced this issue Oct 24, 2017
bors-servo added a commit that referenced this issue Oct 24, 2017
Fix inset box shadows with spread radius > border radius.

Fixes #1916.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1918)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.