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
0d15ad8b
Commit
0d15ad8b
authored
Sep 16, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move client site ifaces to HTMLDocumentObj.
parent
068489fb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
166 additions
and
186 deletions
+166
-186
htmldoc.c
dlls/mshtml/htmldoc.c
+6
-6
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+10
-10
navigate.c
dlls/mshtml/navigate.c
+2
-2
nsembed.c
dlls/mshtml/nsembed.c
+3
-3
nsevents.c
dlls/mshtml/nsevents.c
+2
-2
nsio.c
dlls/mshtml/nsio.c
+3
-4
olecmd.c
dlls/mshtml/olecmd.c
+23
-23
oleobj.c
dlls/mshtml/oleobj.c
+29
-35
olewnd.c
dlls/mshtml/olewnd.c
+8
-8
persist.c
dlls/mshtml/persist.c
+6
-6
task.c
dlls/mshtml/task.c
+14
-14
view.c
dlls/mshtml/view.c
+58
-71
No files found.
dlls/mshtml/htmldoc.c
View file @
0d15ad8b
...
...
@@ -1764,12 +1764,6 @@ static void destroy_htmldoc(HTMLDocument *This)
{
remove_doc_tasks
(
This
);
if
(
This
->
client
)
IOleObject_SetClientSite
(
OLEOBJ
(
This
),
NULL
);
if
(
This
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
This
));
if
(
This
->
ipsite
)
IOleDocumentView_SetInPlaceSite
(
DOCVIEW
(
This
),
NULL
);
if
(
This
->
undomgr
)
IOleUndoManager_Release
(
This
->
undomgr
);
...
...
@@ -1899,6 +1893,12 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
IHTMLWindow2_Release
(
HTMLWINDOW2
(
This
->
basedoc
.
window
));
}
if
(
This
->
client
)
IOleObject_SetClientSite
(
OLEOBJ
(
&
This
->
basedoc
),
NULL
);
if
(
This
->
basedoc
.
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
&
This
->
basedoc
));
if
(
This
->
ipsite
)
IOleDocumentView_SetInPlaceSite
(
DOCVIEW
(
&
This
->
basedoc
),
NULL
);
destroy_htmldoc
(
&
This
->
basedoc
);
if
(
This
->
basedoc
.
nsdoc
)
remove_mutation_observer
(
This
->
nscontainer
,
This
->
basedoc
.
nsdoc
);
...
...
dlls/mshtml/htmlwindow.c
View file @
0d15ad8b
...
...
@@ -869,10 +869,10 @@ static HRESULT WINAPI HTMLWindow2_get_external(IHTMLWindow2 *iface, IDispatch **
*
p
=
NULL
;
if
(
!
This
->
doc_obj
->
basedoc
.
hostui
)
if
(
!
This
->
doc_obj
->
hostui
)
return
S_OK
;
return
IDocHostUIHandler_GetExternal
(
This
->
doc_obj
->
basedoc
.
hostui
,
p
);
return
IDocHostUIHandler_GetExternal
(
This
->
doc_obj
->
hostui
,
p
);
}
static
HRESULT
HTMLWindow_invoke
(
IUnknown
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
...
...
dlls/mshtml/mshtml_private.h
View file @
0d15ad8b
...
...
@@ -284,12 +284,6 @@ struct HTMLDocument {
HTMLWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
IOleClientSite
*
client
;
IDocHostUIHandler
*
hostui
;
IOleInPlaceSite
*
ipsite
;
IOleInPlaceFrame
*
frame
;
IOleInPlaceUIWindow
*
ip_window
;
IOleUndoManager
*
undomgr
;
nsChannelBSC
*
bscallback
;
...
...
@@ -354,6 +348,12 @@ struct HTMLDocumentObj {
LONG
ref
;
NSContainer
*
nscontainer
;
IOleClientSite
*
client
;
IDocHostUIHandler
*
hostui
;
IOleInPlaceSite
*
ipsite
;
IOleInPlaceFrame
*
frame
;
IOleInPlaceUIWindow
*
ip_window
;
};
typedef
struct
{
...
...
@@ -580,9 +580,9 @@ void init_mutation(NSContainer*);
void
set_mutation_observer
(
NSContainer
*
,
nsIDOMHTMLDocument
*
);
void
remove_mutation_observer
(
NSContainer
*
,
nsIDOMHTMLDocument
*
);
void
HTMLDocument_LockContainer
(
HTMLDocument
*
,
BOOL
);
void
show_context_menu
(
HTMLDocument
*
,
DWORD
,
POINT
*
,
IDispatch
*
);
void
notif_focus
(
HTMLDocument
*
);
void
HTMLDocument_LockContainer
(
HTMLDocument
Obj
*
,
BOOL
);
void
show_context_menu
(
HTMLDocument
Obj
*
,
DWORD
,
POINT
*
,
IDispatch
*
);
void
notif_focus
(
HTMLDocument
Obj
*
);
void
show_tooltip
(
HTMLDocument
*
,
DWORD
,
DWORD
,
LPCWSTR
);
void
hide_tooltip
(
HTMLDocument
*
);
...
...
@@ -706,7 +706,7 @@ void do_ns_command(HTMLDocument*,const char*,nsICommandParams*);
#define UPDATE_TITLE 0x0002
void
update_doc
(
HTMLDocument
*
This
,
DWORD
flags
);
void
update_title
(
HTMLDocument
*
);
void
update_title
(
HTMLDocument
Obj
*
);
/* editor */
void
init_editor
(
HTMLDocument
*
);
...
...
dlls/mshtml/navigate.c
View file @
0d15ad8b
...
...
@@ -615,7 +615,7 @@ static void init_bscallback(BSCallback *This, const BSCallbackVtbl *vtbl, IMonik
}
/* Calls undocumented 84 cmd of CGID_ShellDocView */
static
void
call_docview_84
(
HTMLDocument
*
doc
)
static
void
call_docview_84
(
HTMLDocument
Obj
*
doc
)
{
IOleCommandTarget
*
olecmd
;
VARIANT
var
;
...
...
@@ -714,7 +714,7 @@ HRESULT start_binding(HTMLDocument *doc, BSCallback *bscallback, IBindCtx *bctx)
/* NOTE: IE7 calls IsSystemMoniker here*/
call_docview_84
(
doc
);
call_docview_84
(
doc
->
doc_obj
);
if
(
bctx
)
{
RegisterBindStatusCallback
(
bctx
,
STATUSCLB
(
bscallback
),
NULL
,
0
);
...
...
dlls/mshtml/nsembed.c
View file @
0d15ad8b
...
...
@@ -1139,7 +1139,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
FIXME
(
"aContextFlags=%08x
\n
"
,
aContextFlags
);
};
show_context_menu
(
&
This
->
doc
->
base
doc
,
dwID
,
&
pt
,
(
IDispatch
*
)
HTMLDOMNODE
(
get_node
(
&
This
->
doc
->
basedoc
,
aNode
,
TRUE
)));
show_context_menu
(
This
->
doc
,
dwID
,
&
pt
,
(
IDispatch
*
)
HTMLDOMNODE
(
get_node
(
&
This
->
doc
->
basedoc
,
aNode
,
TRUE
)));
return
NS_OK
;
}
...
...
@@ -1178,7 +1178,7 @@ static nsrefcnt NSAPI nsURIContentListener_Release(nsIURIContentListener *iface)
return
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
This
));
}
static
BOOL
translate_url
(
HTMLDocument
*
doc
,
nsIWineURI
*
nsuri
)
static
BOOL
translate_url
(
HTMLDocument
Obj
*
doc
,
nsIWineURI
*
nsuri
)
{
OLECHAR
*
new_url
=
NULL
,
*
url
;
BOOL
ret
=
FALSE
;
...
...
@@ -1251,7 +1251,7 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener
*
_retval
=
FALSE
;
}
else
if
(
This
->
doc
)
{
*
_retval
=
translate_url
(
&
This
->
doc
->
basedoc
.
doc_obj
->
basedoc
,
wine_uri
);
*
_retval
=
translate_url
(
This
->
doc
->
basedoc
.
doc_obj
,
wine_uri
);
}
nsIWineURI_Release
(
wine_uri
);
...
...
dlls/mshtml/nsevents.c
View file @
0d15ad8b
...
...
@@ -93,7 +93,7 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event
if
(
!
This
->
reset_focus
&&
This
->
doc
&&
This
->
doc
->
basedoc
.
doc_obj
->
basedoc
.
focus
&&
!
is_doc_child_focus
(
This
))
{
This
->
doc
->
basedoc
.
doc_obj
->
basedoc
.
focus
=
FALSE
;
notif_focus
(
&
This
->
doc
->
basedoc
);
notif_focus
(
This
->
doc
->
basedoc
.
doc_obj
);
}
return
NS_OK
;
...
...
@@ -107,7 +107,7 @@ static nsresult NSAPI handle_focus(nsIDOMEventListener *iface, nsIDOMEvent *even
if
(
!
This
->
reset_focus
&&
This
->
doc
&&
!
This
->
doc
->
basedoc
.
focus
)
{
This
->
doc
->
basedoc
.
focus
=
TRUE
;
notif_focus
(
&
This
->
doc
->
basedoc
);
notif_focus
(
This
->
doc
->
basedoc
.
doc_obj
);
}
return
NS_OK
;
...
...
dlls/mshtml/nsio.c
View file @
0d15ad8b
...
...
@@ -103,8 +103,7 @@ static BOOL exec_shldocvw_67(HTMLDocumentObj *doc, LPCWSTR url)
IOleCommandTarget
*
cmdtrg
=
NULL
;
HRESULT
hres
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
basedoc
.
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
varUrl
,
varRes
;
...
...
@@ -149,13 +148,13 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container)
doc
=
container_iter
->
doc
;
}
if
(
!
doc
->
basedoc
.
client
)
if
(
!
doc
->
client
)
return
TRUE
;
if
(
!
hlnf
&&
!
exec_shldocvw_67
(
doc
,
uri
))
return
FALSE
;
hres
=
IOleClientSite_QueryInterface
(
doc
->
basedoc
.
client
,
&
IID_IServiceProvider
,
hres
=
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IServiceProvider
,
(
void
**
)
&
service_provider
);
if
(
SUCCEEDED
(
hres
))
{
IHlinkFrame
*
hlink_frame
;
...
...
dlls/mshtml/olecmd.c
View file @
0d15ad8b
...
...
@@ -552,15 +552,15 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
}
}
if
(
This
->
frame
)
IOleInPlaceFrame_SetStatusText
(
This
->
frame
,
NULL
);
if
(
This
->
doc_obj
->
frame
)
IOleInPlaceFrame_SetStatusText
(
This
->
doc_obj
->
frame
,
NULL
);
This
->
readystate
=
READYSTATE_UNINITIALIZED
;
if
(
This
->
client
)
{
if
(
This
->
doc_obj
->
client
)
{
IOleCommandTarget
*
cmdtrg
;
hres
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
hres
=
IOleClientSite_QueryInterface
(
This
->
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
...
...
@@ -573,12 +573,12 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
}
}
if
(
This
->
hostui
)
{
if
(
This
->
doc_obj
->
hostui
)
{
DOCHOSTUIINFO
hostinfo
;
memset
(
&
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
hostinfo
.
cbSize
=
sizeof
(
DOCHOSTUIINFO
);
hres
=
IDocHostUIHandler_GetHostInfo
(
This
->
hostui
,
&
hostinfo
);
hres
=
IDocHostUIHandler_GetHostInfo
(
This
->
doc_obj
->
hostui
,
&
hostinfo
);
if
(
SUCCEEDED
(
hres
))
/* FIXME: use hostinfo */
TRACE
(
"hostinfo = {%u %08x %08x %s %s}
\n
"
,
...
...
@@ -610,10 +610,10 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
return
hres
;
if
(
This
->
ui_active
)
{
if
(
This
->
ip_window
)
call_set_active_object
(
This
->
ip_window
,
NULL
);
if
(
This
->
hostui
)
IDocHostUIHandler_HideUI
(
This
->
hostui
);
if
(
This
->
doc_obj
->
ip_window
)
call_set_active_object
(
This
->
doc_obj
->
ip_window
,
NULL
);
if
(
This
->
doc_obj
->
hostui
)
IDocHostUIHandler_HideUI
(
This
->
doc_obj
->
hostui
);
}
if
(
This
->
doc_obj
->
nscontainer
)
...
...
@@ -622,16 +622,16 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if
(
This
->
ui_active
)
{
RECT
rcBorderWidths
;
if
(
This
->
hostui
)
IDocHostUIHandler_ShowUI
(
This
->
hostui
,
DOCHOSTUITYPE_AUTHOR
,
ACTOBJ
(
This
),
CMDTARGET
(
This
),
This
->
frame
,
This
->
ip_window
);
if
(
This
->
doc_obj
->
hostui
)
IDocHostUIHandler_ShowUI
(
This
->
doc_obj
->
hostui
,
DOCHOSTUITYPE_AUTHOR
,
ACTOBJ
(
This
),
CMDTARGET
(
This
),
This
->
doc_obj
->
frame
,
This
->
doc_obj
->
ip_window
);
if
(
This
->
ip_window
)
call_set_active_object
(
This
->
ip_window
,
ACTOBJ
(
This
));
if
(
This
->
doc_obj
->
ip_window
)
call_set_active_object
(
This
->
doc_obj
->
ip_window
,
ACTOBJ
(
This
));
memset
(
&
rcBorderWidths
,
0
,
sizeof
(
rcBorderWidths
));
if
(
This
->
frame
)
IOleInPlaceFrame_SetBorderSpace
(
This
->
frame
,
&
rcBorderWidths
);
if
(
This
->
doc_obj
->
frame
)
IOleInPlaceFrame_SetBorderSpace
(
This
->
doc_obj
->
frame
,
&
rcBorderWidths
);
}
return
S_OK
;
...
...
@@ -792,8 +792,8 @@ static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, con
OLECMD
olecmd
;
prgCmds
[
i
].
cmdf
=
OLECMDF_SUPPORTED
;
if
(
This
->
client
)
{
hr
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
if
(
This
->
doc_obj
->
client
)
{
hr
=
IOleClientSite_QueryInterface
(
This
->
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hr
))
{
olecmd
.
cmdID
=
prgCmds
[
i
].
cmdID
;
...
...
@@ -897,14 +897,14 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
OleCommandTarget_Exec
};
void
show_context_menu
(
HTMLDocument
*
This
,
DWORD
dwID
,
POINT
*
ppt
,
IDispatch
*
elem
)
void
show_context_menu
(
HTMLDocument
Obj
*
This
,
DWORD
dwID
,
POINT
*
ppt
,
IDispatch
*
elem
)
{
HMENU
menu_res
,
menu
;
DWORD
cmdid
;
HRESULT
hres
;
hres
=
IDocHostUIHandler_ShowContextMenu
(
This
->
hostui
,
dwID
,
ppt
,
(
IUnknown
*
)
CMDTARGET
(
This
),
elem
);
(
IUnknown
*
)
CMDTARGET
(
&
This
->
basedoc
),
elem
);
if
(
hres
==
S_OK
)
return
;
...
...
@@ -912,11 +912,11 @@ void show_context_menu(HTMLDocument *This, DWORD dwID, POINT *ppt, IDispatch *el
menu
=
GetSubMenu
(
menu_res
,
dwID
);
cmdid
=
TrackPopupMenu
(
menu
,
TPM_LEFTALIGN
|
TPM_RIGHTBUTTON
|
TPM_RETURNCMD
,
ppt
->
x
,
ppt
->
y
,
0
,
This
->
hwnd
,
NULL
);
ppt
->
x
,
ppt
->
y
,
0
,
This
->
basedoc
.
hwnd
,
NULL
);
DestroyMenu
(
menu_res
);
if
(
cmdid
)
IOleCommandTarget_Exec
(
CMDTARGET
(
This
),
&
CGID_MSHTML
,
cmdid
,
0
,
NULL
,
NULL
);
IOleCommandTarget_Exec
(
CMDTARGET
(
&
This
->
basedoc
),
&
CGID_MSHTML
,
cmdid
,
0
,
NULL
,
NULL
);
}
void
HTMLDocument_OleCmd_Init
(
HTMLDocument
*
This
)
...
...
dlls/mshtml/oleobj.c
View file @
0d15ad8b
...
...
@@ -97,18 +97,18 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClientSite
);
if
(
pClientSite
==
This
->
client
)
if
(
pClientSite
==
This
->
doc_obj
->
client
)
return
S_OK
;
if
(
This
->
client
)
{
IOleClientSite_Release
(
This
->
client
);
This
->
client
=
NULL
;
if
(
This
->
doc_obj
->
client
)
{
IOleClientSite_Release
(
This
->
doc_obj
->
client
);
This
->
doc_obj
->
client
=
NULL
;
This
->
usermode
=
UNKNOWN_USERMODE
;
}
if
(
This
->
hostui
)
{
IDocHostUIHandler_Release
(
This
->
hostui
);
This
->
hostui
=
NULL
;
if
(
This
->
doc_obj
->
hostui
)
{
IDocHostUIHandler_Release
(
This
->
doc_obj
->
hostui
);
This
->
doc_obj
->
hostui
=
NULL
;
}
memset
(
&
This
->
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
...
...
@@ -192,15 +192,15 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
}
IOleClientSite_AddRef
(
pClientSite
);
This
->
client
=
pClientSite
;
This
->
hostui
=
pDocHostUIHandler
;
This
->
doc_obj
->
client
=
pClientSite
;
This
->
doc_obj
->
hostui
=
pDocHostUIHandler
;
if
(
This
->
usermode
==
UNKNOWN_USERMODE
)
IOleControl_OnAmbientPropertyChange
(
CONTROL
(
This
),
DISPID_AMBIENT_USERMODE
);
IOleControl_OnAmbientPropertyChange
(
CONTROL
(
This
),
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_SILENT
,
&
silent
);
hres
=
get_client_disp_property
(
This
->
doc_obj
->
client
,
DISPID_AMBIENT_SILENT
,
&
silent
);
if
(
SUCCEEDED
(
hres
))
{
if
(
V_VT
(
&
silent
)
!=
VT_BOOL
)
WARN
(
"V_VT(silent) = %d
\n
"
,
V_VT
(
&
silent
));
...
...
@@ -223,9 +223,9 @@ static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite
if
(
!
ppClientSite
)
return
E_INVALIDARG
;
if
(
This
->
client
)
IOleClientSite_AddRef
(
This
->
client
);
*
ppClientSite
=
This
->
client
;
if
(
This
->
doc_obj
->
client
)
IOleClientSite_AddRef
(
This
->
doc_obj
->
client
);
*
ppClientSite
=
This
->
doc_obj
->
client
;
return
S_OK
;
}
...
...
@@ -249,7 +249,7 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
if
(
This
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
This
));
HTMLDocument_LockContainer
(
This
,
FALSE
);
HTMLDocument_LockContainer
(
This
->
doc_obj
,
FALSE
);
return
S_OK
;
}
...
...
@@ -298,11 +298,11 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
}
if
(
!
pActiveSite
)
pActiveSite
=
This
->
client
;
pActiveSite
=
This
->
doc_obj
->
client
;
hres
=
IOleClientSite_QueryInterface
(
pActiveSite
,
&
IID_IOleDocumentSite
,
(
void
**
)
&
pDocSite
);
if
(
SUCCEEDED
(
hres
))
{
HTMLDocument_LockContainer
(
This
,
TRUE
);
HTMLDocument_LockContainer
(
This
->
doc_obj
,
TRUE
);
/* FIXME: Create new IOleDocumentView. See CreateView for more info. */
hres
=
IOleDocumentSite_ActivateMe
(
pDocSite
,
DOCVIEW
(
This
));
...
...
@@ -589,7 +589,7 @@ static HRESULT on_change_dlcontrol(HTMLDocument *This)
VARIANT
res
;
HRESULT
hres
;
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_DLCONTROL
,
&
res
);
hres
=
get_client_disp_property
(
This
->
doc_obj
->
client
,
DISPID_AMBIENT_DLCONTROL
,
&
res
);
if
(
SUCCEEDED
(
hres
))
FIXME
(
"unsupported dlcontrol %08x
\n
"
,
V_I4
(
&
res
));
...
...
@@ -599,18 +599,20 @@ static HRESULT on_change_dlcontrol(HTMLDocument *This)
static
HRESULT
WINAPI
OleControl_OnAmbientPropertyChange
(
IOleControl
*
iface
,
DISPID
dispID
)
{
HTMLDocument
*
This
=
CONTROL_THIS
(
iface
);
IOleClientSite
*
client
;
VARIANT
res
;
HRESULT
hres
;
if
(
!
This
->
client
)
{
TRACE
(
"This->client = NULL
\n
"
);
client
=
This
->
doc_obj
->
client
;
if
(
!
client
)
{
TRACE
(
"client = NULL
\n
"
);
return
S_OK
;
}
switch
(
dispID
)
{
case
DISPID_AMBIENT_USERMODE
:
TRACE
(
"(%p)->(DISPID_AMBIENT_USERMODE)
\n
"
,
This
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_USERMODE
,
&
res
);
hres
=
get_client_disp_property
(
client
,
DISPID_AMBIENT_USERMODE
,
&
res
);
if
(
FAILED
(
hres
))
return
S_OK
;
...
...
@@ -631,7 +633,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
case
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
:
TRACE
(
"(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)
\n
"
,
This
);
on_change_dlcontrol
(
This
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
,
&
res
);
hres
=
get_client_disp_property
(
client
,
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
,
&
res
);
if
(
FAILED
(
hres
))
return
S_OK
;
...
...
@@ -647,7 +649,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
case
DISPID_AMBIENT_SILENT
:
TRACE
(
"(%p)->(DISPID_AMBIENT_SILENT)
\n
"
,
This
);
on_change_dlcontrol
(
This
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_SILENT
,
&
res
);
hres
=
get_client_disp_property
(
client
,
DISPID_AMBIENT_SILENT
,
&
res
);
if
(
FAILED
(
hres
))
return
S_OK
;
...
...
@@ -662,7 +664,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
return
S_OK
;
case
DISPID_AMBIENT_USERAGENT
:
TRACE
(
"(%p)->(DISPID_AMBIENT_USERAGENT)
\n
"
,
This
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_USERAGENT
,
&
res
);
hres
=
get_client_disp_property
(
client
,
DISPID_AMBIENT_USERAGENT
,
&
res
);
if
(
FAILED
(
hres
))
return
S_OK
;
...
...
@@ -671,7 +673,7 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
return
S_OK
;
case
DISPID_AMBIENT_PALETTE
:
TRACE
(
"(%p)->(DISPID_AMBIENT_PALETTE)
\n
"
,
This
);
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_PALETTE
,
&
res
);
hres
=
get_client_disp_property
(
client
,
DISPID_AMBIENT_PALETTE
,
&
res
);
if
(
FAILED
(
hres
))
return
S_OK
;
...
...
@@ -743,18 +745,18 @@ static const ICustomDocVtbl CustomDocVtbl = {
CustomDoc_SetUIHandler
};
void
HTMLDocument_LockContainer
(
HTMLDocument
*
This
,
BOOL
fLock
)
void
HTMLDocument_LockContainer
(
HTMLDocument
Obj
*
This
,
BOOL
fLock
)
{
IOleContainer
*
container
;
HRESULT
hres
;
if
(
!
This
->
client
||
This
->
container_locked
==
fLock
)
if
(
!
This
->
client
||
This
->
basedoc
.
container_locked
==
fLock
)
return
;
hres
=
IOleClientSite_GetContainer
(
This
->
client
,
&
container
);
if
(
SUCCEEDED
(
hres
))
{
IOleContainer_LockContainer
(
container
,
fLock
);
This
->
container_locked
=
fLock
;
This
->
basedoc
.
container_locked
=
fLock
;
IOleContainer_Release
(
container
);
}
}
...
...
@@ -767,12 +769,4 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This
->
lpCustomDocVtbl
=
&
CustomDocVtbl
;
This
->
usermode
=
UNKNOWN_USERMODE
;
This
->
client
=
NULL
;
This
->
hostui
=
NULL
;
This
->
has_key_path
=
FALSE
;
This
->
container_locked
=
FALSE
;
memset
(
&
This
->
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
}
dlls/mshtml/olewnd.c
View file @
0d15ad8b
...
...
@@ -98,8 +98,8 @@ static HRESULT WINAPI OleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceAc
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fActivate
);
if
(
This
->
hostui
)
IDocHostUIHandler_OnFrameWindowActivate
(
This
->
hostui
,
fActivate
);
if
(
This
->
doc_obj
->
hostui
)
IDocHostUIHandler_OnFrameWindowActivate
(
This
->
doc_obj
->
hostui
,
fActivate
);
return
S_OK
;
}
...
...
@@ -193,8 +193,8 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
if
(
!
This
->
in_place_active
)
return
S_OK
;
if
(
This
->
frame
)
IOleInPlaceFrame_Release
(
This
->
frame
);
if
(
This
->
doc_obj
->
frame
)
IOleInPlaceFrame_Release
(
This
->
doc_obj
->
frame
);
if
(
This
->
hwnd
)
{
ShowWindow
(
This
->
hwnd
,
SW_HIDE
);
...
...
@@ -202,19 +202,19 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
}
This
->
focus
=
FALSE
;
notif_focus
(
This
);
notif_focus
(
This
->
doc_obj
);
This
->
in_place_active
=
FALSE
;
if
(
This
->
ipsite
)
{
if
(
This
->
doc_obj
->
ipsite
)
{
IOleInPlaceSiteEx
*
ipsiteex
;
HRESULT
hres
;
hres
=
IOleInPlaceSite_QueryInterface
(
This
->
ipsite
,
&
IID_IOleInPlaceSiteEx
,
(
void
**
)
&
ipsiteex
);
hres
=
IOleInPlaceSite_QueryInterface
(
This
->
doc_obj
->
ipsite
,
&
IID_IOleInPlaceSiteEx
,
(
void
**
)
&
ipsiteex
);
if
(
SUCCEEDED
(
hres
))
{
IOleInPlaceSiteEx_OnInPlaceDeactivateEx
(
ipsiteex
,
TRUE
);
IOleInPlaceSiteEx_Release
(
ipsiteex
);
}
else
{
IOleInPlaceSite_OnInPlaceDeactivate
(
This
->
ipsite
);
IOleInPlaceSite_OnInPlaceDeactivate
(
This
->
doc_obj
->
ipsite
);
}
}
...
...
dlls/mshtml/persist.c
View file @
0d15ad8b
...
...
@@ -117,7 +117,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
call_property_onchanged
(
&
This
->
cp_propnotif
,
DISPID_READYSTATE
);
update_doc
(
This
,
UPDATE_TITLE
);
HTMLDocument_LockContainer
(
This
,
TRUE
);
HTMLDocument_LockContainer
(
This
->
doc_obj
,
TRUE
);
hres
=
IMoniker_GetDisplayName
(
mon
,
pibc
,
NULL
,
&
url
);
if
(
FAILED
(
hres
))
{
...
...
@@ -129,11 +129,11 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
set_current_mon
(
This
,
mon
);
if
(
This
->
client
)
{
if
(
This
->
doc_obj
->
client
)
{
VARIANT
silent
,
offline
;
IOleCommandTarget
*
cmdtrg
=
NULL
;
hres
=
get_client_disp_property
(
This
->
client
,
DISPID_AMBIENT_SILENT
,
&
silent
);
hres
=
get_client_disp_property
(
This
->
doc_obj
->
client
,
DISPID_AMBIENT_SILENT
,
&
silent
);
if
(
SUCCEEDED
(
hres
))
{
if
(
V_VT
(
&
silent
)
!=
VT_BOOL
)
WARN
(
"V_VT(silent) = %d
\n
"
,
V_VT
(
&
silent
));
...
...
@@ -141,7 +141,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
FIXME
(
"silent == true
\n
"
);
}
hres
=
get_client_disp_property
(
This
->
client
,
hres
=
get_client_disp_property
(
This
->
doc_obj
->
client
,
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
,
&
offline
);
if
(
SUCCEEDED
(
hres
))
{
if
(
V_VT
(
&
silent
)
!=
VT_BOOL
)
...
...
@@ -150,7 +150,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
FIXME
(
"offline == true
\n
"
);
}
hres
=
IOleClientSite_QueryInterface
(
This
->
client
,
&
IID_IOleCommandTarget
,
hres
=
IOleClientSite_QueryInterface
(
This
->
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
cmdtrg
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
var
;
...
...
@@ -165,7 +165,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
bscallback
=
create_channelbsc
(
mon
);
if
(
This
->
frame
)
{
if
(
This
->
doc_obj
->
frame
)
{
task
=
heap_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
;
...
...
dlls/mshtml/task.c
View file @
0d15ad8b
...
...
@@ -191,7 +191,7 @@ HRESULT clear_task_timer(HTMLDocument *doc, BOOL interval, DWORD id)
return
S_OK
;
}
static
void
set_downloading
(
HTMLDocument
*
doc
)
static
void
set_downloading
(
HTMLDocument
Obj
*
doc
)
{
IOleCommandTarget
*
olecmd
;
HRESULT
hres
;
...
...
@@ -228,7 +228,7 @@ static void set_downloading(HTMLDocument *doc)
}
/* Calls undocumented 69 cmd of CGID_Explorer */
static
void
call_explorer_69
(
HTMLDocument
*
doc
)
static
void
call_explorer_69
(
HTMLDocument
Obj
*
doc
)
{
IOleCommandTarget
*
olecmd
;
VARIANT
var
;
...
...
@@ -257,17 +257,17 @@ static void set_parsecomplete(HTMLDocument *doc)
if
(
doc
->
usermode
==
EDITMODE
)
init_editor
(
doc
);
call_explorer_69
(
doc
);
call_explorer_69
(
doc
->
doc_obj
);
call_property_onchanged
(
&
doc
->
cp_propnotif
,
1005
);
call_explorer_69
(
doc
);
call_explorer_69
(
doc
->
doc_obj
);
/* FIXME: IE7 calls EnableModelless(TRUE), EnableModelless(FALSE) and sets interactive state here */
doc
->
readystate
=
READYSTATE_INTERACTIVE
;
call_property_onchanged
(
&
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
if
(
doc
->
client
)
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
doc
->
doc_obj
->
client
)
IOleClientSite_QueryInterface
(
doc
->
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
olecmd
)
{
VARIANT
state
,
progress
;
...
...
@@ -292,12 +292,12 @@ static void set_parsecomplete(HTMLDocument *doc)
doc
->
readystate
=
READYSTATE_COMPLETE
;
call_property_onchanged
(
&
doc
->
cp_propnotif
,
DISPID_READYSTATE
);
if
(
doc
->
frame
)
{
if
(
doc
->
doc_obj
->
frame
)
{
static
const
WCHAR
wszDone
[]
=
{
'D'
,
'o'
,
'n'
,
'e'
,
0
};
IOleInPlaceFrame_SetStatusText
(
doc
->
frame
,
wszDone
);
IOleInPlaceFrame_SetStatusText
(
doc
->
doc_obj
->
frame
,
wszDone
);
}
update_title
(
doc
);
update_title
(
doc
->
doc_obj
);
}
static
void
set_progress
(
HTMLDocument
*
doc
)
...
...
@@ -307,8 +307,8 @@ static void set_progress(HTMLDocument *doc)
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
client
)
IOleClientSite_QueryInterface
(
doc
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
doc
->
doc_obj
->
client
)
IOleClientSite_QueryInterface
(
doc
->
doc_obj
->
client
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
olecmd
);
if
(
olecmd
)
{
VARIANT
progress_max
,
progress
;
...
...
@@ -324,12 +324,12 @@ static void set_progress(HTMLDocument *doc)
&
progress
,
NULL
);
}
if
(
doc
->
usermode
==
EDITMODE
&&
doc
->
hostui
)
{
if
(
doc
->
usermode
==
EDITMODE
&&
doc
->
doc_obj
->
hostui
)
{
DOCHOSTUIINFO
hostinfo
;
memset
(
&
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
hostinfo
.
cbSize
=
sizeof
(
DOCHOSTUIINFO
);
hres
=
IDocHostUIHandler_GetHostInfo
(
doc
->
hostui
,
&
hostinfo
);
hres
=
IDocHostUIHandler_GetHostInfo
(
doc
->
doc_obj
->
hostui
,
&
hostinfo
);
if
(
SUCCEEDED
(
hres
))
/* FIXME: use hostinfo */
TRACE
(
"hostinfo = {%u %08x %08x %s %s}
\n
"
,
...
...
@@ -349,7 +349,7 @@ static void process_task(task_t *task)
{
switch
(
task
->
task_id
)
{
case
TASK_SETDOWNLOADSTATE
:
set_downloading
(
task
->
doc
);
set_downloading
(
task
->
doc
->
doc_obj
);
break
;
case
TASK_PARSECOMPLETE
:
set_parsecomplete
(
task
->
doc
);
...
...
dlls/mshtml/view.c
View file @
0d15ad8b
This diff is collapsed.
Click to expand it.
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