mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Pass StringBuilder around during StyleValue serialization
Previously, some StyleValues created a large number of intermediate strings during serialization. Passing a StringBUilder into the serialization function allows us to avoid a large number of these unnecessary allocations.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
4b556feecf
commit
a27d269721
Notes:
github-actions[bot]
2026-01-09 09:02:40 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a27d269721e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7381 Reviewed-by: https://github.com/gmta ✅
@@ -23,7 +23,7 @@ public:
|
||||
virtual double raw_value() const override { return m_resolution.raw_value(); }
|
||||
virtual FlyString unit_name() const override { return m_resolution.unit_name(); }
|
||||
|
||||
virtual String to_string(SerializationMode serialization_mode) const override { return m_resolution.to_string(serialization_mode); }
|
||||
virtual void serialize(StringBuilder& builder, SerializationMode mode) const override { builder.append(m_resolution.to_string(mode)); }
|
||||
|
||||
bool equals(StyleValue const& other) const override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user