mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 08:31:51 +00:00
LibWeb: Make CSS::ComputedProperties GC-allocated
This commit is contained in:
parent
c1cad8fa0e
commit
74469a0c1f
Notes:
github-actions[bot]
2024-12-22 09:13:42 +00:00
Author: https://github.com/awesomekling
Commit: 74469a0c1f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2995
138 changed files with 337 additions and 339 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.has_value());
|
||||
auto const root_element_style = m_root_element->computed_properties();
|
||||
VERIFY(root_element_style);
|
||||
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.has_value());
|
||||
auto const root_element_style = m_root_element->computed_properties();
|
||||
VERIFY(root_element_style);
|
||||
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