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
99af1ee3
Commit
99af1ee3
authored
Jul 25, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use proper window in set_moniker when invoked on frame or iframe.
parent
6457163b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
20 deletions
+33
-20
binding.h
dlls/mshtml/binding.h
+1
-1
navigate.c
dlls/mshtml/navigate.c
+3
-2
persist.c
dlls/mshtml/persist.c
+29
-17
No files found.
dlls/mshtml/binding.h
View file @
99af1ee3
...
...
@@ -110,7 +110,7 @@ nsresult on_start_uri_open(NSContainer*,nsIURI*,cpp_bool*) DECLSPEC_HIDDEN;
HRESULT
hlink_frame_navigate
(
HTMLDocument
*
,
LPCWSTR
,
nsChannel
*
,
DWORD
,
BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_doc_uri
(
HTMLOuterWindow
*
,
IUri
*
,
nsWineURI
**
)
DECLSPEC_HIDDEN
;
HRESULT
load_nsuri
(
HTMLOuterWindow
*
,
nsWineURI
*
,
nsChannelBSC
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
set_moniker
(
HTML
Document
*
,
IMoniker
*
,
IUri
*
,
IBindCtx
*
,
nsChannelBSC
*
,
BOOL
)
DECLSPEC_HIDDEN
;
HRESULT
set_moniker
(
HTML
OuterWindow
*
,
IMoniker
*
,
IUri
*
,
IBindCtx
*
,
nsChannelBSC
*
,
BOOL
)
DECLSPEC_HIDDEN
;
void
prepare_for_binding
(
HTMLDocument
*
,
IMoniker
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
super_navigate
(
HTMLOuterWindow
*
,
IUri
*
,
DWORD
,
const
WCHAR
*
,
BYTE
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
load_uri
(
HTMLOuterWindow
*
,
IUri
*
,
DWORD
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
99af1ee3
...
...
@@ -1132,7 +1132,7 @@ static void on_stop_nsrequest(nsChannelBSC *This, HRESULT result)
WARN
(
"OnStopRequest failed: %08x
\n
"
,
nsres
);
}
if
(
This
->
nschannel
->
load_group
)
{
if
(
This
->
nschannel
&&
This
->
nschannel
->
load_group
)
{
nsres
=
nsILoadGroup_RemoveRequest
(
This
->
nschannel
->
load_group
,
(
nsIRequest
*
)
&
This
->
nschannel
->
nsIHttpChannel_iface
,
NULL
,
request_result
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -1759,6 +1759,7 @@ HRESULT create_channelbsc(IMoniker *mon, const WCHAR *headers, BYTE *post_data,
ret
->
bsc
.
post_data_len
=
post_data_size
;
}
TRACE
(
"created %p
\n
"
,
ret
);
*
retval
=
ret
;
return
S_OK
;
}
...
...
@@ -1954,7 +1955,7 @@ static void navigate_proc(task_t *_task)
navigate_task_t
*
task
=
(
navigate_task_t
*
)
_task
;
HRESULT
hres
;
hres
=
set_moniker
(
&
task
->
window
->
doc_obj
->
basedoc
,
task
->
mon
,
task
->
uri
,
NULL
,
task
->
bscallback
,
TRUE
);
hres
=
set_moniker
(
task
->
window
,
task
->
mon
,
task
->
uri
,
NULL
,
task
->
bscallback
,
TRUE
);
if
(
SUCCEEDED
(
hres
))
{
set_current_mon
(
task
->
window
,
task
->
bscallback
->
bsc
.
mon
,
task
->
flags
);
set_current_uri
(
task
->
window
,
task
->
uri
);
...
...
dlls/mshtml/persist.c
View file @
99af1ee3
...
...
@@ -349,15 +349,20 @@ void prepare_for_binding(HTMLDocument *This, IMoniker *mon, DWORD flags)
}
}
HRESULT
set_moniker
(
HTMLDocument
*
This
,
IMoniker
*
mon
,
IUri
*
nav_uri
,
IBindCtx
*
pibc
,
nsChannelBSC
*
async_bsc
,
BOOL
set_download
)
HRESULT
set_moniker
(
HTMLOuterWindow
*
window
,
IMoniker
*
mon
,
IUri
*
nav_uri
,
IBindCtx
*
pibc
,
nsChannelBSC
*
async_bsc
,
BOOL
set_download
)
{
download_proc_task_t
*
download_task
;
HTMLDocumentObj
*
doc_obj
=
NULL
;
nsChannelBSC
*
bscallback
;
nsWineURI
*
nsuri
;
LPOLESTR
url
;
IUri
*
uri
;
HRESULT
hres
;
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
basedoc
.
window
==
window
)
doc_obj
=
window
->
doc_obj
;
hres
=
IMoniker_GetDisplayName
(
mon
,
pibc
,
NULL
,
&
url
);
if
(
FAILED
(
hres
))
{
WARN
(
"GetDiaplayName failed: %08x
\n
"
,
hres
);
...
...
@@ -376,9 +381,9 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IUri *nav_uri, IBindCtx *
TRACE
(
"got url: %s
\n
"
,
debugstr_w
(
url
));
set_ready_state
(
This
->
window
,
READYSTATE_LOADING
);
set_ready_state
(
window
,
READYSTATE_LOADING
);
hres
=
create_doc_uri
(
This
->
window
,
uri
,
&
nsuri
);
hres
=
create_doc_uri
(
window
,
uri
,
&
nsuri
);
if
(
!
nav_uri
)
IUri_Release
(
uri
);
if
(
SUCCEEDED
(
hres
))
{
...
...
@@ -389,13 +394,16 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IUri *nav_uri, IBindCtx *
}
if
(
SUCCEEDED
(
hres
))
{
remove_target_tasks
(
This
->
task_magic
);
abort_window_bindings
(
This
->
window
->
base
.
inner_window
);
if
(
window
->
base
.
inner_window
->
doc
)
remove_target_tasks
(
window
->
base
.
inner_window
->
task_magic
);
abort_window_bindings
(
window
->
base
.
inner_window
);
hres
=
load_nsuri
(
This
->
window
,
nsuri
,
bscallback
,
LOAD_FLAGS_BYPASS_CACHE
);
hres
=
load_nsuri
(
window
,
nsuri
,
bscallback
,
LOAD_FLAGS_BYPASS_CACHE
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
/* FIXME */
if
(
SUCCEEDED
(
hres
))
hres
=
create_pending_window
(
This
->
window
,
bscallback
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
create_pending_window
(
window
,
bscallback
);
TRACE
(
"pending window for %p %p %p
\n
"
,
window
,
bscallback
,
window
->
pending_window
);
}
if
(
bscallback
!=
async_bsc
)
IBindStatusCallback_Release
(
&
bscallback
->
bsc
.
IBindStatusCallback_iface
);
}
...
...
@@ -405,14 +413,15 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IUri *nav_uri, IBindCtx *
return
hres
;
}
HTMLDocument_LockContainer
(
This
->
doc_obj
,
TRUE
);
if
(
doc_obj
)
{
HTMLDocument_LockContainer
(
doc_obj
,
TRUE
);
if
(
This
->
doc_obj
->
frame
)
{
if
(
doc_obj
->
frame
)
{
docobj_task_t
*
task
;
task
=
heap_alloc
(
sizeof
(
docobj_task_t
));
task
->
doc
=
This
->
doc_obj
;
hres
=
push_task
(
&
task
->
header
,
set_progress_proc
,
NULL
,
This
->
doc_obj
->
basedoc
.
task_magic
);
task
->
doc
=
doc_obj
;
hres
=
push_task
(
&
task
->
header
,
set_progress_proc
,
NULL
,
doc_obj
->
basedoc
.
task_magic
);
if
(
FAILED
(
hres
))
{
CoTaskMemFree
(
url
);
return
hres
;
...
...
@@ -420,10 +429,13 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IUri *nav_uri, IBindCtx *
}
download_task
=
heap_alloc
(
sizeof
(
download_proc_task_t
));
download_task
->
doc
=
This
->
doc_obj
;
download_task
->
doc
=
doc_obj
;
download_task
->
set_download
=
set_download
;
download_task
->
url
=
url
;
return
push_task
(
&
download_task
->
header
,
set_downloading_proc
,
set_downloading_task_destr
,
This
->
doc_obj
->
basedoc
.
task_magic
);
return
push_task
(
&
download_task
->
header
,
set_downloading_proc
,
set_downloading_task_destr
,
doc_obj
->
basedoc
.
task_magic
);
}
return
S_OK
;
}
void
set_ready_state
(
HTMLOuterWindow
*
window
,
READYSTATE
readystate
)
...
...
@@ -562,7 +574,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
prepare_for_binding
(
This
,
pimkName
,
FALSE
);
call_docview_84
(
This
->
doc_obj
);
hres
=
set_moniker
(
This
,
pimkName
,
NULL
,
pibc
,
NULL
,
TRUE
);
hres
=
set_moniker
(
This
->
window
,
pimkName
,
NULL
,
pibc
,
NULL
,
TRUE
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -831,7 +843,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM
}
prepare_for_binding
(
This
,
mon
,
FALSE
);
hres
=
set_moniker
(
This
,
mon
,
NULL
,
NULL
,
NULL
,
TRUE
);
hres
=
set_moniker
(
This
->
window
,
mon
,
NULL
,
NULL
,
NULL
,
TRUE
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -888,7 +900,7 @@ static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
}
prepare_for_binding
(
This
,
mon
,
FALSE
);
hres
=
set_moniker
(
This
,
mon
,
NULL
,
NULL
,
NULL
,
FALSE
);
hres
=
set_moniker
(
This
->
window
,
mon
,
NULL
,
NULL
,
NULL
,
FALSE
);
IMoniker_Release
(
mon
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
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