diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-08-04 09:55:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 09:55:05 -0400 |
commit | 286793c2d2dd7e9aeac974744ec757f65136c8fb (patch) | |
tree | 967f1c8fbe048b617cb3a6c3d298e555a1a93823 /components/script/dom/webidls/XRLayer.webidl | |
parent | 8bf3440380162832d5989ef8010e6483e1c0778d (diff) | |
parent | 9e55c87f6350eea1dc0d0d50c090b5b66ffd78a1 (diff) | |
download | servo-286793c2d2dd7e9aeac974744ec757f65136c8fb.tar.gz servo-286793c2d2dd7e9aeac974744ec757f65136c8fb.zip |
Auto merge of #27487 - asajeffrey:webxr-update-webidl, r=Manishearth,jdm
WebXR Layers update WebIDL
<!-- Please describe your changes on the following line: -->
Updates the WebXR Layers WebIDL. Implements the "update the pending layers state" algorithm from the layer spec.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are updated tests for these changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/webidls/XRLayer.webidl')
-rw-r--r-- | components/script/dom/webidls/XRLayer.webidl | 71 |
1 files changed, 43 insertions, 28 deletions
diff --git a/components/script/dom/webidls/XRLayer.webidl b/components/script/dom/webidls/XRLayer.webidl index d78e220b5f5..60e314316dd 100644 --- a/components/script/dom/webidls/XRLayer.webidl +++ b/components/script/dom/webidls/XRLayer.webidl @@ -2,59 +2,74 @@ * 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/. */ -// https://immersive-web.github.io/layers/#xrlayertype -[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] -interface XRLayer { -// attribute boolean blendTextureSourceAlpha; -// attribute boolean chromaticAberrationCorrection; +// https://immersive-web.github.io/webxr/#xrlayer +[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] +interface XRLayer : EventTarget {}; - void destroy(); -}; -// // TODO: Implement the layer types // -// [SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] -// interface XRProjectionLayer : XRLayer { +// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] +// interface XRCompositionLayer : XRLayer { +// readonly attribute XRLayerLayout layout; +// +// attribute boolean blendTextureSourceAlpha; +// attribute boolean? chromaticAberrationCorrection; +// attribute float? fixedFoveation; +// +// readonly attribute boolean needsRedraw; +// +// void destroy(); +// }; +// +// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] +// interface XRProjectionLayer : XRCompositionLayer { // readonly attribute boolean ignoreDepthValues; // }; // // [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] -// interface XRQuadLayer : XRLayer { -// readonly attribute XRLayerLayout layout; +// interface XRQuadLayer : XRCompositionLayer { +// attribute XRSpace space; // attribute XRRigidTransform transform; // // attribute float width; // attribute float height; +// +// // Events +// attribute EventHandler onredraw; // }; // // [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] -// interface XRCylinderLayer : XRLayer { -// readonly attribute XRLayerLayout layout; -// attribute XRReferenceSpace referenceSpace; -// +// interface XRCylinderLayer : XRCompositionLayer { +// attribute XRSpace space; // attribute XRRigidTransform transform; +// // attribute float radius; // attribute float centralAngle; // attribute float aspectRatio; +// +// // Events +// attribute EventHandler onredraw; // }; // // [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] -// interface XREquirectLayer : XRLayer { -// readonly attribute XRLayerLayout layout; -// attribute XRReferenceSpace referenceSpace; -// +// interface XREquirectLayer : XRCompositionLayer { +// attribute XRSpace space; // attribute XRRigidTransform transform; +// // attribute float radius; -// attribute float scaleX; -// attribute float scaleY; -// attribute float biasX; -// attribute float biasY; +// attribute float centralHorizontalAngle; +// attribute float upperVerticalAngle; +// attribute float lowerVerticalAngle; +// +// // Events +// attribute EventHandler onredraw; // }; // // [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"] -// interface XRCubeLayer : XRLayer { -// readonly attribute XRLayerLayout layout; -// attribute XRReferenceSpace referenceSpace; +// interface XRCubeLayer : XRCompositionLayer { +// attribute XRSpace space; +// attribute DOMPointReadOnly orientation; // -// attribute DOMPoint orientation; +// // Events +// attribute EventHandler onredraw; // }; |