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
80ea5a01
Commit
80ea5a01
authored
Jan 29, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use script versioning 2 if we're not in quirks mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
29c1e1fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
script.c
dlls/mshtml/script.c
+21
-1
No files found.
dlls/mshtml/script.c
View file @
80ea5a01
...
...
@@ -110,6 +110,26 @@ static void set_script_prop(ScriptHost *script_host, DWORD property, VARIANT *va
WARN
(
"SetProperty(%x) failed: %08x
\n
"
,
property
,
hres
);
}
static
BOOL
is_quirks_mode
(
HTMLDocumentNode
*
doc
)
{
const
WCHAR
*
compat_mode
;
nsAString
nsstr
;
nsresult
nsres
;
BOOL
ret
=
FALSE
;
static
const
WCHAR
BackCompatW
[]
=
{
'B'
,
'a'
,
'c'
,
'k'
,
'C'
,
'o'
,
'm'
,
'p'
,
'a'
,
't'
,
0
};
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLDocument_GetCompatMode
(
doc
->
nsdoc
,
&
nsstr
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_GetData
(
&
nsstr
,
&
compat_mode
);
if
(
!
strcmpW
(
compat_mode
,
BackCompatW
))
ret
=
TRUE
;
}
nsAString_Finish
(
&
nsstr
);
return
ret
;
}
static
BOOL
init_script_engine
(
ScriptHost
*
script_host
)
{
IObjectSafety
*
safety
;
...
...
@@ -148,7 +168,7 @@ static BOOL init_script_engine(ScriptHost *script_host)
return
FALSE
;
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
1
;
V_I4
(
&
var
)
=
is_quirks_mode
(
script_host
->
window
->
doc
)
?
1
:
2
;
set_script_prop
(
script_host
,
SCRIPTPROP_INVOKEVERSIONING
,
&
var
);
V_VT
(
&
var
)
=
VT_BOOL
;
...
...
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