Jacek Caban : mshtml: Expose IHTMLDocument7 interface to scripts.

Alexandre Julliard julliard at winehq.org
Tue Sep 12 15:40:38 CDT 2017


Module: wine
Branch: master
Commit: 2936f1135184e5e65304f560a5ec7b1cc19d197d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2936f1135184e5e65304f560a5ec7b1cc19d197d

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Sep 12 13:15:23 2017 +0200

mshtml: Expose IHTMLDocument7 interface to scripts.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmldoc.c             | 3 +++
 dlls/mshtml/mshtml_private.h      | 1 +
 dlls/mshtml/tests/documentmode.js | 5 +++++
 3 files changed, 9 insertions(+)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 357dbcf..db6ee57 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -4939,6 +4939,9 @@ static void HTMLDocumentNode_init_dispex_info(dispex_data_t *info, compat_mode_t
 {
     HTMLDOMNode_init_dispex_info(info, mode);
 
+    if(mode >= COMPAT_MODE_IE9)
+        dispex_info_add_interface(info, IHTMLDocument7_tid, NULL);
+
     /* Depending on compatibility version, we add interfaces in different order
      * so that the right getElementById implementation is used. */
     if(mode < COMPAT_MODE_IE8) {
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index f10a793..ecd72b8 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -146,6 +146,7 @@ typedef struct EventTarget EventTarget;
     XIID(IHTMLDocument4) \
     XIID(IHTMLDocument5) \
     XIID(IHTMLDocument6) \
+    XIID(IHTMLDocument7) \
     XIID(IHTMLDOMAttribute) \
     XIID(IHTMLDOMAttribute2) \
     XIID(IHTMLDOMChildrenCollection) \
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index 9453bdc..20b5882 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -51,6 +51,11 @@ function test_doc_props() {
 
     test_exposed("textContent", v >= 9);
     test_exposed("prefix", v >= 9);
+    test_exposed("defaultView", v >= 9);
+    test_exposed("head", v >= 9);
+
+    test_exposed("parentWindow", true);
+    if(v >= 9) ok(document.defaultView === document.parentWindow, "defaultView != parentWindow");
 
     next_test();
 }




More information about the wine-cvs mailing list