mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 23:19:44 +00:00
LibWeb: Make LengthBox hold LengthPercentageOrAuto
Not every user of this requires an `auto` state, but most do. This has quite a big diff but most of that is mechanical: LengthPercentageOrAuto has `resolved_or_auto()` instead of `resolved()`, and `to_px_or_zero()` instead of `to_px()`, to make their output clearer.
This commit is contained in:
parent
70609cbf4d
commit
dd122e2f74
Notes:
github-actions[bot]
2025-09-04 12:32:43 +00:00
Author: https://github.com/AtkinsSJ
Commit: dd122e2f74
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6043
17 changed files with 199 additions and 215 deletions
|
@ -35,21 +35,21 @@ void InlineLevelIterator::enter_node_with_box_model_metrics(Layout::NodeWithStyl
|
|||
auto& used_values = m_layout_state.get_mutable(node);
|
||||
auto const& computed_values = node.computed_values();
|
||||
|
||||
used_values.margin_top = computed_values.margin().top().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.margin_bottom = computed_values.margin().bottom().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.margin_top = computed_values.margin().top().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
used_values.margin_bottom = computed_values.margin().bottom().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
|
||||
used_values.margin_left = computed_values.margin().left().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.margin_left = computed_values.margin().left().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
used_values.border_left = computed_values.border_left().width;
|
||||
used_values.padding_left = computed_values.padding().left().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.padding_left = computed_values.padding().left().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
|
||||
used_values.margin_right = computed_values.margin().right().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.margin_right = computed_values.margin().right().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
used_values.border_right = computed_values.border_right().width;
|
||||
used_values.padding_right = computed_values.padding().right().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.padding_right = computed_values.padding().right().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
|
||||
used_values.border_top = computed_values.border_top().width;
|
||||
used_values.border_bottom = computed_values.border_bottom().width;
|
||||
used_values.padding_bottom = computed_values.padding().bottom().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.padding_top = computed_values.padding().top().to_px(node, m_containing_block_used_values.content_width());
|
||||
used_values.padding_bottom = computed_values.padding().bottom().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
used_values.padding_top = computed_values.padding().top().to_px_or_zero(node, m_containing_block_used_values.content_width());
|
||||
|
||||
m_extra_leading_metrics->margin += used_values.margin_left;
|
||||
m_extra_leading_metrics->border += used_values.border_left;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue