LibWeb: Remove reference counting for CSS::StyleProperties

`AK::CopyOnWrite` already does reference counting, so there is no need
to do it again.
This commit is contained in:
Jonne Ransijn 2024-10-26 17:42:27 +02:00 committed by Andreas Kling
commit 07cd7d479f
Notes: github-actions[bot] 2024-10-27 12:27:19 +00:00
125 changed files with 207 additions and 216 deletions

View file

@ -133,8 +133,8 @@ Optional<CSSPixels> SVGDecodedImageData::intrinsic_width() const
{
// https://www.w3.org/TR/SVG2/coords.html#SizingSVGInCSS
m_document->update_style();
auto const* root_element_style = m_root_element->computed_css_values();
VERIFY(root_element_style);
auto const root_element_style = m_root_element->computed_css_values();
VERIFY(root_element_style.has_value());
auto const& width_value = root_element_style->size_value(CSS::PropertyID::Width);
if (width_value.is_length() && width_value.length().is_absolute())
return width_value.length().absolute_length_to_px();
@ -145,8 +145,8 @@ Optional<CSSPixels> SVGDecodedImageData::intrinsic_height() const
{
// https://www.w3.org/TR/SVG2/coords.html#SizingSVGInCSS
m_document->update_style();
auto const* root_element_style = m_root_element->computed_css_values();
VERIFY(root_element_style);
auto const root_element_style = m_root_element->computed_css_values();
VERIFY(root_element_style.has_value());
auto const& height_value = root_element_style->size_value(CSS::PropertyID::Height);
if (height_value.is_length() && height_value.length().is_absolute())
return height_value.length().absolute_length_to_px();