Add DOMQuad element

This commit is contained in:
Guillaume Gomez 2015-12-08 00:40:31 +01:00 committed by ggomez
parent 338f66003e
commit 823e1b96c3
8 changed files with 178 additions and 119 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointMethods, Wrap};
use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods, Wrap};
use dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;
use dom::bindings::error::Fallible;
use dom::bindings::global::GlobalRef;
@ -35,6 +35,10 @@ impl DOMPoint {
-> Fallible<Root<DOMPoint>> {
Ok(DOMPoint::new(global, x, y, z, w))
}
pub fn new_from_init(global: GlobalRef, p: &DOMPointInit) -> Root<DOMPoint> {
DOMPoint::new(global, p.x, p.y, p.z, p.w)
}
}
impl DOMPointMethods for DOMPoint {