Changeset 262720 in webkit


Ignore:
Timestamp:
Jun 8, 2020 9:17:29 AM (4 years ago)
Author:
svillar@igalia.com
Message:

[WebXR] Add missing interfaces from the AR module
https://bugs.webkit.org/show_bug.cgi?id=212826

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Added expectations.

  • web-platform-tests/webxr/ar-module/idlharness.https.window-expected.txt: Added.
  • web-platform-tests/webxr/ar-module/xrDevice_isSessionSupported_immersive-ar.https-expected.txt: Added.
  • web-platform-tests/webxr/ar-module/xrDevice_requestSession_immersive-ar.https-expected.txt: Added.

Source/WebCore:

Added the XRInteractionMode partial interface from the WebXR AR module spec. This spec
https://immersive-web.github.io/webxr-ar-module/ expands the WebXR Device API with
functionality available in AR hardware.

Some WebXR wpt tests are now passing.

  • CMakeLists.txt: Added new files.
  • DerivedSources.make: Ditto.
  • Modules/webxr/WebXRSession.cpp:

(WebCore::WebXRSession::interactionMode const): Added.

  • Modules/webxr/WebXRSession.h: Added interactionMode attribute and getter;
  • Modules/webxr/WebXRSession.idl: Added interactionMode attribute;
  • Modules/webxr/XRInteractionMode.h: Added.
  • Modules/webxr/XRInteractionMode.idl: Added.
  • Sources.txt: Added new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.

LayoutTests:

  • platform/wpe/TestExpectations: Unskipped 3 tests which are passing now.
