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
b4f8cf8e
Commit
b4f8cf8e
authored
Apr 17, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMTextNode::data property implementation.
parent
5690304c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
6 deletions
+49
-6
htmltextnode.c
dlls/mshtml/htmltextnode.c
+17
-4
dom.c
dlls/mshtml/tests/dom.c
+32
-2
No files found.
dlls/mshtml/htmltextnode.c
View file @
b4f8cf8e
...
...
@@ -101,15 +101,28 @@ static HRESULT WINAPI HTMLDOMTextNode_Invoke(IHTMLDOMTextNode *iface, DISPID dis
static
HRESULT
WINAPI
HTMLDOMTextNode_put_data
(
IHTMLDOMTextNode
*
iface
,
BSTR
v
)
{
HTMLDOMTextNode
*
This
=
impl_from_IHTMLDOMTextNode
(
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
=
nsIDOMText_SetData
(
This
->
nstext
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLDOMTextNode_get_data
(
IHTMLDOMTextNode
*
iface
,
BSTR
*
p
)
{
HTMLDOMTextNode
*
This
=
impl_from_IHTMLDOMTextNode
(
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
=
nsIDOMText_GetData
(
This
->
nstext
,
&
nsstr
);
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
static
HRESULT
WINAPI
HTMLDOMTextNode_toString
(
IHTMLDOMTextNode
*
iface
,
BSTR
*
String
)
...
...
dlls/mshtml/tests/dom.c
View file @
b4f8cf8e
...
...
@@ -2432,6 +2432,33 @@ static void _test_text_length(unsigned line, IUnknown *unk, LONG l)
IHTMLDOMTextNode_Release
(
text
);
}
#define test_text_data(a,b) _test_text_data(__LINE__,a,b)
static
void
_test_text_data
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exdata
)
{
IHTMLDOMTextNode
*
text
=
_get_text_iface
(
line
,
unk
);
BSTR
str
;
HRESULT
hres
;
hres
=
IHTMLDOMTextNode_get_data
(
text
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_data failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
str
,
exdata
),
"data = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
exdata
);
IHTMLDOMTextNode_Release
(
text
);
SysFreeString
(
str
);
}
#define set_text_data(a,b) _set_text_data(__LINE__,a,b)
static
void
_set_text_data
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
data
)
{
IHTMLDOMTextNode
*
text
=
_get_text_iface
(
line
,
unk
);
BSTR
str
=
a2bstr
(
data
);
HRESULT
hres
;
hres
=
IHTMLDOMTextNode_put_data
(
text
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_data failed: %08x
\n
"
,
hres
);
IHTMLDOMTextNode_Release
(
text
);
SysFreeString
(
str
);
}
#define test_select_set_disabled(i,b) _test_select_set_disabled(__LINE__,i,b)
static
void
_test_select_set_disabled
(
unsigned
line
,
IHTMLSelectElement
*
select
,
VARIANT_BOOL
b
)
{
...
...
@@ -6640,10 +6667,13 @@ static void test_create_elems(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
IHTMLDOMNode_Release
(
node
);
node
=
test_create_text
(
doc
,
"
test
"
);
node
=
test_create_text
(
doc
,
"
abc
"
);
test_ifaces
((
IUnknown
*
)
node
,
text_iids
);
test_disp
((
IUnknown
*
)
node
,
&
DIID_DispHTMLDOMTextNode
,
"[object]"
);
test_text_length
((
IUnknown
*
)
node
,
4
);
test_text_length
((
IUnknown
*
)
node
,
3
);
test_text_data
((
IUnknown
*
)
node
,
"abc"
);
set_text_data
((
IUnknown
*
)
node
,
"test"
);
test_text_data
((
IUnknown
*
)
node
,
"test"
);
V_VT
(
&
var
)
=
VT_NULL
;
node2
=
test_node_insertbefore
((
IUnknown
*
)
body
,
node
,
&
var
);
...
...
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