mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
LibWeb: Implement calc() value equality check in a more efficient way
Instead of serializing two calc() values to String and then comparing those strings, we can now compare calc() values by actually traversing their internal CalculationNode tree. This makes style recomputation faster on pages with lots of calc() values since it's now much cheaper to check whether a property with some calc() value actually changed.
This commit is contained in:
@@ -6552,6 +6552,7 @@ public:
|
||||
{
|
||||
builder.appendff("{: >{}}UNPARSED({})\n", "", indent, m_component_value.to_debug_string());
|
||||
}
|
||||
virtual bool equals(CalculationNode const&) const override { return false; }
|
||||
|
||||
private:
|
||||
UnparsedCalculationNode(ComponentValue component_value)
|
||||
|
||||
Reference in New Issue
Block a user