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

Unified Diff: runtime/observatory/lib/src/elements/nav/refresh.dart

Issue 2159273004: Added helper function to automatically dirty a RenderingScheduler on attribute change (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added comments to new helper method Created 4 years, 5 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 | « runtime/observatory/lib/src/elements/nav/menu_item.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/nav/refresh.dart
diff --git a/runtime/observatory/lib/src/elements/nav/refresh.dart b/runtime/observatory/lib/src/elements/nav/refresh.dart
index 5e5079887622c1abe8a79e8e76d3360414fdeba1..795c7bd18e78ef26b02eba026f4c2244c93487d1 100644
--- a/runtime/observatory/lib/src/elements/nav/refresh.dart
+++ b/runtime/observatory/lib/src/elements/nav/refresh.dart
@@ -27,23 +27,8 @@ class NavRefreshElement extends HtmlElement implements Renderable {
String _label;
bool get disabled => _disabled;
String get label => _label;
- set disabled(bool value) {
- if (_disabled != value) {
- _disabled = value;
- _r.dirty();
- } else {
- _r.scheduleNotification();
- }
- }
- set label(String value) {
- if (_label != value) {
- _label = value;
- _r.dirty();
- } else {
- _r.scheduleNotification();
- }
- }
-
+ set disabled(bool value) => _disabled = _r.checkAndReact(_disabled, value);
+ set label(String value) => _label = _r.checkAndReact(_label, value);
factory NavRefreshElement({String label: 'Refresh', bool disabled: false,
RenderingQueue queue}) {
« no previous file with comments | « runtime/observatory/lib/src/elements/nav/menu_item.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698