aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/trace.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-03-27 00:05:03 -0400
committerGitHub <noreply@github.com>2019-03-27 00:05:03 -0400
commit3c27dc993d3f1ffe61b09de32ce6f8fdfeb1df39 (patch)
tree78f3e26e10c364d6cfd8ca9c26e49c0bb769fea3 /components/script/dom/bindings/trace.rs
parent2684499d2fc359ce609318bec24503306a151219 (diff)
parent2e628055786cd5d1d17cf739aea689f16e7a0d27 (diff)
downloadservo-3c27dc993d3f1ffe61b09de32ce6f8fdfeb1df39.tar.gz
servo-3c27dc993d3f1ffe61b09de32ce6f8fdfeb1df39.zip
Auto merge of #23097 - Manishearth:transforms, r=asajeffrey
Properly support transforms in WebXR Still need to test this There are also a bunch of fixmes that I should get to in this PR. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23097) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r--components/script/dom/bindings/trace.rs48
1 files changed, 5 insertions, 43 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 181bae0a3f9..6d704ef7cb7 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -56,7 +56,9 @@ use cssparser::RGBA;
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
use encoding_rs::{Decoder, Encoding};
use euclid::Length as EuclidLength;
-use euclid::{Point2D, Rect, Transform2D, Transform3D, TypedScale, TypedSize2D, Vector2D};
+use euclid::{
+ Point2D, Rect, Rotation3D, Transform2D, Transform3D, TypedScale, TypedSize2D, Vector2D,
+};
use html5ever::buffer_queue::BufferQueue;
use html5ever::{LocalName, Namespace, Prefix, QualName};
use http::header::HeaderMap;
@@ -491,6 +493,8 @@ unsafe_no_jsmanaged_fields!(RenderApiSender);
unsafe_no_jsmanaged_fields!(ResourceFetchTiming);
unsafe_no_jsmanaged_fields!(Timespec);
unsafe_no_jsmanaged_fields!(HTMLMediaElementFetchContext);
+unsafe_no_jsmanaged_fields!(Rotation3D<f64>, Transform2D<f32>, Transform3D<f64>);
+unsafe_no_jsmanaged_fields!(Point2D<f32>, Vector2D<f32>, Rect<Au>, Rect<f32>);
unsafe impl<'a> JSTraceable for &'a str {
#[inline]
@@ -582,27 +586,6 @@ where
}
}
-unsafe impl JSTraceable for Transform2D<f32> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
-unsafe impl JSTraceable for Transform3D<f64> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
-unsafe impl JSTraceable for Point2D<f32> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
unsafe impl<T, U> JSTraceable for TypedScale<f32, T, U> {
#[inline]
unsafe fn trace(&self, _trc: *mut JSTracer) {
@@ -610,13 +593,6 @@ unsafe impl<T, U> JSTraceable for TypedScale<f32, T, U> {
}
}
-unsafe impl JSTraceable for Vector2D<f32> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
unsafe impl<T> JSTraceable for EuclidLength<u64, T> {
#[inline]
unsafe fn trace(&self, _trc: *mut JSTracer) {
@@ -624,20 +600,6 @@ unsafe impl<T> JSTraceable for EuclidLength<u64, T> {
}
}
-unsafe impl JSTraceable for Rect<Au> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
-unsafe impl JSTraceable for Rect<f32> {
- #[inline]
- unsafe fn trace(&self, _trc: *mut JSTracer) {
- // Do nothing
- }
-}
-
unsafe impl<U> JSTraceable for TypedSize2D<i32, U> {
#[inline]
unsafe fn trace(&self, _trc: *mut JSTracer) {