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
b3c2b380
Commit
b3c2b380
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 state flags to HTMLDocumentObj.
parent
e1aa05b1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
39 deletions
+40
-39
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+7
-6
nsembed.c
dlls/mshtml/nsembed.c
+1
-1
nsevents.c
dlls/mshtml/nsevents.c
+6
-6
olecmd.c
dlls/mshtml/olecmd.c
+2
-2
oleobj.c
dlls/mshtml/oleobj.c
+5
-5
olewnd.c
dlls/mshtml/olewnd.c
+6
-6
view.c
dlls/mshtml/view.c
+12
-12
No files found.
dlls/mshtml/htmldoc.c
View file @
b3c2b380
...
...
@@ -1887,7 +1887,7 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
if
(
This
->
client
)
IOleObject_SetClientSite
(
OLEOBJ
(
&
This
->
basedoc
),
NULL
);
if
(
This
->
basedoc
.
in_place_active
)
if
(
This
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
&
This
->
basedoc
));
if
(
This
->
ipsite
)
IOleDocumentView_SetInPlaceSite
(
DOCVIEW
(
&
This
->
basedoc
),
NULL
);
...
...
dlls/mshtml/mshtml_private.h
View file @
b3c2b380
...
...
@@ -291,12 +291,6 @@ struct HTMLDocument {
USERMODE
usermode
;
READYSTATE
readystate
;
BOOL
in_place_active
;
BOOL
ui_active
;
BOOL
window_active
;
BOOL
has_key_path
;
BOOL
container_locked
;
BOOL
focus
;
LPWSTR
mime
;
DWORD
update
;
...
...
@@ -354,6 +348,13 @@ struct HTMLDocumentObj {
HWND
hwnd
;
HWND
tooltips_hwnd
;
BOOL
in_place_active
;
BOOL
ui_active
;
BOOL
window_active
;
BOOL
has_key_path
;
BOOL
container_locked
;
BOOL
focus
;
};
typedef
struct
{
...
...
dlls/mshtml/nsembed.c
View file @
b3c2b380
...
...
@@ -117,7 +117,7 @@ static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
SetFocus
(
This
->
reset_focus
);
This
->
reset_focus
=
NULL
;
if
(
This
->
doc
)
This
->
doc
->
basedoc
.
focus
=
FALSE
;
This
->
doc
->
focus
=
FALSE
;
}
}
...
...
dlls/mshtml/nsevents.c
View file @
b3c2b380
...
...
@@ -91,9 +91,9 @@ static nsresult NSAPI handle_blur(nsIDOMEventListener *iface, nsIDOMEvent *event
TRACE
(
"(%p)
\n
"
,
This
);
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
.
doc_obj
);
if
(
!
This
->
reset_focus
&&
This
->
doc
&&
This
->
doc
->
basedoc
.
doc_obj
->
focus
&&
!
is_doc_child_focus
(
This
))
{
This
->
doc
->
basedoc
.
doc_obj
->
focus
=
FALSE
;
notif_focus
(
This
->
doc
);
}
return
NS_OK
;
...
...
@@ -105,9 +105,9 @@ static nsresult NSAPI handle_focus(nsIDOMEventListener *iface, nsIDOMEvent *even
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
reset_focus
&&
This
->
doc
&&
!
This
->
doc
->
basedoc
.
focus
)
{
This
->
doc
->
basedoc
.
focus
=
TRUE
;
notif_focus
(
This
->
doc
->
basedoc
.
doc_obj
);
if
(
!
This
->
reset_focus
&&
This
->
doc
&&
!
This
->
doc
->
focus
)
{
This
->
doc
->
focus
=
TRUE
;
notif_focus
(
This
->
doc
);
}
return
NS_OK
;
...
...
dlls/mshtml/olecmd.c
View file @
b3c2b380
...
...
@@ -609,7 +609,7 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if
(
FAILED
(
hres
))
return
hres
;
if
(
This
->
ui_active
)
{
if
(
This
->
doc_obj
->
ui_active
)
{
if
(
This
->
doc_obj
->
ip_window
)
call_set_active_object
(
This
->
doc_obj
->
ip_window
,
NULL
);
if
(
This
->
doc_obj
->
hostui
)
...
...
@@ -619,7 +619,7 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if
(
This
->
doc_obj
->
nscontainer
)
set_ns_editmode
(
This
->
doc_obj
->
nscontainer
);
if
(
This
->
ui_active
)
{
if
(
This
->
doc_obj
->
ui_active
)
{
RECT
rcBorderWidths
;
if
(
This
->
doc_obj
->
hostui
)
...
...
dlls/mshtml/oleobj.c
View file @
b3c2b380
...
...
@@ -133,7 +133,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
This
->
doc_obj
->
hostinfo
=
hostinfo
;
}
if
(
!
This
->
has_key_path
)
{
if
(
!
This
->
doc_obj
->
has_key_path
)
{
hres
=
IDocHostUIHandler_GetOptionKeyPath
(
pDocHostUIHandler
,
&
key_path
,
0
);
if
(
hres
==
S_OK
&&
key_path
)
{
if
(
key_path
[
0
])
{
...
...
@@ -157,7 +157,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
IDocHostUIHandler2_Release
(
pDocHostUIHandler2
);
}
This
->
has_key_path
=
TRUE
;
This
->
doc_obj
->
has_key_path
=
TRUE
;
}
}
...
...
@@ -246,7 +246,7 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
if
(
dwSaveOption
==
OLECLOSE_PROMPTSAVE
)
FIXME
(
"OLECLOSE_PROMPTSAVE not implemented
\n
"
);
if
(
This
->
in_place_active
)
if
(
This
->
doc_obj
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
INPLACEWIN
(
This
));
HTMLDocument_LockContainer
(
This
->
doc_obj
,
FALSE
);
...
...
@@ -750,13 +750,13 @@ void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
IOleContainer
*
container
;
HRESULT
hres
;
if
(
!
This
->
client
||
This
->
basedoc
.
container_locked
==
fLock
)
if
(
!
This
->
client
||
This
->
container_locked
==
fLock
)
return
;
hres
=
IOleClientSite_GetContainer
(
This
->
client
,
&
container
);
if
(
SUCCEEDED
(
hres
))
{
IOleContainer_LockContainer
(
container
,
fLock
);
This
->
basedoc
.
container_locked
=
fLock
;
This
->
container_locked
=
fLock
;
IOleContainer_Release
(
container
);
}
}
...
...
dlls/mshtml/olewnd.c
View file @
b3c2b380
...
...
@@ -68,7 +68,7 @@ static HRESULT WINAPI OleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *
if
(
!
phwnd
)
return
E_INVALIDARG
;
if
(
!
This
->
in_place_active
)
{
if
(
!
This
->
doc_obj
->
in_place_active
)
{
*
phwnd
=
NULL
;
return
E_FAIL
;
}
...
...
@@ -186,11 +186,11 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
ui_active
)
if
(
This
->
doc_obj
->
ui_active
)
IOleDocumentView_UIActivate
(
DOCVIEW
(
This
),
FALSE
);
This
->
window_active
=
FALSE
;
This
->
doc_obj
->
window_active
=
FALSE
;
if
(
!
This
->
in_place_active
)
if
(
!
This
->
doc_obj
->
in_place_active
)
return
S_OK
;
if
(
This
->
doc_obj
->
frame
)
...
...
@@ -201,10 +201,10 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
SetWindowPos
(
This
->
doc_obj
->
hwnd
,
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOACTIVATE
);
}
This
->
focus
=
FALSE
;
This
->
doc_obj
->
focus
=
FALSE
;
notif_focus
(
This
->
doc_obj
);
This
->
in_place_active
=
FALSE
;
This
->
doc_obj
->
in_place_active
=
FALSE
;
if
(
This
->
doc_obj
->
ipsite
)
{
IOleInPlaceSiteEx
*
ipsiteex
;
HRESULT
hres
;
...
...
dlls/mshtml/view.c
View file @
b3c2b380
...
...
@@ -175,7 +175,7 @@ void notif_focus(HTMLDocumentObj *This)
if
(
FAILED
(
hres
))
return
;
IOleControlSite_OnFocus
(
site
,
This
->
basedoc
.
focus
);
IOleControlSite_OnFocus
(
site
,
This
->
focus
);
IOleControlSite_Release
(
site
);
}
...
...
@@ -304,7 +304,7 @@ static HRESULT activate_window(HTMLDocumentObj *This)
if
(
This
->
nscontainer
)
activate_gecko
(
This
->
nscontainer
);
This
->
basedoc
.
in_place_active
=
TRUE
;
This
->
in_place_active
=
TRUE
;
hres
=
IOleInPlaceSite_QueryInterface
(
This
->
ipsite
,
&
IID_IOleInPlaceSiteEx
,
(
void
**
)
&
ipsiteex
);
if
(
SUCCEEDED
(
hres
))
{
BOOL
redraw
=
FALSE
;
...
...
@@ -318,7 +318,7 @@ static HRESULT activate_window(HTMLDocumentObj *This)
}
if
(
FAILED
(
hres
))
{
WARN
(
"OnInPlaceActivate failed: %08x
\n
"
,
hres
);
This
->
basedoc
.
in_place_active
=
FALSE
;
This
->
in_place_active
=
FALSE
;
return
hres
;
}
...
...
@@ -342,7 +342,7 @@ static HRESULT activate_window(HTMLDocumentObj *This)
IOleInPlaceFrame_Release
(
This
->
frame
);
This
->
frame
=
pIPFrame
;
This
->
basedoc
.
window_active
=
TRUE
;
This
->
window_active
=
TRUE
;
return
S_OK
;
}
...
...
@@ -548,7 +548,7 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fShow
);
if
(
fShow
)
{
if
(
!
This
->
ui_active
)
{
if
(
!
This
->
doc_obj
->
ui_active
)
{
hres
=
activate_window
(
This
->
doc_obj
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -581,16 +581,16 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
if
(
fUIActivate
)
{
RECT
rcBorderWidths
;
if
(
This
->
ui_active
)
if
(
This
->
doc_obj
->
ui_active
)
return
S_OK
;
if
(
!
This
->
window_active
)
{
if
(
!
This
->
doc_obj
->
window_active
)
{
hres
=
activate_window
(
This
->
doc_obj
);
if
(
FAILED
(
hres
))
return
hres
;
}
This
->
focus
=
TRUE
;
This
->
doc_obj
->
focus
=
TRUE
;
if
(
This
->
doc_obj
->
nscontainer
)
nsIWebBrowserFocus_Activate
(
This
->
doc_obj
->
nscontainer
->
focus
);
notif_focus
(
This
->
doc_obj
);
...
...
@@ -604,7 +604,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
FIXME
(
"OnUIActivate failed: %08x
\n
"
,
hres
);
IOleInPlaceFrame_Release
(
This
->
doc_obj
->
frame
);
This
->
doc_obj
->
frame
=
NULL
;
This
->
ui_active
=
FALSE
;
This
->
doc_obj
->
ui_active
=
FALSE
;
return
hres
;
}
...
...
@@ -622,10 +622,10 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
memset
(
&
rcBorderWidths
,
0
,
sizeof
(
rcBorderWidths
));
IOleInPlaceFrame_SetBorderSpace
(
This
->
doc_obj
->
frame
,
&
rcBorderWidths
);
This
->
ui_active
=
TRUE
;
This
->
doc_obj
->
ui_active
=
TRUE
;
}
else
{
if
(
This
->
ui_active
)
{
This
->
ui_active
=
FALSE
;
if
(
This
->
doc_obj
->
ui_active
)
{
This
->
doc_obj
->
ui_active
=
FALSE
;
if
(
This
->
doc_obj
->
ip_window
)
call_set_active_object
(
This
->
doc_obj
->
ip_window
,
NULL
);
if
(
This
->
doc_obj
->
frame
)
...
...
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