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
9ae8b8c0
Commit
9ae8b8c0
authored
Feb 26, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Support X-UA-Compatible HTTP header.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
216ad43f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
binding.h
dlls/mshtml/binding.h
+1
-0
mutation.c
dlls/mshtml/mutation.c
+36
-0
navigate.c
dlls/mshtml/navigate.c
+8
-1
No files found.
dlls/mshtml/binding.h
View file @
9ae8b8c0
...
...
@@ -147,6 +147,7 @@ HRESULT load_uri(HTMLOuterWindow*,IUri*,DWORD) DECLSPEC_HIDDEN;
HRESULT
navigate_new_window
(
HTMLOuterWindow
*
,
IUri
*
,
const
WCHAR
*
,
request_data_t
*
,
IHTMLWindow2
**
)
DECLSPEC_HIDDEN
;
HRESULT
navigate_url
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
submit_form
(
HTMLOuterWindow
*
,
const
WCHAR
*
,
IUri
*
,
nsIInputStream
*
)
DECLSPEC_HIDDEN
;
void
process_document_response_headers
(
HTMLDocumentNode
*
,
IBinding
*
)
DECLSPEC_HIDDEN
;
void
init_bscallback
(
BSCallback
*
,
const
BSCallbackVtbl
*
,
IMoniker
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
create_channelbsc
(
IMoniker
*
,
const
WCHAR
*
,
BYTE
*
,
DWORD
,
BOOL
,
nsChannelBSC
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/mutation.c
View file @
9ae8b8c0
...
...
@@ -29,6 +29,7 @@
#include "winreg.h"
#include "ole2.h"
#include "shlguid.h"
#include "wininet.h"
#include "mshtml_private.h"
#include "htmlscript.h"
...
...
@@ -394,6 +395,8 @@ static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
static
const
WCHAR
edgeW
[]
=
{
'e'
,
'd'
,
'g'
,
'e'
,
0
};
TRACE
(
"%s
\n
"
,
debugstr_w
(
p
));
if
(
p
[
0
]
!=
'I'
||
p
[
1
]
!=
'E'
||
p
[
2
]
!=
'='
)
return
FALSE
;
p
+=
3
;
...
...
@@ -432,6 +435,39 @@ static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
return
TRUE
;
}
void
process_document_response_headers
(
HTMLDocumentNode
*
doc
,
IBinding
*
binding
)
{
IWinInetHttpInfo
*
http_info
;
char
buf
[
1024
];
DWORD
size
;
HRESULT
hres
;
hres
=
IBinding_QueryInterface
(
binding
,
&
IID_IWinInetHttpInfo
,
(
void
**
)
&
http_info
);
if
(
FAILED
(
hres
))
{
TRACE
(
"No IWinInetHttpInfo
\n
"
);
return
;
}
size
=
sizeof
(
buf
);
strcpy
(
buf
,
"X-UA-Compatible"
);
hres
=
IWinInetHttpInfo_QueryInfo
(
http_info
,
HTTP_QUERY_CUSTOM
,
buf
,
&
size
,
NULL
,
NULL
);
if
(
hres
==
S_OK
&&
size
)
{
compat_mode_t
document_mode
;
WCHAR
*
header
;
TRACE
(
"size %u
\n
"
,
size
);
header
=
heap_strdupAtoW
(
buf
);
if
(
header
&&
parse_ua_compatible
(
header
,
&
document_mode
))
{
TRACE
(
"setting document mode %d
\n
"
,
document_mode
);
doc
->
document_mode
=
document_mode
;
}
heap_free
(
header
);
}
IWinInetHttpInfo_Release
(
http_info
);
}
static
void
process_meta_element
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLMetaElement
*
meta_element
)
{
nsAString
http_equiv_str
,
content_str
;
...
...
dlls/mshtml/navigate.c
View file @
9ae8b8c0
...
...
@@ -1003,9 +1003,16 @@ static HRESULT on_start_nsrequest(nsChannelBSC *This)
}
if
(
This
->
is_doc_channel
)
{
HRESULT
hres
;
if
(
!
This
->
bsc
.
window
)
return
E_ABORT
;
/* Binding aborted in OnStartRequest call. */
update_window_doc
(
This
->
bsc
.
window
);
hres
=
update_window_doc
(
This
->
bsc
.
window
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
This
->
bsc
.
binding
)
process_document_response_headers
(
This
->
bsc
.
window
->
doc
,
This
->
bsc
.
binding
);
if
(
This
->
bsc
.
window
->
base
.
outer_window
->
readystate
!=
READYSTATE_LOADING
)
set_ready_state
(
This
->
bsc
.
window
->
base
.
outer_window
,
READYSTATE_LOADING
);
}
...
...
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