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

Unified Diff: tools/dom/src/dartium_CustomElementSupport.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 years, 8 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/dom/src/dartium_CssClassSet.dart ('k') | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dartium_CustomElementSupport.dart
diff --git a/tools/dom/src/dartium_CustomElementSupport.dart b/tools/dom/src/dartium_CustomElementSupport.dart
index c957145bae339af04774198e472440e238d2e49b..630d1e38c28231645d8a8adf47b23fcfe61fec9e 100644
--- a/tools/dom/src/dartium_CustomElementSupport.dart
+++ b/tools/dom/src/dartium_CustomElementSupport.dart
@@ -10,15 +10,14 @@ class _VMElementUpgrader implements ElementUpgrader {
final Type _nativeType;
final String _extendsTag;
- _VMElementUpgrader(Document document, Type type, String extendsTag) :
- _type = type,
- _extendsTag = extendsTag,
- _nativeType = _validateCustomType(type).reflectedType {
-
+ _VMElementUpgrader(Document document, Type type, String extendsTag)
+ : _type = type,
+ _extendsTag = extendsTag,
+ _nativeType = _validateCustomType(type).reflectedType {
if (extendsTag == null) {
if (_nativeType != HtmlElement) {
throw new UnsupportedError('Class must provide extendsTag if base '
- 'native class is not HtmlElement');
+ 'native class is not HtmlElement');
}
} else {
if (document.createElement(extendsTag).runtimeType != _nativeType) {
@@ -78,7 +77,7 @@ ClassMirror _validateCustomType(Type type) {
cls != null && cls.qualifiedName == elementName;
ClassMirror superClass = cls.superclass;
ClassMirror nativeClass = _isBuiltinType(superClass) ? superClass : null;
- while(!isRoot(superClass) && !isElement(superClass)) {
+ while (!isRoot(superClass) && !isElement(superClass)) {
superClass = superClass.superclass;
if (nativeClass == null && _isBuiltinType(superClass)) {
nativeClass = superClass;
@@ -87,7 +86,6 @@ ClassMirror _validateCustomType(Type type) {
return nativeClass;
}
-
bool _isBuiltinType(ClassMirror cls) {
// TODO(vsm): Find a less hackish way to do this.
LibraryMirror lib = cls.owner;
« no previous file with comments | « tools/dom/src/dartium_CssClassSet.dart ('k') | tools/dom/src/dartium_KeyEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698