| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 typedef void LayoutCallback(); |
| 6 typedef LayoutCallback MeasurementCallback(); |
| 7 |
| 5 interface WindowEvents extends Events { | 8 interface WindowEvents extends Events { |
| 6 EventListenerList get abort(); | 9 EventListenerList get abort(); |
| 7 EventListenerList get beforeUnload(); | 10 EventListenerList get beforeUnload(); |
| 8 EventListenerList get blur(); | 11 EventListenerList get blur(); |
| 9 EventListenerList get canPlay(); | 12 EventListenerList get canPlay(); |
| 10 EventListenerList get canPlayThrough(); | 13 EventListenerList get canPlayThrough(); |
| 11 EventListenerList get change(); | 14 EventListenerList get change(); |
| 12 EventListenerList get click(); | 15 EventListenerList get click(); |
| 13 EventListenerList get contextMenu(); | 16 EventListenerList get contextMenu(); |
| 14 EventListenerList get dblClick(); | 17 EventListenerList get dblClick(); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 int setInterval(TimeoutHandler handler, int timeout); | 297 int setInterval(TimeoutHandler handler, int timeout); |
| 295 | 298 |
| 296 int setTimeout(TimeoutHandler handler, int timeout); | 299 int setTimeout(TimeoutHandler handler, int timeout); |
| 297 | 300 |
| 298 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]); | 301 Object showModalDialog(String url, [Object dialogArgs, String featureArgs]); |
| 299 | 302 |
| 300 void stop(); | 303 void stop(); |
| 301 | 304 |
| 302 void webkitCancelRequestAnimationFrame(int id); | 305 void webkitCancelRequestAnimationFrame(int id); |
| 303 | 306 |
| 304 // TODO(jacobr): make these return Future<Point>. | |
| 305 Point webkitConvertPointFromNodeToPage([Node node, Point p]); | 307 Point webkitConvertPointFromNodeToPage([Node node, Point p]); |
| 306 | |
| 307 Point webkitConvertPointFromPageToNode([Node node, Point p]); | 308 Point webkitConvertPointFromPageToNode([Node node, Point p]); |
| 308 | 309 |
| 309 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element]); | 310 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element]); |
| 310 | 311 |
| 311 /** | 312 /** |
| 312 * Executes a [callback] after the next batch of browser layout measurements | 313 * Executes [callback] after the event loop unwinds but before the page is |
| 313 * has completed or would have completed if any browser layout measurements | 314 * rendered. Inside the callback, synchronous element measurement is |
| 314 * had been scheduled. | 315 * allowed and dom manipulation that could trigger a layout is disallowed. |
| 316 * The [callback] may return a closure that is run in the normal |
| 317 * context where dom manipulation is allowed but sync measurement is |
| 318 * disallowed. |
| 315 */ | 319 */ |
| 316 void requestLayoutFrame(TimeoutHandler callback); | 320 void requestMeasurementFrame(MeasurementCallback callback); |
| 321 |
| 322 /** |
| 323 * True iff within a call to [:requestMeasurementFrame:] |
| 324 * When inside a measurement frame, any DOM manipulation that could trigger |
| 325 * a layout is prohibited to avoid accidentally triggering large numbers of |
| 326 * layouts. |
| 327 */ |
| 328 bool get inMeasurementFrame(); |
| 317 | 329 |
| 318 // Window open(String url, String target, WindowSpec features); | 330 // Window open(String url, String target, WindowSpec features); |
| 319 | 331 |
| 320 WindowEvents get on(); | 332 WindowEvents get on(); |
| 321 } | 333 } |
| OLD | NEW |