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 uptransformed complex clips should be nerfed #2700
Comments
|
bugzilled: https://bugzilla.mozilla.org/show_bug.cgi?id=1455839 (contains the html version of this testcase) |
|
@mrobinson Have you got cycles to take a look at this one? |
|
@mrobinson check out https://bug1455839.bmoattachments.org/attachment.cgi?id=8971412 in vanilla firefox |
|
tl;dr: you should just see a solid black rect. |
|
Here's some wrench yaml showing a reduced test case ---
root:
items:
- type: clip
bounds: [100, 100, 100, 100]
id: 2
-
type: stacking-context
clip-and-scroll: 2
transform: rotate(0.25)
items:
- type: clip
bounds: [0, 0, 2400, 900]
id: 3
complex:
- rect: [ 0, 0, 2400, 900 ]
radius: 50
- type: rect
color: [0, 255, 0, 1]
bounds: [0, 0, 2400, 900]
clip-and-scroll: 3There should be a single green 100x100 rectangle at 100x100. Instead an area the size of the radius of the interior clip shows up surrounding the 100x100 rectangle. This seems to be a bad interaction between the rotation and a clip with a radius. The rotation suggests that it's an issue that involves complex clips that span coordinate systems. |
When clip segments were optimized away due to having no intersection with the outer screen bounds, they were treated as opaque regions. This is due to the fact that an Option is not expressive enough to represent the three different kinds of distinct destinies of clip segments. This change replaces the Option with an enum that is either a RenderTaskId, Opaque, or Empty to represent a clip segment that should not be rendered. Fixes servo#2700.
When clip segments were optimized away due to having no intersection with the outer screen bounds, they were treated as opaque regions. This is due to the fact that an Option is not expressive enough to represent the three different kinds of distinct destinies of clip segments. This change replaces the Option with an enum that is either a RenderTaskId, Opaque, or Empty to represent a clip segment that should not be rendered. Fixes servo#2700.
Fix issue with optimized away clip segments When clip segments were optimized away due to having no intersection with the outer screen bounds, they were treated as opaque regions. This is due to the fact that an Option is not expressive enough to represent the three different kinds of distinct destinies of clip segments. This change replaces the Option with an enum that is either a RenderTaskId, Opaque, or Empty to represent a clip segment that should not be rendered. Fixes #2700. <!-- 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/2707) <!-- Reviewable:end -->
The boundary of the clipped content can't be clipped by anything, escaping parent stacking contexts and even overlapping the chrome.
pls nerf
Here's a slightly scaled and rotated div with border-radius inside an overflow:hidden parent div:
As you can see, the edge of the inner div has escape the parent, clippable by no mortal.
I've reduced this to the following capture, but need to call it a day:
scene.yaml