Jacek Caban : mshtml: Store Gecko element both as nsIDOMElement and nsIDOMHTMLElement in HTMLElement.

Alexandre Julliard julliard at winehq.org
Mon Feb 12 16:10:36 CST 2018


Module: wine
Branch: master
Commit: 54a746f15568c811b3770ddab60d6954de9f8f12
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=54a746f15568c811b3770ddab60d6954de9f8f12

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 12 01:27:32 2018 +0100

mshtml: Store Gecko element both as nsIDOMElement and nsIDOMHTMLElement in HTMLElement.

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

---

 dlls/mshtml/htmlelem.c       | 4 +++-
 dlls/mshtml/mshtml_private.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 1bd4ec4..d843884 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -5463,7 +5463,9 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElemen
 
         /* No AddRef, share reference with HTMLDOMNode */
         assert((nsIDOMNode*)nselem == This->node.nsnode);
-        This->nselem = nselem;
+        This->dom_element = (nsIDOMElement*)nselem;
+        This->html_element = nselem;
+        This->nselem = This->html_element;
     }
 
     ConnectionPointContainer_Init(&This->cp_container, (IUnknown*)&This->IHTMLElement_iface, This->node.vtbl->cpc_entries);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 5ed6264..21871c0 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -780,6 +780,8 @@ typedef struct {
     IProvideMultipleClassInfo IProvideMultipleClassInfo_iface;
 
     nsIDOMHTMLElement *nselem;
+    nsIDOMElement *dom_element;
+    nsIDOMHTMLElement *html_element;
     HTMLStyle *style;
     HTMLStyle *runtime_style;
     HTMLAttributeCollection *attrs;




More information about the wine-cvs mailing list