mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-03 14:50:02 +00:00
LibWeb/CSS: Resolve used value for the inline-size
property
This commit is contained in:
parent
1739e2851d
commit
53bf0ef225
Notes:
github-actions[bot]
2025-03-10 13:02:08 +00:00
Author: https://github.com/tcl3
Commit: 53bf0ef225
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3881
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 67 additions and 4 deletions
|
@ -243,7 +243,7 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
|||
|
||||
// -> block-size
|
||||
// -> height
|
||||
// FIXME: -> inline-size
|
||||
// -> inline-size
|
||||
// -> margin-block-end
|
||||
// -> margin-block-start
|
||||
// -> margin-bottom
|
||||
|
@ -277,6 +277,13 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
|||
return style_value_for_size(Size::make_px(maybe_used_height.release_value()));
|
||||
return style_value_for_size(layout_node.computed_values().height());
|
||||
}
|
||||
case PropertyID::InlineSize: {
|
||||
auto writing_mode = layout_node.computed_values().writing_mode();
|
||||
auto is_vertically_oriented = first_is_one_of(writing_mode, WritingMode::VerticalLr, WritingMode::VerticalRl);
|
||||
if (is_vertically_oriented)
|
||||
return style_value_for_property(layout_node, PropertyID::Height);
|
||||
return style_value_for_property(layout_node, PropertyID::Width);
|
||||
}
|
||||
case PropertyID::MarginBlockEnd:
|
||||
if (auto maybe_used_value = used_value_for_property([&](auto const& paintable_box) { return pixels_for_pixel_box_logical_side(layout_node, paintable_box.box_model().margin, LogicalSide::BlockEnd); }); maybe_used_value.has_value())
|
||||
return LengthStyleValue::create(Length::make_px(maybe_used_value.release_value()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue