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
ff54bafb
Commit
ff54bafb
authored
Mar 01, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use JScript extension for IE9+ mode support.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d95a8b2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
script.c
dlls/mshtml/script.c
+22
-4
No files found.
dlls/mshtml/script.c
View file @
ff54bafb
...
...
@@ -65,6 +65,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#endif
/* See jscript.h in jscript.dll. */
#define SCRIPTLANGUAGEVERSION_HTML 0x400
#define SCRIPTLANGUAGEVERSION_ES5 0x102
static
const
WCHAR
documentW
[]
=
{
'd'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
windowW
[]
=
{
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
0
};
static
const
WCHAR
script_endW
[]
=
{
'<'
,
'/'
,
'S'
,
'C'
,
'R'
,
'I'
,
'P'
,
'T'
,
'>'
,
0
};
...
...
@@ -94,7 +98,7 @@ struct ScriptHost {
static
ScriptHost
*
get_elem_script_host
(
HTMLInnerWindow
*
,
HTMLScriptElement
*
);
static
void
set_script_prop
(
ScriptHost
*
script_host
,
DWORD
property
,
VARIANT
*
val
)
static
BOOL
set_script_prop
(
ScriptHost
*
script_host
,
DWORD
property
,
VARIANT
*
val
)
{
IActiveScriptProperty
*
script_prop
;
HRESULT
hres
;
...
...
@@ -103,13 +107,17 @@ static void set_script_prop(ScriptHost *script_host, DWORD property, VARIANT *va
(
void
**
)
&
script_prop
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not get IActiveScriptProperty iface: %08x
\n
"
,
hres
);
return
;
return
FALSE
;
}
hres
=
IActiveScriptProperty_SetProperty
(
script_prop
,
property
,
NULL
,
val
);
IActiveScriptProperty_Release
(
script_prop
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
{
WARN
(
"SetProperty(%x) failed: %08x
\n
"
,
property
,
hres
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
init_script_engine
(
ScriptHost
*
script_host
)
...
...
@@ -152,9 +160,19 @@ static BOOL init_script_engine(ScriptHost *script_host)
compat_mode
=
lock_document_mode
(
script_host
->
window
->
doc
);
script_mode
=
compat_mode
<
COMPAT_MODE_IE8
?
SCRIPTLANGUAGEVERSION_5_7
:
SCRIPTLANGUAGEVERSION_5_8
;
if
(
IsEqualGUID
(
&
script_host
->
guid
,
&
CLSID_JScript
))
{
if
(
compat_mode
>=
COMPAT_MODE_IE9
)
script_mode
=
SCRIPTLANGUAGEVERSION_ES5
;
script_mode
|=
SCRIPTLANGUAGEVERSION_HTML
;
}
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
script_mode
;
set_script_prop
(
script_host
,
SCRIPTPROP_INVOKEVERSIONING
,
&
var
);
if
(
!
set_script_prop
(
script_host
,
SCRIPTPROP_INVOKEVERSIONING
,
&
var
)
&&
(
script_mode
&
SCRIPTLANGUAGEVERSION_HTML
))
{
/* If this failed, we're most likely using native jscript. */
WARN
(
"Failed to set script mode to HTML version.
\n
"
);
V_I4
(
&
var
)
=
compat_mode
<
COMPAT_MODE_IE8
?
SCRIPTLANGUAGEVERSION_5_7
:
SCRIPTLANGUAGEVERSION_5_8
;
set_script_prop
(
script_host
,
SCRIPTPROP_INVOKEVERSIONING
,
&
var
);
}
V_VT
(
&
var
)
=
VT_BOOL
;
V_BOOL
(
&
var
)
=
VARIANT_TRUE
;
...
...
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