| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // TODO(jacobr): define a base class containing the overlap between | 5 // TODO(jacobr): define a base class containing the overlap between |
| 6 // this class and ElementEvents. | 6 // this class and ElementEvents. |
| 7 class WindowEventsImplementation extends EventsImplementation | 7 class WindowEventsImplementation extends EventsImplementation |
| 8 implements WindowEvents { | 8 implements WindowEvents { |
| 9 WindowEventsImplementation._wrap(_ptr) : super._wrap(_ptr); | 9 WindowEventsImplementation._wrap(_ptr) : super._wrap(_ptr); |
| 10 | 10 |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 if (p === null) { | 826 if (p === null) { |
| 827 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom
.unwrap(node))); | 827 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom
.unwrap(node))); |
| 828 } else { | 828 } else { |
| 829 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom
.unwrap(node), LevelDom.unwrap(p))); | 829 return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode(LevelDom
.unwrap(node), LevelDom.unwrap(p))); |
| 830 } | 830 } |
| 831 } | 831 } |
| 832 throw "Incorrect number or type of arguments"; | 832 throw "Incorrect number or type of arguments"; |
| 833 } | 833 } |
| 834 | 834 |
| 835 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element = null]) { | 835 int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Eleme
nt element = null]) { |
| 836 if (element === null) { | 836 return _ptr.webkitRequestAnimationFrame(callback, LevelDom.unwrap(element)); |
| 837 return _ptr.webkitRequestAnimationFrame(callback); | |
| 838 } else { | |
| 839 return _ptr.webkitRequestAnimationFrame( | |
| 840 callback, LevelDom.unwrap(element)); | |
| 841 } | |
| 842 } | 837 } |
| 843 | 838 |
| 844 void requestLayoutFrame(TimeoutHandler callback) { | 839 void requestLayoutFrame(TimeoutHandler callback) { |
| 845 _addMeasurementFrameCallback(callback); | 840 _addMeasurementFrameCallback(callback); |
| 846 } | 841 } |
| 847 | 842 |
| 848 WindowEvents get on() { | 843 WindowEvents get on() { |
| 849 if (_on === null) { | 844 if (_on === null) { |
| 850 _on = new WindowEventsImplementation._wrap(_ptr); | 845 _on = new WindowEventsImplementation._wrap(_ptr); |
| 851 } | 846 } |
| 852 return _on; | 847 return _on; |
| 853 } | 848 } |
| 854 } | 849 } |
| OLD | NEW |