mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
This commit is contained in:
parent
2ff7cb5a37
commit
3d57c22e9c
133 changed files with 686 additions and 596 deletions
|
@ -8,24 +8,24 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
|||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::TypedRect;
|
||||
use euclid::Rect;
|
||||
use webxr_api::Viewport;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRViewport {
|
||||
reflector_: Reflector,
|
||||
viewport: TypedRect<i32, Viewport>,
|
||||
viewport: Rect<i32, Viewport>,
|
||||
}
|
||||
|
||||
impl XRViewport {
|
||||
fn new_inherited(viewport: TypedRect<i32, Viewport>) -> XRViewport {
|
||||
fn new_inherited(viewport: Rect<i32, Viewport>) -> XRViewport {
|
||||
XRViewport {
|
||||
reflector_: Reflector::new(),
|
||||
viewport,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, viewport: TypedRect<i32, Viewport>) -> DomRoot<XRViewport> {
|
||||
pub fn new(global: &GlobalScope, viewport: Rect<i32, Viewport>) -> DomRoot<XRViewport> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRViewport::new_inherited(viewport)),
|
||||
global,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue