Project

General

Profile

Feature #2049 » ie10_history_support_20130730a.diff

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

View differences:

src/Wt/WApplication.C
if (selectIE7)
addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=7");
} else
} else if (environment().agent() == WEnvironment::IE9)
addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=9");
else
addMetaHeader(MetaHttpHeader, "X-UA-Compatible", "IE=edge");
}
domRoot_ = new WContainerWidget();
src/Wt/WEnvironment
IE6 = 1001, //!< Internet Explorer 6
IE7 = 1002, //!< Internet Explorer 7
IE8 = 1003, //!< Internet Explorer 8
IE9 = 1004, //!< Internet Explorer 9 or later
IE9 = 1004, //!< Internet Explorer 9
IE10 = 1005, //!< Internet Explorer 10 or later
Opera = 3000, //!< Opera
Opera10 = 3010, //!< Opera 10 or later
WebKit = 4000, //!< WebKit
src/Wt/WEnvironment.C
agent_ = IE7;
else if (userAgent_.find("MSIE 8.") != std::string::npos)
agent_ = IE8;
else if (userAgent_.find("MSIE") != std::string::npos)
else if (userAgent_.find("MSIE 9.") != std::string::npos)
agent_ = IE9;
else if (userAgent_.find("MSIE") != std::string::npos)
agent_ = IE10;
if (userAgent_.find("Opera") != std::string::npos) {
agent_ = Opera;
src/Wt/WPaintedWidget.C
// on older browsers, inline svg is only supported in xhtml mode. HTML5
// also allows inline svg
// Safari 5 and Opera 11 do not seem to support inline svg in html mode
method = HtmlCanvas;
method = env.javaScript() ? HtmlCanvas : PngImage;
else
if (!env.javaScript())
method = InlineSvgVml;
......
if (method == InlineSvgVml)
painter_ = new WWidgetVectorPainter(this, WWidgetPainter::InlineSvg);
else if (method == PngImage)
painter_ = new WWidgetRasterPainter(this);
else
painter_ = new WWidgetCanvasPainter(this);
src/web/WebRenderer.C
"xmlns=\"http://www.w3.org/1999/xhtml\"" + htmlAttr);
page.setVar("METACLOSE", "/>");
} else {
if (session_.env().agentIsIE())
if (session_.env().agentIsIElt(10))
page.setVar("HTMLATTRIBUTES",
"xmlns:v=\"urn:schemas-microsoft-com:vml\""
" lang=\"en\" dir=\"ltr\"" + htmlAttr);
......
result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\"";
closeSpecial(result, xhtml);
}
} else {
} else if (session_.env().agentIsIElt(10)) {
result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\"";
closeSpecial(result, xhtml);
} else {
result << "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"";
closeSpecial(result, xhtml);
}
}
src/web/skeleton/Boot.html
<head>
_$_HEADDECLARATIONS_$_
<title></title>
<!--[if gte IE 6]>
<!--[if (gte IE 6)&(lt IE 10)]>
<style type="text/css">
v\:* { behavior:url(#default#VML); position:absolute }
</style>
......
<link href="_$_BOOT_STYLE_URL_$_" rel="stylesheet"
type="text/css" _$_METACLOSE_$_
_$_$endif_$_()
<!--[if gte IE 6]>
<!--[if (gte IE 6)&(lt IE 10)]>
<script type="text/javascript">
document.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML");
</script>
src/web/skeleton/Hybrid.html
<head>
_$_HEADDECLARATIONS_$_
<title>_$_TITLE_$_</title>
<!--[if gte IE 6]>
<!--[if (gte IE 6)&(lt IE 10)]>
<style type="text/css">
v\:* { behavior: url(#default#VML);position:absolute }
</style>
src/web/skeleton/Plain.html
<head>
_$_HEADDECLARATIONS_$_
<title>_$_TITLE_$_</title>
<!--[if gte IE 6]>
<!--[if (gte IE 6)&(lt IE 10)]>
<style type="text/css">
v\:* { behavior: url(#default#VML);position:absolute }
</style>
(2-2/2)