Changes between Version 1 and Version 2 of CSSContainment
- Timestamp:
- Mar 29, 2021, 6:49:20 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CSSContainment
v1 v2 24 24 Layout containment limits the scope of layout, it makes the contained element opaque for layout purposes; nothing outside can affect its internal layout, and vice versa. 25 25 26 The central method to check whether layout containment should apply to the element will be called 'shouldApplyLayoutContainment'. It will check the conditions from the spec [3], i.e. it generates a principal box, is not an internal table box (other than table-cell), not an internal ruby box and not a non-atomic inline-levelbox.26 The central method to check whether layout containment should apply to the element will be called `shouldApplyLayoutContainment`. It will check the conditions from the spec [3], i.e. it generates a principal box, is not an internal table box (other than table-cell), not an internal ruby box and not a non-atomic inline-levelbox. 27 27 28 28 Following the layout containment box algorithm [4]: 29 - The layout containment box establishes an independent formatting context. To implement this, RenderBox::createsNewFormattingContextwill have to be adapted.29 - The layout containment box establishes an independent formatting context. To implement this, `RenderBox::createsNewFormattingContext` will have to be adapted. 30 30 31 - If the computed value of the overflow property is either visible or clip or a combination thereof, any overflow must be treated as ink overflow. Adjust LayoutBox::LayoutOverflowRectForPropagation to not add visual overflow if shouldApplyLayoutContainmentis true, since in that case it will be treated as ink overflow.31 - If the computed value of the overflow property is either visible or clip or a combination thereof, any overflow must be treated as ink overflow. Adjust `LayoutBox::LayoutOverflowRectForPropagation` to not add visual overflow if `shouldApplyLayoutContainment` is true, since in that case it will be treated as ink overflow. 32 32 33 - The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block. This needs changes in RenderElement::canContainFixedPositionObjects and RenderElement::canContainAbsolutelyPositionedObjects.33 - The layout containment box establishes an absolute positioning containing block and a fixed positioning containing block. This needs changes in `RenderElement::canContainFixedPositionObjects` and `RenderElement::canContainAbsolutelyPositionedObjects`. 34 34 35 - The layout containment box creates a stacking context. This requires an additional check in RenderLayer::shouldBeCSSStackingContext.35 - The layout containment box creates a stacking context. This requires an additional check in `RenderLayer::shouldBeCSSStackingContext`. 36 36 37 - For the purpose of the vertical-align property, or any other property whose effects need to relate the position of the layout containment box's baseline to something other than its descendants, the containment box is treated as having no baseline. The cooperating methods baselinePosition, firstLineBaseline and inlineBlockBaselinewill need to be adapted for various kind of renderers to support this.37 - For the purpose of the vertical-align property, or any other property whose effects need to relate the position of the layout containment box's baseline to something other than its descendants, the containment box is treated as having no baseline. The cooperating methods `baselinePosition`, `firstLineBaseline` and `inlineBlockBaseline` will need to be adapted for various kind of renderers to support this. 38 38 39 Layout contained elements act as relayout boundaries, so objectIsRelayoutBoundaryshould be changed in order40 for RenderObject::markContainingBlocksForLayoutto avoid marking the contained element ancestors.39 Layout contained elements act as relayout boundaries, so `objectIsRelayoutBoundary` should be changed in order 40 for `RenderObject::markContainingBlocksForLayout` to avoid marking the contained element ancestors. 41 41 42 42 [1] https://www.w3.org/TR/css-contain-1/ [[br]]