mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 18:52:56 +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:
parent
0178929387
commit
41f56b0df9
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/awesomekling
Commit: 41f56b0df9
Pull-request: https://github.com/SerenityOS/serenity/pull/22422
19 changed files with 42 additions and 48 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue