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
b69550ab
Commit
b69550ab
authored
Dec 21, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMTextNode::splitText implementation.
parent
998d3464
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
htmltextnode.c
dlls/mshtml/htmltextnode.c
+25
-2
jstest.html
dlls/mshtml/tests/jstest.html
+16
-0
No files found.
dlls/mshtml/htmltextnode.c
View file @
b69550ab
...
...
@@ -152,8 +152,31 @@ static HRESULT WINAPI HTMLDOMTextNode_get_length(IHTMLDOMTextNode *iface, LONG *
static
HRESULT
WINAPI
HTMLDOMTextNode_splitText
(
IHTMLDOMTextNode
*
iface
,
LONG
offset
,
IHTMLDOMNode
**
pRetNode
)
{
HTMLDOMTextNode
*
This
=
impl_from_IHTMLDOMTextNode
(
iface
);
FIXME
(
"(%p)->(%d %p)
\n
"
,
This
,
offset
,
pRetNode
);
return
E_NOTIMPL
;
HTMLDOMNode
*
node
;
nsIDOMText
*
text
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%d %p)
\n
"
,
This
,
offset
,
pRetNode
);
nsres
=
nsIDOMText_SplitText
(
This
->
nstext
,
offset
,
&
text
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SplitText failed: %x08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
!
text
)
{
*
pRetNode
=
NULL
;
return
S_OK
;
}
hres
=
get_node
(
This
->
node
.
doc
,
(
nsIDOMNode
*
)
text
,
TRUE
,
&
node
);
nsIDOMText_Release
(
text
);
if
(
FAILED
(
hres
))
return
hres
;
*
pRetNode
=
&
node
->
IHTMLDOMNode_iface
;
return
S_OK
;
}
static
const
IHTMLDOMTextNodeVtbl
HTMLDOMTextNodeVtbl
=
{
...
...
dlls/mshtml/tests/jstest.html
View file @
b69550ab
...
...
@@ -339,6 +339,21 @@ function test_language_attribute() {
ok
(
elem
.
language
===
"1"
,
"elem.language = "
+
elem
.
language
);
}
function
test_text_node
()
{
document
.
body
.
innerHTML
=
'testing text'
;
var
text
=
document
.
body
.
childNodes
[
0
],
text2
;
ok
(
text
.
data
==
"testing text"
,
"text.data = "
+
text
.
data
);
text2
=
text
.
splitText
(
7
);
ok
(
text
.
data
==
"testing"
,
"text.data = "
+
text
.
data
);
ok
(
text2
.
data
==
" text"
,
"text2.data = "
+
text2
.
data
);
ok
(
text
.
nextSibling
===
text2
,
"text.nextSibling !== text2"
);
text2
=
text
.
splitText
(
0
);
ok
(
text
.
data
==
""
,
"text.data = "
+
text
.
data
);
ok
(
text2
.
data
==
"testing"
,
"text2.data = "
+
text2
.
data
);
}
var
globalVar
=
false
;
function
runTests
()
{
...
...
@@ -363,6 +378,7 @@ function runTests() {
test_customtag
();
test_whitespace_nodes
();
test_language_attribute
();
test_text_node
();
var
r
=
window
.
execScript
(
"globalVar = true;"
);
ok
(
r
===
undefined
,
"execScript returned "
+
r
);
...
...
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