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
3bf7482d
Commit
3bf7482d
authored
Jun 02, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_offsetParent implementation.
parent
e644c2cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
5 deletions
+45
-5
htmlelem.c
dlls/mshtml/htmlelem.c
+35
-2
dom.c
dlls/mshtml/tests/dom.c
+10
-3
No files found.
dlls/mshtml/htmlelem.c
View file @
3bf7482d
...
...
@@ -923,8 +923,41 @@ static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, LONG *p)
static
HRESULT
WINAPI
HTMLElement_get_offsetParent
(
IHTMLElement
*
iface
,
IHTMLElement
**
p
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNSHTMLElement
*
nselem
;
nsIDOMElement
*
nsparent
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMNSHTMLElement: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMNSHTMLElement_GetOffsetParent
(
nselem
,
&
nsparent
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetOffsetParent failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
nsparent
)
{
HTMLDOMNode
*
node
;
hres
=
get_node
(
This
->
node
.
doc
,
(
nsIDOMNode
*
)
nsparent
,
TRUE
,
&
node
);
nsIDOMElement_Release
(
nsparent
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IHTMLDOMNode_QueryInterface
(
&
node
->
IHTMLDOMNode_iface
,
&
IID_IHTMLElement
,
(
void
**
)
p
);
}
else
{
*
p
=
NULL
;
hres
=
S_OK
;
}
return
hres
;
}
static
HRESULT
WINAPI
HTMLElement_put_innerHTML
(
IHTMLElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
3bf7482d
...
...
@@ -931,10 +931,11 @@ static void _test_elem_attr(unsigned line, IHTMLElement *elem, const char *name,
VariantClear
(
&
value
);
}
#define test_elem_offset(
u) _test_elem_offset(__LINE__,u
)
static
void
_test_elem_offset
(
unsigned
line
,
IUnknown
*
unk
)
#define test_elem_offset(
a,b) _test_elem_offset(__LINE__,a,b
)
static
void
_test_elem_offset
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
parent_tag
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
IHTMLElement
*
off_parent
;
LONG
l
;
HRESULT
hres
;
...
...
@@ -950,6 +951,12 @@ static void _test_elem_offset(unsigned line, IUnknown *unk)
hres
=
IHTMLElement_get_offsetLeft
(
elem
,
&
l
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_offsetLeft failed: %08x
\n
"
,
hres
);
hres
=
IHTMLElement_get_offsetParent
(
elem
,
&
off_parent
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_offsetParent failed: %08x
\n
"
,
hres
);
_test_elem_tag
(
line
,
(
IUnknown
*
)
off_parent
,
parent_tag
);
IHTMLElement_Release
(
off_parent
);
IHTMLElement_Release
(
elem
);
}
...
...
@@ -6513,7 +6520,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_title
((
IUnknown
*
)
select
,
NULL
);
test_elem_set_title
((
IUnknown
*
)
select
,
"Title"
);
test_elem_title
((
IUnknown
*
)
select
,
"Title"
);
test_elem_offset
((
IUnknown
*
)
select
);
test_elem_offset
((
IUnknown
*
)
select
,
"BODY"
);
test_elem_bounding_client_rect
((
IUnknown
*
)
select
);
node
=
get_first_child
((
IUnknown
*
)
select
);
...
...
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