mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibWeb+WebContent: Use new String class in CSS::StyleValue
Converts uses of DeprecatedString to String in StyleValue, and patches surrounding files that depend on these functions.
This commit is contained in:
parent
1c2e7b1e47
commit
ce0f41b9fb
37 changed files with 335 additions and 330 deletions
|
@ -49,7 +49,7 @@ DeprecatedString MediaList::item(u32 index) const
|
|||
if (!is_supported_property_index(index))
|
||||
return {};
|
||||
|
||||
return m_media[index].to_deprecated_string();
|
||||
return m_media[index].to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string();
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom-1/#dom-medialist-appendmedium
|
||||
|
@ -70,7 +70,7 @@ void MediaList::delete_medium(DeprecatedString medium)
|
|||
if (!m)
|
||||
return;
|
||||
m_media.remove_all_matching([&](auto& existing) -> bool {
|
||||
return m->to_deprecated_string() == existing->to_deprecated_string();
|
||||
return m->to_string().release_value_but_fixme_should_propagate_errors() == existing->to_string().release_value_but_fixme_should_propagate_errors();
|
||||
});
|
||||
// FIXME: If nothing was removed, then throw a NotFoundError exception.
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ JS::Value MediaList::item_value(size_t index) const
|
|||
{
|
||||
if (index >= m_media.size())
|
||||
return JS::js_undefined();
|
||||
return JS::PrimitiveString::create(vm(), m_media[index].to_deprecated_string());
|
||||
return JS::PrimitiveString::create(vm(), m_media[index].to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue