mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 07:48:47 +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
|
@ -34,7 +34,7 @@ void PluginArray::refresh() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewing-support:support-named-properties
|
||||
Vector<String> PluginArray::supported_property_names() const
|
||||
Vector<FlyString> PluginArray::supported_property_names() const
|
||||
{
|
||||
// The PluginArray interface supports named properties. If the user agent's PDF viewer supported is true, then they are the PDF viewer plugin names. Otherwise, they are the empty list.
|
||||
auto const& window = verify_cast<HTML::Window>(HTML::relevant_global_object(*this));
|
||||
|
@ -42,12 +42,12 @@ Vector<String> PluginArray::supported_property_names() const
|
|||
return {};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewer-plugin-names
|
||||
static Vector<String> const plugin_names = {
|
||||
"PDF Viewer"_string,
|
||||
"Chrome PDF Viewer"_string,
|
||||
"Chromium PDF Viewer"_string,
|
||||
"Microsoft Edge PDF Viewer"_string,
|
||||
"WebKit built-in PDF"_string,
|
||||
static Vector<FlyString> const plugin_names = {
|
||||
"PDF Viewer"_fly_string,
|
||||
"Chrome PDF Viewer"_fly_string,
|
||||
"Chromium PDF Viewer"_fly_string,
|
||||
"Microsoft Edge PDF Viewer"_fly_string,
|
||||
"WebKit built-in PDF"_fly_string,
|
||||
};
|
||||
|
||||
return plugin_names;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue