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 upAllow a layer to mask its children to its boundaries #110
Conversation
|
Would it be better to allow a layer to clip to its bounds and instead express this through nesting of layers? That would obviously be harder to fit into what we have today. |
|
Yeah, my original goal here was to implement masks_to_bounds. There is some more work to do on scrolling before that is possible though. Right now root layers expand to the size of their children, which enables them to scroll properly. We need to refactor scrolling so that can happen with a root layer that defines the clipping region of all of its children. I plan to tackle this soon after the next couple patches. |
|
Okay. I reworked this using the "masks to bounds" paradigm. Things are working pretty well on the Servo side because of this, moving the needle on iframe scrolling from not working at all to mostly broken. :) |
|
Looks like it's hard to do this in a way that doesn't interfere with scrolling. Going to abandon this version for one that properly handles iframe scrolling. |
mrobinson commentedSep 16, 2014
This allows preventing iframes from overlowing their boundaries.