summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-02-18 16:17:27 +0000
committerAndreas Kling <kling@serenityos.org>2022-02-18 19:04:37 +0100
commit67066c5140b1a2f026f099cec3fe90525cdf41ec (patch)
tree31635800dbde6d7a4fc7c9a017527643e279c773 /Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
parent5b2482a9396dc5f7044647f9132f55785fabffdd (diff)
downloadserenity-67066c5140b1a2f026f099cec3fe90525cdf41ec.zip
LibWeb: Remove fallback value from Length::resolved()
Nobody makes undefined Lengths now, (although actually removing Undefined will come in a later commit) so we can remove this parameter, and `resolved_or_auto()`/`resolved_or_zero()`.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/BorderPainting.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Painting/BorderPainting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
index deafecc964..116ddcdfcc 100644
--- a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
+++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp
@@ -17,10 +17,10 @@ BorderRadiusData normalized_border_radius_data(Layout::Node const& node, Gfx::Fl
// Spec just says "Refer to corresponding dimension of the border box."
// For now, all relative values are relative to the width.
auto width_length = CSS::Length::make_px(rect.width());
- auto bottom_left_radius_px = bottom_left_radius.resolved(node, width_length).resolved_or_zero(node).to_px(node);
- auto bottom_right_radius_px = bottom_right_radius.resolved(node, width_length).resolved_or_zero(node).to_px(node);
- auto top_left_radius_px = top_left_radius.resolved(node, width_length).resolved_or_zero(node).to_px(node);
- auto top_right_radius_px = top_right_radius.resolved(node, width_length).resolved_or_zero(node).to_px(node);
+ auto bottom_left_radius_px = bottom_left_radius.resolved(node, width_length).resolved(node).to_px(node);
+ auto bottom_right_radius_px = bottom_right_radius.resolved(node, width_length).resolved(node).to_px(node);
+ auto top_left_radius_px = top_left_radius.resolved(node, width_length).resolved(node).to_px(node);
+ auto top_right_radius_px = top_right_radius.resolved(node, width_length).resolved(node).to_px(node);
// Scale overlapping curves according to https://www.w3.org/TR/css-backgrounds-3/#corner-overlap
auto f = 1.0f;