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
fa43b8ca
Commit
fa43b8ca
authored
Nov 20, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Make msec argument of setTimeout optional.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
062bbb91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+26
-1
jstest.html
dlls/mshtml/tests/jstest.html
+3
-2
No files found.
dlls/mshtml/htmlwindow.c
View file @
fa43b8ca
...
...
@@ -2628,10 +2628,14 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
TRACE
(
"(%p)->(%x %x %x %p %p %p %p)
\n
"
,
This
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
if
(
id
==
DISPID_IHTMLWINDOW2_LOCATION
&&
(
wFlags
&
DISPATCH_PROPERTYPUT
))
{
switch
(
id
)
{
case
DISPID_IHTMLWINDOW2_LOCATION
:
{
HTMLLocation
*
location
;
HRESULT
hres
;
if
(
!
(
wFlags
&
DISPATCH_PROPERTYPUT
))
break
;
TRACE
(
"forwarding to location.href
\n
"
);
hres
=
get_location
(
window
,
&
location
);
...
...
@@ -2643,6 +2647,27 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID
IHTMLLocation_Release
(
&
location
->
IHTMLLocation_iface
);
return
hres
;
}
case
DISPID_IHTMLWINDOW2_SETTIMEOUT
:
case
DISPID_IHTMLWINDOW3_SETTIMEOUT
:
{
VARIANT
args
[
2
];
DISPPARAMS
dp
=
{
args
,
NULL
,
2
,
0
};
/*
* setTimeout calls shoud use default value 0 for the second argument if only one is provided,
* but IDL file does not reflect that. We fixup arguments here instead.
*/
if
(
!
(
wFlags
&
DISPATCH_METHOD
)
||
pdp
->
cArgs
!=
1
||
pdp
->
cNamedArgs
)
break
;
TRACE
(
"Fixing args
\n
"
);
V_VT
(
args
)
=
VT_I4
;
V_I4
(
args
)
=
0
;
args
[
1
]
=
*
pdp
->
rgvarg
;
return
IDispatchEx_InvokeEx
(
&
window
->
event_target
.
dispex
.
IDispatchEx_iface
,
id
,
lcid
,
wFlags
,
&
dp
,
pvarRes
,
pei
,
pspCaller
);
}
}
return
IDispatchEx_InvokeEx
(
&
window
->
event_target
.
dispex
.
IDispatchEx_iface
,
id
,
lcid
,
wFlags
,
pdp
,
pvarRes
,
pei
,
pspCaller
);
}
...
...
dlls/mshtml/tests/jstest.html
View file @
fa43b8ca
...
...
@@ -383,6 +383,9 @@ function runTests() {
var
r
=
window
.
execScript
(
"globalVar = true;"
);
ok
(
r
===
undefined
,
"execScript returned "
+
r
);
ok
(
globalVar
===
true
,
"globalVar = "
+
globalVar
);
/* Call setTimeout without specified time. */
window
.
setTimeout
(
function
()
{
external
.
reportSuccess
();
});
}
function
runTest
()
{
...
...
@@ -391,8 +394,6 @@ function runTest() {
}
catch
(
e
)
{
ok
(
false
,
"got exception "
+
e
.
message
);
}
external
.
reportSuccess
();
}
</script>
<body
onload=
"runTest();"
>
...
...
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