Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upcorrect for empty box shadow rects #1117
Merged
Conversation
|
The explicit empty check is to work around empty rects until we resolve servo/euclid#183 (comment) |
| @@ -786,9 +786,13 @@ impl FrameBuilder { | |||
|
|
|||
| let bs_rect = box_bounds.translate(box_offset) | |||
| .inflate(inflate_amount, inflate_amount); | |||
| // If we have negative inflate amounts. | |||
| // Have to explicitly check this since euclid::TypedRect relies on negative rects | |||
| let bs_rect_empty = bs_rect.size.width <= 0.0 || bs_rect.size.height <= 0.0; | |||
This comment has been minimized.
This comment has been minimized.
kvark
Apr 13, 2017
Member
should the conditions be < instead of <=, given the comment says "negative"?
This comment has been minimized.
This comment has been minimized.
changm
Apr 13, 2017
Author
Contributor
No, but I put "negative" there since Euclid correctly handles 0 sized rects. I can update the comment to reflect that if you want. I was hoping to just do bs_rect.is_empty().
|
@bors-servo r+ |
|
|
bors-servo
added a commit
that referenced
this pull request
Apr 13, 2017
correct for empty box shadow rects <!-- 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/1117) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
changm commentedApr 13, 2017
•
edited by larsbergstrom
This change is