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
508aa85c
Commit
508aa85c
authored
Sep 14, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLInputElement::src property implementation.
parent
ee5d6784
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
7 deletions
+70
-7
htmlimg.c
dlls/mshtml/htmlimg.c
+1
-1
htmlinput.c
dlls/mshtml/htmlinput.c
+31
-4
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
nsio.c
dlls/mshtml/nsio.c
+5
-1
dom.c
dlls/mshtml/tests/dom.c
+32
-0
No files found.
dlls/mshtml/htmlimg.c
View file @
508aa85c
...
@@ -295,7 +295,7 @@ static HRESULT WINAPI HTMLImgElement_get_src(IHTMLImgElement *iface, BSTR *p)
...
@@ -295,7 +295,7 @@ static HRESULT WINAPI HTMLImgElement_get_src(IHTMLImgElement *iface, BSTR *p)
}
}
nsAString_GetData
(
&
src_str
,
&
src
);
nsAString_GetData
(
&
src_str
,
&
src
);
hres
=
nsuri_to_url
(
src
,
p
);
hres
=
nsuri_to_url
(
src
,
TRUE
,
p
);
nsAString_Finish
(
&
src_str
);
nsAString_Finish
(
&
src_str
);
return
hres
;
return
hres
;
...
...
dlls/mshtml/htmlinput.c
View file @
508aa85c
...
@@ -506,15 +506,42 @@ static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p
...
@@ -506,15 +506,42 @@ static HRESULT WINAPI HTMLInputElement_get_alt(IHTMLInputElement *iface, BSTR *p
static
HRESULT
WINAPI
HTMLInputElement_put_src
(
IHTMLInputElement
*
iface
,
BSTR
v
)
static
HRESULT
WINAPI
HTMLInputElement_put_src
(
IHTMLInputElement
*
iface
,
BSTR
v
)
{
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString
nsstr
;
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_Init
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetSrc
(
This
->
nsinput
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetSrc failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLInputElement_get_src
(
IHTMLInputElement
*
iface
,
BSTR
*
p
)
static
HRESULT
WINAPI
HTMLInputElement_get_src
(
IHTMLInputElement
*
iface
,
BSTR
*
p
)
{
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
const
PRUnichar
*
src
;
return
E_NOTIMPL
;
nsAString
src_str
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
src_str
,
NULL
);
nsres
=
nsIDOMHTMLInputElement_GetSrc
(
This
->
nsinput
,
&
src_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSrc failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsAString_GetData
(
&
src_str
,
&
src
);
hres
=
nsuri_to_url
(
src
,
FALSE
,
p
);
nsAString_Finish
(
&
src_str
);
return
hres
;
}
}
static
HRESULT
WINAPI
HTMLInputElement_put_lowsrc
(
IHTMLInputElement
*
iface
,
BSTR
v
)
static
HRESULT
WINAPI
HTMLInputElement_put_lowsrc
(
IHTMLInputElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/mshtml_private.h
View file @
508aa85c
...
@@ -554,7 +554,7 @@ void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
...
@@ -554,7 +554,7 @@ void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
void
release_nsio
(
void
);
void
release_nsio
(
void
);
BOOL
install_wine_gecko
(
BOOL
);
BOOL
install_wine_gecko
(
BOOL
);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BSTR
*
);
HRESULT
nsuri_to_url
(
LPCWSTR
,
B
OOL
,
B
STR
*
);
void
hlink_frame_navigate
(
HTMLDocument
*
,
IHlinkFrame
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
void
hlink_frame_navigate
(
HTMLDocument
*
,
IHlinkFrame
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
...
...
dlls/mshtml/nsio.c
View file @
508aa85c
...
@@ -77,7 +77,7 @@ static const char *debugstr_nsacstr(const nsACString *nsstr)
...
@@ -77,7 +77,7 @@ static const char *debugstr_nsacstr(const nsACString *nsstr)
return
debugstr_a
(
data
);
return
debugstr_a
(
data
);
}
}
HRESULT
nsuri_to_url
(
LPCWSTR
nsuri
,
BSTR
*
ret
)
HRESULT
nsuri_to_url
(
LPCWSTR
nsuri
,
B
OOL
ret_empty
,
B
STR
*
ret
)
{
{
const
WCHAR
*
ptr
=
nsuri
;
const
WCHAR
*
ptr
=
nsuri
;
...
@@ -86,9 +86,13 @@ HRESULT nsuri_to_url(LPCWSTR nsuri, BSTR *ret)
...
@@ -86,9 +86,13 @@ HRESULT nsuri_to_url(LPCWSTR nsuri, BSTR *ret)
if
(
!
strncmpW
(
nsuri
,
wine_prefixW
,
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
)))
if
(
!
strncmpW
(
nsuri
,
wine_prefixW
,
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
)))
ptr
+=
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
);
ptr
+=
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
);
if
(
*
ptr
||
ret_empty
)
{
*
ret
=
SysAllocString
(
ptr
);
*
ret
=
SysAllocString
(
ptr
);
if
(
!*
ret
)
if
(
!*
ret
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
else
{
*
ret
=
NULL
;
}
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
nsuri
),
debugstr_w
(
*
ret
));
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
nsuri
),
debugstr_w
(
*
ret
));
return
S_OK
;
return
S_OK
;
...
...
dlls/mshtml/tests/dom.c
View file @
508aa85c
...
@@ -1586,6 +1586,35 @@ static void _test_input_put_value(unsigned line, IUnknown *unk, const char *val)
...
@@ -1586,6 +1586,35 @@ static void _test_input_put_value(unsigned line, IUnknown *unk, const char *val)
IHTMLInputElement_Release
(
input
);
IHTMLInputElement_Release
(
input
);
}
}
#define test_input_src(i,s) _test_input_src(__LINE__,i,s)
static
void
_test_input_src
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
exsrc
)
{
BSTR
src
;
HRESULT
hres
;
hres
=
IHTMLInputElement_get_src
(
input
,
&
src
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_src failed: %08x
\n
"
,
hres
);
if
(
exsrc
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
src
,
exsrc
),
"get_src returned %s expected %s
\n
"
,
wine_dbgstr_w
(
src
),
exsrc
);
else
ok_
(
__FILE__
,
line
)
(
!
src
,
"get_src returned %s expected NULL
\n
"
,
wine_dbgstr_w
(
src
));
SysFreeString
(
src
);
}
#define test_input_set_src(u,s) _test_input_set_src(__LINE__,u,s)
static
void
_test_input_set_src
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
src
)
{
BSTR
tmp
;
HRESULT
hres
;
tmp
=
a2bstr
(
src
);
hres
=
IHTMLInputElement_put_src
(
input
,
tmp
);
SysFreeString
(
tmp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_src failed: %08x
\n
"
,
hres
);
_test_input_src
(
line
,
input
,
src
);
}
#define test_elem_class(u,c) _test_elem_class(__LINE__,u,c)
#define test_elem_class(u,c) _test_elem_class(__LINE__,u,c)
static
void
_test_elem_class
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exclass
)
static
void
_test_elem_class
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exclass
)
{
{
...
@@ -4622,6 +4651,9 @@ static void test_elems(IHTMLDocument2 *doc)
...
@@ -4622,6 +4651,9 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_set_checked
(
input
,
VARIANT_TRUE
);
test_input_set_checked
(
input
,
VARIANT_TRUE
);
test_input_set_checked
(
input
,
VARIANT_FALSE
);
test_input_set_checked
(
input
,
VARIANT_FALSE
);
test_input_src
(
input
,
NULL
);
test_input_set_src
(
input
,
"about:blank"
);
IHTMLInputElement_Release
(
input
);
IHTMLInputElement_Release
(
input
);
IHTMLElement_Release
(
elem
);
IHTMLElement_Release
(
elem
);
}
}
...
...
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