Project

General

Profile

Feature #2049 » ie10_history_support_20130730a.diff

Bruce Toll, 07/31/2013 08:57 PM

View differences:

src/Wt/WApplication.C
148 148

  
149 149
      if (selectIE7)
150 150
	addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=7");
151
    } else
151
    } else if (environment().agent() == WEnvironment::IE9)
152 152
      addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=9");
153
    else
154
      addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=edge");
153 155
  }
154 156

  
155 157
  domRoot_ = new WContainerWidget();
src/Wt/WEnvironment
86 86
    IE6 = 1001,                 //!< Internet Explorer 6
87 87
    IE7 = 1002,                 //!< Internet Explorer 7
88 88
    IE8 = 1003,                 //!< Internet Explorer 8
89
    IE9 = 1004,                 //!< Internet Explorer 9 or later
89
    IE9 = 1004,                 //!< Internet Explorer 9
90
    IE10 = 1005,                //!< Internet Explorer 10 or later
90 91
    Opera = 3000,               //!< Opera
91 92
    Opera10 = 3010,             //!< Opera 10 or later
92 93
    WebKit = 4000,              //!< WebKit
src/Wt/WEnvironment.C
244 244
    agent_ = IE7;
245 245
  else if (userAgent_.find("MSIE 8.") != std::string::npos)
246 246
    agent_ = IE8;
247
  else if (userAgent_.find("MSIE") != std::string::npos)
247
  else if (userAgent_.find("MSIE 9.") != std::string::npos)
248 248
    agent_ = IE9;
249
  else if (userAgent_.find("MSIE") != std::string::npos)
250
    agent_ = IE10;
249 251

  
250 252
  if (userAgent_.find("Opera") != std::string::npos) {
251 253
    agent_ = Opera;
src/Wt/WPaintedWidget.C
186 186
    // on older browsers, inline svg is only supported in xhtml mode. HTML5
187 187
    // also allows inline svg
188 188
    // Safari 5 and Opera 11 do not seem to support inline svg in html mode
189
    method = HtmlCanvas;
189
    method = env.javaScript() ? HtmlCanvas : PngImage;
190 190
  else 
191 191
    if (!env.javaScript())
192 192
      method = InlineSvgVml;
......
248 248

  
249 249
  if (method == InlineSvgVml)
250 250
    painter_ = new WWidgetVectorPainter(this, WWidgetPainter::InlineSvg);
251
  else if (method == PngImage)
252
    painter_ = new WWidgetRasterPainter(this);
251 253
  else
252 254
    painter_ = new WWidgetCanvasPainter(this);
253 255

  
src/web/WebRenderer.C
285 285
		"xmlns=\"http://www.w3.org/1999/xhtml\"" + htmlAttr);
286 286
    page.setVar("METACLOSE", "/>");
287 287
  } else {
288
    if (session_.env().agentIsIE())
288
    if (session_.env().agentIsIElt(10))
289 289
      page.setVar("HTMLATTRIBUTES",
290 290
		  "xmlns:v=\"urn:schemas-microsoft-com:vml\""
291 291
		  " lang=\"en\" dir=\"ltr\"" + htmlAttr);
......
1813 1813
	  result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\"";
1814 1814
	  closeSpecial(result, xhtml);
1815 1815
	}
1816
      } else {
1816
      } else if (session_.env().agentIsIElt(10)) {
1817 1817
	result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"";
1818 1818
	closeSpecial(result, xhtml);
1819
      } else {
1820
	result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"";
1821
	closeSpecial(result, xhtml);
1819 1822
      }
1820 1823
    }
1821 1824

  
src/web/skeleton/Boot.html
3 3
<head>
4 4
_$_HEADDECLARATIONS_$_
5 5
<title></title>
6
<!--[if gte IE 6]>
6
<!--[if (gte IE 6)&(lt IE 10)]>
7 7
<style type="text/css">
8 8
v\:* { behavior:url(#default#VML); position:absolute }
9 9
</style>
......
31 31
<link href="_$_BOOT_STYLE_URL_$_" rel="stylesheet"
32 32
      type="text/css" _$_METACLOSE_$_
33 33
_$_$endif_$_()
34
<!--[if gte IE 6]>
34
<!--[if (gte IE 6)&(lt IE 10)]>
35 35
<script type="text/javascript">
36 36
document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML");
37 37
</script>
src/web/skeleton/Hybrid.html
3 3
<head>
4 4
_$_HEADDECLARATIONS_$_
5 5
<title>_$_TITLE_$_</title>
6
<!--[if gte IE 6]>
6
<!--[if (gte IE 6)&(lt IE 10)]>
7 7
<style type="text/css">
8 8
v\:* { behavior: url(#default#VML);position:absolute }
9 9
</style>
src/web/skeleton/Plain.html
3 3
<head>
4 4
_$_HEADDECLARATIONS_$_
5 5
<title>_$_TITLE_$_</title>
6
<!--[if gte IE 6]>
6
<!--[if (gte IE 6)&(lt IE 10)]>
7 7
<style type="text/css">
8 8
v\:* { behavior: url(#default#VML);position:absolute }
9 9
</style>
(2-2/2)