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
020c75b0
Commit
020c75b0
authored
Dec 13, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Dec 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLImgElement get_Name.
parent
cde32172
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
htmlimg.c
dlls/mshtml/htmlimg.c
+18
-2
dom.c
dlls/mshtml/tests/dom.c
+16
-1
No files found.
dlls/mshtml/htmlimg.c
View file @
020c75b0
...
...
@@ -437,8 +437,24 @@ static HRESULT WINAPI HTMLImgElement_put_name(IHTMLImgElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLImgElement_get_name
(
IHTMLImgElement
*
iface
,
BSTR
*
p
)
{
HTMLImgElement
*
This
=
HTMLIMG_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
strName
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
strName
,
NULL
);
nsres
=
nsIDOMHTMLImageElement_GetName
(
This
->
nsimg
,
&
strName
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
str
;
nsAString_GetData
(
&
strName
,
&
str
);
*
p
=
*
str
?
SysAllocString
(
str
)
:
NULL
;
}
else
{
ERR
(
"GetName failed: %08x
\n
"
,
nsres
);
}
nsAString_Finish
(
&
strName
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLImgElement_put_width
(
IHTMLImgElement
*
iface
,
LONG
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
020c75b0
...
...
@@ -49,7 +49,7 @@ static const char elem_test_str[] =
"<table id=
\"
tbl
\"
><tbody><tr></tr><tr id=
\"
row2
\"
><td>td1 text</td><td>td2 text</td></tr></tbody></table>"
"<script id=
\"
sc
\"
type=
\"
text/javascript
\"
><!--
\n
function Testing() {}
\n
// -->
\n
</script>"
"<test />"
"<img id=
\"
imgid
\"
/>"
"<img id=
\"
imgid
\"
name=
\"
WineImg
\"
/>"
"<iframe src=
\"
about:blank
\"
id=
\"
ifr
\"
></iframe>"
"<form id=
\"
frm
\"
></form>"
"</body></html>"
;
...
...
@@ -1927,6 +1927,20 @@ static void _test_img_set_alt(unsigned line, IUnknown *unk, const char *alt)
_test_img_alt
(
line
,
unk
,
alt
);
}
#define test_img_name(u, c) _test_img_name(__LINE__,u, c)
static
void
_test_img_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
pValue
)
{
IHTMLImgElement
*
img
=
_get_img_iface
(
line
,
unk
);
BSTR
sName
;
HRESULT
hres
;
hres
=
IHTMLImgElement_get_name
(
img
,
&
sName
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_Name failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
sName
,
pValue
),
"expected '%s' got '%s'
\n
"
,
pValue
,
wine_dbgstr_w
(
sName
));
SysFreeString
(
sName
);
}
#define test_input_get_disabled(i,b) _test_input_get_disabled(__LINE__,i,b)
static
void
_test_input_get_disabled
(
unsigned
line
,
IHTMLInputElement
*
input
,
VARIANT_BOOL
exb
)
{
...
...
@@ -5526,6 +5540,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_img_set_src
((
IUnknown
*
)
elem
,
"about:blank"
);
test_img_alt
((
IUnknown
*
)
elem
,
NULL
);
test_img_set_alt
((
IUnknown
*
)
elem
,
"alt test"
);
test_img_name
((
IUnknown
*
)
elem
,
"WineImg"
);
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