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
e75683b8
Commit
e75683b8
authored
Sep 21, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use IUri as base URL in navigate_url.
parent
40e7f752
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
49 deletions
+65
-49
binding.h
dlls/mshtml/binding.h
+1
-1
htmlanchor.c
dlls/mshtml/htmlanchor.c
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-1
htmlframebase.c
dlls/mshtml/htmlframebase.c
+1
-1
htmllocation.c
dlls/mshtml/htmllocation.c
+2
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
navigate.c
dlls/mshtml/navigate.c
+57
-41
nsio.c
dlls/mshtml/nsio.c
+1
-1
No files found.
dlls/mshtml/binding.h
View file @
e75683b8
...
...
@@ -103,7 +103,7 @@ HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_
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
*
,
WCHAR
*
,
nsWineURI
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_doc_uri
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
nsWineURI
**
)
DECLSPEC_HIDDEN
;
HRESULT
load_nsuri
(
HTMLOuterWindow
*
,
nsWineURI
*
,
nsChannelBSC
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
set_moniker
(
HTMLDocument
*
,
IMoniker
*
,
IBindCtx
*
,
nsChannelBSC
*
,
BOOL
)
DECLSPEC_HIDDEN
;
void
prepare_for_binding
(
HTMLDocument
*
,
IMoniker
*
,
BOOL
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/htmlanchor.c
View file @
e75683b8
...
...
@@ -121,7 +121,7 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This)
if
(
*
href
)
{
if
(
!
window
)
window
=
This
->
element
.
node
.
doc
->
basedoc
.
window
;
hres
=
navigate_url
(
window
,
href
,
window
->
ur
l
);
hres
=
navigate_url
(
window
,
href
,
window
->
ur
i
);
}
else
{
TRACE
(
"empty href
\n
"
);
hres
=
S_OK
;
...
...
dlls/mshtml/htmldoc.c
View file @
e75683b8
...
...
@@ -609,7 +609,7 @@ static HRESULT WINAPI HTMLDocument_put_URL(IHTMLDocument2 *iface, BSTR v)
return
E_FAIL
;
}
return
navigate_url
(
This
->
window
,
v
,
This
->
window
->
ur
l
);
return
navigate_url
(
This
->
window
,
v
,
This
->
window
->
ur
i
);
}
static
HRESULT
WINAPI
HTMLDocument_get_URL
(
IHTMLDocument2
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/htmlframebase.c
View file @
e75683b8
...
...
@@ -135,7 +135,7 @@ static HRESULT WINAPI HTMLFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
return
E_FAIL
;
}
return
navigate_url
(
This
->
content_window
,
v
,
This
->
element
.
node
.
doc
->
basedoc
.
window
->
ur
l
);
return
navigate_url
(
This
->
content_window
,
v
,
This
->
element
.
node
.
doc
->
basedoc
.
window
->
ur
i
);
}
static
HRESULT
WINAPI
HTMLFrameBase_get_src
(
IHTMLFrameBase
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/htmllocation.c
View file @
e75683b8
...
...
@@ -170,7 +170,7 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
return
E_FAIL
;
}
return
navigate_url
(
This
->
window
->
base
.
outer_window
,
v
,
This
->
window
->
base
.
outer_window
->
ur
l
);
return
navigate_url
(
This
->
window
->
base
.
outer_window
,
v
,
This
->
window
->
base
.
outer_window
->
ur
i
);
}
static
HRESULT
WINAPI
HTMLLocation_get_href
(
IHTMLLocation
*
iface
,
BSTR
*
p
)
...
...
@@ -570,7 +570,7 @@ static HRESULT WINAPI HTMLLocation_replace(IHTMLLocation *iface, BSTR bstr)
return
E_FAIL
;
}
return
navigate_url
(
This
->
window
->
base
.
outer_window
,
bstr
,
This
->
window
->
base
.
outer_window
->
ur
l
);
return
navigate_url
(
This
->
window
->
base
.
outer_window
,
bstr
,
This
->
window
->
base
.
outer_window
->
ur
i
);
}
static
HRESULT
WINAPI
HTMLLocation_assign
(
IHTMLLocation
*
iface
,
BSTR
bstr
)
...
...
dlls/mshtml/mshtml_private.h
View file @
e75683b8
...
...
@@ -775,7 +775,7 @@ void init_node_cc(void);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
)
DECLSPEC_HIDDEN
;
BOOL
compare_ignoring_frag
(
IUri
*
,
IUri
*
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
*
)
DECLSPEC_HIDDEN
;
HRESULT
set_frame_doc
(
HTMLFrameBase
*
,
nsIDOMDocument
*
)
DECLSPEC_HIDDEN
;
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
e75683b8
...
...
@@ -2245,61 +2245,28 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url, nsChannel *nschanne
return
hres
;
}
HRESULT
navigate_ur
l
(
HTMLOuterWindow
*
window
,
const
WCHAR
*
new_url
,
const
WCHAR
*
base_url
)
HRESULT
navigate_ur
i
(
HTMLOuterWindow
*
window
,
IUri
*
uri
,
const
WCHAR
*
display_uri
)
{
WCHAR
url
[
INTERNET_MAX_URL_LENGTH
];
nsWineURI
*
uri
;
nsWineURI
*
nsuri
;
HRESULT
hres
;
if
(
!
new_url
)
{
*
url
=
0
;
}
else
if
(
base_url
)
{
DWORD
len
=
0
;
hres
=
CoInternetCombineUrl
(
base_url
,
new_url
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
url
,
sizeof
(
url
)
/
sizeof
(
WCHAR
),
&
len
,
0
);
if
(
FAILED
(
hres
))
return
hres
;
}
else
{
strcpyW
(
url
,
new_url
);
}
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
hostui
)
{
OLECHAR
*
translated_url
=
NULL
;
hres
=
IDocHostUIHandler_TranslateUrl
(
window
->
doc_obj
->
hostui
,
0
,
url
,
&
translated_url
);
if
(
hres
==
S_OK
)
{
TRACE
(
"%08x %s -> %s
\n
"
,
hres
,
debugstr_w
(
url
),
debugstr_w
(
translated_url
));
strcpyW
(
url
,
translated_url
);
CoTaskMemFree
(
translated_url
);
}
}
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
is_webbrowser
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
BOOL
cancel
=
FALSE
;
IUri
*
uri
;
hres
=
IDocObjectService_FireBeforeNavigate2
(
window
->
doc_obj
->
doc_object_service
,
NULL
,
url
,
0x40
,
hres
=
IDocObjectService_FireBeforeNavigate2
(
window
->
doc_obj
->
doc_object_service
,
NULL
,
display_uri
,
0x40
,
NULL
,
NULL
,
0
,
NULL
,
TRUE
,
&
cancel
);
if
(
SUCCEEDED
(
hres
)
&&
cancel
)
{
TRACE
(
"Navigation canceled
\n
"
);
return
S_OK
;
}
hres
=
CreateUri
(
url
,
0
,
0
,
&
uri
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
super_navigate
(
window
,
uri
,
NULL
,
NULL
,
0
);
IUri_Release
(
uri
);
return
hres
;
return
super_navigate
(
window
,
uri
,
NULL
,
NULL
,
0
);
}
if
(
window
->
doc_obj
&&
window
==
window
->
doc_obj
->
basedoc
.
window
)
{
BOOL
cancel
;
hres
=
hlink_frame_navigate
(
&
window
->
base
.
inner_window
->
doc
->
basedoc
,
url
,
NULL
,
0
,
&
cancel
);
hres
=
hlink_frame_navigate
(
&
window
->
base
.
inner_window
->
doc
->
basedoc
,
display_uri
,
NULL
,
0
,
&
cancel
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2309,11 +2276,60 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, const WCHAR
}
}
hres
=
create_doc_uri
(
window
,
url
,
&
uri
);
hres
=
create_doc_uri
(
window
,
display_uri
,
&
nsuri
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
load_nsuri
(
window
,
nsuri
,
NULL
,
LOAD_FLAGS_NONE
);
nsISupports_Release
((
nsISupports
*
)
nsuri
);
return
hres
;
}
HRESULT
navigate_url
(
HTMLOuterWindow
*
window
,
const
WCHAR
*
new_url
,
IUri
*
base_uri
)
{
BSTR
display_uri
;
IUri
*
uri
;
HRESULT
hres
;
if
(
new_url
&&
base_uri
)
hres
=
CoInternetCombineUrlEx
(
base_uri
,
new_url
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
&
uri
,
0
);
else
hres
=
CreateUri
(
new_url
,
0
,
0
,
&
uri
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
load_nsuri
(
window
,
uri
,
NULL
,
LOAD_FLAGS_NONE
);
nsISupports_Release
((
nsISupports
*
)
uri
);
hres
=
IUri_GetDisplayUri
(
uri
,
&
display_uri
);
if
(
FAILED
(
hres
))
{
IUri_Release
(
uri
);
return
hres
;
}
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
hostui
)
{
OLECHAR
*
translated_url
=
NULL
;
hres
=
IDocHostUIHandler_TranslateUrl
(
window
->
doc_obj
->
hostui
,
0
,
display_uri
,
&
translated_url
);
if
(
hres
==
S_OK
)
{
TRACE
(
"%08x %s -> %s
\n
"
,
hres
,
debugstr_w
(
display_uri
),
debugstr_w
(
translated_url
));
SysFreeString
(
display_uri
);
IUri_Release
(
uri
);
hres
=
CreateUri
(
translated_url
,
0
,
0
,
&
uri
);
CoTaskMemFree
(
translated_url
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IUri_GetDisplayUri
(
uri
,
&
display_uri
);
if
(
FAILED
(
hres
))
{
IUri_Release
(
uri
);
return
hres
;
}
}
}
hres
=
navigate_uri
(
window
,
uri
,
display_uri
);
IUri_Release
(
uri
);
SysFreeString
(
display_uri
);
return
hres
;
}
dlls/mshtml/nsio.c
View file @
e75683b8
...
...
@@ -2867,7 +2867,7 @@ static nsresult create_nsuri(IUri *iuri, HTMLOuterWindow *window, NSContainer *c
return
NS_OK
;
}
HRESULT
create_doc_uri
(
HTMLOuterWindow
*
window
,
WCHAR
*
url
,
nsWineURI
**
ret
)
HRESULT
create_doc_uri
(
HTMLOuterWindow
*
window
,
const
WCHAR
*
url
,
nsWineURI
**
ret
)
{
nsWineURI
*
uri
;
IUri
*
iuri
;
...
...
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