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

Webrender doesn't curve borders if both neighbours are invisible #1291

Closed
Gankra opened this issue May 24, 2017 · 1 comment
Closed

Webrender doesn't curve borders if both neighbours are invisible #1291

Gankra opened this issue May 24, 2017 · 1 comment

Comments

@Gankra
Copy link
Contributor

@Gankra Gankra commented May 24, 2017

Here are two borders that should render the same (to the human eye) but don't in webrender:

screen shot 2017-05-24 at 11 46 02 am

left (incorrect render):

          bounds: [28, 18, 144, 122]
          clip: [-17895698, -17895698, 35791396, 35791396]
          "clip-and-scroll": 0
          type: border
          width: [18, 0, 18, 0]
          "border-type": normal
          color: 0 0 255 1.0000
          style:
            - solid
            - none
            - solid
            - none
          radius: [61, 61]

right (correct render):

          bounds: [192, 18, 144.03334, 122]
          clip: [-17895698, -17895698, 35791396, 35791396]
          "clip-and-scroll": 0
          type: border
          width: [18, 0.016666668, 18, 0.016666668]
          "border-type": normal
          color: 0 0 255 1.0000
          style: solid
          radius: [61, 61]

The problem is that webrender seems to give up on applying curvature if both neighbours (in this case left and right) have no rendered size. This can be accomplished by either border-width: 0 or style: none -- in this case both.

This is seen in this gecko reftest: layout/reftests/border-radius/corner-joins-1.xhtml -- both servo and gecko feed webrender zero-size borders.

@Gankra
Copy link
Contributor Author

@Gankra Gankra commented May 24, 2017

I'm looking into fixing this, since it should be straightforward.

bors-servo added a commit that referenced this issue May 25, 2017
don't take rectangular border fast path for curved borders

fixes #1291

<!-- 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/1293)
<!-- 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.

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