Commit 667b3f0d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use IE8 compatibility mode for documents in standards mode in internet zone.

parent 26226905
...@@ -803,9 +803,27 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, ...@@ -803,9 +803,27 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
nsIDOMDocumentType *nsdoctype; nsIDOMDocumentType *nsdoctype;
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMDocumentType, (void**)&nsdoctype); nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMDocumentType, (void**)&nsdoctype);
if(NS_SUCCEEDED(nsres)) { if(NS_SUCCEEDED(nsres)) {
compat_mode_t mode = COMPAT_MODE_IE7;
TRACE("doctype node\n"); 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); nsIDOMDocumentType_Release(nsdoctype);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment