Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
971ee04c
Commit
971ee04c
authored
Mar 19, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLAnchorElement::get_protocol implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
119b1a69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
htmlanchor.c
dlls/mshtml/htmlanchor.c
+52
-2
No files found.
dlls/mshtml/htmlanchor.c
View file @
971ee04c
...
...
@@ -174,6 +174,27 @@ HRESULT handle_link_click_event(HTMLElement *element, nsAString *href_str, nsASt
return
hres
;
}
static
IUri
*
get_anchor_uri
(
HTMLAnchorElement
*
anchor
)
{
nsAString
href_str
;
IUri
*
uri
=
NULL
;
nsresult
nsres
;
nsAString_Init
(
&
href_str
,
NULL
);
nsres
=
nsIDOMHTMLAnchorElement_GetHref
(
anchor
->
nsanchor
,
&
href_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
href
;
nsAString_GetData
(
&
href_str
,
&
href
);
create_uri
(
href
,
0
,
&
uri
);
}
else
{
ERR
(
"GetHref failed: %08x
\n
"
,
nsres
);
}
nsAString_Finish
(
&
href_str
);
return
uri
;
}
static
inline
HTMLAnchorElement
*
impl_from_IHTMLAnchorElement
(
IHTMLAnchorElement
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLAnchorElement
,
IHTMLAnchorElement_iface
);
...
...
@@ -481,8 +502,37 @@ static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface,
static
HRESULT
WINAPI
HTMLAnchorElement_get_protocol
(
IHTMLAnchorElement
*
iface
,
BSTR
*
p
)
{
HTMLAnchorElement
*
This
=
impl_from_IHTMLAnchorElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
BSTR
scheme
;
size_t
len
;
IUri
*
uri
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
uri
=
get_anchor_uri
(
This
);
if
(
!
uri
)
{
WARN
(
"Could not create IUri
\n
"
);
*
p
=
NULL
;
return
S_OK
;
}
hres
=
IUri_GetSchemeName
(
uri
,
&
scheme
);
IUri_Release
(
uri
);
if
(
FAILED
(
hres
))
return
hres
;
len
=
SysStringLen
(
scheme
);
if
(
len
)
{
*
p
=
SysAllocStringLen
(
scheme
,
len
+
1
);
if
(
*
p
)
(
*
p
)[
len
]
=
':'
;
else
hres
=
E_OUTOFMEMORY
;
}
else
{
*
p
=
NULL
;
}
SysFreeString
(
scheme
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLAnchorElement_put_search
(
IHTMLAnchorElement
*
iface
,
BSTR
v
)
...
...
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