mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibWeb: Add accessors for UsedValues::computed_{width,height}
This is preparation for doing some more work when assigning to these values.
This commit is contained in:
parent
c12c9eed38
commit
ed8930fff5
11 changed files with 155 additions and 137 deletions
|
@ -34,9 +34,9 @@ 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_left = computed_values.margin().left.resolved(node, CSS::Length::make_px(m_container_state.content_width)).to_px(node);
|
||||
used_values.margin_left = computed_values.margin().left.resolved(node, CSS::Length::make_px(m_container_state.content_width())).to_px(node);
|
||||
used_values.border_left = computed_values.border_left().width;
|
||||
used_values.padding_left = computed_values.padding().left.resolved(node, CSS::Length::make_px(m_container_state.content_width)).to_px(node);
|
||||
used_values.padding_left = computed_values.padding().left.resolved(node, CSS::Length::make_px(m_container_state.content_width())).to_px(node);
|
||||
|
||||
m_extra_leading_metrics->margin += used_values.margin_left;
|
||||
m_extra_leading_metrics->border += used_values.border_left;
|
||||
|
@ -54,9 +54,9 @@ void InlineLevelIterator::exit_node_with_box_model_metrics()
|
|||
auto& used_values = m_layout_state.get_mutable(node);
|
||||
auto const& computed_values = node.computed_values();
|
||||
|
||||
used_values.margin_right = computed_values.margin().right.resolved(node, CSS::Length::make_px(m_container_state.content_width)).to_px(node);
|
||||
used_values.margin_right = computed_values.margin().right.resolved(node, CSS::Length::make_px(m_container_state.content_width())).to_px(node);
|
||||
used_values.border_right = computed_values.border_right().width;
|
||||
used_values.padding_right = computed_values.padding().right.resolved(node, CSS::Length::make_px(m_container_state.content_width)).to_px(node);
|
||||
used_values.padding_right = computed_values.padding().right.resolved(node, CSS::Length::make_px(m_container_state.content_width())).to_px(node);
|
||||
|
||||
m_extra_trailing_metrics->margin += used_values.margin_right;
|
||||
m_extra_trailing_metrics->border += used_values.border_right;
|
||||
|
@ -209,7 +209,7 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next(float available_wi
|
|||
.node = &box,
|
||||
.offset_in_node = 0,
|
||||
.length_in_node = 0,
|
||||
.width = box_state.content_width,
|
||||
.width = box_state.content_width(),
|
||||
.padding_start = box_state.padding_left,
|
||||
.padding_end = box_state.padding_right,
|
||||
.border_start = box_state.border_left,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue