mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
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:
parent
e636f3976d
commit
07cd7d479f
Notes:
github-actions[bot]
2024-10-27 12:27:19 +00:00
Author: https://github.com/yyny
Commit: 07cd7d479f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1980
125 changed files with 207 additions and 216 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue