[PATCH v3 17/17] mshtml: Implement HTMLPluginsCollection's toString.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Oct 6 10:11:47 CDT 2021
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/mshtml/omnavigator.c | 16 +++++++++++++++-
dlls/mshtml/tests/documentmode.js | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c
index 377be34..edccd4e 100644
--- a/dlls/mshtml/omnavigator.c
+++ b/dlls/mshtml/omnavigator.c
@@ -860,6 +860,20 @@ static HRESULT WINAPI HTMLPluginsCollection_refresh(IHTMLPluginsCollection *ifac
return S_OK;
}
+static const WCHAR *HTMLPluginsCollection_get_compat_name(compat_mode_t compat_mode)
+{
+ return compat_mode < COMPAT_MODE_IE11 ? L"MSPluginsCollection" : NULL;
+}
+
+static const dispex_static_data_vtbl_t HTMLPluginsCollection_dispex_vtbl = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ HTMLPluginsCollection_get_compat_name
+};
+
static const IHTMLPluginsCollectionVtbl HTMLPluginsCollectionVtbl = {
HTMLPluginsCollection_QueryInterface,
HTMLPluginsCollection_AddRef,
@@ -878,7 +892,7 @@ static const tid_t HTMLPluginsCollection_iface_tids[] = {
};
static dispex_static_data_t HTMLPluginsCollection_dispex = {
L"PluginArray",
- NULL,
+ &HTMLPluginsCollection_dispex_vtbl,
DispCPlugins_tid,
HTMLPluginsCollection_iface_tids
};
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index 6b61a8f..a8a7c09 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -221,6 +221,7 @@ sync_test("builtin_toString", function() {
test("performance", window.performance, "Performance");
test("performanceNavigation", window.performance.navigation, "PerformanceNavigation");
test("performanceTiming", window.performance.timing, "PerformanceTiming");
+ test("plugins", window.navigator.plugins, v < 11 ? "MSPluginsCollection" : "PluginArray");
test("screen", window.screen, "Screen");
test("sessionStorage", window.sessionStorage, "Storage");
test("style", document.body.style, "MSStyleCSSProperties");
--
2.31.1
More information about the wine-devel
mailing list