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
f2617512
Commit
f2617512
authored
Jun 25, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::get_offsetTop implementation.
parent
61201984
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+22
-2
dom.c
dlls/mshtml/tests/dom.c
+14
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
f2617512
...
...
@@ -712,8 +712,27 @@ static HRESULT WINAPI HTMLElement_get_offsetLeft(IHTMLElement *iface, long *p)
static
HRESULT
WINAPI
HTMLElement_get_offsetTop
(
IHTMLElement
*
iface
,
long
*
p
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNSHTMLElement
*
nselem
;
PRInt32
top
=
0
;
nsresult
nsres
;
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_GetOffsetTop
(
nselem
,
&
top
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetOffsetTop failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
top
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement_get_offsetWidth
(
IHTMLElement
*
iface
,
long
*
p
)
...
...
@@ -1414,6 +1433,7 @@ static const tid_t HTMLElement_iface_tids[] = {
IHTMLElement2_tid
,
0
};
static
dispex_static_data_t
HTMLElement_dispex
=
{
NULL
,
DispHTMLUnknownElement_tid
,
...
...
dlls/mshtml/tests/dom.c
View file @
f2617512
...
...
@@ -475,6 +475,19 @@ static void _test_elem_attr(unsigned line, IHTMLElement *elem, LPCWSTR name, LPC
VariantClear
(
&
value
);
}
#define test_elem_offset(u) _test_elem_offset(__LINE__,u)
static
void
_test_elem_offset
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
long
l
;
HRESULT
hres
;
hres
=
IHTMLElement_get_offsetTop
(
elem
,
&
l
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_offsetTop failed: %08x
\n
"
,
hres
);
IHTMLElement_Release
(
elem
);
}
static
void
test_doc_elem
(
IHTMLDocument2
*
doc
)
{
IHTMLElement
*
elem
;
...
...
@@ -2044,6 +2057,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
);
node
=
get_first_child
((
IUnknown
*
)
select
);
ok
(
node
!=
NULL
,
"node == NULL
\n
"
);
...
...
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