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
6b9c2148
Commit
6b9c2148
authored
Sep 07, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use query_interface in the dispex vtbl for XMLHttpRequest.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
070b51d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
43 deletions
+24
-43
htmlevent.c
dlls/mshtml/htmlevent.c
+0
-21
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-1
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+24
-21
No files found.
dlls/mshtml/htmlevent.c
View file @
6b9c2148
...
...
@@ -4577,27 +4577,6 @@ void *EventTarget_query_interface(EventTarget *event_target, REFIID riid)
return
NULL
;
}
HRESULT
EventTarget_QI
(
EventTarget
*
event_target
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IEventTarget
))
{
if
(
use_event_quirks
(
event_target
))
{
WARN
(
"IEventTarget queried, but not supported by in document mode
\n
"
);
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IEventTarget_AddRef
(
&
event_target
->
IEventTarget_iface
);
*
ppv
=
&
event_target
->
IEventTarget_iface
;
return
S_OK
;
}
if
(
dispex_query_interface
(
&
event_target
->
dispex
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
WARN
(
"(%p)->(%s %p)
\n
"
,
event_target
,
debugstr_mshtml_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
void
EventTarget_init_dispex_info
(
dispex_data_t
*
dispex_info
,
compat_mode_t
compat_mode
)
{
static
const
dispex_hook_t
IEventTarget_hooks
[]
=
{
...
...
dlls/mshtml/mshtml_private.h
View file @
6b9c2148
...
...
@@ -1211,7 +1211,6 @@ void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMElement*,dispex_stati
void
EventTarget_Init
(
EventTarget
*
,
IUnknown
*
,
dispex_static_data_t
*
,
compat_mode_t
);
void
*
EventTarget_query_interface
(
EventTarget
*
,
REFIID
);
HRESULT
EventTarget_QI
(
EventTarget
*
,
REFIID
,
void
**
);
void
EventTarget_init_dispex_info
(
dispex_data_t
*
,
compat_mode_t
);
void
*
HTMLDOMNode_QI
(
HTMLDOMNode
*
,
REFIID
);
...
...
dlls/mshtml/xmlhttprequest.c
View file @
6b9c2148
...
...
@@ -508,28 +508,12 @@ static HRESULT WINAPI HTMLXMLHttpRequest_QueryInterface(IHTMLXMLHttpRequest *ifa
{
HTMLXMLHttpRequest
*
This
=
impl_from_IHTMLXMLHttpRequest
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
&
This
->
IHTMLXMLHttpRequest_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
*
ppv
=
&
This
->
IHTMLXMLHttpRequest_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLXMLHttpRequest
,
riid
))
{
*
ppv
=
&
This
->
IHTMLXMLHttpRequest_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLXMLHttpRequest2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLXMLHttpRequest2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWineXMLHttpRequestPrivate
,
riid
))
{
*
ppv
=
&
This
->
IWineXMLHttpRequestPrivate_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
{
*
ppv
=
&
This
->
IProvideClassInfo2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
{
*
ppv
=
&
This
->
IProvideClassInfo2_iface
;
}
else
{
return
EventTarget_QI
(
&
This
->
event_target
,
riid
,
ppv
);
}
if
(
dispex_query_interface
(
&
This
->
event_target
.
dispex
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
HTMLXMLHttpRequest_AddRef
(
IHTMLXMLHttpRequest
*
iface
)
...
...
@@ -1517,6 +1501,24 @@ static inline HTMLXMLHttpRequest *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLXMLHttpRequest
,
event_target
.
dispex
);
}
static
void
*
HTMLXMLHttpRequest_query_interface
(
DispatchEx
*
dispex
,
REFIID
riid
)
{
HTMLXMLHttpRequest
*
This
=
impl_from_DispatchEx
(
dispex
);
if
(
IsEqualGUID
(
&
IID_IHTMLXMLHttpRequest
,
riid
))
return
&
This
->
IHTMLXMLHttpRequest_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLXMLHttpRequest2
,
riid
))
return
&
This
->
IHTMLXMLHttpRequest2_iface
;
if
(
IsEqualGUID
(
&
IID_IWineXMLHttpRequestPrivate
,
riid
))
return
&
This
->
IWineXMLHttpRequestPrivate_iface
;
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
return
&
This
->
IProvideClassInfo2_iface
;
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
return
&
This
->
IProvideClassInfo2_iface
;
return
EventTarget_query_interface
(
&
This
->
event_target
,
riid
);
}
static
void
HTMLXMLHttpRequest_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLXMLHttpRequest
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -1606,6 +1608,7 @@ static void HTMLXMLHttpRequest_init_dispex_info(dispex_data_t *info, compat_mode
static
const
event_target_vtbl_t
HTMLXMLHttpRequest_event_target_vtbl
=
{
{
.
query_interface
=
HTMLXMLHttpRequest_query_interface
,
.
destructor
=
HTMLXMLHttpRequest_destructor
,
.
traverse
=
HTMLXMLHttpRequest_traverse
,
.
unlink
=
HTMLXMLHttpRequest_unlink
,
...
...
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