diff --git a/Tests/LibWeb/Layout/expected/css-round-function-with-percentage-value.txt b/Tests/LibWeb/Layout/expected/css-round-function-with-percentage-value.txt new file mode 100644 index 00000000000..e575f96c238 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/css-round-function-with-percentage-value.txt @@ -0,0 +1,15 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x600 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x17 children: not-inline + BlockContainer at (8,8) content-size 200x17 children: not-inline + BlockContainer at (48,8) content-size 100x17 children: inline + frag 0 from TextNode start: 0, length: 1, rect: [48,8 6.34375x17] baseline: 13.296875 + "1" + TextNode <#text> + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x600] + PaintableWithLines (BlockContainer) [8,8 784x17] + PaintableWithLines (BlockContainer
.wrapper) [8,8 200x17] + PaintableWithLines (BlockContainer
.box) [8,8 140x17] + TextPaintable (TextNode<#text>) diff --git a/Tests/LibWeb/Layout/input/css-round-function-with-percentage-value.html b/Tests/LibWeb/Layout/input/css-round-function-with-percentage-value.html new file mode 100644 index 00000000000..9d92ca9575c --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-round-function-with-percentage-value.html @@ -0,0 +1,11 @@ + +
1
\ No newline at end of file diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp index b3416439abc..235b6f54d43 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp @@ -2079,7 +2079,6 @@ bool RoundCalculationNode::contains_percentage() const CalculatedStyleValue::CalculationResult RoundCalculationNode::resolve(Optional context, CalculatedStyleValue::PercentageBasis const& percentage_basis) const { - auto resolved_type = m_x->resolved_type().value(); auto node_a = m_x->resolve(context, percentage_basis); auto node_b = m_y->resolve(context, percentage_basis); @@ -2089,6 +2088,8 @@ CalculatedStyleValue::CalculationResult RoundCalculationNode::resolve(Optional