Added framebuffer and related attributes to XRWebGLLayer

This commit is contained in:
Alan Jeffrey 2019-07-17 18:09:15 -05:00
parent dc1da02aa4
commit aa0a72df0f
10 changed files with 158 additions and 46 deletions

View file

@ -84,6 +84,8 @@ pub enum Error {
InvalidModification,
/// NotReadableError DOMException
NotReadable,
/// OperationError DOMException
Operation,
/// TypeError JavaScript Error
Type(String),
@ -136,6 +138,7 @@ pub unsafe fn throw_dom_exception(cx: *mut JSContext, global: &GlobalScope, resu
Error::TypeMismatch => DOMErrorName::TypeMismatchError,
Error::InvalidModification => DOMErrorName::InvalidModificationError,
Error::NotReadable => DOMErrorName::NotReadableError,
Error::Operation => DOMErrorName::OperationError,
Error::Type(message) => {
assert!(!JS_IsExceptionPending(cx));
throw_type_error(cx, &message);

View file

@ -57,8 +57,8 @@ use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
use encoding_rs::{Decoder, Encoding};
use euclid::Length as EuclidLength;
use euclid::{
Point2D, Rect, RigidTransform3D, Rotation3D, Transform2D, Transform3D, TypedRigidTransform3D,
TypedScale, TypedSize2D, Vector2D,
Point2D, Rect, RigidTransform3D, Rotation3D, Transform2D, Transform3D, TypedRect,
TypedRigidTransform3D, TypedScale, TypedSize2D, Vector2D,
};
use html5ever::buffer_queue::BufferQueue;
use html5ever::{LocalName, Namespace, Prefix, QualName};
@ -647,6 +647,13 @@ unsafe impl<U> JSTraceable for TypedSize2D<u32, U> {
}
}
unsafe impl<U> JSTraceable for TypedRect<i32, U> {
#[inline]
unsafe fn trace(&self, _trc: *mut JSTracer) {
// Do nothing
}
}
unsafe impl JSTraceable for StyleLocked<FontFaceRule> {
unsafe fn trace(&self, _trc: *mut JSTracer) {
// Do nothing.