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 upBox-shadow has wrong corner radius in this testcase #2581
Closed
Labels
Comments
pcwalton
added a commit
to pcwalton/webrender
that referenced
this issue
Sep 18, 2018
`ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow() neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes servo#2581.
pcwalton
added a commit
to pcwalton/webrender
that referenced
this issue
Sep 18, 2018
`ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes servo#2581.
bors-servo
added a commit
that referenced
this issue
Sep 18, 2018
…r=kvark Call `ensure_no_corner_overlap()` to legalize border radii in `ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes #2581. r? @gw3583 <!-- 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/3080) <!-- Reviewable:end -->
pcwalton
added a commit
to pcwalton/webrender
that referenced
this issue
Sep 18, 2018
`ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes servo#2581.
pcwalton
added a commit
to pcwalton/webrender
that referenced
this issue
Sep 18, 2018
`ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes servo#2581.
bors-servo
added a commit
that referenced
this issue
Sep 19, 2018
…r=gw3583 Call `ensure_no_corner_overlap()` to legalize border radii in `ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes #2581. r? @gw3583 <!-- 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/3080) <!-- Reviewable:end -->
|
After the fix, this shadow is still a lot smaller than if you give it zero blur. |
|
OK, reopening so I can investigate. |
|
(In the box-shadow-playground tool, you can manipulate the blur radius by dragging the corners of the red boxes in the left half of the screen.) |
|
Oh, maybe the build I'm running doesn't have this fix yet. |
|
I was running a build without the fix. Now I'm running a build which does have the fix, and this bug is indeed fixed. Thanks! |
fschutt
added a commit
to fschutt/webrender
that referenced
this issue
Sep 23, 2018
`ClipItem::new_box_shadow()`. If no blur is present, `DisplayListFlattener::add_box_shadow()` calls `ClipItem::new_rounded_rect()` in its fast path, which calls `ensure_no_corner_overlap()`. However, in the slow path, which is used when blur is present, `ClipItem::new_box_shadow()` is called instead. Prior to this patch, `ClipItem::new_box_shadow()` neglected to call `ensure_no_corner_overlap()`. This is why the bug manifested itself only when blur was present. Closes servo#2581.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

It looks correct without a blur, but as soon as you add 1px of blur, things start to go wrong.
http://tests.themasta.com/box-shadow-playground/#blue_red_outset_0_1_265_265_250x250_0x0_0x0_250x250_350_0_1_-80
This is also broken in non-webrender Firefox, but in different and exciting ways.