Enable min-content, max-content, fit-content and stretch (#33492)

For the sizing properties.

We don't actually support them yet, just treating them as
the initial value.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-20 16:48:27 +02:00 committed by GitHub
parent 4bde9af515
commit 9597390d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 120 additions and 2798 deletions

View file

@ -10,7 +10,6 @@ use log::debug;
use serde::Serialize;
use style::computed_values::float::T as StyleFloat;
use style::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
use style::values::computed::Size;
use crate::block::FormattingContextType;
use crate::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils};
@ -551,12 +550,8 @@ impl SpeculatedFloatPlacement {
// traversal logic will know that objects later in the document
// might flow around this float.
let inline_size = flow.as_block().fragment.style.content_inline_size();
let fixed = match inline_size {
Size::Auto => false,
Size::LengthPercentage(ref lp) => {
lp.0.is_definitely_zero() || lp.0.maybe_to_used_value(None).is_some()
},
};
let fixed =
inline_size.is_definitely_zero() || inline_size.maybe_to_used_value(None).is_some();
if !fixed {
float_inline_size = Au::from_px(1)
}