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

Zero width borders break WR #2812

Closed
nc4rrillo opened this issue Jun 8, 2018 · 0 comments
Closed

Zero width borders break WR #2812

nc4rrillo opened this issue Jun 8, 2018 · 0 comments

Comments

@nc4rrillo
Copy link
Contributor

@nc4rrillo nc4rrillo commented Jun 8, 2018

While updating to the latest WR I discovered the following YAML:

root:
  items:
    - type: stacking-context
      bounds: [0, 0, 500, 500]
      items:
        - type: border
          bounds: [ 0, 0, 50, 50 ]
          width: [ 0, 0, 0, 0 ]
          border-type: normal
          style: [ solid, solid, solid, solid ]
          color: [ blue, blue, blue, blue ]

breaks WR with the following assertion:

thread 'WRRenderBackend#0' panicked at 'assertion failed: descriptor.size.width > 0 && descriptor.size.height > 0', webrender\src\texture_cache.rs:801:9

I think this has to do with moving borders to the brush code path and caching them in the texture cache.

Probably Gecko/Servo stop completely zero width borders from hitting WR at all. Should WR treat this as a no op rather than hitting an assertion?

gw3583 added a commit to gw3583/webrender that referenced this issue Jun 18, 2018
bors-servo added a commit that referenced this issue Jun 18, 2018
Handle zero-width sized borders without crashing.

Fixes #2812.

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