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

Unified Diff: lib/html/scripts/css_code_generator.py

Issue 10928060: Partially migrate from old getter syntax to new one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/css_code_generator.py
diff --git a/lib/html/scripts/css_code_generator.py b/lib/html/scripts/css_code_generator.py
index 0656de8ad73b86567d9b180e0b117ff7dbca9ded..a3d8e2d38ce6db3eff0d9531bd3b33044475ab28 100644
--- a/lib/html/scripts/css_code_generator.py
+++ b/lib/html/scripts/css_code_generator.py
@@ -63,13 +63,13 @@ def generate_code(input_path):
interface CSSStyleDeclaration {
- String get cssText();
+ String get cssText;
void set cssText(String value);
- int get length();
+ int get length;
- CSSRule get parentRule();
+ CSSRule get parentRule;
CSSValue getPropertyCSSValue(String propertyName);
@@ -108,7 +108,7 @@ class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
CSSStyleDeclarationWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
- static String get _browserPrefix() {
+ static String get _browserPrefix {
if (_cachedBrowserPrefix === null) {
if (_Device.isFirefox) {
_cachedBrowserPrefix = '-moz-';
@@ -120,13 +120,13 @@ class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
return _cachedBrowserPrefix;
}
- String get cssText() { return _ptr.cssText; }
+ String get cssText => _ptr.cssText;
void set cssText(String value) { _ptr.cssText = value; }
- int get length() { return _ptr.length; }
+ int get length => _ptr.length;
- CSSRule get parentRule() { return LevelDom.wrapCSSRule(_ptr.parentRule); }
+ CSSRule get parentRule => LevelDom.wrapCSSRule(_ptr.parentRule);
CSSValue getPropertyCSSValue(String propertyName) {
return LevelDom.wrapCSSValue(_ptr.getPropertyCSSValue(propertyName));
@@ -160,7 +160,7 @@ class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
_ptr.setProperty(propertyName, value, priority);
}
- String get typeName() { return "CSSStyleDeclaration"; }
+ String get typeName => "CSSStyleDeclaration";
""".lstrip() % SOURCE_PATH)
@@ -182,7 +182,7 @@ class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
interface_lines.append(comment % 'Gets')
interface_lines.append("""
- String get %s();
+ String get %s;
""" % camel_case_name)
@@ -195,7 +195,7 @@ class CSSStyleDeclarationWrappingImplementation extends DOMWrapperBase implement
class_lines.append('\n');
class_lines.append(comment % 'Gets')
class_lines.append("""
- String get %s() =>
+ String get %s =>
getPropertyValue('%s');
""" % (camel_case_name, css_name))
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698