Remove SizeKeyword, merge it into Size (#33844)

It's not really useful to have it.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-10-15 12:30:22 +02:00 committed by GitHub
parent c37fb2e453
commit 564478ef0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 45 deletions

View file

@ -29,7 +29,7 @@ use crate::dom_traversal::Contents;
use crate::fragment_tree::FragmentFlags;
use crate::geom::{
AuOrAuto, LengthPercentageOrAuto, LogicalSides, LogicalVec2, PhysicalSides, PhysicalSize,
PhysicalVec, Size, SizeKeyword,
PhysicalVec, Size,
};
use crate::{ContainingBlock, IndefiniteContainingBlock};
@ -528,7 +528,7 @@ impl ComputedValuesExt for ComputedValues {
// TODO: We are assuming that Size::Initial doesn't stretch. However, it may actually
// stretch flex and grid items depending on the CSS Align properties, in that case
// the caller needs to take care of it.
Size::Keyword(SizeKeyword::Stretch) => true,
Size::Stretch => true,
Size::Numeric(length_percentage) => length_percentage.has_percentage(),
_ => false,
}