Subversion Repository Public Repository

litesoft

Diff Revisions 473 vs 474 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/nonpublic/NP_UserAgent_IE.java

Diff revisions: vs.
  @@ -5,14 +5,25 @@
5 5
6 6 public class NP_UserAgent_IE extends org.litesoft.GWT.client.UserAgent
7 7 {
8 + private boolean mLegacyIE;
9 +
8 10 public NP_UserAgent_IE()
9 11 {
10 - super( BrowserFamily.IE, determineReal() );
12 + super( BrowserFamily.IE, "" );
13 + int zVersion = determineReal();
14 + mLegacyIE = (zVersion < 9);
15 + mReally = "IE" + zVersion;
16 + }
17 +
18 + @Override
19 + public boolean isLegacyIE()
20 + {
21 + return mLegacyIE;
11 22 }
12 23
13 24 // ; MSIE 6.0;
14 25 // 01234567890
15 - private static String determineReal()
26 + private static int determineReal()
16 27 {
17 28 String zUserAgent = getBrowserUserAgent();
18 29 int atStart = zUserAgent.indexOf("; MSIE ") + 7;
  @@ -20,11 +31,11 @@
20 31 if ( (atStart > 6) && (atEnd != -1) && (atEnd <= (atStart + 2)))
21 32 {
22 33 try {
23 - return "IE" + Integer.parseInt(zUserAgent.substring(atStart,atEnd));
34 + return Integer.parseInt(zUserAgent.substring(atStart,atEnd));
24 35 } catch (NumberFormatException e) {
25 36 // Really? Then Assume the default
26 37 }
27 38 }
28 - return "IE8";
39 + return 8;
29 40 }
30 41 }