mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibWeb: Resolve CSS inset properties when entering inline-flow elements
We don't actually apply the insets anywhere yet, but at least now they are available in the node's layout state.
This commit is contained in:
parent
88949b10d8
commit
481fdfee68
2 changed files with 5 additions and 1 deletions
|
@ -96,6 +96,8 @@ public:
|
||||||
virtual CSSPixelPoint calculate_static_position(Box const&) const;
|
virtual CSSPixelPoint calculate_static_position(Box const&) const;
|
||||||
bool can_skip_is_anonymous_text_run(Box&);
|
bool can_skip_is_anonymous_text_run(Box&);
|
||||||
|
|
||||||
|
void compute_inset(NodeWithStyleAndBoxModelMetrics const&);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FormattingContext(Type, LayoutState&, Box const&, FormattingContext* parent = nullptr);
|
FormattingContext(Type, LayoutState&, Box const&, FormattingContext* parent = nullptr);
|
||||||
|
|
||||||
|
@ -106,7 +108,6 @@ protected:
|
||||||
[[nodiscard]] bool should_treat_max_height_as_none(Box const&, AvailableSize const&) const;
|
[[nodiscard]] bool should_treat_max_height_as_none(Box const&, AvailableSize const&) const;
|
||||||
|
|
||||||
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode, AvailableSpace const&);
|
OwnPtr<FormattingContext> layout_inside(Box const&, LayoutMode, AvailableSpace const&);
|
||||||
void compute_inset(Box const& box);
|
|
||||||
|
|
||||||
struct SpaceUsedByFloats {
|
struct SpaceUsedByFloats {
|
||||||
CSSPixels left { 0 };
|
CSSPixels left { 0 };
|
||||||
|
|
|
@ -42,6 +42,9 @@ void InlineLevelIterator::enter_node_with_box_model_metrics(Layout::NodeWithStyl
|
||||||
m_extra_leading_metrics->border += used_values.border_left;
|
m_extra_leading_metrics->border += used_values.border_left;
|
||||||
m_extra_leading_metrics->padding += used_values.padding_left;
|
m_extra_leading_metrics->padding += used_values.padding_left;
|
||||||
|
|
||||||
|
// Now's our chance to resolve the inset properties for this node.
|
||||||
|
m_inline_formatting_context.compute_inset(node);
|
||||||
|
|
||||||
m_box_model_node_stack.append(node);
|
m_box_model_node_stack.append(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue