Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4d89c62e
Commit
4d89c62e
authored
Jul 28, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement2::get_scrollTop implementation.
parent
e1a553e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
htmlelem2.c
dlls/mshtml/htmlelem2.c
+20
-2
dom.c
dlls/mshtml/tests/dom.c
+16
-0
No files found.
dlls/mshtml/htmlelem2.c
View file @
4d89c62e
...
...
@@ -787,8 +787,26 @@ static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
static
HRESULT
WINAPI
HTMLElement2_get_scrollTop
(
IHTMLElement2
*
iface
,
long
*
p
)
{
HTMLElement
*
This
=
HTMLELEM2_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
=
nsIDOMElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsres
=
nsIDOMNSHTMLElement_GetScrollTop
(
nselem
,
&
top
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetScrollTop failed: %08x
\n
"
,
nsres
);
}
else
{
ERR
(
"Could not get nsIDOMNSHTMLElement interface: %08x
\n
"
,
nsres
);
}
*
p
=
top
;
TRACE
(
"*p = %ld
\n
"
,
*
p
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement2_put_scrollLeft
(
IHTMLElement2
*
iface
,
long
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
4d89c62e
...
...
@@ -1014,6 +1014,20 @@ static long _elem_get_scroll_width(unsigned line, IUnknown *unk)
return
l
;
}
#define elem_get_scroll_top(u) _elem_get_scroll_top(__LINE__,u)
static
long
_elem_get_scroll_top
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLElement2
*
elem
=
_get_elem2_iface
(
line
,
unk
);
long
l
=
-
1
;
HRESULT
hres
;
hres
=
IHTMLElement2_get_scrollTop
(
elem
,
&
l
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_scrollTop failed: %08x
\n
"
,
hres
);
IHTMLElement2_Release
(
elem
);
return
l
;
}
#define test_img_set_src(u,s) _test_img_set_src(__LINE__,u,s)
static
void
_test_img_set_src
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
src
)
{
...
...
@@ -1992,6 +2006,8 @@ static void test_default_body(IHTMLBodyElement *body)
ok
(
l
!=
-
1
,
"scrollHeight == -1
\n
"
);
l
=
elem_get_scroll_width
((
IUnknown
*
)
body
);
ok
(
l
!=
-
1
,
"scrollWidth == -1
\n
"
);
l
=
elem_get_scroll_top
((
IUnknown
*
)
body
);
ok
(
!
l
,
"scrollWidth = %ld
\n
"
,
l
);
}
static
void
test_window
(
IHTMLDocument2
*
doc
)
...
...
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