mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement DOMPoint.fromPoint
This commit is contained in:
parent
5f477707a1
commit
40dbb2c100
19 changed files with 30 additions and 133 deletions
|
@ -2,6 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::{
|
||||
DOMPointReadOnlyMethods, Wrap,
|
||||
};
|
||||
|
@ -50,6 +51,11 @@ impl DOMPointReadOnly {
|
|||
) -> Fallible<DomRoot<DOMPointReadOnly>> {
|
||||
Ok(DOMPointReadOnly::new(global, x, y, z, w))
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dom-dompointreadonly-frompoint
|
||||
pub fn FromPoint(global: &GlobalScope, init: &DOMPointInit) -> DomRoot<Self> {
|
||||
Self::new(global, init.x, init.y, init.z, init.w)
|
||||
}
|
||||
}
|
||||
|
||||
impl DOMPointReadOnlyMethods for DOMPointReadOnly {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue