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

Unified Diff: runtime/observatory/lib/src/elements/nav/menu_item.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
Index: runtime/observatory/lib/src/elements/nav/menu_item.dart
diff --git a/runtime/observatory/lib/src/elements/nav/menu_item.dart b/runtime/observatory/lib/src/elements/nav/menu_item.dart
index fd89f7e6419a75c3eb0d7a460a3d64879e141b38..27d9722aa8ed0faea1fd09c3cf2acbfcb46d6e5a 100644
--- a/runtime/observatory/lib/src/elements/nav/menu_item.dart
+++ b/runtime/observatory/lib/src/elements/nav/menu_item.dart
@@ -57,22 +57,8 @@ class NavMenuItemElement extends HtmlElement implements Renderable {
String _link;
String get label => _label;
String get link => _link;
- set label(String value) {
- if (_label != value) {
- _label = value;
- _r.dirty();
- } else {
- _r.scheduleNotification();
- }
- }
- set link(String value) {
- if (_link != value) {
- _link = value;
- _r.dirty();
- } else {
- _r.scheduleNotification();
- }
- }
+ set label(String value) => _label = _r.checkAndReact(_label, value);
+ set link(String value) => _link = _r.checkAndReact(_link, value);
factory NavMenuItemElement(String label, {String link,
« no previous file with comments | « runtime/observatory/lib/src/elements/nav/menu.dart ('k') | runtime/observatory/lib/src/elements/nav/refresh.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698