mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
layout: Rewrite clipping to be a two-phase process that takes physical
border box positions and transforms into account. Clipping region computation now follows a simple process: (1) in the parent's coordinate system, parents store appropriate clipping regions into children; (2) each child moves its clipping region to its own coordinate system if necessary. Because clipping region computation is now based on stacking-relative border box positions and the `transform_rect` method, it can handle `position: relative` offsets and more types of transforms, such as scaling. Improves etsy.com. Closes #13753.
This commit is contained in:
parent
759185abe0
commit
7df456e8ac
9 changed files with 251 additions and 162 deletions
|
@ -935,7 +935,9 @@ pub struct BaseFlow {
|
|||
/// assignment.
|
||||
pub late_absolute_position_info: LateAbsolutePositionInfo,
|
||||
|
||||
/// The clipping region for this flow and its descendants, in layer coordinates.
|
||||
/// The clipping region for this flow and its descendants, in the coordinate system of the
|
||||
/// nearest ancestor stacking context. If this flow itself represents a stacking context, then
|
||||
/// this is in the flow's own coordinate system.
|
||||
pub clip: ClippingRegion,
|
||||
|
||||
/// The stacking-relative position of the display port.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue