LibWeb: Let supported_property_names() return Vector<FlyString>

Ultimately, this API should probably be replaced with something that
updates a cache on relevant DOM mutations instead of regenerating
the list of property names again and again.
This commit is contained in:
Andreas Kling 2023-12-24 20:59:00 +01:00
parent 0178929387
commit 41f56b0df9
Notes: sideshowbarker 2024-07-17 07:06:47 +09:00
19 changed files with 42 additions and 48 deletions

View file

@ -52,7 +52,7 @@ String Plugin::filename() const
}
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewing-support:support-named-properties-3
Vector<String> Plugin::supported_property_names() const
Vector<FlyString> Plugin::supported_property_names() const
{
// The Plugin interface supports named properties. If the user agent's PDF viewer supported is true, then they are the PDF viewer mime types. Otherwise, they are the empty list.
auto const& window = verify_cast<HTML::Window>(HTML::relevant_global_object(*this));
@ -60,9 +60,9 @@ Vector<String> Plugin::supported_property_names() const
return {};
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewer-mime-types
static Vector<String> const mime_types = {
"application/pdf"_string,
"text/pdf"_string,
static Vector<FlyString> const mime_types = {
"application/pdf"_fly_string,
"text/pdf"_fly_string,
};
return mime_types;