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
908cfec3
Commit
908cfec3
authored
Sep 11, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use query_interface in the dispex vtbl for DOM and Text Ranges.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
c4cf5bf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
30 deletions
+34
-30
range.c
dlls/mshtml/range.c
+34
-30
No files found.
dlls/mshtml/range.c
View file @
908cfec3
...
...
@@ -814,24 +814,12 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r
{
HTMLTxtRange
*
This
=
impl_from_IHTMLTxtRange
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
&
This
->
IHTMLTxtRange_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLTxtRange
,
riid
))
{
*
ppv
=
&
This
->
IHTMLTxtRange_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleCommandTarget
,
riid
))
{
*
ppv
=
&
This
->
IOleCommandTarget_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
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
HTMLTxtRange_AddRef
(
IHTMLTxtRange
*
iface
)
...
...
@@ -1710,6 +1698,18 @@ static inline HTMLTxtRange *HTMLTxtRange_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLTxtRange
,
dispex
);
}
static
void
*
HTMLTxtRange_query_interface
(
DispatchEx
*
dispex
,
REFIID
riid
)
{
HTMLTxtRange
*
This
=
HTMLTxtRange_from_DispatchEx
(
dispex
);
if
(
IsEqualGUID
(
&
IID_IHTMLTxtRange
,
riid
))
return
&
This
->
IHTMLTxtRange_iface
;
if
(
IsEqualGUID
(
&
IID_IOleCommandTarget
,
riid
))
return
&
This
->
IOleCommandTarget_iface
;
return
NULL
;
}
static
void
HTMLTxtRange_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLTxtRange
*
This
=
HTMLTxtRange_from_DispatchEx
(
dispex
);
...
...
@@ -1734,6 +1734,7 @@ static void HTMLTxtRange_destructor(DispatchEx *dispex)
}
static
const
dispex_static_data_vtbl_t
HTMLTxtRange_dispex_vtbl
=
{
.
query_interface
=
HTMLTxtRange_query_interface
,
.
destructor
=
HTMLTxtRange_destructor
,
.
traverse
=
HTMLTxtRange_traverse
,
.
unlink
=
HTMLTxtRange_unlink
...
...
@@ -1784,22 +1785,12 @@ static HRESULT WINAPI HTMLDOMRange_QueryInterface(IHTMLDOMRange *iface, REFIID r
{
HTMLDOMRange
*
This
=
impl_from_IHTMLDOMRange
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppv
=
&
This
->
IHTMLDOMRange_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMRange
,
riid
))
{
*
ppv
=
&
This
->
IHTMLDOMRange_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
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
HTMLDOMRange_AddRef
(
IHTMLDOMRange
*
iface
)
...
...
@@ -2081,6 +2072,18 @@ static inline HTMLDOMRange *HTMLDOMRange_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLDOMRange
,
dispex
);
}
static
void
*
HTMLDOMRange_query_interface
(
DispatchEx
*
dispex
,
REFIID
riid
)
{
HTMLDOMRange
*
This
=
HTMLDOMRange_from_DispatchEx
(
dispex
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
return
&
This
->
IHTMLDOMRange_iface
;
if
(
IsEqualGUID
(
&
IID_IHTMLDOMRange
,
riid
))
return
&
This
->
IHTMLDOMRange_iface
;
return
NULL
;
}
static
void
HTMLDOMRange_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLDOMRange
*
This
=
HTMLDOMRange_from_DispatchEx
(
dispex
);
...
...
@@ -2101,6 +2104,7 @@ static void HTMLDOMRange_destructor(DispatchEx *dispex)
}
static
const
dispex_static_data_vtbl_t
HTMLDOMRange_dispex_vtbl
=
{
.
query_interface
=
HTMLDOMRange_query_interface
,
.
destructor
=
HTMLDOMRange_destructor
,
.
traverse
=
HTMLDOMRange_traverse
,
.
unlink
=
HTMLDOMRange_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