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
ad156168
Commit
ad156168
authored
Aug 25, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_parentElement implementation.
parent
48008766
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+15
-2
dom.c
dlls/mshtml/tests/dom.c
+26
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
ad156168
...
...
@@ -382,8 +382,21 @@ static HRESULT WINAPI HTMLElement_get_tagName(IHTMLElement *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLElement_get_parentElement
(
IHTMLElement
*
iface
,
IHTMLElement
**
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
IHTMLDOMNode
*
node
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
hres
=
IHTMLDOMNode_get_parentNode
(
HTMLDOMNODE
(
&
This
->
node
),
&
node
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IHTMLDOMNode_QueryInterface
(
node
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
IHTMLDOMNode_Release
(
node
);
if
(
FAILED
(
hres
))
*
p
=
NULL
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_style
(
IHTMLElement
*
iface
,
IHTMLStyle
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
ad156168
...
...
@@ -971,6 +971,20 @@ static long _get_node_type(unsigned line, IUnknown *unk)
return
type
;
}
#define test_elem_get_parent(u) _test_elem_get_parent(__LINE__,u)
static
IHTMLElement
*
_test_elem_get_parent
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
IHTMLElement
*
parent
;
HRESULT
hres
;
hres
=
IHTMLElement_get_parentElement
(
elem
,
&
parent
);
IHTMLElement_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_parentElement failed: %08x
\n
"
,
hres
);
return
parent
;
}
#define elem_get_scroll_height(u) _elem_get_scroll_height(__LINE__,u)
static
long
_elem_get_scroll_height
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -2209,7 +2223,7 @@ static void test_elems(IHTMLDocument2 *doc)
{
IHTMLElementCollection
*
col
;
IHTMLDOMChildrenCollection
*
child_col
;
IHTMLElement
*
elem
;
IHTMLElement
*
elem
,
*
elem2
,
*
elem3
;
IHTMLDOMNode
*
node
,
*
node2
;
IDispatch
*
disp
;
long
type
;
...
...
@@ -2299,6 +2313,17 @@ static void test_elems(IHTMLDocument2 *doc)
IHTMLDOMNode_Release
(
node
);
ok
(
node2
==
NULL
,
"node != NULL
\n
"
);
elem2
=
test_elem_get_parent
((
IUnknown
*
)
elem
);
ok
(
elem2
!=
NULL
,
"elem2 == NULL
\n
"
);
test_node_name
((
IUnknown
*
)
elem2
,
"BODY"
);
elem3
=
test_elem_get_parent
((
IUnknown
*
)
elem2
);
IHTMLElement_Release
(
elem2
);
ok
(
elem3
!=
NULL
,
"elem3 == NULL
\n
"
);
test_node_name
((
IUnknown
*
)
elem3
,
"HTML"
);
elem2
=
test_elem_get_parent
((
IUnknown
*
)
elem3
);
IHTMLElement_Release
(
elem3
);
ok
(
elem2
==
NULL
,
"elem2 != NULL
\n
"
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_OPTION
,
2
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_SELECT
,
0
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_HTML
,
0
);
...
...
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