Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bbd9c41a
Commit
bbd9c41a
authored
Sep 19, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use specific dispex for each SVG element.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
d31e95a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
10 deletions
+79
-10
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
svg.c
dlls/mshtml/svg.c
+76
-8
No files found.
dlls/mshtml/htmlelem.c
View file @
bbd9c41a
...
...
@@ -7314,7 +7314,7 @@ void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
}
}
static
const
tid_t
HTMLElement_iface_tids
[]
=
{
const
tid_t
HTMLElement_iface_tids
[]
=
{
HTMLELEMENT_TIDS
,
0
};
...
...
@@ -7933,7 +7933,7 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMElement *n
nsIDOMHTMLElement
*
html_element
;
nsresult
nsres
;
HTMLDOMNode_Init
(
doc
,
&
This
->
node
,
(
nsIDOMNode
*
)
nselem
,
dispex_data
?
dispex_data
:
&
HTMLUnknownElement_dispex
);
HTMLDOMNode_Init
(
doc
,
&
This
->
node
,
(
nsIDOMNode
*
)
nselem
,
dispex_data
);
/* No AddRef, share reference with HTMLDOMNode */
assert
((
nsIDOMNode
*
)
nselem
==
This
->
node
.
nsnode
);
...
...
dlls/mshtml/mshtml_private.h
View file @
bbd9c41a
...
...
@@ -888,6 +888,7 @@ typedef struct {
IHTMLElement4_tid, \
IHTMLUniqueName_tid
extern
const
tid_t
HTMLElement_iface_tids
[];
extern
cp_static_data_t
HTMLElementEvents2_data
;
#define HTMLELEMENT_CPC {&DIID_HTMLElementEvents2, &HTMLElementEvents2_data}
extern
const
cpc_entry_t
HTMLElement_cpc
[];
...
...
dlls/mshtml/svg.c
View file @
bbd9c41a
...
...
@@ -31,6 +31,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
...
...
@@ -196,12 +197,27 @@ static const NodeImplVtbl SVGElementImplVtbl = {
.
get_attr_col
=
HTMLElement_get_attr_col
,
};
static
void
init_svg_element
(
SVGElement
*
svg_element
,
HTMLDocumentNode
*
doc
,
nsIDOMSVGElement
*
nselem
)
static
const
event_target_vtbl_t
SVGElement_event_target_vtbl
=
{
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
.
traverse
=
HTMLDOMNode_traverse
,
.
unlink
=
HTMLDOMNode_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
};
static
dispex_static_data_t
SVGElement_dispex
=
{
"HTMLUnknownElement"
,
&
SVGElement_event_target_vtbl
.
dispex_vtbl
,
DispHTMLUnknownElement_tid
,
HTMLElement_iface_tids
,
HTMLElement_init_dispex_info
};
static
void
init_svg_element
(
SVGElement
*
svg_element
,
HTMLDocumentNode
*
doc
,
nsIDOMSVGElement
*
nselem
,
dispex_static_data_t
*
dispex_data
)
{
if
(
!
svg_element
->
element
.
node
.
vtbl
)
svg_element
->
element
.
node
.
vtbl
=
&
SVGElementImplVtbl
;
svg_element
->
ISVGElement_iface
.
lpVtbl
=
&
SVGElementVtbl
;
HTMLElement_Init
(
&
svg_element
->
element
,
doc
,
(
nsIDOMElement
*
)
nselem
,
NULL
);
HTMLElement_Init
(
&
svg_element
->
element
,
doc
,
(
nsIDOMElement
*
)
nselem
,
dispex_data
);
}
struct
SVGSVGElement
{
...
...
@@ -731,6 +747,23 @@ static const NodeImplVtbl SVGSVGElementImplVtbl = {
.
get_attr_col
=
HTMLElement_get_attr_col
,
};
static
const
event_target_vtbl_t
SVGSVGElement_event_target_vtbl
=
{
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
.
traverse
=
HTMLDOMNode_traverse
,
.
unlink
=
HTMLDOMNode_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
};
static
dispex_static_data_t
SVGSVGElement_dispex
=
{
"HTMLUnknownElement"
,
&
SVGSVGElement_event_target_vtbl
.
dispex_vtbl
,
DispHTMLUnknownElement_tid
,
HTMLElement_iface_tids
,
HTMLElement_init_dispex_info
};
static
HRESULT
create_viewport_element
(
HTMLDocumentNode
*
doc
,
nsIDOMSVGElement
*
nselem
,
HTMLElement
**
elem
)
{
SVGSVGElement
*
ret
;
...
...
@@ -742,7 +775,7 @@ static HRESULT create_viewport_element(HTMLDocumentNode *doc, nsIDOMSVGElement *
ret
->
ISVGSVGElement_iface
.
lpVtbl
=
&
SVGSVGElementVtbl
;
ret
->
svg_element
.
element
.
node
.
vtbl
=
&
SVGSVGElementImplVtbl
;
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
);
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
,
&
SVGSVGElement_dispex
);
*
elem
=
&
ret
->
svg_element
.
element
;
return
S_OK
;
...
...
@@ -894,6 +927,23 @@ static const NodeImplVtbl SVGCircleElementImplVtbl = {
.
get_attr_col
=
HTMLElement_get_attr_col
,
};
static
const
event_target_vtbl_t
SVGCircleElement_event_target_vtbl
=
{
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
.
traverse
=
HTMLDOMNode_traverse
,
.
unlink
=
HTMLDOMNode_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
};
static
dispex_static_data_t
SVGCircleElement_dispex
=
{
"HTMLUnknownElement"
,
&
SVGCircleElement_event_target_vtbl
.
dispex_vtbl
,
DispHTMLUnknownElement_tid
,
HTMLElement_iface_tids
,
HTMLElement_init_dispex_info
};
static
HRESULT
create_circle_element
(
HTMLDocumentNode
*
doc
,
nsIDOMSVGElement
*
nselem
,
HTMLElement
**
elem
)
{
SVGCircleElement
*
ret
;
...
...
@@ -905,7 +955,7 @@ static HRESULT create_circle_element(HTMLDocumentNode *doc, nsIDOMSVGElement *ns
ret
->
ISVGCircleElement_iface
.
lpVtbl
=
&
SVGCircleElementVtbl
;
ret
->
svg_element
.
element
.
node
.
vtbl
=
&
SVGCircleElementImplVtbl
;
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
);
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
,
&
SVGCircleElement_dispex
);
*
elem
=
&
ret
->
svg_element
.
element
;
return
S_OK
;
...
...
@@ -1132,6 +1182,23 @@ static const NodeImplVtbl SVGTSpanElementImplVtbl = {
.
get_attr_col
=
HTMLElement_get_attr_col
,
};
static
const
event_target_vtbl_t
SVGTSpanElement_event_target_vtbl
=
{
{
HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
.
traverse
=
HTMLDOMNode_traverse
,
.
unlink
=
HTMLDOMNode_unlink
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
};
static
dispex_static_data_t
SVGTSpanElement_dispex
=
{
"HTMLUnknownElement"
,
&
SVGTSpanElement_event_target_vtbl
.
dispex_vtbl
,
DispHTMLUnknownElement_tid
,
HTMLElement_iface_tids
,
HTMLElement_init_dispex_info
};
static
HRESULT
create_tspan_element
(
HTMLDocumentNode
*
doc
,
nsIDOMSVGElement
*
nselem
,
HTMLElement
**
elem
)
{
SVGTSpanElement
*
ret
;
...
...
@@ -1142,7 +1209,7 @@ static HRESULT create_tspan_element(HTMLDocumentNode *doc, nsIDOMSVGElement *nse
ret
->
svg_element
.
element
.
node
.
vtbl
=
&
SVGTSpanElementImplVtbl
;
init_text_content_element
(
&
ret
->
text_content
,
&
ret
->
svg_element
);
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
);
init_svg_element
(
&
ret
->
svg_element
,
doc
,
nselem
,
&
SVGTSpanElement_dispex
);
*
elem
=
&
ret
->
svg_element
.
element
;
return
S_OK
;
...
...
@@ -1165,7 +1232,8 @@ HRESULT create_svg_element(HTMLDocumentNode *doc, nsIDOMSVGElement *dom_element,
if
(
!
svg_element
)
return
E_OUTOFMEMORY
;
init_svg_element
(
svg_element
,
doc
,
dom_element
);
svg_element
->
element
.
node
.
vtbl
=
&
SVGElementImplVtbl
;
init_svg_element
(
svg_element
,
doc
,
dom_element
,
&
SVGElement_dispex
);
*
elem
=
&
svg_element
->
element
;
return
S_OK
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment