mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
This reduces time spent in `~StyleProperty()` from 2.18% to 0.67% on https://cloudflare.com.
21 lines
472 B
C++
21 lines
472 B
C++
/*
|
|
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/CSS/StyleProperty.h>
|
|
#include <LibWeb/CSS/StyleValues/StyleValue.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
StyleProperty::~StyleProperty() = default;
|
|
|
|
bool StyleProperty::operator==(StyleProperty const& other) const
|
|
{
|
|
if (important != other.important || property_id != other.property_id)
|
|
return false;
|
|
return value->equals(*other.value);
|
|
}
|
|
|
|
}
|