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
56b69dff
Commit
56b69dff
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: Moved usermode to HTMLDocumentObj.
parent
e52e57cf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
23 deletions
+23
-23
editor.c
dlls/mshtml/editor.c
+4
-4
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-1
nsevents.c
dlls/mshtml/nsevents.c
+2
-2
olecmd.c
dlls/mshtml/olecmd.c
+6
-6
oleobj.c
dlls/mshtml/oleobj.c
+4
-6
persist.c
dlls/mshtml/persist.c
+1
-1
task.c
dlls/mshtml/task.c
+2
-2
view.c
dlls/mshtml/view.c
+1
-1
No files found.
dlls/mshtml/editor.c
View file @
56b69dff
...
...
@@ -100,7 +100,7 @@ void set_dirty(HTMLDocument *This, VARIANT_BOOL dirty)
{
nsresult
nsres
;
if
(
This
->
usermode
!=
EDITMODE
||
!
This
->
doc_obj
->
nscontainer
||
!
This
->
doc_obj
->
nscontainer
->
editor
)
if
(
This
->
doc_obj
->
usermode
!=
EDITMODE
||
!
This
->
doc_obj
->
nscontainer
||
!
This
->
doc_obj
->
nscontainer
->
editor
)
return
;
if
(
dirty
)
{
...
...
@@ -150,7 +150,7 @@ static DWORD query_ns_edit_status(HTMLDocument *This, const char *nscmd)
nsICommandParams
*
nsparam
;
PRBool
b
=
FALSE
;
if
(
This
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
if
(
This
->
doc_obj
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
return
OLECMDF_SUPPORTED
;
if
(
This
->
doc_obj
->
nscontainer
&&
nscmd
)
{
...
...
@@ -185,7 +185,7 @@ static DWORD query_align_status(HTMLDocument *This, const char *align_str)
nsICommandParams
*
nsparam
;
char
*
align
=
NULL
;
if
(
This
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
if
(
This
->
doc_obj
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
return
OLECMDF_SUPPORTED
;
if
(
This
->
doc_obj
->
nscontainer
)
{
...
...
@@ -715,7 +715,7 @@ static HRESULT query_justify(HTMLDocument *This, OLECMD *cmd)
case
IDM_JUSTIFYLEFT
:
TRACE
(
"(%p) IDM_JUSTIFYLEFT
\n
"
,
This
);
/* FIXME: We should set OLECMDF_LATCHED only if it's set explicitly. */
if
(
This
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
if
(
This
->
doc_obj
->
usermode
!=
EDITMODE
||
This
->
readystate
<
READYSTATE_INTERACTIVE
)
cmd
->
cmdf
=
OLECMDF_SUPPORTED
;
else
cmd
->
cmdf
=
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
;
...
...
dlls/mshtml/htmldoc.c
View file @
56b69dff
...
...
@@ -1940,6 +1940,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
doc
->
nscontainer
=
NSContainer_Create
(
doc
,
NULL
);
list_init
(
&
doc
->
bindings
);
doc
->
usermode
=
UNKNOWN_USERMODE
;
if
(
doc
->
nscontainer
)
{
nsresult
nsres
;
...
...
dlls/mshtml/mshtml_private.h
View file @
56b69dff
...
...
@@ -284,7 +284,6 @@ struct HTMLDocument {
HTMLWindow
*
window
;
nsIDOMHTMLDocument
*
nsdoc
;
USERMODE
usermode
;
READYSTATE
readystate
;
LPWSTR
mime
;
...
...
@@ -350,6 +349,8 @@ struct HTMLDocumentObj {
BOOL
container_locked
;
BOOL
focus
;
USERMODE
usermode
;
/* FIXME: probably should be in document node object */
nsChannelBSC
*
bscallback
;
IMoniker
*
mon
;
...
...
dlls/mshtml/nsevents.c
View file @
56b69dff
...
...
@@ -121,7 +121,7 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface,
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
event
);
update_doc
(
&
This
->
doc
->
basedoc
,
UPDATE_UI
);
if
(
This
->
doc
->
basedoc
.
usermode
==
EDITMODE
)
if
(
This
->
doc
->
usermode
==
EDITMODE
)
handle_edit_event
(
&
This
->
doc
->
basedoc
,
event
);
return
NS_OK
;
...
...
@@ -145,7 +145,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
This
->
editor_controller
=
NULL
;
}
if
(
This
->
doc
->
basedoc
.
usermode
==
EDITMODE
)
if
(
This
->
doc
->
usermode
==
EDITMODE
)
handle_edit_load
(
&
This
->
doc
->
basedoc
);
if
(
!
This
->
doc
->
basedoc
.
nsdoc
)
{
...
...
dlls/mshtml/olecmd.c
View file @
56b69dff
...
...
@@ -473,7 +473,7 @@ static HRESULT exec_mshtml_copy(HTMLDocument *This, DWORD cmdexecopt, VARIANT *i
{
TRACE
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
This
->
usermode
==
EDITMODE
)
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
editor_exec_copy
(
This
,
cmdexecopt
,
in
,
out
);
do_ns_command
(
This
,
NSCMD_COPY
,
NULL
);
...
...
@@ -491,7 +491,7 @@ static HRESULT exec_mshtml_cut(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in
{
TRACE
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
This
->
usermode
==
EDITMODE
)
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
editor_exec_cut
(
This
,
cmdexecopt
,
in
,
out
);
FIXME
(
"Unimplemented in browse mode
\n
"
);
...
...
@@ -509,7 +509,7 @@ static HRESULT exec_mshtml_paste(HTMLDocument *This, DWORD cmdexecopt, VARIANT *
{
TRACE
(
"(%p)->(%08x %p %p)
\n
"
,
This
,
cmdexecopt
,
in
,
out
);
if
(
This
->
usermode
==
EDITMODE
)
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
editor_exec_paste
(
This
,
cmdexecopt
,
in
,
out
);
FIXME
(
"Unimplemented in browse mode
\n
"
);
...
...
@@ -523,7 +523,7 @@ static HRESULT exec_browsemode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
This
->
usermode
=
BROWSEMODE
;
This
->
doc_obj
->
usermode
=
BROWSEMODE
;
return
S_OK
;
}
...
...
@@ -538,10 +538,10 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if
(
in
||
out
)
FIXME
(
"unsupported args
\n
"
);
if
(
This
->
usermode
==
EDITMODE
)
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
S_OK
;
This
->
usermode
=
EDITMODE
;
This
->
doc_obj
->
usermode
=
EDITMODE
;
if
(
This
->
doc_obj
->
mon
)
{
CLSID
clsid
=
IID_NULL
;
...
...
dlls/mshtml/oleobj.c
View file @
56b69dff
...
...
@@ -103,7 +103,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
if
(
This
->
doc_obj
->
client
)
{
IOleClientSite_Release
(
This
->
doc_obj
->
client
);
This
->
doc_obj
->
client
=
NULL
;
This
->
usermode
=
UNKNOWN_USERMODE
;
This
->
doc_obj
->
usermode
=
UNKNOWN_USERMODE
;
}
if
(
This
->
doc_obj
->
hostui
)
{
...
...
@@ -195,7 +195,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
This
->
doc_obj
->
client
=
pClientSite
;
This
->
doc_obj
->
hostui
=
pDocHostUIHandler
;
if
(
This
->
usermode
==
UNKNOWN_USERMODE
)
if
(
This
->
doc_obj
->
usermode
==
UNKNOWN_USERMODE
)
IOleControl_OnAmbientPropertyChange
(
CONTROL
(
This
),
DISPID_AMBIENT_USERMODE
);
IOleControl_OnAmbientPropertyChange
(
CONTROL
(
This
),
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
);
...
...
@@ -618,10 +618,10 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
if
(
V_VT
(
&
res
)
==
VT_BOOL
)
{
if
(
V_BOOL
(
&
res
))
{
This
->
usermode
=
BROWSEMODE
;
This
->
doc_obj
->
usermode
=
BROWSEMODE
;
}
else
{
FIXME
(
"edit mode is not supported
\n
"
);
This
->
usermode
=
EDITMODE
;
This
->
doc_obj
->
usermode
=
EDITMODE
;
}
}
else
{
FIXME
(
"V_VT(res)=%d
\n
"
,
V_VT
(
&
res
));
...
...
@@ -767,6 +767,4 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This
->
lpOleDocumentVtbl
=
&
OleDocumentVtbl
;
This
->
lpOleControlVtbl
=
&
OleControlVtbl
;
This
->
lpCustomDocVtbl
=
&
CustomDocVtbl
;
This
->
usermode
=
UNKNOWN_USERMODE
;
}
dlls/mshtml/persist.c
View file @
56b69dff
...
...
@@ -529,7 +529,7 @@ static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
usermode
==
EDITMODE
)
if
(
This
->
doc_obj
->
usermode
==
EDITMODE
)
return
editor_is_dirty
(
This
);
return
S_FALSE
;
...
...
dlls/mshtml/task.c
View file @
56b69dff
...
...
@@ -254,7 +254,7 @@ static void set_parsecomplete(HTMLDocument *doc)
TRACE
(
"(%p)
\n
"
,
doc
);
if
(
doc
->
usermode
==
EDITMODE
)
if
(
doc
->
doc_obj
->
usermode
==
EDITMODE
)
init_editor
(
doc
);
call_explorer_69
(
doc
->
doc_obj
);
...
...
@@ -324,7 +324,7 @@ static void set_progress(HTMLDocument *doc)
&
progress
,
NULL
);
}
if
(
doc
->
usermode
==
EDITMODE
&&
doc
->
doc_obj
->
hostui
)
{
if
(
doc
->
doc_obj
->
usermode
==
EDITMODE
&&
doc
->
doc_obj
->
hostui
)
{
DOCHOSTUIINFO
hostinfo
;
memset
(
&
hostinfo
,
0
,
sizeof
(
DOCHOSTUIINFO
));
...
...
dlls/mshtml/view.c
View file @
56b69dff
...
...
@@ -610,7 +610,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
if
(
This
->
doc_obj
->
hostui
)
{
hres
=
IDocHostUIHandler_ShowUI
(
This
->
doc_obj
->
hostui
,
This
->
usermode
==
EDITMODE
?
DOCHOSTUITYPE_AUTHOR
:
DOCHOSTUITYPE_BROWSE
,
This
->
doc_obj
->
usermode
==
EDITMODE
?
DOCHOSTUITYPE_AUTHOR
:
DOCHOSTUITYPE_BROWSE
,
ACTOBJ
(
This
),
CMDTARGET
(
This
),
This
->
doc_obj
->
frame
,
This
->
doc_obj
->
ip_window
);
if
(
FAILED
(
hres
))
IDocHostUIHandler_HideUI
(
This
->
doc_obj
->
hostui
);
...
...
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