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
ae6fed5c
Commit
ae6fed5c
authored
Oct 11, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Improved IHTMLElement2::doScroll stub.
parent
5763637e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
2 deletions
+77
-2
htmlelem2.c
dlls/mshtml/htmlelem2.c
+9
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
mutation.c
dlls/mshtml/mutation.c
+2
-0
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+65
-0
No files found.
dlls/mshtml/htmlelem2.c
View file @
ae6fed5c
...
...
@@ -130,8 +130,15 @@ static HRESULT WINAPI HTMLElement2_componentFromPoint(IHTMLElement2 *iface,
static
HRESULT
WINAPI
HTMLElement2_doScroll
(
IHTMLElement2
*
iface
,
VARIANT
component
)
{
HTMLElement
*
This
=
HTMLELEM2_THIS
(
iface
);
FIXME
(
"(%p)->()
\n
"
,
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
component
));
if
(
!
This
->
node
.
doc
->
content_ready
||
!
This
->
node
.
doc
->
basedoc
.
doc_obj
->
in_place_active
)
return
E_PENDING
;
WARN
(
"stub
\n
"
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement2_put_onscroll
(
IHTMLElement2
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/mshtml_private.h
View file @
ae6fed5c
...
...
@@ -472,6 +472,7 @@ struct HTMLDocumentNode {
LONG
ref
;
HTMLDOMNode
*
nodes
;
BOOL
content_ready
;
IInternetSecurityManager
*
secmgr
;
...
...
dlls/mshtml/mutation.c
View file @
ae6fed5c
...
...
@@ -466,6 +466,8 @@ static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocu
TRACE
(
"
\n
"
);
This
->
doc
->
basedoc
.
doc_node
->
content_ready
=
TRUE
;
task
=
heap_alloc
(
sizeof
(
task_t
));
task
->
doc
=
&
This
->
doc
->
basedoc
;
...
...
dlls/mshtml/tests/htmldoc.c
View file @
ae6fed5c
...
...
@@ -157,6 +157,7 @@ static BOOL ipsex;
static
BOOL
set_clientsite
=
FALSE
,
container_locked
=
FALSE
;
static
BOOL
readystate_set_loading
=
FALSE
,
readystate_set_interactive
=
FALSE
,
load_from_stream
;
static
BOOL
editmode
=
FALSE
,
show_failed
;
static
BOOL
inplace_deactivated
;
static
int
stream_read
,
protocol_read
;
static
enum
load_state_t
{
LD_DOLOAD
,
...
...
@@ -211,6 +212,18 @@ static int strcmp_wa(LPCWSTR strw, const char *stra)
return
lstrcmpA
(
stra
,
buf
);
}
static
BSTR
a2bstr
(
const
char
*
str
)
{
BSTR
ret
;
int
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
ret
=
SysAllocStringLen
(
NULL
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
return
ret
;
}
static
BOOL
is_english
(
void
)
{
return
PRIMARYLANGID
(
GetSystemDefaultLangID
())
==
LANG_ENGLISH
...
...
@@ -1493,6 +1506,7 @@ static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSiteEx *iface)
static
HRESULT
WINAPI
InPlaceSite_OnInPlaceActivate
(
IOleInPlaceSiteEx
*
iface
)
{
CHECK_EXPECT
(
OnInPlaceActivate
);
inplace_deactivated
=
FALSE
;
return
S_OK
;
}
...
...
@@ -1550,6 +1564,7 @@ static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSiteEx *iface, BOOL
static
HRESULT
WINAPI
InPlaceSite_OnInPlaceDeactivate
(
IOleInPlaceSiteEx
*
iface
)
{
CHECK_EXPECT
(
OnInPlaceDeactivate
);
inplace_deactivated
=
TRUE
;
return
S_OK
;
}
...
...
@@ -2565,6 +2580,53 @@ static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
return
DefWindowProc
(
hwnd
,
msg
,
wParam
,
lParam
);
}
static
void
test_doscroll
(
IUnknown
*
unk
)
{
IHTMLDocument3
*
doc
;
IHTMLElement2
*
elem2
;
IHTMLElement
*
elem
;
VARIANT
v
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLDocument3
,
(
void
**
)
&
doc
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLDocument3 iface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IHTMLDocument3_get_documentElement
(
doc
,
&
elem
);
IHTMLDocument3_Release
(
doc
);
ok
(
hres
==
S_OK
,
"get_documentElement failed: %08x
\n
"
,
hres
);
switch
(
load_state
)
{
case
LD_DOLOAD
:
case
LD_NO
:
ok
(
!
elem
,
"elem != NULL
\n
"
);
default:
break
;
case
LD_INTERACTIVE
:
case
LD_COMPLETE
:
ok
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
}
if
(
!
elem
)
return
;
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLElement2
,
(
void
**
)
&
elem2
);
IHTMLElement_Release
(
elem
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLElement2 iface: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
"left"
);
hres
=
IHTMLElement2_doScroll
(
elem2
,
v
);
SysFreeString
(
V_BSTR
(
&
v
));
IHTMLElement2_Release
(
elem2
);
if
(
inplace_deactivated
)
ok
(
hres
==
E_PENDING
,
"doScroll failed: %08x
\n
"
,
hres
);
else
if
(
load_state
==
LD_COMPLETE
)
ok
(
hres
==
S_OK
,
"doScroll failed: %08x
\n
"
,
hres
);
else
ok
(
hres
==
E_PENDING
||
hres
==
S_OK
,
"doScroll failed: %08x
\n
"
,
hres
);
}
static
void
_test_readyState
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLDocument2
*
htmldoc
;
...
...
@@ -2618,6 +2680,8 @@ static void _test_readyState(unsigned line, IUnknown *unk)
ok_
(
__FILE__
,
line
)
(
V_VT
(
&
out
)
==
VT_I4
,
"V_VT(out)=%d
\n
"
,
V_VT
(
&
out
));
ok_
(
__FILE__
,
line
)
(
V_I4
(
&
out
)
==
load_state
%
5
,
"VT_I4(out)=%d, expected %d
\n
"
,
V_I4
(
&
out
),
load_state
%
5
);
test_doscroll
((
IUnknown
*
)
htmldoc
);
IHTMLDocument2_Release
(
htmldoc
);
}
...
...
@@ -3868,6 +3932,7 @@ static void init_test(enum load_state_t ls) {
stream_read
=
0
;
protocol_read
=
0
;
ipsex
=
FALSE
;
inplace_deactivated
=
FALSE
;
}
static
void
test_HTMLDocument
(
BOOL
do_load
)
...
...
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