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

Side by Side Diff: test/performance/perf.dart

Issue 14295009: Fix widget.dart to work with the latest web_ui library. Specifically, query selectors need to use "… (Closed) Base URL: https://github.com/kevmoo/widget.dart.git@master
Patch Set: ptal Created 7 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 unified diff | Download patch
« no previous file with comments | « test/effects/swapper_tests.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import 'dart:async'; 1 import 'dart:async';
2 import 'dart:html'; 2 import 'dart:html';
3 import 'package:widget/effects.dart'; 3 import 'package:widget/effects.dart';
4 4
5 void main() { 5 void main() {
6 6
7 _initialize(); 7 _initialize();
8 query('#do-swap').onClick.listen(_doSwap); 8 query('#do-swap').onClick.listen(_doSwap);
9 9
10 } 10 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 final newActive = _contentElementField.children[index]; 61 final newActive = _contentElementField.children[index];
62 return showItem(newActive, effect: effect, duration: duration, effectTiming: e ffectTiming, hideEffect: hideEffect); 62 return showItem(newActive, effect: effect, duration: duration, effectTiming: e ffectTiming, hideEffect: hideEffect);
63 } 63 }
64 64
65 Future<bool> showItem(Element item, {ShowHideEffect effect, int duration, Effect Timing effectTiming, ShowHideEffect hideEffect}) { 65 Future<bool> showItem(Element item, {ShowHideEffect effect, int duration, Effect Timing effectTiming, ShowHideEffect hideEffect}) {
66 assert(_contentElementField.children.contains(item)); 66 assert(_contentElementField.children.contains(item));
67 67
68 final oldActiveChild = _activeItem; 68 final oldActiveChild = _activeItem;
69 if(oldActiveChild == item) { 69 if(oldActiveChild == item) {
70 return new Future<bool>.immediate(true); 70 return new Future<bool>.value(true);
71 } 71 }
72 72
73 [oldActiveChild, item].forEach((e) => e.classes.remove(_dirClassPrev)); 73 [oldActiveChild, item].forEach((e) => e.classes.remove(_dirClassPrev));
74 74
75 oldActiveChild.classes.remove(_activeClass); 75 oldActiveChild.classes.remove(_activeClass);
76 oldActiveChild.classes.add(_dirClassPrev); 76 oldActiveChild.classes.add(_dirClassPrev);
77 77
78 item.classes.add(_activeClass); 78 item.classes.add(_activeClass);
79 79
80 return Swapper.swap(_contentElementField, item, effect: effect, duration: dura tion, effectTiming: effectTiming, hideEffect: hideEffect) 80 return Swapper.swap(_contentElementField, item, effect: effect, duration: dura tion, effectTiming: effectTiming, hideEffect: hideEffect)
(...skipping 26 matching lines...) Expand all
107 107
108 // A bit of a hack. Because we call Swap w/ two displayed items: 108 // A bit of a hack. Because we call Swap w/ two displayed items:
109 // one marked 'prev' and one marked 'next', Swap tries to hide one of them 109 // one marked 'prev' and one marked 'next', Swap tries to hide one of them
110 // this only causes a problem when clicking right the first time, since all 110 // this only causes a problem when clicking right the first time, since all
111 // times after, the cached ShowHideState of the item is set 111 // times after, the cached ShowHideState of the item is set
112 // So...we're going to walk the showHide states of all children now 112 // So...we're going to walk the showHide states of all children now
113 // ...and ignore the result...but just to populate the values 113 // ...and ignore the result...but just to populate the values
114 theItems.forEach((f) => ShowHide.getState(f)); 114 theItems.forEach((f) => ShowHide.getState(f));
115 } 115 }
116 } 116 }
OLDNEW
« no previous file with comments | « test/effects/swapper_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698