Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: lib/html/dart2js/html_dart2js.dart

Issue 10905130: Adding IE support to browser prefixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing test exceptions from html.status. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index b5f3864e29a456a43eabccd93c282b8133fd4f3b..b623803da1d8c5ae1feae7df6cafc04e1f8ce440 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -917,10 +917,13 @@ String get _browserPrefix() {
if (_cachedBrowserPrefix === null) {
if (_Device.isFirefox) {
_cachedBrowserPrefix = '-moz-';
+ } else if (_Device.isIE) {
+ _cachedBrowserPrefix = '-ms-';
+ } else if (_Device.isOpera) {
+ _cachedBrowserPrefix = '-o-';
} else {
_cachedBrowserPrefix = '-webkit-';
}
- // TODO(jacobr): support IE 9.0 and Opera as well.
}
return _cachedBrowserPrefix;
}
@@ -39430,6 +39433,16 @@ class _Device {
static String get userAgent() => window.navigator.userAgent;
/**
+ * Determines if the current device is running Opera.
+ */
+ static bool get isOpera() => userAgent.contains("Opera", 0);
+
+ /**
+ * Determines if the current device is running Internet Explorer.
+ */
+ static bool get isIE() => !isOpera && userAgent.contains("MSIE", 0);
+
+ /**
* Determines if the current device is running Firefox.
*/
static bool get isFirefox() => userAgent.contains("Firefox", 0);
« no previous file with comments | « lib/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate ('k') | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698