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

Unified Diff: samples-dev/swarm/swarm_ui_lib/view/view.dart

Issue 2828603002: Format samples and samples-dev directories. (Closed)
Patch Set: 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 | « samples-dev/swarm/swarm_ui_lib/view/SliderMenu.dart ('k') | samples-dev/swarm/test/swarm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples-dev/swarm/swarm_ui_lib/view/view.dart
diff --git a/samples-dev/swarm/swarm_ui_lib/view/view.dart b/samples-dev/swarm/swarm_ui_lib/view/view.dart
index ee3d33a72a16d307b68f6da69d44a7004c5e341b..b84981d1068b11e3fe869b257cf840f5b5b9ea2c 100644
--- a/samples-dev/swarm/swarm_ui_lib/view/view.dart
+++ b/samples-dev/swarm/swarm_ui_lib/view/view.dart
@@ -19,7 +19,6 @@ part 'MeasureText.dart';
part 'PagedViews.dart';
part 'SliderMenu.dart';
-
// TODO(rnystrom): Note! This class is undergoing heavy construction. It will
// temporary support both some old and some new ways of doing things until all
// subclasses are refactored to use the new way. There will be some scaffolding
@@ -43,15 +42,13 @@ class View implements Positionable {
// object instead, and integrating with built in CSS properties.
final Map<String, String> customStyle;
- View()
- : customStyle = new Map<String, String>();
+ View() : customStyle = new Map<String, String>();
- View.fromNode(Element this._node)
- : customStyle = new Map<String, String>();
+ View.fromNode(Element this._node) : customStyle = new Map<String, String>();
View.html(String html)
- : customStyle = new Map<String, String>(),
- _node = new Element.html(html);
+ : customStyle = new Map<String, String>(),
+ _node = new Element.html(html);
// TODO(rnystrom): Get rid of this when all views are refactored to not use
// it.
@@ -111,9 +108,9 @@ class View implements Positionable {
* document or not.
*/
bool get isInDocument {
- return _node != null
- && node.ownerDocument is HtmlDocument
- && (node.ownerDocument as HtmlDocument).body.contains(node);
+ return _node != null &&
+ node.ownerDocument is HtmlDocument &&
+ (node.ownerDocument as HtmlDocument).body.contains(node);
}
/**
@@ -142,7 +139,9 @@ class View implements Positionable {
* Override this to generate the DOM structure for the view.
*/
// TODO(rnystrom): make this method abstract, see b/5015671
- Element render() { throw 'abstract'; }
+ Element render() {
+ throw 'abstract';
+ }
/**
* Override this to perform initialization behavior that requires access to
@@ -310,7 +309,6 @@ class View implements Positionable {
_resizeSubscription = window.onResize.listen(handler);
}
-
// Trigger the initial layout.
doLayout();
}
@@ -358,8 +356,8 @@ class View implements Positionable {
// TODO(10459): code should not use Completer.sync.
Completer sizeCompleter = new Completer<Size>.sync();
scheduleMicrotask(() {
- sizeCompleter.complete(
- new Size(_node.client.width, _node.client.height));
+ sizeCompleter
+ .complete(new Size(_node.client.width, _node.client.height));
});
layout.measureLayout(sizeCompleter.future, changed);
} else {
« no previous file with comments | « samples-dev/swarm/swarm_ui_lib/view/SliderMenu.dart ('k') | samples-dev/swarm/test/swarm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698