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
b701be3c
Commit
b701be3c
authored
Mar 08, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLDOMNode previousSibling.
parent
96a8417a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
htmlnode.c
dlls/mshtml/htmlnode.c
+20
-2
dom.c
dlls/mshtml/tests/dom.c
+21
-0
No files found.
dlls/mshtml/htmlnode.c
View file @
b701be3c
...
...
@@ -782,8 +782,26 @@ static HRESULT WINAPI HTMLDOMNode_get_lastChild(IHTMLDOMNode *iface, IHTMLDOMNod
static
HRESULT
WINAPI
HTMLDOMNode_get_previousSibling
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
{
HTMLDOMNode
*
This
=
impl_from_IHTMLDOMNode
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNode
*
nschild
=
NULL
;
HTMLDOMNode
*
node
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsIDOMNode_GetPreviousSibling
(
This
->
nsnode
,
&
nschild
);
if
(
!
nschild
)
{
*
p
=
NULL
;
return
S_OK
;
}
hres
=
get_node
(
This
->
doc
,
nschild
,
TRUE
,
&
node
);
nsIDOMNode_Release
(
nschild
);
if
(
FAILED
(
hres
))
return
hres
;
*
p
=
&
node
->
IHTMLDOMNode_iface
;
IHTMLDOMNode_AddRef
(
*
p
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDOMNode_get_nextSibling
(
IHTMLDOMNode
*
iface
,
IHTMLDOMNode
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
b701be3c
...
...
@@ -1989,6 +1989,20 @@ static IHTMLDOMNode *_node_get_next(unsigned line, IUnknown *unk)
return
next
;
}
#define node_get_prev(u) _node_get_prev(__LINE__,u)
static
IHTMLDOMNode
*
_node_get_prev
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDOMNode
*
node
=
_get_node_iface
(
line
,
unk
);
IHTMLDOMNode
*
prev
;
HRESULT
hres
;
hres
=
IHTMLDOMNode_get_previousSibling
(
node
,
&
prev
);
IHTMLDOMNode_Release
(
node
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_previousSibling failed: %08x
\n
"
,
hres
);
return
prev
;
}
#define test_elem_get_parent(u) _test_elem_get_parent(__LINE__,u)
static
IHTMLElement
*
_test_elem_get_parent
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -6681,9 +6695,16 @@ static void test_elems(IHTMLDocument2 *doc)
node
=
get_child_item
(
child_col
,
0
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
if
(
node
)
{
IHTMLDOMNode
*
prev
;
type
=
get_node_type
((
IUnknown
*
)
node
);
ok
(
type
==
3
,
"type=%d
\n
"
,
type
);
node2
=
node_get_next
((
IUnknown
*
)
node
);
prev
=
node_get_prev
((
IUnknown
*
)
node2
);
ok
(
iface_cmp
((
IUnknown
*
)
node
,
(
IUnknown
*
)
prev
),
"node != prev
\n
"
);
IHTMLDOMNode_Release
(
prev
);
IHTMLDOMNode_Release
(
node
);
}
...
...
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