Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
66fd80ba
Commit
66fd80ba
authored
Sep 18, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move some Element methods around.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
5f047400
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
81 deletions
+81
-81
htmlelem.c
dlls/mshtml/htmlelem.c
+81
-81
No files found.
dlls/mshtml/htmlelem.c
View file @
66fd80ba
...
@@ -6780,6 +6780,50 @@ static inline HTMLElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
...
@@ -6780,6 +6780,50 @@ static inline HTMLElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
);
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
);
}
}
HRESULT
HTMLElement_clone
(
HTMLDOMNode
*
iface
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
{
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HTMLElement
*
new_elem
;
HRESULT
hres
;
hres
=
HTMLElement_Create
(
This
->
node
.
doc
,
nsnode
,
FALSE
,
&
new_elem
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
This
->
filter
)
{
new_elem
->
filter
=
wcsdup
(
This
->
filter
);
if
(
!
new_elem
->
filter
)
{
IHTMLElement_Release
(
&
This
->
IHTMLElement_iface
);
return
E_OUTOFMEMORY
;
}
}
*
ret
=
&
new_elem
->
node
;
return
S_OK
;
}
cp_static_data_t
HTMLElementEvents2_data
=
{
HTMLElementEvents2_tid
,
NULL
/* FIXME */
,
TRUE
};
const
cpc_entry_t
HTMLElement_cpc
[]
=
{
HTMLELEMENT_CPC
,
{
NULL
}
};
static
const
NodeImplVtbl
HTMLElementImplVtbl
=
{
.
clsid
=
&
CLSID_HTMLUnknownElement
,
.
qi
=
HTMLElement_QI
,
.
destructor
=
HTMLElement_destructor
,
.
cpc_entries
=
HTMLElement_cpc
,
.
clone
=
HTMLElement_clone
,
.
handle_event
=
HTMLElement_handle_event
,
.
get_attr_col
=
HTMLElement_get_attr_col
};
static
inline
HTMLElement
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
.
event_target
.
dispex
);
}
void
*
HTMLElement_QI
(
HTMLDOMNode
*
iface
,
REFIID
riid
)
void
*
HTMLElement_QI
(
HTMLDOMNode
*
iface
,
REFIID
riid
)
{
{
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
...
@@ -6847,87 +6891,6 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
...
@@ -6847,87 +6891,6 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
free
(
This
->
filter
);
free
(
This
->
filter
);
}
}
HRESULT
HTMLElement_clone
(
HTMLDOMNode
*
iface
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
{
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HTMLElement
*
new_elem
;
HRESULT
hres
;
hres
=
HTMLElement_Create
(
This
->
node
.
doc
,
nsnode
,
FALSE
,
&
new_elem
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
This
->
filter
)
{
new_elem
->
filter
=
wcsdup
(
This
->
filter
);
if
(
!
new_elem
->
filter
)
{
IHTMLElement_Release
(
&
This
->
IHTMLElement_iface
);
return
E_OUTOFMEMORY
;
}
}
*
ret
=
&
new_elem
->
node
;
return
S_OK
;
}
HRESULT
HTMLElement_handle_event
(
HTMLDOMNode
*
iface
,
DWORD
eid
,
nsIDOMEvent
*
event
,
BOOL
*
prevent_default
)
{
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
switch
(
eid
)
{
case
EVENTID_KEYDOWN
:
{
nsIDOMKeyEvent
*
key_event
;
nsresult
nsres
;
nsres
=
nsIDOMEvent_QueryInterface
(
event
,
&
IID_nsIDOMKeyEvent
,
(
void
**
)
&
key_event
);
if
(
NS_SUCCEEDED
(
nsres
))
{
UINT32
code
=
0
;
nsIDOMKeyEvent_GetKeyCode
(
key_event
,
&
code
);
if
(
code
==
VK_F1
/* DOM_VK_F1 */
)
{
DOMEvent
*
help_event
;
HRESULT
hres
;
TRACE
(
"F1 pressed
\n
"
);
hres
=
create_document_event
(
This
->
node
.
doc
,
EVENTID_HELP
,
&
help_event
);
if
(
SUCCEEDED
(
hres
))
{
dispatch_event
(
&
This
->
node
.
event_target
,
help_event
);
IDOMEvent_Release
(
&
help_event
->
IDOMEvent_iface
);
}
*
prevent_default
=
TRUE
;
}
nsIDOMKeyEvent_Release
(
key_event
);
}
}
}
return
S_OK
;
}
cp_static_data_t
HTMLElementEvents2_data
=
{
HTMLElementEvents2_tid
,
NULL
/* FIXME */
,
TRUE
};
const
cpc_entry_t
HTMLElement_cpc
[]
=
{
HTMLELEMENT_CPC
,
{
NULL
}
};
static
const
NodeImplVtbl
HTMLElementImplVtbl
=
{
.
clsid
=
&
CLSID_HTMLUnknownElement
,
.
qi
=
HTMLElement_QI
,
.
destructor
=
HTMLElement_destructor
,
.
cpc_entries
=
HTMLElement_cpc
,
.
clone
=
HTMLElement_clone
,
.
handle_event
=
HTMLElement_handle_event
,
.
get_attr_col
=
HTMLElement_get_attr_col
};
static
inline
HTMLElement
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
.
event_target
.
dispex
);
}
HRESULT
HTMLElement_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
grfdex
,
DISPID
*
pid
)
HRESULT
HTMLElement_get_dispid
(
DispatchEx
*
dispex
,
BSTR
name
,
DWORD
grfdex
,
DISPID
*
pid
)
{
{
HTMLElement
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLElement
*
This
=
impl_from_DispatchEx
(
dispex
);
...
@@ -7068,6 +7031,43 @@ HRESULT HTMLElement_handle_event_default(DispatchEx *dispex, eventid_t eid, nsID
...
@@ -7068,6 +7031,43 @@ HRESULT HTMLElement_handle_event_default(DispatchEx *dispex, eventid_t eid, nsID
return
This
->
node
.
vtbl
->
handle_event
(
&
This
->
node
,
eid
,
nsevent
,
prevent_default
);
return
This
->
node
.
vtbl
->
handle_event
(
&
This
->
node
,
eid
,
nsevent
,
prevent_default
);
}
}
HRESULT
HTMLElement_handle_event
(
HTMLDOMNode
*
iface
,
DWORD
eid
,
nsIDOMEvent
*
event
,
BOOL
*
prevent_default
)
{
HTMLElement
*
This
=
impl_from_HTMLDOMNode
(
iface
);
switch
(
eid
)
{
case
EVENTID_KEYDOWN
:
{
nsIDOMKeyEvent
*
key_event
;
nsresult
nsres
;
nsres
=
nsIDOMEvent_QueryInterface
(
event
,
&
IID_nsIDOMKeyEvent
,
(
void
**
)
&
key_event
);
if
(
NS_SUCCEEDED
(
nsres
))
{
UINT32
code
=
0
;
nsIDOMKeyEvent_GetKeyCode
(
key_event
,
&
code
);
if
(
code
==
VK_F1
/* DOM_VK_F1 */
)
{
DOMEvent
*
help_event
;
HRESULT
hres
;
TRACE
(
"F1 pressed
\n
"
);
hres
=
create_document_event
(
This
->
node
.
doc
,
EVENTID_HELP
,
&
help_event
);
if
(
SUCCEEDED
(
hres
))
{
dispatch_event
(
&
This
->
node
.
event_target
,
help_event
);
IDOMEvent_Release
(
&
help_event
->
IDOMEvent_iface
);
}
*
prevent_default
=
TRUE
;
}
nsIDOMKeyEvent_Release
(
key_event
);
}
}
}
return
S_OK
;
}
EventTarget
*
HTMLElement_get_parent_event_target
(
DispatchEx
*
dispex
)
EventTarget
*
HTMLElement_get_parent_event_target
(
DispatchEx
*
dispex
)
{
{
HTMLElement
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLElement
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
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