mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user