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
6e905fd6
Commit
6e905fd6
authored
Sep 09, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTxtRange::parentElement implementation.
parent
fbdab049
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
txtrange.c
dlls/mshtml/txtrange.c
+35
-2
No files found.
dlls/mshtml/txtrange.c
View file @
6e905fd6
...
...
@@ -77,6 +77,16 @@ static int string_to_nscmptype(LPCWSTR str)
return
-
1
;
}
static
PRUint16
get_node_type
(
nsIDOMNode
*
node
)
{
PRUint16
type
=
0xfff
;
if
(
node
)
nsIDOMNode_GetNodeType
(
node
,
&
type
);
return
type
;
}
#define HTMLTXTRANGE_THIS(iface) DEFINE_THIS(HTMLTxtRange, HTMLTxtRange, iface)
static
HRESULT
WINAPI
HTMLTxtRange_QueryInterface
(
IHTMLTxtRange
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -280,8 +290,31 @@ static HRESULT WINAPI HTMLTxtRange_get_text(IHTMLTxtRange *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLTxtRange_parentElement
(
IHTMLTxtRange
*
iface
,
IHTMLElement
**
parent
)
{
HTMLTxtRange
*
This
=
HTMLTXTRANGE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
parent
);
return
E_NOTIMPL
;
nsIDOMNode
*
nsnode
,
*
tmp
;
HTMLDOMNode
*
node
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
parent
);
nsIDOMRange_GetCommonAncestorContainer
(
This
->
nsrange
,
&
nsnode
);
while
(
nsnode
&&
get_node_type
(
nsnode
)
!=
ELEMENT_NODE
)
{
nsIDOMNode_GetParentNode
(
nsnode
,
&
tmp
);
nsIDOMNode_Release
(
nsnode
);
nsnode
=
tmp
;
}
if
(
!
nsnode
)
{
*
parent
=
NULL
;
return
S_OK
;
}
node
=
get_node
(
This
->
doc
,
nsnode
);
nsIDOMNode_Release
(
nsnode
);
hres
=
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
parent
);
IHTMLDOMNode_Release
(
HTMLDOMNODE
(
node
));
return
hres
;
}
static
HRESULT
WINAPI
HTMLTxtRange_duplicate
(
IHTMLTxtRange
*
iface
,
IHTMLTxtRange
**
Duplicate
)
...
...
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