Jacek Caban : mshtml: Added edge compatibility mode support.

Alexandre Julliard julliard at winehq.org
Mon Apr 24 16:11:23 CDT 2017


Module: wine
Branch: master
Commit: cad03646c58382da599537e702246960596adf63
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cad03646c58382da599537e702246960596adf63

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Apr 24 15:19:19 2017 +0200

mshtml: Added edge compatibility mode support.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/mutation.c     | 9 ++++++++-
 dlls/mshtml/tests/script.c | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c
index 8c4fc67..84a290e 100644
--- a/dlls/mshtml/mutation.c
+++ b/dlls/mshtml/mutation.c
@@ -371,10 +371,17 @@ static BOOL parse_ua_compatible(const WCHAR *p, compat_mode_t *r)
 {
     int v = 0;
 
+    static const WCHAR edgeW[] = {'e','d','g','e',0};
+
     if(p[0] != 'I' || p[1] != 'E' || p[2] != '=')
         return FALSE;
-
     p += 3;
+
+    if(!strcmpiW(p, edgeW)) {
+        *r = COMPAT_MODE_IE11;
+        return TRUE;
+    }
+
     while('0' <= *p && *p <= '9')
         v = v*10 + *(p++)-'0';
     if(*p || !v)
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index e8b3d19..41aaa3e 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -3471,6 +3471,7 @@ static void run_js_tests(void)
     run_script_as_http_with_mode("documentmode.js", "?9", "9");
     run_script_as_http_with_mode("documentmode.js", "?10", "10");
     run_script_as_http_with_mode("documentmode.js", "?11", "11");
+    run_script_as_http_with_mode("documentmode.js", "?11", "edge");
 
     run_script_as_http_with_mode("asyncscriptload.js", NULL, "9");
 }




More information about the wine-cvs mailing list