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
41e3de93
Commit
41e3de93
authored
Nov 12, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTxtRange::moveToElementText implementation.
parent
f1786a20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
dom.c
dlls/mshtml/tests/dom.c
+11
-0
txtrange.c
dlls/mshtml/txtrange.c
+16
-2
No files found.
dlls/mshtml/tests/dom.c
View file @
41e3de93
...
...
@@ -4823,6 +4823,7 @@ static void test_txtrange(IHTMLDocument2 *doc)
IHTMLTxtRange
*
body_range
,
*
range
,
*
range2
;
IHTMLSelectionObject
*
selection
;
IDispatch
*
disp_range
;
IHTMLElement
*
body
;
HRESULT
hres
;
body_range
=
test_create_body_range
(
doc
);
...
...
@@ -5008,6 +5009,16 @@ static void test_txtrange(IHTMLDocument2 *doc)
test_range_moveend
(
range
,
characterW
,
2
,
2
);
test_range_text
(
range
,
"ab"
);
body
=
doc_get_body
(
doc
);
hres
=
IHTMLTxtRange_moveToElementText
(
range
,
body
);
ok
(
hres
==
S_OK
,
"moveToElementText failed: %08x
\n
"
,
hres
);
test_range_text
(
range
,
"abc xyz abc 123
\r\n
it's text"
);
test_range_parent
(
range
,
ET_BODY
);
IHTMLElement_Release
(
body
);
IHTMLTxtRange_Release
(
range
);
}
...
...
dlls/mshtml/txtrange.c
View file @
41e3de93
...
...
@@ -1579,8 +1579,22 @@ static HRESULT WINAPI HTMLTxtRange_pasteHTML(IHTMLTxtRange *iface, BSTR html)
static
HRESULT
WINAPI
HTMLTxtRange_moveToElementText
(
IHTMLTxtRange
*
iface
,
IHTMLElement
*
element
)
{
HTMLTxtRange
*
This
=
impl_from_IHTMLTxtRange
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
element
);
return
E_NOTIMPL
;
HTMLElement
*
elem
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
element
);
elem
=
unsafe_impl_from_IHTMLElement
(
element
);
if
(
!
elem
)
return
E_INVALIDARG
;
nsres
=
nsIDOMRange_SelectNodeContents
(
This
->
nsrange
,
elem
->
node
.
nsnode
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SelectNodeContents failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTxtRange_setEndPoint
(
IHTMLTxtRange
*
iface
,
BSTR
how
,
...
...
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