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 6b846f020420176217d48266485e2b3b59bfb01a..12ad45fc3aa5640b066e430c99d7af69ae925001 100644 |
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate |
@@ -217,8 +217,46 @@ $endif |
} |
/** |
- * convertPointFromNodeToPage and convertPointFromPageToNode are removed. |
- * see http://dev.w3.org/csswg/cssom-view/#geometry |
+ * Converts a point from node coordinates to this window's coordinates. |
+ * |
+ * ## Other resources |
+ * |
+ * * [webkitConvertPointFromPageToNode] |
+ * (https://developer.apple.com/library/safari/documentation/DataManagement/Reference/DOMWindowAdditionsReference/DOMWindowAdditions/DOMWindowAdditions.html#//apple_ref/javascript/instm/DOMWindow/webkitConvertPointFromNodeToPage) |
+ * from Safari Development Library. |
+ */ |
+ @DomName('Window.convertPointFromNodeToPage') |
+ @SupportedBrowser(SupportedBrowser.CHROME) |
+ @SupportedBrowser(SupportedBrowser.SAFARI) |
+ @Experimental() |
+ Point convertPointFromNodeToPage(Node node, Point point) { |
+ var result = _convertPointFromNodeToPage(node, |
+ new _DomPoint(point.x, point.y)); |
+ return new Point(result.x, result.y); |
+ } |
+ |
+ /** |
+ * Converts a point from this window's coordinates to node coordinates. |
+ * |
+ * ## Other resources |
+ * |
+ * * [webkitConvertPointFromPageToNode] |
+ * (https://developer.apple.com/library/safari/documentation/DataManagement/Reference/DOMWindowAdditionsReference/DOMWindowAdditions/DOMWindowAdditions.html#//apple_ref/javascript/instm/DOMWindow/webkitConvertPointFromPageToNode) |
+ * from Safari Development Library. |
+ */ |
+ @DomName('Window.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 |