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
679591ff
Commit
679591ff
authored
Nov 30, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for relative URLs in navigate_url.
parent
7cb41811
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
20 deletions
+30
-20
htmllocation.c
dlls/mshtml/htmllocation.c
+3
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
navigate.c
dlls/mshtml/navigate.c
+26
-16
No files found.
dlls/mshtml/htmllocation.c
View file @
679591ff
...
...
@@ -154,12 +154,12 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
{
FIXME
(
"No
document
available
\n
"
);
if
(
!
This
->
window
)
{
FIXME
(
"No
window
available
\n
"
);
return
E_FAIL
;
}
return
navigate_url
(
This
->
window
->
doc
,
v
);
return
navigate_url
(
This
->
window
,
v
,
This
->
window
->
url
);
}
static
HRESULT
WINAPI
HTMLLocation_get_href
(
IHTMLLocation
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/mshtml_private.h
View file @
679591ff
...
...
@@ -668,7 +668,7 @@ BOOL install_wine_gecko(BOOL);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
);
HRESULT
hlink_frame_navigate
(
HTMLDocument
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
HRESULT
navigate_url
(
HTML
DocumentNode
*
,
OLE
CHAR
*
);
HRESULT
navigate_url
(
HTML
Window
*
,
const
WCHAR
*
,
const
W
CHAR
*
);
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
);
HRESULT
call_set_active_object
(
IOleInPlaceUIWindow
*
,
IOleInPlaceActiveObject
*
);
...
...
dlls/mshtml/navigate.c
View file @
679591ff
...
...
@@ -27,9 +27,12 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "hlguids.h"
#include "shlguid.h"
#include "wininet.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -41,8 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define CONTENT_LENGTH "Content-Length"
#define UTF16_STR "utf-16"
static
WCHAR
emptyW
[]
=
{
0
};
typedef
struct
{
const
nsIInputStreamVtbl
*
lpInputStreamVtbl
;
...
...
@@ -1231,30 +1232,39 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
return
hres
;
}
HRESULT
navigate_url
(
HTMLDocumentNode
*
doc
,
OLECHAR
*
url
)
HRESULT
navigate_url
(
HTMLWindow
*
window
,
const
WCHAR
*
new_url
,
const
WCHAR
*
base_url
)
{
OLECHAR
*
translated_url
=
NULL
;
WCHAR
url
[
INTERNET_MAX_URL_LENGTH
]
;
HRESULT
hres
;
if
(
!
url
)
url
=
emptyW
;
if
(
!
new_url
)
{
*
url
=
0
;
}
else
if
(
base_url
)
{
DWORD
len
=
0
;
if
(
doc
->
basedoc
.
doc_obj
->
hostui
)
{
hres
=
IDocHostUIHandler_TranslateUrl
(
doc
->
basedoc
.
doc_obj
->
hostui
,
0
,
url
,
&
translated_url
);
if
(
hres
==
S_OK
)
url
=
translated_url
;
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
(
doc
!=
doc
->
basedoc
.
doc_obj
->
basedoc
.
doc_node
)
{
FIXME
(
"navigation in frame
\n
"
);
return
E_NOTIMPL
;
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
)
{
strcpyW
(
url
,
translated_url
);
CoTaskMemFree
(
translated_url
);
}
}
hres
=
hlink_frame_navigate
(
&
doc
->
basedoc
,
url
,
NULL
,
0
);
hres
=
hlink_frame_navigate
(
&
window
->
doc
->
basedoc
,
url
,
NULL
,
0
);
if
(
FAILED
(
hres
))
FIXME
(
"hlink_frame_navigate failed: %08x
\n
"
,
hres
);
CoTaskMemFree
(
translated_url
);
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