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
1017c2b3
Commit
1017c2b3
authored
Nov 07, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLObjectElement::name property implementation.
parent
a56c5b18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
+55
-5
htmlobject.c
dlls/mshtml/htmlobject.c
+17
-4
dom.c
dlls/mshtml/tests/dom.c
+38
-1
No files found.
dlls/mshtml/htmlobject.c
View file @
1017c2b3
...
...
@@ -162,15 +162,28 @@ static HRESULT WINAPI HTMLObjectElement_get_align(IHTMLObjectElement *iface, BST
static
HRESULT
WINAPI
HTMLObjectElement_put_name
(
IHTMLObjectElement
*
iface
,
BSTR
v
)
{
HTMLObjectElement
*
This
=
impl_from_IHTMLObjectElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLObjectElement_SetName
(
This
->
nsobject
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLObjectElement_get_name
(
IHTMLObjectElement
*
iface
,
BSTR
*
p
)
{
HTMLObjectElement
*
This
=
impl_from_IHTMLObjectElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLObjectElement_GetName
(
This
->
nsobject
,
&
nsstr
);
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
static
HRESULT
WINAPI
HTMLObjectElement_put_codeBase
(
IHTMLObjectElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
1017c2b3
...
...
@@ -56,7 +56,7 @@ static const char elem_test_str[] =
"<textarea id=
\"
X
\"
>text text</textarea>"
"<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 /><object id=
\"
objid
\"
vspace=100></object><embed />"
"<test /><object id=
\"
objid
\"
name=
\"
objname
\"
vspace=100></object><embed />"
"<img id=
\"
imgid
\"
name=
\"
WineImg
\"
/>"
"<iframe src=
\"
about:blank
\"
id=
\"
ifr
\"
></iframe>"
"<form id=
\"
frm
\"
></form>"
...
...
@@ -1573,6 +1573,40 @@ static void _test_object_vspace(unsigned line, IUnknown *unk, LONG exl)
IHTMLObjectElement_Release
(
object
);
}
#define test_object_name(a,b) _test_object_name(__LINE__,a,b)
static
void
_test_object_name
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
exname
)
{
IHTMLObjectElement
*
object
=
_get_object_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
str
;
HRESULT
hres
;
str
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLObjectElement_get_name
(
object
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_name failed: %08x
\n
"
,
hres
);
if
(
exname
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
str
,
exname
),
"name=%s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
exname
);
else
ok_
(
__FILE__
,
line
)(
!
str
,
"name=%s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLObjectElement_Release
(
object
);
}
#define set_object_name(a,b) _set_object_name(__LINE__,a,b)
static
void
_set_object_name
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
name
)
{
IHTMLObjectElement
*
object
=
_get_object_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
str
;
HRESULT
hres
;
str
=
a2bstr
(
name
);
hres
=
IHTMLObjectElement_put_name
(
object
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_name failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
IHTMLObjectElement_Release
(
object
);
_test_object_name
(
line
,
elem
,
name
);
}
#define create_option_elem(d,t,v) _create_option_elem(__LINE__,d,t,v)
static
IHTMLOptionElement
*
_create_option_elem
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
txt
,
const
char
*
val
)
...
...
@@ -5914,6 +5948,9 @@ static void test_elems(IHTMLDocument2 *doc)
ok
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
if
(
elem
)
{
test_object_vspace
((
IUnknown
*
)
elem
,
100
);
test_object_name
(
elem
,
"objname"
);
set_object_name
(
elem
,
"test"
);
set_object_name
(
elem
,
NULL
);
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