mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Omit default radius from ellipse() serialization
This commit is contained in:
Notes:
github-actions[bot]
2025-12-12 12:21:40 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/883b190e64d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7109 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -135,11 +135,16 @@ Gfx::Path Ellipse::to_path(CSSPixelRect reference_box, Layout::Node const& node)
|
||||
String Ellipse::to_string(SerializationMode mode) const
|
||||
{
|
||||
StringBuilder arguments_builder;
|
||||
auto serialized_radius = radius->to_string(mode);
|
||||
|
||||
arguments_builder.append(radius->to_string(mode));
|
||||
if (serialized_radius != "closest-side closest-side"sv)
|
||||
arguments_builder.append(serialized_radius);
|
||||
|
||||
if (position)
|
||||
arguments_builder.appendff(" at {}", position->to_string(mode));
|
||||
if (position) {
|
||||
if (!arguments_builder.is_empty())
|
||||
arguments_builder.append(' ');
|
||||
arguments_builder.appendff("at {}", position->to_string(mode));
|
||||
}
|
||||
|
||||
return MUST(String::formatted("ellipse({})", arguments_builder.to_string_without_validation()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user