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
87f7aea1
Commit
87f7aea1
authored
Jul 05, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Reimplement IHTMLDocument5::get_compatMode based on document mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
429e0dde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
htmldoc.c
dlls/mshtml/htmldoc.c
+5
-10
documentmode.js
dlls/mshtml/tests/documentmode.js
+5
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
87f7aea1
...
...
@@ -2947,19 +2947,14 @@ static HRESULT WINAPI HTMLDocument5_get_onbeforedeactivate(IHTMLDocument5 *iface
static
HRESULT
WINAPI
HTMLDocument5_get_compatMode
(
IHTMLDocument5
*
iface
,
BSTR
*
p
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument5
(
iface
);
nsAString
mode_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
static
const
WCHAR
BackCompatW
[]
=
{
'B'
,
'a'
,
'c'
,
'k'
,
'C'
,
'o'
,
'm'
,
'p'
,
'a'
,
't'
,
0
};
static
const
WCHAR
CSS1CompatW
[]
=
{
'C'
,
'S'
,
'S'
,
'1'
,
'C'
,
'o'
,
'm'
,
'p'
,
'a'
,
't'
,
0
};
if
(
!
This
->
doc_node
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
mode_str
,
NULL
);
nsres
=
nsIDOMHTMLDocument_GetCompatMode
(
This
->
doc_node
->
nsdoc
,
&
mode_str
);
return
return_nsstr
(
nsres
,
&
mode_str
,
p
);
*
p
=
SysAllocString
(
This
->
doc_node
->
document_mode
==
COMPAT_MODE_QUIRKS
?
BackCompatW
:
CSS1CompatW
);
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
static
const
IHTMLDocument5Vtbl
HTMLDocument5Vtbl
=
{
...
...
dlls/mshtml/tests/documentmode.js
View file @
87f7aea1
...
...
@@ -29,6 +29,11 @@ function test_doc_mode() {
ok
(
opt
===
document
.
documentMode
,
"documentMode = "
+
document
.
documentMode
);
if
(
document
.
documentMode
>
5
)
ok
(
document
.
compatMode
===
"CSS1Compat"
,
"document.compatMode = "
+
document
.
compatMode
);
else
ok
(
document
.
compatMode
===
"BackCompat"
,
"document.compatMode = "
+
document
.
compatMode
);
next_test
();
}
...
...
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