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
28f35f86
Commit
28f35f86
authored
Aug 14, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use helper to get IUri in HTMLLocation implementation.
parent
39182135
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
htmllocation.c
dlls/mshtml/htmllocation.c
+22
-10
No files found.
dlls/mshtml/htmllocation.c
View file @
28f35f86
...
...
@@ -46,6 +46,13 @@ static HRESULT get_url(HTMLLocation *This, const WCHAR **ret)
return
S_OK
;
}
static
IUri
*
get_uri
(
HTMLLocation
*
This
)
{
if
(
!
This
->
window
)
return
NULL
;
return
This
->
window
->
uri
;
}
static
HRESULT
get_url_components
(
HTMLLocation
*
This
,
URL_COMPONENTSW
*
url
)
{
const
WCHAR
*
doc_url
;
...
...
@@ -278,6 +285,7 @@ static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
BSTR
protocol
,
ret
;
unsigned
len
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -285,12 +293,12 @@ static HRESULT WINAPI HTMLLocation_get_protocol(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
if
(
!
(
uri
=
get_uri
(
This
))
)
{
FIXME
(
"No current URI
\n
"
);
return
E_NOTIMPL
;
}
hres
=
IUri_GetSchemeName
(
This
->
window
->
uri
,
&
protocol
);
hres
=
IUri_GetSchemeName
(
uri
,
&
protocol
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
hres
==
S_FALSE
)
{
...
...
@@ -367,6 +375,7 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
{
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
BSTR
hostname
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -374,12 +383,12 @@ static HRESULT WINAPI HTMLLocation_get_hostname(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
if
(
!
(
uri
=
get_uri
(
This
))
)
{
FIXME
(
"No current URI
\n
"
);
return
E_NOTIMPL
;
}
hres
=
IUri_GetHost
(
This
->
window
->
uri
,
&
hostname
);
hres
=
IUri_GetHost
(
uri
,
&
hostname
);
if
(
hres
==
S_OK
)
{
*
p
=
hostname
;
}
else
if
(
hres
==
S_FALSE
)
{
...
...
@@ -403,6 +412,7 @@ static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
{
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
DWORD
port
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -410,12 +420,12 @@ static HRESULT WINAPI HTMLLocation_get_port(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
if
(
!
(
uri
=
get_uri
(
This
))
)
{
FIXME
(
"No current URI
\n
"
);
return
E_NOTIMPL
;
}
hres
=
IUri_GetPort
(
This
->
window
->
uri
,
&
port
);
hres
=
IUri_GetPort
(
uri
,
&
port
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -479,6 +489,7 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
{
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
BSTR
query
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -486,12 +497,12 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
if
(
!
(
uri
=
get_uri
(
This
))
)
{
FIXME
(
"No current URI
\n
"
);
return
E_NOTIMPL
;
}
hres
=
IUri_GetQuery
(
This
->
window
->
uri
,
&
query
);
hres
=
IUri_GetQuery
(
uri
,
&
query
);
if
(
hres
==
S_OK
)
{
*
p
=
query
;
}
else
if
(
hres
==
S_FALSE
)
{
...
...
@@ -515,6 +526,7 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
{
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
BSTR
hash
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -522,12 +534,12 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
if
(
!
This
->
window
||
!
This
->
window
->
uri
)
{
if
(
!
(
uri
=
get_uri
(
This
))
)
{
FIXME
(
"No current URI
\n
"
);
return
E_NOTIMPL
;
}
hres
=
IUri_GetFragment
(
This
->
window
->
uri
,
&
hash
);
hres
=
IUri_GetFragment
(
uri
,
&
hash
);
if
(
hres
==
S_OK
)
{
*
p
=
hash
;
}
else
if
(
hres
==
S_FALSE
)
{
...
...
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