Location:
trunk
Files:
3 added
11 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r262716 r262720  
     12020-06-05  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [WebXR] Add missing interfaces from the AR module
     4        https://bugs.webkit.org/show_bug.cgi?id=212826
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * platform/wpe/TestExpectations: Unskipped 3 tests which are passing now.
     9
    1102020-06-03  Sergio Villar Senin  <svillar@igalia.com>
    211
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r262716 r262720  
     12020-06-05  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [WebXR] Add missing interfaces from the AR module
     4        https://bugs.webkit.org/show_bug.cgi?id=212826
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Added expectations.
     9
     10        * web-platform-tests/webxr/ar-module/idlharness.https.window-expected.txt: Added.
     11        * web-platform-tests/webxr/ar-module/xrDevice_isSessionSupported_immersive-ar.https-expected.txt: Added.
     12        * web-platform-tests/webxr/ar-module/xrDevice_requestSession_immersive-ar.https-expected.txt: Added.
     13
    1142020-06-01  Sergio Villar Senin  <svillar@igalia.com>
    215
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r262713 r262720  
    960960webkit.org/b/209859 [ Release ] imported/w3c/web-platform-tests/webxr/xrSession_requestAnimationFrame_callback_calls.https.html [ Pass ]
    961961webkit.org/b/209859 imported/w3c/web-platform-tests/webxr/xrSession_requestReferenceSpace.https.html [ Pass ]
     962webkit.org/b/209859 imported/w3c/web-platform-tests/webxr/ar-module/idlharness.https.window.html [ Pass ]
     963webkit.org/b/209859 imported/w3c/web-platform-tests/webxr/ar-module/xrDevice_isSessionSupported_immersive-ar.https.html [ Pass ]
     964webkit.org/b/209859 imported/w3c/web-platform-tests/webxr/ar-module/xrDevice_requestSession_immersive-ar.https.html [ Pass ]
    962965
    963966# Passing since r259532.
  • trunk/Source/WebCore/CMakeLists.txt

    r262695 r262720  
    12251225        Modules/webxr/XRInputSourceEvent.idl
    12261226        Modules/webxr/XRInputSourcesChangeEvent.idl
     1227        Modules/webxr/XRInteractionMode.idl
    12271228        Modules/webxr/XRReferenceSpaceEvent.idl
    12281229        Modules/webxr/XRReferenceSpaceType.idl
  • trunk/Source/WebCore/ChangeLog

    r262718 r262720  
     12020-06-05  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        [WebXR] Add missing interfaces from the AR module
     4        https://bugs.webkit.org/show_bug.cgi?id=212826
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Added the XRInteractionMode partial interface from the WebXR AR module spec. This spec
     9        https://immersive-web.github.io/webxr-ar-module/ expands the WebXR Device API with
     10        functionality available in AR hardware.
     11
     12        Some WebXR wpt tests are now passing.
     13
     14        * CMakeLists.txt: Added new files.
     15        * DerivedSources.make: Ditto.
     16        * Modules/webxr/WebXRSession.cpp:
     17        (WebCore::WebXRSession::interactionMode const): Added.
     18        * Modules/webxr/WebXRSession.h: Added interactionMode attribute and getter;
     19        * Modules/webxr/WebXRSession.idl: Added interactionMode attribute;
     20        * Modules/webxr/XRInteractionMode.h: Added.
     21        * Modules/webxr/XRInteractionMode.idl: Added.
     22        * Sources.txt: Added new files.
     23        * WebCore.xcodeproj/project.pbxproj: Ditto.
     24
    1252020-05-29  Sergio Villar Senin  <svillar@igalia.com>
    226
  • trunk/Source/WebCore/DerivedSources.make

    r262682 r262720  
    517517    $(WebCore)/Modules/webxr/XRInputSourceEvent.idl \
    518518    $(WebCore)/Modules/webxr/XRInputSourcesChangeEvent.idl \
     519    $(WebCore)/Modules/webxr/XRInteractionMode.idl \
    519520    $(WebCore)/Modules/webxr/XRReferenceSpaceEvent.idl \
    520521    $(WebCore)/Modules/webxr/XRReferenceSpaceType.idl \
  • trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp

    r262718 r262720  
    6767}
    6868
     69XRInteractionMode WebXRSession::interactionMode() const
     70{
     71    return m_interactionMode;
     72}
     73
    6974XRVisibilityState WebXRSession::visibilityState() const
    7075{
  • trunk/Source/WebCore/Modules/webxr/WebXRSession.h

    r262718 r262720  
    3737#include "XREnvironmentBlendMode.h"
    3838#include "XRFrameRequestCallback.h"
     39#include "XRInteractionMode.h"
    3940#include "XRReferenceSpaceType.h"
    4041#include "XRSessionMode.h"
     
    6566
    6667    XREnvironmentBlendMode environmentBlendMode() const;
     68    XRInteractionMode interactionMode() const;
    6769    XRVisibilityState visibilityState() const;
    6870    const WebXRRenderState& renderState() const;
     
    100102
    101103    XREnvironmentBlendMode m_environmentBlendMode;
     104    XRInteractionMode m_interactionMode;
    102105    XRVisibilityState m_visibilityState;
    103106    RefPtr<WebXRInputSourceArray> m_inputSources;
  • trunk/Source/WebCore/Modules/webxr/WebXRSession.idl

    r262718 r262720  
    3333] interface WebXRSession : EventTarget {
    3434    // Attributes
     35    readonly attribute XRInteractionMode interactionMode;
    3536    readonly attribute XREnvironmentBlendMode environmentBlendMode;
    3637    readonly attribute XRVisibilityState visibilityState;
  • trunk/Source/WebCore/Modules/webxr/XRInteractionMode.h

    r262719 r262720  
    2424 */
    2525
    26 [
    27     EnabledAtRuntime=WebXR,
    28     Conditional=WEBXR,
    29     ActiveDOMObject,
    30     SecureContext,
    31     Exposed=Window,
    32     InterfaceName=XRSession
    33 ] interface WebXRSession : EventTarget {
    34     // Attributes
    35     readonly attribute XREnvironmentBlendMode environmentBlendMode;
    36     readonly attribute XRVisibilityState visibilityState;
    37     [SameObject] readonly attribute WebXRRenderState renderState;
    38     [SameObject] readonly attribute WebXRInputSourceArray inputSources;
     26#pragma once
    3927
    40     // Methods
    41     void updateRenderState(optional XRRenderStateInit stateInit);
    42     [NewObject] Promise<WebXRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
     28#if ENABLE(WEBXR)
    4329
    44     unsigned long requestAnimationFrame(XRFrameRequestCallback callback);
    45     void cancelAnimationFrame(unsigned long handle);
     30namespace WebCore {
    4631
    47     Promise<void> end();
     32enum class XRInteractionMode {
     33    ScreenSpace,
     34    WorldSpace
     35};
    4836
    49     // Events
    50     attribute EventHandler onend;
    51     attribute EventHandler onselect;
    52     attribute EventHandler oninputsourceschange;
    53     attribute EventHandler onselectstart;
    54     attribute EventHandler onselectend;
    55     attribute EventHandler onsqueeze;
    56     attribute EventHandler onsqueezestart;
    57     attribute EventHandler onsqueezeend;
    58     attribute EventHandler onvisibilitychange;
    59 };
     37} // namespace WebCore
     38
     39#endif // ENABLE(WEBXR)
  • trunk/Source/WebCore/Modules/webxr/XRInteractionMode.idl

    r262719 r262720  
    2626[
    2727    EnabledAtRuntime=WebXR,
    28     Conditional=WEBXR,
    29     ActiveDOMObject,
    30     SecureContext,
    31     Exposed=Window,
    32     InterfaceName=XRSession
    33 ] interface WebXRSession : EventTarget {
    34     // Attributes
    35     readonly attribute XREnvironmentBlendMode environmentBlendMode;
    36     readonly attribute XRVisibilityState visibilityState;
    37     [SameObject] readonly attribute WebXRRenderState renderState;
    38     [SameObject] readonly attribute WebXRInputSourceArray inputSources;
    39 
    40     // Methods
    41     void updateRenderState(optional XRRenderStateInit stateInit);
    42     [NewObject] Promise<WebXRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type);
    43 
    44     unsigned long requestAnimationFrame(XRFrameRequestCallback callback);
    45     void cancelAnimationFrame(unsigned long handle);
    46 
    47     Promise<void> end();
    48 
    49     // Events
    50     attribute EventHandler onend;
    51     attribute EventHandler onselect;
    52     attribute EventHandler oninputsourceschange;
    53     attribute EventHandler onselectstart;
    54     attribute EventHandler onselectend;
    55     attribute EventHandler onsqueeze;
    56     attribute EventHandler onsqueezestart;
    57     attribute EventHandler onsqueezeend;
    58     attribute EventHandler onvisibilitychange;
     28    Conditional=WEBXR
     29] enum XRInteractionMode {
     30    "screen-space",
     31    "world-space"
    5932};
  • trunk/Source/WebCore/Sources.txt

    r262695 r262720  
    36103610JSWebXRInputSource.cpp
    36113611JSWebXRInputSourceArray.cpp
     3612JSXRInteractionMode.cpp
    36123613JSXRInputSourceEvent.cpp
    36133614JSXRInputSourcesChangeEvent.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r262710 r262720  
    47844784                E1284AE110447D4500EAEB52 /* PageTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E1284AE010447D4500EAEB52 /* PageTransitionEvent.h */; };
    47854785                E1284BB110449FFA00EAEB52 /* JSPageTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E1284BAF10449FFA00EAEB52 /* JSPageTransitionEvent.h */; };
     4786                E12A9F4A248A99E2003F06C8 /* XRInteractionMode.h in Headers */ = {isa = PBXBuildFile; fileRef = E12A9F48248A99E0003F06C8 /* XRInteractionMode.h */; };
    47864787                E12DE7181E4B74A600F9ACCF /* GridTrackSizingAlgorithm.h in Headers */ = {isa = PBXBuildFile; fileRef = E12DE7161E4B748700F9ACCF /* GridTrackSizingAlgorithm.h */; };
    47874788                E12EDB7B0B308A78002704B6 /* EventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = E12EDB7A0B308A78002704B6 /* EventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1519015191                E1284BAF10449FFA00EAEB52 /* JSPageTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPageTransitionEvent.h; sourceTree = "<group>"; };
    1519115192                E1284BB010449FFA00EAEB52 /* JSPageTransitionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPageTransitionEvent.cpp; sourceTree = "<group>"; };
     15193                E12A9F46248A99DF003F06C8 /* XRInteractionMode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XRInteractionMode.idl; sourceTree = "<group>"; };
     15194                E12A9F48248A99E0003F06C8 /* XRInteractionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XRInteractionMode.h; sourceTree = "<group>"; };
    1519215195                E12DE7151E4B748700F9ACCF /* GridTrackSizingAlgorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GridTrackSizingAlgorithm.cpp; sourceTree = "<group>"; };
    1519315196                E12DE7161E4B748700F9ACCF /* GridTrackSizingAlgorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridTrackSizingAlgorithm.h; sourceTree = "<group>"; };
     
    2753827541                                E1EE8AF92412B17000E794D6 /* XRInputSourcesChangeEvent.h */,
    2753927542                                E1EE8AE42412B17000E794D6 /* XRInputSourcesChangeEvent.idl */,
     27543                                E12A9F48248A99E0003F06C8 /* XRInteractionMode.h */,
     27544                                E12A9F46248A99DF003F06C8 /* XRInteractionMode.idl */,
    2754027545                                E1EE8B162412B17000E794D6 /* XRPose.idl */,
    2754127546                                E1EE8AF62412B17000E794D6 /* XRReferenceSpace.idl */,
     
    3389833903                                E1EE8B9F2413195000E794D6 /* XRInputSourceEvent.h in Headers */,
    3389933904                                E1EE8B992413195000E794D6 /* XRInputSourcesChangeEvent.h in Headers */,
     33905                                E12A9F4A248A99E2003F06C8 /* XRInteractionMode.h in Headers */,
    3390033906                                E1EE8B842413191F00E794D6 /* XRReferenceSpaceEvent.h in Headers */,
    3390133907                                E1EE8B772413191F00E794D6 /* XRReferenceSpaceType.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.