mshtml: Properly handle conditional comments in IE9+ modes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
74d6c6d2fb
commit
67de587f60
|
@ -138,14 +138,6 @@ static PRUnichar *handle_insert_comment(HTMLDocumentNode *doc, const PRUnichar *
|
|||
return NULL;
|
||||
|
||||
compat_version = compat_mode_info[doc->document_mode].ie_version;
|
||||
if(compat_version > 8) {
|
||||
/*
|
||||
* Ideally we should handle higher versions, but right now it would cause more problems than it's worth.
|
||||
* We should revisit that once more IE9 features are implemented, most notably new events APIs.
|
||||
*/
|
||||
WARN("Using compat version 8\n");
|
||||
compat_version = 8;
|
||||
}
|
||||
|
||||
switch(cmpt) {
|
||||
case CMP_EQ:
|
||||
|
@ -748,6 +740,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
|
|||
|
||||
TRACE("(%p)->(%p %p)\n", This, aDocument, aContent);
|
||||
|
||||
if(This->document_mode < COMPAT_MODE_IE10) {
|
||||
nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMComment, (void**)&nscomment);
|
||||
if(NS_SUCCEEDED(nsres)) {
|
||||
TRACE("comment node\n");
|
||||
|
@ -756,6 +749,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface,
|
|||
nsIDOMComment_Release(nscomment);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(This->document_mode == COMPAT_MODE_QUIRKS) {
|
||||
nsIDOMDocumentType *nsdoctype;
|
||||
|
|
|
@ -165,10 +165,6 @@ function test_conditional_comments() {
|
|||
function test_version(v) {
|
||||
var version = compat_version ? compat_version : 7;
|
||||
|
||||
/* Uncomment and fix tests below once we support that. */
|
||||
if(version >= 9)
|
||||
return;
|
||||
|
||||
div.innerHTML = "<!--[if lte IE " + v + "]>true<![endif]-->";
|
||||
ok(div.innerText === (version <= v ? "true" : ""),
|
||||
"div.innerText = " + div.innerText + " for version (<=) " + v);
|
||||
|
@ -178,11 +174,11 @@ function test_conditional_comments() {
|
|||
"div.innerText = " + div.innerText + " for version (<) " + v);
|
||||
|
||||
div.innerHTML = "<!--[if gte IE " + v + "]>true<![endif]-->";
|
||||
ok(div.innerText === (version >= v ? "true" : ""),
|
||||
ok(div.innerText === (version >= v && version < 10 ? "true" : ""),
|
||||
"div.innerText = " + div.innerText + " for version (>=) " + v);
|
||||
|
||||
div.innerHTML = "<!--[if gt IE " + v + "]>true<![endif]-->";
|
||||
ok(div.innerText === (version > v ? "true" : ""),
|
||||
ok(div.innerText === (version > v && version < 10 ? "true" : ""),
|
||||
"div.innerText = " + div.innerText + " for version (>) " + v);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue