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