mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Keep track of the containing block writing mode.
This is necessary for correctly converting `relative_containing_block_size` to physical coordinates.
This commit is contained in:
parent
8221bfc3ef
commit
cabbbcc978
5 changed files with 38 additions and 4 deletions
|
@ -683,6 +683,9 @@ pub struct AbsolutePositionInfo {
|
|||
/// The size of the containing block for relatively-positioned descendants.
|
||||
pub relative_containing_block_size: LogicalSize<Au>,
|
||||
|
||||
/// The writing mode for `relative_containing_block_size`.
|
||||
pub relative_containing_block_mode: WritingMode,
|
||||
|
||||
/// The position of the absolute containing block relative to the nearest ancestor stacking
|
||||
/// context. If the absolute containing block establishes the stacking context for this flow,
|
||||
/// and this flow is not itself absolutely-positioned, then this is (0, 0).
|
||||
|
@ -700,6 +703,7 @@ impl AbsolutePositionInfo {
|
|||
// of the root layer.
|
||||
AbsolutePositionInfo {
|
||||
relative_containing_block_size: LogicalSize::zero(writing_mode),
|
||||
relative_containing_block_mode: writing_mode,
|
||||
stacking_relative_position_of_absolute_containing_block: Point2D::zero(),
|
||||
layers_needed_for_positioned_flows: false,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue