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
c13bb135
Commit
c13bb135
authored
Jun 25, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved DispatchEx instance from HTMLOuterWindow to HTMLInnerWindow.
parent
79356c65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
htmlwindow.c
dlls/mshtml/htmlwindow.c
+19
-19
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
c13bb135
...
@@ -154,7 +154,7 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii
...
@@ -154,7 +154,7 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii
}
else
if
(
IsEqualGUID
(
&
IID_ITravelLogClient
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_ITravelLogClient
,
riid
))
{
TRACE
(
"(%p)->(IID_ITravelLogClient %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_ITravelLogClient %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
ITravelLogClient_iface
;
*
ppv
=
&
This
->
ITravelLogClient_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
out
er_window
->
dispex
,
riid
,
ppv
))
{
}
else
if
(
dispex_query_interface
(
&
This
->
inn
er_window
->
dispex
,
riid
,
ppv
))
{
assert
(
!*
ppv
);
assert
(
!*
ppv
);
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
...
@@ -225,13 +225,13 @@ static void release_outer_window(HTMLOuterWindow *This)
...
@@ -225,13 +225,13 @@ static void release_outer_window(HTMLOuterWindow *This)
nsIDOMWindow_Release
(
This
->
nswindow
);
nsIDOMWindow_Release
(
This
->
nswindow
);
list_remove
(
&
This
->
entry
);
list_remove
(
&
This
->
entry
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
heap_free
(
This
);
}
}
static
void
release_inner_window
(
HTMLInnerWindow
*
This
)
static
void
release_inner_window
(
HTMLInnerWindow
*
This
)
{
{
htmldoc_release
(
&
This
->
doc
->
basedoc
);
htmldoc_release
(
&
This
->
doc
->
basedoc
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
heap_free
(
This
);
}
}
...
@@ -2137,7 +2137,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pc
...
@@ -2137,7 +2137,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pc
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
}
static
HRESULT
WINAPI
WindowDispEx_GetTypeInfo
(
IDispatchEx
*
iface
,
UINT
iTInfo
,
static
HRESULT
WINAPI
WindowDispEx_GetTypeInfo
(
IDispatchEx
*
iface
,
UINT
iTInfo
,
...
@@ -2147,7 +2147,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo,
...
@@ -2147,7 +2147,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo,
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
}
static
HRESULT
WINAPI
WindowDispEx_GetIDsOfNames
(
IDispatchEx
*
iface
,
REFIID
riid
,
static
HRESULT
WINAPI
WindowDispEx_GetIDsOfNames
(
IDispatchEx
*
iface
,
REFIID
riid
,
...
@@ -2182,7 +2182,7 @@ static HRESULT WINAPI WindowDispEx_Invoke(IDispatchEx *iface, DISPID dispIdMembe
...
@@ -2182,7 +2182,7 @@ static HRESULT WINAPI WindowDispEx_Invoke(IDispatchEx *iface, DISPID dispIdMembe
/* FIXME: Use script dispatch */
/* FIXME: Use script dispatch */
return
IDispatchEx_Invoke
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
return
IDispatchEx_Invoke
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
}
...
@@ -2261,7 +2261,7 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName,
...
@@ -2261,7 +2261,7 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName,
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
return
hres
;
hres
=
IDispatchEx_GetDispID
(
&
window
->
dispex
.
IDispatchEx_iface
,
bstrName
,
grfdex
,
pid
);
hres
=
IDispatchEx_GetDispID
(
&
window
->
base
.
inner_window
->
dispex
.
IDispatchEx_iface
,
bstrName
,
grfdex
,
pid
);
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
return
hres
;
...
@@ -2310,7 +2310,7 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
...
@@ -2310,7 +2310,7 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
return
hres
;
return
hres
;
}
}
return
IDispatchEx_InvokeEx
(
&
window
->
dispex
.
IDispatchEx_iface
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
return
IDispatchEx_InvokeEx
(
&
window
->
base
.
inner_window
->
dispex
.
IDispatchEx_iface
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
pei
,
pspCaller
);
}
}
...
@@ -2320,7 +2320,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByName(IDispatchEx *iface, BSTR b
...
@@ -2320,7 +2320,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByName(IDispatchEx *iface, BSTR b
TRACE
(
"(%p)->(%s %x)
\n
"
,
This
,
debugstr_w
(
bstrName
),
grfdex
);
TRACE
(
"(%p)->(%s %x)
\n
"
,
This
,
debugstr_w
(
bstrName
),
grfdex
);
return
IDispatchEx_DeleteMemberByName
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
bstrName
,
grfdex
);
return
IDispatchEx_DeleteMemberByName
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
bstrName
,
grfdex
);
}
}
static
HRESULT
WINAPI
WindowDispEx_DeleteMemberByDispID
(
IDispatchEx
*
iface
,
DISPID
id
)
static
HRESULT
WINAPI
WindowDispEx_DeleteMemberByDispID
(
IDispatchEx
*
iface
,
DISPID
id
)
...
@@ -2329,7 +2329,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByDispID(IDispatchEx *iface, DISP
...
@@ -2329,7 +2329,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByDispID(IDispatchEx *iface, DISP
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
id
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
id
);
return
IDispatchEx_DeleteMemberByDispID
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
id
);
return
IDispatchEx_DeleteMemberByDispID
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
id
);
}
}
static
HRESULT
WINAPI
WindowDispEx_GetMemberProperties
(
IDispatchEx
*
iface
,
DISPID
id
,
DWORD
grfdexFetch
,
DWORD
*
pgrfdex
)
static
HRESULT
WINAPI
WindowDispEx_GetMemberProperties
(
IDispatchEx
*
iface
,
DISPID
id
,
DWORD
grfdexFetch
,
DWORD
*
pgrfdex
)
...
@@ -2338,7 +2338,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberProperties(IDispatchEx *iface, DISPI
...
@@ -2338,7 +2338,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberProperties(IDispatchEx *iface, DISPI
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
id
,
grfdexFetch
,
pgrfdex
);
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
id
,
grfdexFetch
,
pgrfdex
);
return
IDispatchEx_GetMemberProperties
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
id
,
grfdexFetch
,
return
IDispatchEx_GetMemberProperties
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
id
,
grfdexFetch
,
pgrfdex
);
pgrfdex
);
}
}
...
@@ -2348,7 +2348,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberName(IDispatchEx *iface, DISPID id,
...
@@ -2348,7 +2348,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberName(IDispatchEx *iface, DISPID id,
TRACE
(
"(%p)->(%x %p)
\n
"
,
This
,
id
,
pbstrName
);
TRACE
(
"(%p)->(%x %p)
\n
"
,
This
,
id
,
pbstrName
);
return
IDispatchEx_GetMemberName
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
id
,
pbstrName
);
return
IDispatchEx_GetMemberName
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
id
,
pbstrName
);
}
}
static
HRESULT
WINAPI
WindowDispEx_GetNextDispID
(
IDispatchEx
*
iface
,
DWORD
grfdex
,
DISPID
id
,
DISPID
*
pid
)
static
HRESULT
WINAPI
WindowDispEx_GetNextDispID
(
IDispatchEx
*
iface
,
DWORD
grfdex
,
DISPID
id
,
DISPID
*
pid
)
...
@@ -2357,7 +2357,7 @@ static HRESULT WINAPI WindowDispEx_GetNextDispID(IDispatchEx *iface, DWORD grfde
...
@@ -2357,7 +2357,7 @@ static HRESULT WINAPI WindowDispEx_GetNextDispID(IDispatchEx *iface, DWORD grfde
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
grfdex
,
id
,
pid
);
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
grfdex
,
id
,
pid
);
return
IDispatchEx_GetNextDispID
(
&
This
->
out
er_window
->
dispex
.
IDispatchEx_iface
,
grfdex
,
id
,
pid
);
return
IDispatchEx_GetNextDispID
(
&
This
->
inn
er_window
->
dispex
.
IDispatchEx_iface
,
grfdex
,
id
,
pid
);
}
}
static
HRESULT
WINAPI
WindowDispEx_GetNameSpaceParent
(
IDispatchEx
*
iface
,
IUnknown
**
ppunk
)
static
HRESULT
WINAPI
WindowDispEx_GetNameSpaceParent
(
IDispatchEx
*
iface
,
IUnknown
**
ppunk
)
...
@@ -2436,24 +2436,24 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
...
@@ -2436,24 +2436,24 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
HTMLWindowSP_QueryService
HTMLWindowSP_QueryService
};
};
static
inline
HTML
Out
erWindow
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
static
inline
HTML
Inn
erWindow
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
HTML
Out
erWindow
,
dispex
);
return
CONTAINING_RECORD
(
iface
,
HTML
Inn
erWindow
,
dispex
);
}
}
static
HRESULT
HTMLWindow_invoke
(
DispatchEx
*
dispex
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
static
HRESULT
HTMLWindow_invoke
(
DispatchEx
*
dispex
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
{
HTML
Out
erWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
HTML
Inn
erWindow
*
This
=
impl_from_DispatchEx
(
dispex
);
global_prop_t
*
prop
;
global_prop_t
*
prop
;
DWORD
idx
;
DWORD
idx
;
HRESULT
hres
;
HRESULT
hres
;
idx
=
id
-
MSHTML_DISPID_CUSTOM_MIN
;
idx
=
id
-
MSHTML_DISPID_CUSTOM_MIN
;
if
(
idx
>=
This
->
global_prop_cnt
)
if
(
idx
>=
This
->
base
.
outer_window
->
global_prop_cnt
)
return
DISP_E_MEMBERNOTFOUND
;
return
DISP_E_MEMBERNOTFOUND
;
prop
=
This
->
global_props
+
idx
;
prop
=
This
->
base
.
outer_window
->
global_props
+
idx
;
switch
(
prop
->
type
)
{
switch
(
prop
->
type
)
{
case
GLOBAL_SCRIPTVAR
:
{
case
GLOBAL_SCRIPTVAR
:
{
...
@@ -2580,6 +2580,8 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLDocumentNo
...
@@ -2580,6 +2580,8 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLDocumentNo
htmldoc_addref
(
&
doc_node
->
basedoc
);
htmldoc_addref
(
&
doc_node
->
basedoc
);
window
->
doc
=
doc_node
;
window
->
doc
=
doc_node
;
init_dispex
(
&
window
->
dispex
,
(
IUnknown
*
)
&
window
->
base
.
IHTMLWindow2_iface
,
&
HTMLWindow_dispex
);
*
ret
=
window
;
*
ret
=
window
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -2608,8 +2610,6 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow,
...
@@ -2608,8 +2610,6 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow,
window
->
window_ref
->
window
=
window
;
window
->
window_ref
->
window
=
window
;
window
->
window_ref
->
ref
=
1
;
window
->
window_ref
->
ref
=
1
;
init_dispex
(
&
window
->
dispex
,
(
IUnknown
*
)
&
window
->
base
.
IHTMLWindow2_iface
,
&
HTMLWindow_dispex
);
if
(
nswindow
)
{
if
(
nswindow
)
{
nsIDOMWindow_AddRef
(
nswindow
);
nsIDOMWindow_AddRef
(
nswindow
);
window
->
nswindow
=
nswindow
;
window
->
nswindow
=
nswindow
;
...
...
dlls/mshtml/mshtml_private.h
View file @
c13bb135
...
@@ -316,7 +316,6 @@ struct HTMLWindow {
...
@@ -316,7 +316,6 @@ struct HTMLWindow {
struct
HTMLOuterWindow
{
struct
HTMLOuterWindow
{
HTMLWindow
base
;
HTMLWindow
base
;
DispatchEx
dispex
;
windowref_t
*
window_ref
;
windowref_t
*
window_ref
;
LONG
task_magic
;
LONG
task_magic
;
...
@@ -356,6 +355,7 @@ struct HTMLOuterWindow {
...
@@ -356,6 +355,7 @@ struct HTMLOuterWindow {
struct
HTMLInnerWindow
{
struct
HTMLInnerWindow
{
HTMLWindow
base
;
HTMLWindow
base
;
DispatchEx
dispex
;
HTMLDocumentNode
*
doc
;
HTMLDocumentNode
*
doc
;
};
};
...
...
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