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
281826eb
Commit
281826eb
authored
Jul 21, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMNode3::put_textContent implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8ef2d4ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+19
-2
elements.js
dlls/mshtml/tests/elements.js
+9
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
281826eb
...
...
@@ -1241,8 +1241,25 @@ static HRESULT WINAPI HTMLDOMNode3_get_namespaceURI(IHTMLDOMNode3 *iface, VARIAN
static
HRESULT
WINAPI
HTMLDOMNode3_put_textContent
(
IHTMLDOMNode3
*
iface
,
VARIANT
v
)
{
HTMLDOMNode
*
This
=
impl_from_IHTMLDOMNode3
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
if
(
V_VT
(
&
v
)
!=
VT_BSTR
)
{
FIXME
(
"unsupported argument %s
\n
"
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
nsAString_Init
(
&
nsstr
,
V_BSTR
(
&
v
));
nsres
=
nsIDOMNode_SetTextContent
(
This
->
nsnode
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetTextContent failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMNode3_get_textContent
(
IHTMLDOMNode3
*
iface
,
VARIANT
*
p
)
...
...
dlls/mshtml/tests/elements.js
View file @
281826eb
...
...
@@ -68,6 +68,15 @@ function test_textContent() {
div
.
innerHTML
=
"abc<script>/* */</script><div>text</div>"
;
ok
(
div
.
textContent
===
"abc/* */text"
,
"div.textContent = "
+
div
.
textContent
);
div
.
textContent
=
"test"
;
ok
(
div
.
textContent
===
"test"
,
"div.textContent = "
+
div
.
textContent
);
ok
(
div
.
childNodes
.
length
===
1
,
"div.childNodes.length = "
+
div
.
childNodes
.
length
);
ok
(
div
.
firstChild
.
textContent
===
"test"
,
"div.firstChild.textContent = "
+
div
.
firstChild
.
textContent
);
div
.
textContent
=
""
;
ok
(
div
.
textContent
===
""
,
"div.textContent = "
+
div
.
textContent
);
ok
(
div
.
childNodes
.
length
===
0
,
"div.childNodes.length = "
+
div
.
childNodes
.
length
);
next_test
();
}
...
...
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