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

box-shadow + border-radius doesn't work #189

Closed
glennw opened this issue Feb 19, 2016 · 2 comments
Closed

box-shadow + border-radius doesn't work #189

glennw opened this issue Feb 19, 2016 · 2 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented Feb 19, 2016

It currently sets a clip out rect around the visual box. Could we instead modify the box-shadow raster op shader to detect if inside the visual box and output 0?

cc @pcwalton

@jaredpetker
Copy link
Contributor

@jaredpetker jaredpetker commented Dec 20, 2016

I don't quite grok what you mean @glennw, I was looking for a ticket with regards to the fact that corner radii clipping doesn't seem to be supported for shadows, and only clips out a square, is this what you are referring to here as well?

@changm
Copy link
Contributor

@changm changm commented Feb 21, 2017

Here's a test case:

<html><head><style>div { box-shadow: 0px 0px 5px 0px #000000; width: 50px; height: 50px; border-radius: 20px; }</style></head><body><div></div></body></html>

What it should look like:
correct

What it actually looks like:
incorrect

glennw pushed a commit to glennw/webrender that referenced this issue Mar 28, 2017
This is not a super-efficient implementation, but it adds the
functionality required for box shadows that have border radii.

Once this is in place, we can do some follow up optimization passes.

Fixes servo#189.
glennw pushed a commit to glennw/webrender that referenced this issue Mar 28, 2017
This is not a super-efficient implementation, but it adds the
functionality required for box shadows that have border radii.

Once this is in place, we can do some follow up optimization passes.

Fixes servo#189.
bors-servo added a commit that referenced this issue Mar 29, 2017
Add support for clip in/out.

This is not a super-efficient implementation, but it adds the
functionality required for box shadows that have border radii.

Once this is in place, we can do some follow up optimization passes.

Fixes #189.

<!-- 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/1015)
<!-- 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
3 participants
You can’t perform that action at this time.