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
fd47fa46
Commit
fd47fa46
authored
Oct 26, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved url and mon to HTMLWindow.
parent
207fe98e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
28 deletions
+28
-28
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-2
htmllocation.c
dlls/mshtml/htmllocation.c
+2
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-3
nsio.c
dlls/mshtml/nsio.c
+1
-1
olecmd.c
dlls/mshtml/olecmd.c
+4
-4
persist.c
dlls/mshtml/persist.c
+14
-14
secmgr.c
dlls/mshtml/secmgr.c
+2
-2
No files found.
dlls/mshtml/htmldoc.c
View file @
fd47fa46
...
...
@@ -589,7 +589,7 @@ static HRESULT WINAPI HTMLDocument_get_URL(IHTMLDocument2 *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
p
);
*
p
=
SysAllocString
(
This
->
doc_obj
->
url
?
This
->
doc_obj
->
url
:
about_blank_url
);
*
p
=
SysAllocString
(
This
->
window
->
url
?
This
->
window
->
url
:
about_blank_url
);
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
...
...
@@ -1886,7 +1886,6 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
set_current_mon
(
&
This
->
basedoc
,
NULL
);
if
(
This
->
basedoc
.
doc_node
)
{
This
->
basedoc
.
doc_node
->
basedoc
.
doc_obj
=
NULL
;
IHTMLDocument2_Release
(
HTMLDOC
(
&
This
->
basedoc
.
doc_node
->
basedoc
));
...
...
dlls/mshtml/htmllocation.c
View file @
fd47fa46
...
...
@@ -37,12 +37,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
HRESULT
get_url
(
HTMLLocation
*
This
,
const
WCHAR
**
ret
)
{
if
(
!
This
->
window
||
!
This
->
window
->
doc_obj
||
!
This
->
window
->
doc_obj
->
url
)
{
if
(
!
This
->
window
||
!
This
->
window
->
url
)
{
FIXME
(
"No current URL
\n
"
);
return
E_NOTIMPL
;
}
*
ret
=
This
->
window
->
doc_obj
->
url
;
*
ret
=
This
->
window
->
url
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlwindow.c
View file @
fd47fa46
...
...
@@ -159,6 +159,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
DWORD
i
;
set_window_bscallback
(
This
,
NULL
);
set_current_mon
(
This
,
NULL
);
window_set_docnode
(
This
,
NULL
);
release_children
(
This
);
...
...
dlls/mshtml/mshtml_private.h
View file @
fd47fa46
...
...
@@ -220,6 +220,8 @@ struct HTMLWindow {
HTMLWindow
*
parent
;
nsChannelBSC
*
bscallback
;
IMoniker
*
mon
;
LPOLESTR
url
;
event_target_t
*
event_target
;
IHTMLEventObj
*
event
;
...
...
@@ -360,8 +362,6 @@ struct HTMLDocumentObj {
DWORD
update
;
/* FIXME: probably should be in document node object */
IMoniker
*
mon
;
LPOLESTR
url
;
struct
list
bindings
;
};
...
...
@@ -660,7 +660,7 @@ void add_nsevent_listener(HTMLWindow*,LPCWSTR);
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
);
void
set_window_bscallback
(
HTMLWindow
*
,
nsChannelBSC
*
);
void
set_current_mon
(
HTML
Document
*
,
IMoniker
*
);
void
set_current_mon
(
HTML
Window
*
,
IMoniker
*
);
HRESULT
start_binding
(
HTMLDocument
*
,
BSCallback
*
,
IBindCtx
*
);
void
detach_document_bindings
(
HTMLDocumentObj
*
);
...
...
dlls/mshtml/nsio.c
View file @
fd47fa46
...
...
@@ -737,7 +737,7 @@ static nsresult async_open(nsChannel *This, HTMLWindow *window, BOOL is_doc_chan
return
NS_ERROR_UNEXPECTED
;
if
(
is_doc_channel
)
set_current_mon
(
&
window
->
doc_obj
->
basedoc
,
mon
);
set_current_mon
(
window
,
mon
);
bscallback
=
create_channelbsc
(
mon
);
IMoniker_Release
(
mon
);
...
...
dlls/mshtml/olecmd.c
View file @
fd47fa46
...
...
@@ -543,9 +543,9 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
This
->
doc_obj
->
usermode
=
EDITMODE
;
if
(
This
->
doc_obj
->
mon
)
{
if
(
This
->
window
->
mon
)
{
CLSID
clsid
=
IID_NULL
;
hres
=
IMoniker_GetClassID
(
This
->
doc_obj
->
mon
,
&
clsid
);
hres
=
IMoniker_GetClassID
(
This
->
window
->
mon
,
&
clsid
);
if
(
SUCCEEDED
(
hres
))
{
/* We should use IMoniker::Save here */
FIXME
(
"Use CLSID %s
\n
"
,
debugstr_guid
(
&
clsid
));
...
...
@@ -588,11 +588,11 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
update_doc
(
This
,
UPDATE_UI
);
if
(
This
->
doc_obj
->
mon
)
{
if
(
This
->
window
->
mon
)
{
/* FIXME: We should find nicer way to do this */
remove_doc_tasks
(
This
);
mon
=
This
->
doc_obj
->
mon
;
mon
=
This
->
window
->
mon
;
IMoniker_AddRef
(
mon
);
}
else
{
static
const
WCHAR
about_blankW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
0
};
...
...
dlls/mshtml/persist.c
View file @
fd47fa46
...
...
@@ -48,31 +48,31 @@ static BOOL use_gecko_script(LPCWSTR url)
&&
strncmpiW
(
aboutW
,
url
,
sizeof
(
aboutW
)
/
sizeof
(
WCHAR
));
}
void
set_current_mon
(
HTML
Document
*
This
,
IMoniker
*
mon
)
void
set_current_mon
(
HTML
Window
*
This
,
IMoniker
*
mon
)
{
HRESULT
hres
;
if
(
This
->
doc_obj
->
mon
)
{
IMoniker_Release
(
This
->
doc_obj
->
mon
);
This
->
doc_obj
->
mon
=
NULL
;
if
(
This
->
mon
)
{
IMoniker_Release
(
This
->
mon
);
This
->
mon
=
NULL
;
}
if
(
This
->
doc_obj
->
url
)
{
CoTaskMemFree
(
This
->
doc_obj
->
url
);
This
->
doc_obj
->
url
=
NULL
;
if
(
This
->
url
)
{
CoTaskMemFree
(
This
->
url
);
This
->
url
=
NULL
;
}
if
(
!
mon
)
return
;
IMoniker_AddRef
(
mon
);
This
->
doc_obj
->
mon
=
mon
;
This
->
mon
=
mon
;
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
doc_obj
->
url
);
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
This
->
url
);
if
(
FAILED
(
hres
))
WARN
(
"GetDisplayName failed: %08x
\n
"
,
hres
);
set_script_mode
(
This
->
window
,
use_gecko_script
(
This
->
doc_obj
->
url
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
set_script_mode
(
This
,
use_gecko_script
(
This
->
url
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
}
static
HRESULT
set_moniker
(
HTMLDocument
*
This
,
IMoniker
*
mon
,
IBindCtx
*
pibc
,
BOOL
*
bind_complete
)
...
...
@@ -127,7 +127,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
TRACE
(
"got url: %s
\n
"
,
debugstr_w
(
url
));
set_current_mon
(
This
,
mon
);
set_current_mon
(
This
->
window
,
mon
);
if
(
This
->
doc_obj
->
client
)
{
VARIANT
silent
,
offline
;
...
...
@@ -318,11 +318,11 @@ static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoni
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppimkName
);
if
(
!
This
->
doc_obj
->
mon
)
if
(
!
This
->
window
||
!
This
->
window
->
mon
)
return
E_UNEXPECTED
;
IMoniker_AddRef
(
This
->
doc_obj
->
mon
);
*
ppimkName
=
This
->
doc_obj
->
mon
;
IMoniker_AddRef
(
This
->
window
->
mon
);
*
ppimkName
=
This
->
window
->
mon
;
return
S_OK
;
}
...
...
dlls/mshtml/secmgr.c
View file @
fd47fa46
...
...
@@ -78,7 +78,7 @@ static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHost
TRACE
(
"(%p)->(%d %p %d %p %d %x %x)
\n
"
,
This
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
url
=
This
->
basedoc
.
doc_obj
->
url
?
This
->
basedoc
.
doc_obj
->
url
:
about_blankW
;
url
=
This
->
basedoc
.
window
->
url
?
This
->
basedoc
.
window
->
url
:
about_blankW
;
return
IInternetSecurityManager_ProcessUrlAction
(
This
->
secmgr
,
url
,
dwAction
,
pPolicy
,
cbPolicy
,
pContext
,
cbContext
,
dwFlags
,
dwReserved
);
...
...
@@ -124,7 +124,7 @@ static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHos
TRACE
(
"(%p)->(%s %p %p %p %d %x)
\n
"
,
This
,
debugstr_guid
(
guidKey
),
ppPolicy
,
pcbPolicy
,
pContext
,
cbContext
,
dwReserved
);
url
=
This
->
basedoc
.
doc_obj
->
url
?
This
->
basedoc
.
doc_obj
->
url
:
about_blankW
;
url
=
This
->
basedoc
.
window
->
url
?
This
->
basedoc
.
window
->
url
:
about_blankW
;
hres
=
IInternetSecurityManager_QueryCustomPolicy
(
This
->
secmgr
,
url
,
guidKey
,
ppPolicy
,
pcbPolicy
,
pContext
,
cbContext
,
dwReserved
);
...
...
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