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
5ecea72a
Commit
5ecea72a
authored
Nov 21, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTextNode2::appendData implementation.
parent
f6f55058
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
htmltextnode.c
dlls/mshtml/htmltextnode.c
+14
-2
dom.c
dlls/mshtml/tests/dom.c
+30
-0
No files found.
dlls/mshtml/htmltextnode.c
View file @
5ecea72a
...
...
@@ -237,8 +237,20 @@ static HRESULT WINAPI HTMLDOMTextNode2_substringData(IHTMLDOMTextNode2 *iface, L
static
HRESULT
WINAPI
HTMLDOMTextNode2_appendData
(
IHTMLDOMTextNode2
*
iface
,
BSTR
string
)
{
HTMLDOMTextNode
*
This
=
impl_from_IHTMLDOMTextNode2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
string
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
string
));
nsAString_InitDepend
(
&
nsstr
,
string
);
nsres
=
nsIDOMText_AppendData
(
This
->
nstext
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"AppendData failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMTextNode2_insertData
(
IHTMLDOMTextNode2
*
iface
,
LONG
offset
,
BSTR
string
)
...
...
dlls/mshtml/tests/dom.c
View file @
5ecea72a
...
...
@@ -264,6 +264,7 @@ static const IID * const text_iids[] = {
&
IID_IHTMLDOMNode
,
&
IID_IHTMLDOMNode2
,
&
IID_IHTMLDOMTextNode
,
&
IID_IHTMLDOMTextNode2
,
NULL
};
...
...
@@ -873,6 +874,17 @@ static IHTMLDOMTextNode *_get_text_iface(unsigned line, IUnknown *unk)
return
text
;
}
#define get_text2_iface(u) _get_text2_iface(__LINE__,u)
static
IHTMLDOMTextNode2
*
_get_text2_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMTextNode2
*
text2
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDOMTextNode2
,
(
void
**
)
&
text2
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDOMTextNode2: %08x
\n
"
,
hres
);
return
text2
;
}
#define get_comment_iface(u) _get_comment_iface(__LINE__,u)
static
IHTMLCommentElement
*
_get_comment_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -2709,6 +2721,19 @@ static void _set_text_data(unsigned line, IUnknown *unk, const char *data)
SysFreeString
(
str
);
}
#define text_append_data(a,b) _text_append_data(__LINE__,a,b)
static
void
_text_append_data
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
data
)
{
IHTMLDOMTextNode2
*
text
=
_get_text2_iface
(
line
,
unk
);
BSTR
str
=
a2bstr
(
data
);
HRESULT
hres
;
hres
=
IHTMLDOMTextNode2_appendData
(
text
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"appendData failed: %08x
\n
"
,
hres
);
IHTMLDOMTextNode2_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
)
{
...
...
@@ -8155,6 +8180,11 @@ static void test_create_elems(IHTMLDocument2 *doc)
test_text_data
((
IUnknown
*
)
node
,
"abc"
);
set_text_data
((
IUnknown
*
)
node
,
"test"
);
test_text_data
((
IUnknown
*
)
node
,
"test"
);
text_append_data
((
IUnknown
*
)
node
,
" append"
);
test_text_data
((
IUnknown
*
)
node
,
"test append"
);
text_append_data
((
IUnknown
*
)
node
,
NULL
);
test_text_data
((
IUnknown
*
)
node
,
"test append"
);
set_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