summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-10-28 15:42:18 +0100
committerLinus Groh <mail@linusgroh.de>2022-10-28 16:17:08 +0100
commit5e2b41175c984a6ba4e292b232257759ffbb39df (patch)
tree66e02fa4c313cee110fc6ea188d042b9bad027bd /Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
parent377eb09492177a7d99a91e1a0fba65ff9b823585 (diff)
downloadserenity-5e2b41175c984a6ba4e292b232257759ffbb39df.zip
LibWeb: Return empty Optional<StyleProperty> for shorthand properties
This is a stopgap until we implement shorthand -> longhand conversion.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleProperties.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleProperties.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
index 84028bdd9a..96ebd559e7 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp
@@ -44,6 +44,11 @@ NonnullRefPtr<StyleValue> StyleProperties::property(CSS::PropertyID property_id)
return value.release_nonnull();
}
+RefPtr<StyleValue> StyleProperties::maybe_null_property(CSS::PropertyID property_id) const
+{
+ return m_property_values[to_underlying(property_id)];
+}
+
CSS::Size StyleProperties::size_value(CSS::PropertyID id) const
{
auto value = property(id);