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
6079c561
Commit
6079c561
authored
Aug 18, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLImgElement::align property implementation.
parent
e12cb546
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
4 deletions
+44
-4
htmlimg.c
dlls/mshtml/htmlimg.c
+24
-4
dom.c
dlls/mshtml/tests/dom.c
+20
-0
No files found.
dlls/mshtml/htmlimg.c
View file @
6079c561
...
...
@@ -412,15 +412,35 @@ static HRESULT WINAPI HTMLImgElement_get_loop(IHTMLImgElement *iface, VARIANT *p
static
HRESULT
WINAPI
HTMLImgElement_put_align
(
IHTMLImgElement
*
iface
,
BSTR
v
)
{
HTMLImgElement
*
This
=
impl_from_IHTMLImgElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
str
,
v
);
nsres
=
nsIDOMHTMLImageElement_SetAlign
(
This
->
nsimg
,
&
str
);
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
)){
ERR
(
"Set Align(%s) failed: %08x
\n
"
,
debugstr_w
(
v
),
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLImgElement_get_align
(
IHTMLImgElement
*
iface
,
BSTR
*
p
)
{
HTMLImgElement
*
This
=
impl_from_IHTMLImgElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
str
,
NULL
);
nsres
=
nsIDOMHTMLImageElement_GetAlign
(
This
->
nsimg
,
&
str
);
return
return_nsstr
(
nsres
,
&
str
,
p
);
}
static
HRESULT
WINAPI
HTMLImgElement_put_onload
(
IHTMLImgElement
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
6079c561
...
...
@@ -2783,6 +2783,24 @@ static void _test_img_set_alt(unsigned line, IUnknown *unk, const char *alt)
_test_img_alt
(
line
,
unk
,
alt
);
}
#define test_img_align(u,a) _test_img_align(__LINE__,u,a)
static
void
_test_img_align
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
align
)
{
IHTMLImgElement
*
img
=
_get_img_iface
(
line
,
unk
);
BSTR
tmp
;
HRESULT
hres
;
tmp
=
a2bstr
(
align
);
hres
=
IHTMLImgElement_put_align
(
img
,
tmp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_align failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
hres
=
IHTMLImgElement_get_align
(
img
,
&
tmp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_align failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
tmp
,
align
),
"Expect %s, got %s
\n
"
,
align
,
wine_dbgstr_w
(
tmp
));
SysFreeString
(
tmp
);
}
#define test_img_name(u, c) _test_img_name(__LINE__,u, c)
static
void
_test_img_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
pValue
)
{
...
...
@@ -7000,6 +7018,8 @@ static void test_elems(IHTMLDocument2 *doc)
elem
=
get_elem_by_id
(
doc
,
"imgid"
,
TRUE
);
if
(
elem
)
{
test_img_align
((
IUnknown
*
)
elem
,
"left"
);
test_img_name
((
IUnknown
*
)
elem
,
"WineImg"
);
test_img_src
((
IUnknown
*
)
elem
,
""
,
NULL
);
test_img_set_src
((
IUnknown
*
)
elem
,
"about:blank"
);
test_img_src
((
IUnknown
*
)
elem
,
"about:blank"
,
NULL
);
...
...
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