Commit 6614df04 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Set compatibility mode based on doctype.

parent 73bdf9d9
...@@ -729,6 +729,17 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, ...@@ -729,6 +729,17 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
return; return;
} }
if(This->document_mode == COMPAT_MODE_QUIRKS) {
nsIDOMDocumentType *nsdoctype;
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMDocumentType, (void**)&nsdoctype);
if(NS_SUCCEEDED(nsres)) {
TRACE("doctype node\n");
/* FIXME: We should set it to something higher for internet zone. */
set_document_mode(This, COMPAT_MODE_IE7);
nsIDOMDocumentType_Release(nsdoctype);
}
}
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLElement, (void**)&nselem); nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMHTMLElement, (void**)&nselem);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres))
return; return;
......
...@@ -134,7 +134,6 @@ typedef nsISupports nsISHistory; ...@@ -134,7 +134,6 @@ typedef nsISupports nsISHistory;
typedef nsISupports nsIWidget; typedef nsISupports nsIWidget;
typedef nsISupports nsIPrompt; typedef nsISupports nsIPrompt;
typedef nsISupports nsIAuthPrompt; typedef nsISupports nsIAuthPrompt;
typedef nsISupports nsIDOMDocumentType;
typedef nsISupports nsIDOMDOMImplementation; typedef nsISupports nsIDOMDOMImplementation;
typedef nsISupports nsIDOMCDATASection; typedef nsISupports nsIDOMCDATASection;
typedef nsISupports nsIDOMProcessingInstruction; typedef nsISupports nsIDOMProcessingInstruction;
...@@ -1201,6 +1200,20 @@ interface nsIDOMComment : nsIDOMCharacterData ...@@ -1201,6 +1200,20 @@ interface nsIDOMComment : nsIDOMCharacterData
[ [
object, object,
uuid(cd7467b9-0f26-4787-a359-66e80ba8db92),
local
]
interface nsIDOMDocumentType : nsIDOMNode
{
nsresult GetName(nsAString *aName);
nsresult GetPublicId(nsAString *aPublicId);
nsresult GetSystemId(nsAString *aSystemId);
nsresult GetInternalSubset(nsAString *aInternalSubset);
nsresult MozRemove();
}
[
object,
uuid(48eb8d72-95bb-402e-a8fc-f2b187abcbdb), uuid(48eb8d72-95bb-402e-a8fc-f2b187abcbdb),
local local
] ]
......
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