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
7e345794
Commit
7e345794
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_scrollHeight implementation.
parent
72d201b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
htmlelem2.c
dlls/mshtml/htmlelem2.c
+20
-2
dom.c
dlls/mshtml/tests/dom.c
+27
-0
No files found.
dlls/mshtml/htmlelem2.c
View file @
7e345794
...
...
@@ -713,8 +713,26 @@ static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDis
static
HRESULT
WINAPI
HTMLElement2_get_scrollHeight
(
IHTMLElement2
*
iface
,
long
*
p
)
{
HTMLElement
*
This
=
HTMLELEM2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMNSHTMLElement
*
nselem
;
PRInt32
height
=
0
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMElement_QueryInterface
(
This
->
nselem
,
&
IID_nsIDOMNSHTMLElement
,
(
void
**
)
&
nselem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsres
=
nsIDOMNSHTMLElement_GetScrollHeight
(
nselem
,
&
height
);
nsIDOMNSHTMLElement_Release
(
nselem
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetScrollHeight failed: %08x
\n
"
,
nsres
);
}
else
{
ERR
(
"Could not get nsIDOMNSHTMLElement interface: %08x
\n
"
,
nsres
);
}
*
p
=
height
;
TRACE
(
"*p = %ld
\n
"
,
*
p
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement2_get_scrollWidth
(
IHTMLElement2
*
iface
,
long
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
7e345794
...
...
@@ -968,6 +968,29 @@ static long _get_node_type(unsigned line, IUnknown *unk)
return
type
;
}
#define elem_get_scroll_height(u) _elem_get_scroll_height(__LINE__,u)
static
long
_elem_get_scroll_height
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLElement2
*
elem
=
_get_elem2_iface
(
line
,
unk
);
IHTMLTextContainer
*
txtcont
;
long
l
=
-
1
,
l2
=
-
1
;
HRESULT
hres
;
hres
=
IHTMLElement2_get_scrollHeight
(
elem
,
&
l
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_scrollHeight failed: %08x
\n
"
,
hres
);
IHTMLElement2_Release
(
elem
);
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLTextContainer
,
(
void
**
)
&
txtcont
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLTextContainer: %08x
\n
"
,
hres
);
hres
=
IHTMLTextContainer_get_scrollHeight
(
txtcont
,
&
l2
);
IHTMLTextContainer_Release
(
txtcont
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"IHTMLTextContainer::get_scrollHeight failed: %ld
\n
"
,
l2
);
ok_
(
__FILE__
,
line
)
(
l
==
l2
,
"unexpected height %ld, expected %ld
\n
"
,
l2
,
l
);
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
)
{
...
...
@@ -1927,6 +1950,7 @@ static void test_default_selection(IHTMLDocument2 *doc)
static
void
test_default_body
(
IHTMLBodyElement
*
body
)
{
long
l
;
BSTR
bstr
;
HRESULT
hres
;
...
...
@@ -1934,6 +1958,9 @@ static void test_default_body(IHTMLBodyElement *body)
hres
=
IHTMLBodyElement_get_background
(
body
,
&
bstr
);
ok
(
hres
==
S_OK
,
"get_background failed: %08x
\n
"
,
hres
);
ok
(
bstr
==
NULL
,
"bstr != NULL
\n
"
);
l
=
elem_get_scroll_height
((
IUnknown
*
)
body
);
ok
(
l
!=
-
1
,
"scrollHeight == -1
\n
"
);
}
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