Containing blocks contains styles rather than just a writing mode

This commit is contained in:
Simon Sapin 2019-12-07 13:40:57 +01:00
parent 40ad9a722d
commit fa1adf2ad3
6 changed files with 31 additions and 25 deletions

View file

@ -29,20 +29,19 @@ pub use flow::{BoxTreeRoot, FragmentTreeRoot};
use crate::geom::flow_relative::Vec2;
use crate::style_ext::ComputedValuesExt;
use style::computed_values::position::T as Position;
use style::logical_geometry::WritingMode;
use style::properties::ComputedValues;
use style::values::computed::{Length, LengthOrAuto};
use style::Zero;
struct ContainingBlock {
struct ContainingBlock<'a> {
inline_size: Length,
block_size: LengthOrAuto,
mode: WritingMode,
style: &'a ComputedValues,
}
struct DefiniteContainingBlock {
struct DefiniteContainingBlock<'a> {
size: Vec2<Length>,
mode: WritingMode,
style: &'a ComputedValues,
}
/// https://drafts.csswg.org/css2/visuren.html#relative-positioning