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

Side by Side Diff: sky/examples/fn/lib/fakesky.dart

Issue 1000863002: Fix errors in Sky detected by Dart analyzer (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: One more Created 5 years, 9 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 | « no previous file | sky/framework/animation/timer.dart » ('j') | 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 2
3 void assertHasParentNode(Node n) { assert(n.parentNode != null); } 3 void assertHasParentNode(Node n) { assert(n.parentNode != null); }
4 void assertHasParentNodes(List<Node> list) { 4 void assertHasParentNodes(List<Node> list) {
5 for (var n in list) { 5 for (var n in list) {
6 assertHasParentNode(n); 6 assertHasParentNode(n);
7 } 7 }
8 } 8 }
9 9
10 class Node { 10 class Node {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 Document(); 110 Document();
111 Element createElement(String tagName) { 111 Element createElement(String tagName) {
112 switch (tagName) { 112 switch (tagName) {
113 case 'img' : return new HTMLImageElement(); 113 case 'img' : return new HTMLImageElement();
114 default : return new Element(); 114 default : return new Element();
115 } 115 }
116 } 116 }
117 } 117 }
118 118
119 class HTMLImageElement extends Element { 119 class HTMLImageElement extends Element {
120 Image(); 120 HTMLImageElement();
121 String src; 121 String src;
122 Object style = {}; 122 Object style = {};
123 } 123 }
124 124
125 class Event {} 125 class Event {}
126 126
127 class PointerEvent extends Event {} 127 class PointerEvent extends Event {}
128 class GestureEvent extends Event {} 128 class GestureEvent extends Event {}
129 class WheelEvent extends Event {} 129 class WheelEvent extends Event {}
130 130
131 typedef EventListener(Event event); 131 typedef EventListener(Event event);
132 132
133 void _callRAF(Function fn) { 133 void _callRAF(Function fn) {
134 fn(new DateTime.now().millisecondsSinceEpoch.toDouble()); 134 fn(new DateTime.now().millisecondsSinceEpoch.toDouble());
135 } 135 }
136 136
137 class Window { 137 class Window {
138 int requestAnimationFrame(Function fn) { 138 int requestAnimationFrame(Function fn) {
139 new Timer(const Duration(milliseconds: 16), () { 139 new Timer(const Duration(milliseconds: 16), () {
140 _callRAF(fn); 140 _callRAF(fn);
141 }); 141 });
142 return 1;
142 } 143 }
143 144
144 void cancelAnimationFrame(int id) { 145 void cancelAnimationFrame(int id) {
145 } 146 }
146 } 147 }
147 148
148 Document document = new Document(); 149 Document document = new Document();
149 150
150 Window window = new Window(); 151 Window window = new Window();
151 152
152 class ClientRect { 153 class ClientRect {
153 double top 154 double top;
154 double right; 155 double right;
155 double bottomr; 156 double bottomr;
156 double left; 157 double left;
157 double width; 158 double width;
158 double height; 159 double height;
159 } 160 }
OLDNEW
« no previous file with comments | « no previous file | sky/framework/animation/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698