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

Unified Diff: runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 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
Index: runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart
diff --git a/runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart b/runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart
index d5ba83d7414d65ad3cc73d6c2517be534cb1eb2d..b0f280a12b7b066c5de8e60cd543d69337f37514 100644
--- a/runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart
+++ b/runtime/observatory/lib/src/elements/helpers/rendering_scheduler.dart
@@ -16,6 +16,7 @@ abstract class Renderable {
class RenderedEvent<T> {
/// Renderable to which the event is related
final T element;
+
/// Is another rendering scheduled for this element.
final bool otherRenderScheduled;
@@ -31,12 +32,16 @@ class RenderingScheduler<T extends Renderable> implements RenderingTask {
bool _dirty = false;
bool _renderingScheduled = false;
bool _notificationScheduled = false;
+
/// Element managed by this scheduler.
final T element;
+
/// Queue used for rendering operations.
final RenderingQueue queue;
+
/// Does the element need a new rendering cycle.
bool get isDirty => _dirty;
+
/// Is the scheduler enabled.
bool get isEnabled => _enabled;
@@ -48,7 +53,9 @@ class RenderingScheduler<T extends Renderable> implements RenderingTask {
/// If no queue is provided it will create a new default configured queue.
factory RenderingScheduler(T element, {RenderingQueue queue}) {
assert(element != null);
- if (queue == null) { queue = new RenderingQueue(); }
+ if (queue == null) {
+ queue = new RenderingQueue();
+ }
return new RenderingScheduler<T>._(element, queue);
}
@@ -83,8 +90,10 @@ class RenderingScheduler<T extends Renderable> implements RenderingTask {
/// If value changes a new rendering is scheduled.
/// set attr(T v) => _attr = _r.checkAndReact(_attr, v);
dynamic checkAndReact(dynamic oldValue, dynamic newValue) {
- if (oldValue != newValue) dirty();
- else scheduleNotification();
+ if (oldValue != newValue)
+ dirty();
+ else
+ scheduleNotification();
return newValue;
}
« no previous file with comments | « runtime/observatory/lib/src/elements/helpers/nav_menu.dart ('k') | runtime/observatory/lib/src/elements/helpers/tag.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698