aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/dompoint.rs
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2019-07-05 11:03:34 +0900
committerKagami Sascha Rosylight <saschanaz@outlook.com>2019-07-06 01:15:24 +0900
commit40dbb2c1008f9629e6794d980fdc9374a8bbbb59 (patch)
treee23771068af5ff278fb7e5594b27d43be66f88cb /components/script/dom/dompoint.rs
parent5f477707a1ec863aea7868299b960e86582382bc (diff)
downloadservo-40dbb2c1008f9629e6794d980fdc9374a8bbbb59.tar.gz
servo-40dbb2c1008f9629e6794d980fdc9374a8bbbb59.zip
Implement DOMPoint.fromPoint
Diffstat (limited to 'components/script/dom/dompoint.rs')
-rw-r--r--components/script/dom/dompoint.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/dompoint.rs b/components/script/dom/dompoint.rs
index 654e6dda3d8..6a89249342d 100644
--- a/components/script/dom/dompoint.rs
+++ b/components/script/dom/dompoint.rs
@@ -40,6 +40,11 @@ impl DOMPoint {
Ok(DOMPoint::new(global, x, y, z, w))
}
+ // https://drafts.fxtf.org/geometry/#dom-dompoint-frompoint
+ pub fn FromPoint(global: &GlobalScope, init: &DOMPointInit) -> DomRoot<Self> {
+ Self::new_from_init(global, init)
+ }
+
pub fn new_from_init(global: &GlobalScope, p: &DOMPointInit) -> DomRoot<DOMPoint> {
DOMPoint::new(global, p.x, p.y, p.z, p.w)
}