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

Unified Diff: tools/dom/scripts/css_code_generator.py

Issue 1327083002: Revert "Patched in Dartium JsInterop" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/deps/dartium.deps/DEPS ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/css_code_generator.py
diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py
index 74de8e4285a19d2691abc04b961c0c90289f844a..3a00dde0224a1ba904d292e704a7c52fec73ce4e 100644
--- a/tools/dom/scripts/css_code_generator.py
+++ b/tools/dom/scripts/css_code_generator.py
@@ -102,8 +102,18 @@ part of $LIBRARYNAME;
class_file.write("""
+$if DART2JS
+$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with
+ $(CLASSNAME)Base $IMPLEMENTS {
+$else
+ $if JSINTEROP
+$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS) class $CLASSNAME extends
+ $(CLASSNAME)Base $IMPLEMENTS {
+ $else
$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with
$(CLASSNAME)Base $IMPLEMENTS {
+ $endif
+$endif
factory $CLASSNAME() => new CssStyleDeclaration.css('');
factory $CLASSNAME.css(String css) {
@@ -242,7 +252,7 @@ $if DART2JS
String get %s => this._%s;
/** Sets the value of "%s" */
- set %s(String value) {
+ void set %s(String value) {
_%s = value == null ? '' : value;
}
@Returns('String')
@@ -256,7 +266,15 @@ $if DART2JS
$endif
}
+$if DART2JS
+class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
+$else
+ $if JSINTEROP
+class _CssStyleDeclarationSet extends CssStyleDeclarationBase {
+ $else
class _CssStyleDeclarationSet extends Object with CssStyleDeclarationBase {
+ $endif
+$endif
final Iterable<Element> _elementIterable;
Iterable<CssStyleDeclaration> _elementCssStyleDeclarationSetIterable;
@@ -291,7 +309,7 @@ $if DART2JS
property = dashifyName(camelName)
class_file.write("""
/** Sets the value of "%s" */
- set %s(String value) {
+ void set %s(String value) {
_setAll('%s', value);
}
""" % (property, camelName, camelName))
@@ -353,7 +371,7 @@ $endif
if base_css_name in annotated:
class_lines.append(annotated[base_css_name])
class_lines.append("""
- set %s(String value) {
+ void set %s(String value) {
setProperty('%s', value, '');
}
""" % (camel_case_name, css_name))
« no previous file with comments | « tools/deps/dartium.deps/DEPS ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698