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
8df27741
Commit
8df27741
authored
Dec 16, 2014
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Support new window targets for FORM elements.
parent
4b33a339
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
28 deletions
+45
-28
binding.h
dlls/mshtml/binding.h
+2
-2
hlink.c
dlls/mshtml/hlink.c
+1
-1
htmlanchor.c
dlls/mshtml/htmlanchor.c
+1
-1
htmlform.c
dlls/mshtml/htmlform.c
+15
-12
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
navigate.c
dlls/mshtml/navigate.c
+25
-11
No files found.
dlls/mshtml/binding.h
View file @
8df27741
...
...
@@ -138,9 +138,9 @@ HRESULT set_moniker(HTMLOuterWindow*,IMoniker*,IUri*,IBindCtx*,nsChannelBSC*,BOO
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
;
HRESULT
navigate_new_window
(
HTMLOuterWindow
*
,
IUri
*
,
const
WCHAR
*
,
IHTMLWindow2
**
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_new_window
(
HTMLOuterWindow
*
,
IUri
*
,
const
WCHAR
*
,
request_data_t
*
,
IHTMLWindow2
**
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
submit_form
(
HTMLOuterWindow
*
,
IUri
*
,
nsIInputStream
*
)
DECLSPEC_HIDDEN
;
HRESULT
submit_form
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
*
,
nsIInputStream
*
)
DECLSPEC_HIDDEN
;
void
init_bscallback
(
BSCallback
*
,
const
BSCallbackVtbl
*
,
IMoniker
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
create_channelbsc
(
IMoniker
*
,
const
WCHAR
*
,
BYTE
*
,
DWORD
,
BOOL
,
nsChannelBSC
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/hlink.c
View file @
8df27741
...
...
@@ -85,7 +85,7 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L
FIXME
(
"JumpLocation not supported
\n
"
);
if
(
!
This
->
doc_obj
->
client
)
return
navigate_new_window
(
This
->
window
,
This
->
window
->
uri
,
NULL
,
NULL
);
return
navigate_new_window
(
This
->
window
,
This
->
window
->
uri
,
NULL
,
NULL
,
NULL
);
return
IOleObject_DoVerb
(
&
This
->
IOleObject_iface
,
OLEIVERB_SHOW
,
NULL
,
NULL
,
-
1
,
NULL
,
NULL
);
}
...
...
dlls/mshtml/htmlanchor.c
View file @
8df27741
...
...
@@ -65,7 +65,7 @@ static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *targ
if
(
FAILED
(
hres
))
return
hres
;
hres
=
navigate_new_window
(
This
->
element
.
node
.
doc
->
basedoc
.
window
,
uri
,
target
,
NULL
);
hres
=
navigate_new_window
(
This
->
element
.
node
.
doc
->
basedoc
.
window
,
uri
,
target
,
NULL
,
NULL
);
IUri_Release
(
uri
);
return
hres
;
}
...
...
dlls/mshtml/htmlform.c
View file @
8df27741
...
...
@@ -389,6 +389,7 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
IUri
*
uri
;
nsresult
nsres
;
HRESULT
hres
;
BOOL
use_new_window
;
TRACE
(
"(%p)->()
\n
"
,
This
);
...
...
@@ -404,22 +405,21 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
nsAString_Init
(
&
target_str
,
NULL
);
nsres
=
nsIDOMHTMLFormElement_GetTarget
(
This
->
nsform
,
&
target_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
BOOL
use_new_window
;
if
(
NS_SUCCEEDED
(
nsres
))
window
=
get_target_window
(
this_window
,
&
target_str
,
&
use_new_window
);
if
(
use_new_window
)
FIXME
(
"submit to new window is not supported
\n
"
);
}
nsAString_Finish
(
&
target_str
);
if
(
!
window
)
if
(
!
window
&&
!
use_new_window
)
{
nsAString_Finish
(
&
target_str
);
return
S_OK
;
}
/*
* FIXME: We currently don't use our submit implementation for sub-windows because
* load_nsuri can't support post data. We should fix it.
*/
if
(
!
window
->
doc_obj
||
window
->
doc_obj
->
basedoc
.
window
!=
window
)
{
if
(
window
&&
(
!
window
->
doc_obj
||
window
->
doc_obj
->
basedoc
.
window
!=
window
)
)
{
nsres
=
nsIDOMHTMLFormElement_Submit
(
This
->
nsform
);
nsAString_Finish
(
&
target_str
);
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Submit failed: %08x
\n
"
,
nsres
);
...
...
@@ -442,13 +442,16 @@ static HRESULT WINAPI HTMLFormElement_submit(IHTMLFormElement *iface)
}
nsAString_Finish
(
&
action_uri_str
);
if
(
SUCCEEDED
(
hres
))
{
window
->
readystate_locked
++
;
hres
=
submit_form
(
window
,
uri
,
post_stream
);
window
->
readystate_locked
--
;
const
PRUnichar
*
target
;
nsAString_GetData
(
&
target_str
,
&
target
);
hres
=
submit_form
(
window
,
target
,
uri
,
post_stream
);
IUri_Release
(
uri
);
}
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
nsAString_Finish
(
&
target_str
);
if
(
window
)
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
if
(
post_stream
)
nsIInputStream_Release
(
post_stream
);
return
hres
;
...
...
dlls/mshtml/htmlwindow.c
View file @
8df27741
...
...
@@ -967,7 +967,7 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
if
(
FAILED
(
hres
))
return
hres
;
hres
=
navigate_new_window
(
window
,
uri
,
name
,
pomWindowResult
);
hres
=
navigate_new_window
(
window
,
uri
,
name
,
NULL
,
pomWindowResult
);
IUri_Release
(
uri
);
return
hres
;
}
...
...
dlls/mshtml/navigate.c
View file @
8df27741
...
...
@@ -2107,7 +2107,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC
return
hres
;
}
HRESULT
navigate_new_window
(
HTMLOuterWindow
*
window
,
IUri
*
uri
,
const
WCHAR
*
name
,
IHTMLWindow2
**
ret
)
HRESULT
navigate_new_window
(
HTMLOuterWindow
*
window
,
IUri
*
uri
,
const
WCHAR
*
name
,
request_data_t
*
request_data
,
IHTMLWindow2
**
ret
)
{
IWebBrowser2
*
web_browser
;
IHTMLWindow2
*
new_window
;
...
...
@@ -2115,7 +2115,12 @@ HRESULT navigate_new_window(HTMLOuterWindow *window, IUri *uri, const WCHAR *nam
nsChannelBSC
*
bsc
;
HRESULT
hres
;
hres
=
create_channelbsc
(
NULL
,
NULL
,
NULL
,
0
,
FALSE
,
&
bsc
);
if
(
request_data
)
hres
=
create_channelbsc
(
NULL
,
request_data
->
headers
,
request_data
->
post_data
,
request_data
->
post_data_len
,
FALSE
,
&
bsc
);
else
hres
=
create_channelbsc
(
NULL
,
NULL
,
NULL
,
0
,
FALSE
,
&
bsc
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2322,23 +2327,32 @@ static HRESULT translate_uri(HTMLOuterWindow *window, IUri *orig_uri, BSTR *ret_
return
S_OK
;
}
HRESULT
submit_form
(
HTMLOuterWindow
*
window
,
IUri
*
submit_uri
,
nsIInputStream
*
post_stream
)
HRESULT
submit_form
(
HTMLOuterWindow
*
window
,
const
WCHAR
*
target
,
IUri
*
submit_uri
,
nsIInputStream
*
post_stream
)
{
request_data_t
request_data
=
{
NULL
};
BSTR
display_uri
;
IUri
*
uri
;
HRESULT
hres
;
hres
=
read_post_data_stream
(
post_stream
,
TRUE
,
NULL
,
&
request_data
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
translate_uri
(
window
,
submit_uri
,
&
display_uri
,
&
uri
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
navigate_uri
(
window
,
uri
,
display_uri
,
&
request_data
,
BINDING_NAVIGATED
|
BINDING_SUBMIT
);
IUri_Release
(
uri
);
SysFreeString
(
display_uri
);
}
if
(
window
)
{
IUri
*
uri
;
BSTR
display_uri
;
window
->
readystate_locked
++
;
hres
=
translate_uri
(
window
,
submit_uri
,
&
display_uri
,
&
uri
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
navigate_uri
(
window
,
uri
,
display_uri
,
&
request_data
,
BINDING_NAVIGATED
|
BINDING_SUBMIT
);
IUri_Release
(
uri
);
SysFreeString
(
display_uri
);
}
window
->
readystate_locked
--
;
}
else
hres
=
navigate_new_window
(
window
,
submit_uri
,
target
,
&
request_data
,
NULL
);
release_request_data
(
&
request_data
);
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