Chromium Code Reviews| Index: tools/dom/templates/html/impl/impl_Window.darttemplate |
| diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate |
| index d8d90d610417447acfb9a3423f784baee18a2522..be5ed459a147b6c66e2bc5b77532b100017ff1e5 100644 |
| --- a/tools/dom/templates/html/impl/impl_Window.darttemplate |
| +++ b/tools/dom/templates/html/impl/impl_Window.darttemplate |
| @@ -225,5 +225,30 @@ $else |
| } |
| $endif |
| + @DomName('DOMWindow.convertPointFromNodeToPage') |
| + @SupportedBrowser(SupportedBrowser.CHROME) |
| + @SupportedBrowser(SupportedBrowser.SAFARI) |
| + @Experimental |
| + Point convertPointFromNodeToPage(Node node, Point point) { |
| + var result = _convertPointFromNodeToPage(node, |
| + 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
|
| + 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
|
| + } |
| + |
| + @DomName('DOMWindow.convertPointFromPageToNode') |
| + @SupportedBrowser(SupportedBrowser.CHROME) |
| + @SupportedBrowser(SupportedBrowser.SAFARI) |
| + @Experimental |
| + Point convertPointFromPageToNode(Node node, Point point) { |
| + var result = _convertPointFromPageToNode(node, |
| + new _DomPoint(point.x, point.y)); |
| + return new Point(result.x, result.y); |
| + } |
| + |
| + /** |
| + * Checks whether [convertPointFromNodeToPage] and |
| + * [convertPointFromPageToNode] are supported on the current platform. |
| + */ |
| + static bool get supportsPointConversions => _DomPoint.supported; |
| $!MEMBERS |
| } |