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
60887201
Commit
60887201
authored
Apr 12, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Apr 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Tell wine-gecko about the IE compat document mode.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
1e2a24e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
25 deletions
+30
-25
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
mutation.c
dlls/mshtml/mutation.c
+27
-1
omnavigator.c
dlls/mshtml/omnavigator.c
+2
-24
No files found.
dlls/mshtml/mshtml_private.h
View file @
60887201
...
...
@@ -1023,6 +1023,7 @@ void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN
HRESULT
create_gecko_browser
(
HTMLDocumentObj
*
,
GeckoBrowser
**
)
DECLSPEC_HIDDEN
;
void
detach_gecko_browser
(
GeckoBrowser
*
)
DECLSPEC_HIDDEN
;
DWORD
get_compat_mode_version
(
compat_mode_t
compat_mode
)
DECLSPEC_HIDDEN
;
compat_mode_t
lock_document_mode
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
void
init_mutation
(
nsIComponentManager
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/mutation.c
View file @
60887201
...
...
@@ -388,6 +388,26 @@ static nsresult run_insert_script(HTMLDocumentNode *doc, nsISupports *script_ifa
return
NS_OK
;
}
DWORD
get_compat_mode_version
(
compat_mode_t
compat_mode
)
{
switch
(
compat_mode
)
{
case
COMPAT_MODE_QUIRKS
:
case
COMPAT_MODE_IE5
:
case
COMPAT_MODE_IE7
:
return
7
;
case
COMPAT_MODE_IE8
:
return
8
;
case
COMPAT_MODE_IE9
:
return
9
;
case
COMPAT_MODE_IE10
:
return
10
;
case
COMPAT_MODE_IE11
:
return
11
;
DEFAULT_UNREACHABLE
;
}
return
0
;
}
/*
* We may change document mode only in early stage of document lifetime.
* Later attempts will not have an effect.
...
...
@@ -396,7 +416,13 @@ compat_mode_t lock_document_mode(HTMLDocumentNode *doc)
{
TRACE
(
"%p: %d
\n
"
,
doc
,
doc
->
document_mode
);
doc
->
document_mode_locked
=
TRUE
;
if
(
!
doc
->
document_mode_locked
)
{
doc
->
document_mode_locked
=
TRUE
;
if
(
doc
->
html_document
)
nsIDOMHTMLDocument_SetIECompatMode
(
doc
->
html_document
,
get_compat_mode_version
(
doc
->
document_mode
));
}
return
doc
->
document_mode
;
}
...
...
dlls/mshtml/omnavigator.c
View file @
60887201
...
...
@@ -1170,30 +1170,8 @@ extern HRESULT WINAPI MapBrowserEmulationModeToUserAgent(const void*,WCHAR**);
/* Retrieves allocated user agent via CoTaskMemAlloc */
static
HRESULT
get_user_agent
(
OmNavigator
*
navigator
,
WCHAR
**
user_agent
)
{
DWORD
version
;
switch
(
dispex_compat_mode
(
&
navigator
->
dispex
))
{
case
COMPAT_MODE_QUIRKS
:
case
COMPAT_MODE_IE5
:
case
COMPAT_MODE_IE7
:
version
=
7
;
break
;
case
COMPAT_MODE_IE8
:
version
=
8
;
break
;
case
COMPAT_MODE_IE9
:
version
=
9
;
break
;
case
COMPAT_MODE_IE10
:
version
=
10
;
break
;
case
COMPAT_MODE_IE11
:
version
=
11
;
break
;
default:
assert
(
0
);
return
E_FAIL
;
}
DWORD
version
=
get_compat_mode_version
(
dispex_compat_mode
(
&
navigator
->
dispex
));
return
MapBrowserEmulationModeToUserAgent
(
&
version
,
user_agent
);
}
...
...
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