Jacek Caban : mshtml: Use IE8 compatibility mode for documents in standards mode in internet zone.
Alexandre Julliard
julliard at winehq.org
Thu Mar 1 13:34:45 CST 2018
Module: wine
Branch: master
Commit: 667b3f0dff825e38a295dff1b8329fd3467ac436
URL: https://source.winehq.org/git/wine.git/?a=commit;h=667b3f0dff825e38a295dff1b8329fd3467ac436
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Mar 1 19:17:59 2018 +0100
mshtml: Use IE8 compatibility mode for documents in standards mode in internet zone.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/mutation.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c
index 555a99b..1144b47 100644
--- a/dlls/mshtml/mutation.c
+++ b/dlls/mshtml/mutation.c
@@ -803,9 +803,27 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
nsIDOMDocumentType *nsdoctype;
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMDocumentType, (void**)&nsdoctype);
if(NS_SUCCEEDED(nsres)) {
+ compat_mode_t mode = COMPAT_MODE_IE7;
+
TRACE("doctype node\n");
- /* FIXME: We should set it to something higher for internet zone. */
- set_document_mode(This, COMPAT_MODE_IE7, FALSE);
+
+ if(This->window && This->window->base.outer_window) {
+ HTMLOuterWindow *window = This->window->base.outer_window;
+ DWORD zone;
+ HRESULT hres;
+
+ /*
+ * Internet URL zone is treated differently. Native defaults to latest supported
+ * mode. We default to IE8. Ideally, we'd sync that with version used for IE=edge
+ * X-UA-Compatible version, allow configuration and default to higher version
+ * (once it's well supported).
+ */
+ hres = IInternetSecurityManager_MapUrlToZone(window->secmgr, window->url, &zone, 0);
+ if(SUCCEEDED(hres) && zone == URLZONE_INTERNET)
+ mode = COMPAT_MODE_IE8;
+ }
+
+ set_document_mode(This, mode, FALSE);
nsIDOMDocumentType_Release(nsdoctype);
}
}
More information about the wine-cvs
mailing list