LibWeb: Parse sizes attribute as StyleValue

Gets us a step closer to removing the `FooOrCalculated` classes
This commit is contained in:
Callum Law
2026-03-29 13:26:57 +13:00
committed by Sam Atkins
parent 3e58e15217
commit f2a8099d13
Notes: github-actions[bot] 2026-03-30 13:06:49 +00:00
4 changed files with 24 additions and 26 deletions

View File

@@ -46,10 +46,10 @@ struct SourceSet {
SourceSet();
Vector<ImageSource> m_sources;
CSS::LengthOrCalculated m_source_size;
NonnullRefPtr<CSS::StyleValue const> m_source_size;
};
SourceSet parse_a_srcset_attribute(StringView);
[[nodiscard]] CSS::LengthOrCalculated parse_a_sizes_attribute(DOM::Element const& element, StringView sizes, HTML::HTMLImageElement const* img = nullptr);
[[nodiscard]] NonnullRefPtr<CSS::StyleValue const> parse_a_sizes_attribute(DOM::Element const& element, StringView sizes, HTML::HTMLImageElement const* img = nullptr);
}