Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, 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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $if DART2JS | 7 $if DART2JS |
| 8 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { | 8 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { |
| 9 $else | 9 $else |
| 10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 10 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 $else | 218 $else |
| 219 /// Checks if _setImmediate is supported. | 219 /// Checks if _setImmediate is supported. |
| 220 static bool get _supportsSetImmediate => false; | 220 static bool get _supportsSetImmediate => false; |
| 221 | 221 |
| 222 /// Dartium stub for IE's setImmediate. | 222 /// Dartium stub for IE's setImmediate. |
| 223 void _setImmediate(void callback()) { | 223 void _setImmediate(void callback()) { |
| 224 throw new UnsupportedError('setImmediate is not supported'); | 224 throw new UnsupportedError('setImmediate is not supported'); |
| 225 } | 225 } |
| 226 $endif | 226 $endif |
| 227 | 227 |
| 228 @DomName('DOMWindow.convertPointFromNodeToPage') | |
| 229 @SupportedBrowser(SupportedBrowser.CHROME) | |
| 230 @SupportedBrowser(SupportedBrowser.SAFARI) | |
| 231 @Experimental | |
| 232 Point convertPointFromNodeToPage(Node node, Point point) { | |
| 233 var result = _convertPointFromNodeToPage(node, | |
| 234 new _DomPoint(point.x, point.y)); | |
|
Jacob
2013/03/21 23:11:51
I think the JavaScript API for this was supposed t
blois
2013/04/02 20:25:30
Can we guarantee that the fields x & y will not be
Jacob
2013/04/02 23:57:13
I doubt we can.
On 2013/04/02 20:25:30, blois wr
| |
| 235 return new Point(result.x, result.y); | |
|
Jacob
2013/03/21 23:11:51
why not just make _DomPoint implement Point so thi
blois
2013/04/02 20:25:30
That seems like a heavier solution than necessary
Jacob
2013/04/02 23:57:13
Why not make both cases consistent?
On 2013/04/02
blois
2013/04/05 18:03:07
Had a good discussion with Stephen on this, would
| |
| 236 } | |
| 237 | |
| 238 @DomName('DOMWindow.convertPointFromPageToNode') | |
| 239 @SupportedBrowser(SupportedBrowser.CHROME) | |
| 240 @SupportedBrowser(SupportedBrowser.SAFARI) | |
| 241 @Experimental | |
| 242 Point convertPointFromPageToNode(Node node, Point point) { | |
| 243 var result = _convertPointFromPageToNode(node, | |
| 244 new _DomPoint(point.x, point.y)); | |
| 245 return new Point(result.x, result.y); | |
| 246 } | |
| 247 | |
| 248 /** | |
| 249 * Checks whether [convertPointFromNodeToPage] and | |
| 250 * [convertPointFromPageToNode] are supported on the current platform. | |
| 251 */ | |
| 252 static bool get supportsPointConversions => _DomPoint.supported; | |
| 228 $!MEMBERS | 253 $!MEMBERS |
| 229 } | 254 } |
| OLD | NEW |