summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-06 22:17:27 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-07 16:43:06 +0000
commit525f22d018cb5f9c4c6ea0e2b5544fdcab8da483 (patch)
tree2488bac4fab4acec0d258c9bac2338bc95ee6398 /Userland/Libraries/LibWeb/CSS
parent5db38d7ba1a8caa5138dd65cc06be0c0e5a568e4 (diff)
downloadserenity-525f22d018cb5f9c4c6ea0e2b5544fdcab8da483.zip
LibJS: Replace standalone js_string() with PrimitiveString::create()
Note that js_rope_string() has been folded into this, the old name was misleading - it would not always create a rope string, only if both sides are not empty strings. Use a three-argument create() overload instead.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp4
-rw-r--r--Userland/Libraries/LibWeb/CSS/MediaList.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
index d5c4d28654..d3dc1b1dc9 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
@@ -340,8 +340,8 @@ JS::ThrowCompletionOr<JS::Value> CSSStyleDeclaration::internal_get(JS::PropertyK
if (property_id == CSS::PropertyID::Invalid)
return Base::internal_get(name, receiver);
if (auto maybe_property = property(property_id); maybe_property.has_value())
- return { js_string(vm(), maybe_property->value->to_deprecated_string()) };
- return { js_string(vm(), DeprecatedString::empty()) };
+ return { JS::PrimitiveString::create(vm(), maybe_property->value->to_deprecated_string()) };
+ return { JS::PrimitiveString::create(vm(), DeprecatedString::empty()) };
}
JS::ThrowCompletionOr<bool> CSSStyleDeclaration::internal_set(JS::PropertyKey const& name, JS::Value value, JS::Value receiver)
diff --git a/Userland/Libraries/LibWeb/CSS/MediaList.cpp b/Userland/Libraries/LibWeb/CSS/MediaList.cpp
index 1d4ec36ede..20dfecca36 100644
--- a/Userland/Libraries/LibWeb/CSS/MediaList.cpp
+++ b/Userland/Libraries/LibWeb/CSS/MediaList.cpp
@@ -100,7 +100,7 @@ JS::Value MediaList::item_value(size_t index) const
{
if (index >= m_media.size())
return JS::js_undefined();
- return JS::js_string(vm(), m_media[index].to_deprecated_string());
+ return JS::PrimitiveString::create(vm(), m_media[index].to_deprecated_string());
}
}