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

Unified Diff: tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate

Issue 2978213002: Removed DARTIUM codegen for IDLS (sdk/lib/dartium) (Closed)
Patch Set: Update generated darttemplate Created 3 years, 5 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:
View side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index bb4cd3e84f5dec93aed67d2574eb4ff13b8f38e9..03a291474cd52216a3a624fc8bf9b5a04f952dac 100644
--- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -49,22 +49,9 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with
}
bool _supportsProperty(String propertyName) {
-$if DART2JS
return JS('bool', '# in #', propertyName, this);
-$else
- // You can't just check the value of a property, because there is no way
- // to distinguish between property not being present in the browser and
- // not having a value at all. (Ultimately we'll want the native method to
- // return null if the property doesn't exist and empty string if it's
- // defined but just doesn't have a value.
- return _hasProperty(propertyName);
-$endif
}
-$if DARTIUM
- bool _hasProperty(String propertyName) =>
- _blink.BlinkCSSStyleDeclaration.instance.$__get___propertyIsEnumerable_Callback_1_(this, propertyName);
-$endif
@DomName('CSSStyleDeclaration.setProperty')
void setProperty(String propertyName, String value, [String priority]) {
@@ -92,35 +79,22 @@ $endif
return propertyName;
}
-$if DART2JS
static final _propertyCache = JS('', '{}');
static String _readCache(String key) =>
JS('String|Null', '#[#]', _propertyCache, key);
static void _writeCache(String key, String value) {
JS('void', '#[#] = #', _propertyCache, key, value);
}
-$else
- static String _readCache(String key) => null;
- static void _writeCache(String key, value) {}
-$endif
static String _camelCase(String hyphenated) {
-$if DART2JS
var replacedMs = JS('String', r'#.replace(/^-ms-/, "ms-")', hyphenated);
return JS(
'String',
r'#.replace(/-([\da-z])/ig,'
r'function(_, letter) { return letter.toUpperCase();})',
replacedMs);
-$else
- // The "ms" prefix is always lowercased.
- return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped(
- new RegExp('-([a-z]+)', caseSensitive: false),
- (match) => match[0][1].toUpperCase() + match[0].substring(2));
-$endif
}
-$if DART2JS
void _setPropertyHelper(String propertyName, String value, [String priority]) {
if (value == null) value = '';
if (priority == null) priority = '';
@@ -133,21 +107,7 @@ $if DART2JS
static bool get supportsTransitions {
return document.body.style.supportsProperty('transition');
}
-$else
- void _setPropertyHelper(String propertyName, String value, [String priority]) {
- if (priority == null) {
- priority = '';
- }
- _setProperty(propertyName, value, priority);
- }
-
- /**
- * Checks to see if CSS Transitions are supported.
- */
- static bool get supportsTransitions => true;
-$endif
$!MEMBERS
-$if DART2JS
/** Gets the value of "background" */
String get background => this._background;
@@ -1139,7 +1099,6 @@ $if DART2JS
@JSName('zIndex')
String _zIndex;
-$endif
}
class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
@@ -1161,7 +1120,6 @@ class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
}
-$if DART2JS
void _setAll(String propertyName, String value) {
value = value == null ? '' : value;
for (Element element in _elementIterable) {
@@ -1619,7 +1577,6 @@ $if DART2JS
_setAll('zIndex', value);
}
-$endif
// Important note: CssStyleDeclarationSet does NOT implement every method
// available in CssStyleDeclaration. Some of the methods don't make so much
@@ -1628,23 +1585,9 @@ $endif
// items in the MEMBERS set if you want that functionality.
}
-$if DART2JS
-abstract class CssStyleDeclarationBase {
- String getPropertyValue(String propertyName);
- void setProperty(String propertyName, String value, [String priority]);
-$else
- $if JSINTEROP
-class CssStyleDeclarationBase {
- String getPropertyValue(String propertyName) =>
- throw new StateError('getProperty not overridden in dart:html');
- void setProperty(String propertyName, String value, [String priority]) =>
- throw new StateError('setProperty not overridden in dart:html');
- $else
abstract class CssStyleDeclarationBase {
String getPropertyValue(String propertyName);
void setProperty(String propertyName, String value, [String priority]);
- $endif
-$endif
/** Gets the value of "align-content" */
String get alignContent =>

Powered by Google App Engine
This is Rietveld 408576698