-
Notifications
You must be signed in to change notification settings - Fork 279
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
Allow items to be clipped by the intersection of multiple clip chains #1964
Comments
/cc @mrobinson |
Question - do we need an arbitrary number of clip chains that can be specified, or do we know / think that two would cover all use cases? |
You can nest the example arbitrarily deeply, so I think we would need an arbitrary number. The other way to resolve this conundrum would be to make it so that clips on a stacking context always apply to everything that's rendered by that stacking context (including the stacking context's contents). This would be closer to what Gecko is doing. |
@mstange Just to clarify, stacking contexts don't have clips. For filters, the boundaries of the filtered area are determined by the display items inside (and their respective positions). |
I can understand now why we'd want to add the option to add a special clip to a stacking context. |
@mrobinson It would be good to prioritize fixing this, not just for correctness but also to unlock some clip optimizations on the gecko side (in that we can do a better job of deduplicating the clips we send to WR). |
Also for the record, doing this via clips on a stacking context always applying to their contents would work, but it would mean that we would start pushing stacking context where we weren't before, just for the sake of getting the clips working properly. This might end up being pretty heavyweight. I think from my point of view the best API would be something like a |
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#1964.
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#1964.
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#1964.
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#1964.
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#840. Fixes servo#1964.
API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes servo#840. Fixes servo#1964.
Add support for API-defined ClipChains API-defined clip chains allow constructing combinations of clips that select any combination of clips from the ClipScrollTree without regard to parents of clips. A ClipChain is defined by an optional ClipChain parent and a vector of clips to use for that chain. A chain's clips are combined with its parents clips to provide all the clips for display items that set their clipping ClipId as the clip chain via ClipId::ClipChain. Fixes #1964. <!-- 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/2300) <!-- Reviewable:end -->
I'm not convinced this is entirely covered by #840, so I'm filing a new issue.
The scenario that we want to support is described by Markus at https://bugzilla.mozilla.org/show_bug.cgi?id=1408792#c13 - the problem is that the WR API doesn't allow us to say "this item should be clipped by the intersection of these two clip chains". We can only specify a single clip chain per item, plus a "local clip" on the item, which isn't powerful enough to support the use cases in question.
The text was updated successfully, but these errors were encountered: