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
070b51d7
Commit
070b51d7
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 inner windows.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
47393c30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
59 deletions
+63
-59
htmlwindow.c
dlls/mshtml/htmlwindow.c
+63
-59
No files found.
dlls/mshtml/htmlwindow.c
View file @
070b51d7
...
...
@@ -157,70 +157,64 @@ static inline HTMLOuterWindow *HTMLOuterWindow_from_IHTMLWindow2(IHTMLWindow2 *i
return
CONTAINING_RECORD
(
iface
,
HTMLOuterWindow
,
base
.
IHTMLWindow2_iface
);
}
static
HRESULT
base_query_interface
(
HTMLWindow
*
This
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatchEx
,
riid
))
{
*
ppv
=
&
This
->
IDispatchEx_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLFramesCollection2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow3
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow3_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow4
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow4_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow5
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow5_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow6
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow6_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLWindow7
,
riid
))
{
*
ppv
=
&
This
->
IHTMLWindow7_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLPrivateWindow
,
riid
))
{
*
ppv
=
&
This
->
IHTMLPrivateWindow_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
{
*
ppv
=
&
This
->
IServiceProvider_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_ITravelLogClient
,
riid
))
{
*
ppv
=
&
This
->
ITravelLogClient_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IObjectIdentity
,
riid
))
{
*
ppv
=
&
This
->
IObjectIdentity_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
{
*
ppv
=
&
This
->
IProvideMultipleClassInfo_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
{
*
ppv
=
&
This
->
IProvideMultipleClassInfo_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IProvideMultipleClassInfo
,
riid
))
{
*
ppv
=
&
This
->
IProvideMultipleClassInfo_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWineHTMLWindowPrivate
,
riid
))
{
*
ppv
=
&
This
->
IWineHTMLWindowPrivate_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWineHTMLWindowCompatPrivate
,
riid
))
{
*
ppv
=
&
This
->
IWineHTMLWindowCompatPrivate_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IMarshal
,
riid
))
{
*
ppv
=
NULL
;
FIXME
(
"(%p)->(IID_IMarshal %p)
\n
"
,
This
,
ppv
);
return
E_NOINTERFACE
;
}
else
{
return
S_FALSE
;
static
void
*
base_query_interface
(
HTMLWindow
*
This
,
REFIID
riid
)
{
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
return
&
This
->
IHTMLWindow2_iface
;
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
return
&
This
->
IHTMLWindow2_iface
;
if
(
IsEqualGUID
(
&
IID_IDispatchEx
,
riid
))
return
&
This
->
IDispatchEx_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLFramesCollection2
,
riid
))
return
&
This
->
IHTMLWindow2_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow2
,
riid
))
return
&
This
->
IHTMLWindow2_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow3
,
riid
))
return
&
This
->
IHTMLWindow3_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow4
,
riid
))
return
&
This
->
IHTMLWindow4_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow5
,
riid
))
return
&
This
->
IHTMLWindow5_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow6
,
riid
))
return
&
This
->
IHTMLWindow6_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLWindow7
,
riid
))
return
&
This
->
IHTMLWindow7_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLPrivateWindow
,
riid
))
return
&
This
->
IHTMLPrivateWindow_iface
;
if
(
IsEqualGUID
(
&
IID_IServiceProvider
,
riid
))
return
&
This
->
IServiceProvider_iface
;
if
(
IsEqualGUID
(
&
IID_ITravelLogClient
,
riid
))
return
&
This
->
ITravelLogClient_iface
;
if
(
IsEqualGUID
(
&
IID_IObjectIdentity
,
riid
))
return
&
This
->
IObjectIdentity_iface
;
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo
,
riid
))
return
&
This
->
IProvideMultipleClassInfo_iface
;
if
(
IsEqualGUID
(
&
IID_IProvideClassInfo2
,
riid
))
return
&
This
->
IProvideMultipleClassInfo_iface
;
if
(
IsEqualGUID
(
&
IID_IProvideMultipleClassInfo
,
riid
))
return
&
This
->
IProvideMultipleClassInfo_iface
;
if
(
IsEqualGUID
(
&
IID_IWineHTMLWindowPrivate
,
riid
))
return
&
This
->
IWineHTMLWindowPrivate_iface
;
if
(
IsEqualGUID
(
&
IID_IWineHTMLWindowCompatPrivate
,
riid
))
return
&
This
->
IWineHTMLWindowCompatPrivate_iface
;
if
(
IsEqualGUID
(
&
IID_IMarshal
,
riid
))
{
FIXME
(
"(%p)->(IID_IMarshal)
\n
"
,
This
);
return
NULL
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
return
NULL
;
}
static
HRESULT
WINAPI
HTMLWindow2_QueryInterface
(
IHTMLWindow2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLInnerWindow
*
This
=
HTMLInnerWindow_from_IHTMLWindow2
(
iface
);
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
if
(
dispex_query_interface
(
&
This
->
event_target
.
dispex
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
hres
=
base_query_interface
(
&
This
->
base
,
riid
,
ppv
);
if
(
hres
!=
S_FALSE
)
return
hres
;
return
EventTarget_QI
(
&
This
->
event_target
,
riid
,
ppv
);
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
HTMLWindow2_AddRef
(
IHTMLWindow2
*
iface
)
...
...
@@ -246,13 +240,15 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
static
HRESULT
WINAPI
outer_window_QueryInterface
(
IHTMLWindow2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLOuterWindow
*
This
=
HTMLOuterWindow_from_IHTMLWindow2
(
iface
);
HRESULT
hres
;
IUnknown
*
base_iface
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
hres
=
base_query_interface
(
&
This
->
base
,
riid
,
ppv
);
if
(
hres
!=
S_FALSE
)
return
hres
;
if
((
base_iface
=
base_query_interface
(
&
This
->
base
,
riid
)))
{
*
ppv
=
base_iface
;
IUnknown_AddRef
(
base_iface
);
return
S_OK
;
}
if
(
IsEqualGUID
(
&
IID_nsXPCOMCycleCollectionParticipant
,
riid
))
{
*
ppv
=
&
outer_window_ccp
;
...
...
@@ -3928,6 +3924,13 @@ static inline HTMLInnerWindow *impl_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLInnerWindow
,
event_target
.
dispex
);
}
static
void
*
HTMLWindow_query_interface
(
DispatchEx
*
dispex
,
REFIID
riid
)
{
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
void
*
iface
=
base_query_interface
(
&
This
->
base
,
riid
);
return
iface
?
iface
:
EventTarget_query_interface
(
&
This
->
event_target
,
riid
);
}
static
void
HTMLWindow_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLInnerWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -4294,6 +4297,7 @@ static IHTMLEventObj *HTMLWindow_set_current_event(DispatchEx *dispex, IHTMLEven
static
const
event_target_vtbl_t
HTMLWindow_event_target_vtbl
=
{
{
.
query_interface
=
HTMLWindow_query_interface
,
.
destructor
=
HTMLWindow_destructor
,
.
traverse
=
HTMLWindow_traverse
,
.
unlink
=
HTMLWindow_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