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
Show 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)
...
@@ -154,12 +154,12 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
window
||
!
This
->
window
->
doc
)
{
if
(
!
This
->
window
)
{
FIXME
(
"No
document
available
\n
"
);
FIXME
(
"No
window
available
\n
"
);
return
E_FAIL
;
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
)
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);
...
@@ -668,7 +668,7 @@ BOOL install_wine_gecko(BOOL);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
);
HRESULT
hlink_frame_navigate
(
HTMLDocument
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
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
);
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
);
HRESULT
call_set_active_object
(
IOleInPlaceUIWindow
*
,
IOleInPlaceActiveObject
*
);
HRESULT
call_set_active_object
(
IOleInPlaceUIWindow
*
,
IOleInPlaceActiveObject
*
);
...
...
dlls/mshtml/navigate.c
View file @
679591ff
...
@@ -27,9 +27,12 @@
...
@@ -27,9 +27,12 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winuser.h"
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "ole2.h"
#include "hlguids.h"
#include "hlguids.h"
#include "shlguid.h"
#include "shlguid.h"
#include "wininet.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
...
@@ -41,8 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
...
@@ -41,8 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define CONTENT_LENGTH "Content-Length"
#define CONTENT_LENGTH "Content-Length"
#define UTF16_STR "utf-16"
#define UTF16_STR "utf-16"
static
WCHAR
emptyW
[]
=
{
0
};
typedef
struct
{
typedef
struct
{
const
nsIInputStreamVtbl
*
lpInputStreamVtbl
;
const
nsIInputStreamVtbl
*
lpInputStreamVtbl
;
...
@@ -1231,30 +1232,39 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
...
@@ -1231,30 +1232,39 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url,
return
hres
;
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
;
HRESULT
hres
;
if
(
!
url
)
if
(
!
new_url
)
{
url
=
emptyW
;
*
url
=
0
;
}
else
if
(
base_url
)
{
DWORD
len
=
0
;
if
(
doc
->
basedoc
.
doc_obj
->
hostui
)
{
hres
=
CoInternetCombineUrl
(
base_url
,
new_url
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
hres
=
IDocHostUIHandler_TranslateUrl
(
doc
->
basedoc
.
doc_obj
->
hostui
,
0
,
url
,
url
,
sizeof
(
url
)
/
sizeof
(
WCHAR
),
&
len
,
0
);
&
translated_url
);
if
(
FAILED
(
hres
))
if
(
hres
==
S_OK
)
return
hres
;
url
=
translated_url
;
}
else
{
strcpyW
(
url
,
new_url
);
}
}
if
(
doc
!=
doc
->
basedoc
.
doc_obj
->
basedoc
.
doc_node
)
{
if
(
window
->
doc_obj
&&
window
->
doc_obj
->
hostui
)
{
FIXME
(
"navigation in frame
\n
"
);
OLECHAR
*
translated_url
=
NULL
;
return
E_NOTIMPL
;
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
))
if
(
FAILED
(
hres
))
FIXME
(
"hlink_frame_navigate failed: %08x
\n
"
,
hres
);
FIXME
(
"hlink_frame_navigate failed: %08x
\n
"
,
hres
);
CoTaskMemFree
(
translated_url
);
return
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