From 2de76c5db45d3aebffbdeaac3f6657b265f0f4d9 Mon Sep 17 00:00:00 2001 From: Kevin McNee Date: Thu, 29 Jan 2026 13:10:19 -0800 Subject: [PATCH] Revert "Add WPTs for WebXR plane-detection feature" This reverts commit 3e460ede4b15078f81167a185ac5a8506590c353. Reason for revert: New tests fail on mac e.g. https://ci.chromium.org/ui/p/chromium/builders/ci/mac15-arm64-rel-tests/19926/overview Original change's description: > Add WPTs for WebXR plane-detection feature > > Bug: 394636076 > Change-Id: I268d51e008fbbe1b894b4c0cf6191e4b73b53050 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7524325 > Reviewed-by: Brandon Jones > Commit-Queue: Alexander Cooper > Cr-Commit-Position: refs/heads/main@{#1576754} Bug: 394636076 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I362766841b3d50168f27e372019502314d792a56 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7532807 Owners-Override: Kevin McNee Auto-Submit: Kevin McNee Commit-Queue: Rubber Stamper Bot-Commit: Rubber Stamper Cr-Commit-Position: refs/heads/main@{#1576800} --- resources/chromium/webxr-test.js | 80 ------------------- ...e_detectedPlanes_inactive_frame.https.html | 35 -------- ...xrFrame_detectedPlanes_plumbing.https.html | 70 ---------------- .../xrPlane_identity.https.html | 48 ----------- ...Plane_lastChangedTime_no_change.https.html | 60 -------------- .../xrSession_initiateRoomCapture.https.html | 43 ---------- webxr/resources/webxr_test_constants.js | 26 +----- 7 files changed, 1 insertion(+), 361 deletions(-) delete mode 100644 webxr/plane-detection/xrFrame_detectedPlanes_inactive_frame.https.html delete mode 100644 webxr/plane-detection/xrFrame_detectedPlanes_plumbing.https.html delete mode 100644 webxr/plane-detection/xrPlane_identity.https.html delete mode 100644 webxr/plane-detection/xrPlane_lastChangedTime_no_change.https.html delete mode 100644 webxr/plane-detection/xrSession_initiateRoomCapture.https.html diff --git a/resources/chromium/webxr-test.js b/resources/chromium/webxr-test.js index 61dde7981d2b5b..40bc915f4477ee 100644 --- a/resources/chromium/webxr-test.js +++ b/resources/chromium/webxr-test.js @@ -336,7 +336,6 @@ class MockRuntime { 'secondary-views': xrSessionMojom.XRSessionFeature.SECONDARY_VIEWS, 'camera-access': xrSessionMojom.XRSessionFeature.CAMERA_ACCESS, 'layers': xrSessionMojom.XRSessionFeature.LAYERS, - 'plane-detection': xrSessionMojom.XRSessionFeature.PLANE_DETECTION, }; static _sessionModeToMojoMap = { @@ -372,19 +371,6 @@ class MockRuntime { "unsigned-short": xrSessionMojom.XRDepthDataFormat.kUnsignedShort, }; - static _semanticLabelToMojoMap = { - "other": vrMojom.XRSemanticLabel.kOther, - "floor": vrMojom.XRSemanticLabel.kFloor, - "wall": vrMojom.XRSemanticLabel.kWall, - "ceiling": vrMojom.XRSemanticLabel.kCeiling, - "table": vrMojom.XRSemanticLabel.kTable, - }; - - static _planeOrientationToMojoMap = { - "horizontal": vrMojom.XRPlaneOrientation.HORIZONTAL, - "vertical": vrMojom.XRPlaneOrientation.VERTICAL, - }; - constructor(fakeDeviceInit, service) { this.sessionClient_ = null; @@ -412,9 +398,6 @@ class MockRuntime { // ID of the next subscription to be assigned. this.next_hit_test_id_ = 1n; - this.world_ = null; - this.worldDirty_ = false; - this.anchor_controllers_ = new Map(); // ID of the next anchor to be assigned. this.next_anchor_id_ = 1n; @@ -616,12 +599,10 @@ class MockRuntime { // WebXR Test API Hit Test extensions setWorld(world) { this.world_ = world; - this.worldDirty_ = true; } clearWorld() { this.world_ = null; - this.worldDirty_ = true; } // WebXR Test API Anchor extensions @@ -1049,8 +1030,6 @@ class MockRuntime { this._calculateAnchorInformation(frameData); - this._calculatePlaneInformation(frameData); - if (options.depthActive) { this._calculateDepthInformation(frameData); } @@ -1431,65 +1410,6 @@ class MockRuntime { } } - // Private functions - plane detection implementation: - - // Modifies passed in frameData to add plane detection results. - _calculatePlaneInformation(frameData) { - if (!this.enabledFeatures_.includes(xrSessionMojom.XRSessionFeature.PLANE_DETECTION)) { - return; - } - - frameData.detectedPlanesData = { - allPlanesIds: [], - updatedPlanesData: [] - }; - - if (!this.world_) { - this.worldDirty_ = false; - return; - } - - for (let i = 0; i < this.world_.hitTestRegions.length; i++) { - const region = this.world_.hitTestRegions[i]; - if (region.type !== "plane") { - continue; - } - - // PlaneId is just an idValue (uint64). We can use the index in the hitTestRegions. - // Though 0 is an invalid id, so increment by 1. - const planeId = { idValue: BigInt(i + 1) }; - frameData.detectedPlanesData.allPlanesIds.push(planeId); - - // Only treat planes as updated if the world state was changed since last frame. - if (this.worldDirty_) { - const planeInfo = region.planeInfo; - if (planeInfo) { - let semanticLabel = null; - if (planeInfo.semanticLabel && planeInfo.semanticLabel in MockRuntime._semanticLabelToMojoMap) { - semanticLabel = MockRuntime._semanticLabelToMojoMap[planeInfo.semanticLabel]; - } - const planeData = { - id: planeId, - orientation: MockRuntime._planeOrientationToMojoMap[planeInfo.orientation], - mojoFromPlane: getPoseFromTransform(planeInfo.origin), - semanticLabel: semanticLabel, - polygon: [] - }; - - if (planeInfo.polygon) { - for (const point of planeInfo.polygon) { - planeData.polygon.push({ x: point.x, z: point.z }); - } - } - - frameData.detectedPlanesData.updatedPlanesData.push(planeData); - } - } - } - - this.worldDirty_ = false; - } - // Private functions - depth sensing implementation: /** diff --git a/webxr/plane-detection/xrFrame_detectedPlanes_inactive_frame.https.html b/webxr/plane-detection/xrFrame_detectedPlanes_inactive_frame.https.html deleted file mode 100644 index 21c0b3c8b50cff..00000000000000 --- a/webxr/plane-detection/xrFrame_detectedPlanes_inactive_frame.https.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/webxr/plane-detection/xrFrame_detectedPlanes_plumbing.https.html b/webxr/plane-detection/xrFrame_detectedPlanes_plumbing.https.html deleted file mode 100644 index 4ac2cbc384dfa2..00000000000000 --- a/webxr/plane-detection/xrFrame_detectedPlanes_plumbing.https.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - diff --git a/webxr/plane-detection/xrPlane_identity.https.html b/webxr/plane-detection/xrPlane_identity.https.html deleted file mode 100644 index b4188219627224..00000000000000 --- a/webxr/plane-detection/xrPlane_identity.https.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - diff --git a/webxr/plane-detection/xrPlane_lastChangedTime_no_change.https.html b/webxr/plane-detection/xrPlane_lastChangedTime_no_change.https.html deleted file mode 100644 index 21f193a89ee962..00000000000000 --- a/webxr/plane-detection/xrPlane_lastChangedTime_no_change.https.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - diff --git a/webxr/plane-detection/xrSession_initiateRoomCapture.https.html b/webxr/plane-detection/xrSession_initiateRoomCapture.https.html deleted file mode 100644 index 351b15f92125ae..00000000000000 --- a/webxr/plane-detection/xrSession_initiateRoomCapture.https.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/webxr/resources/webxr_test_constants.js b/webxr/resources/webxr_test_constants.js index 79b7d028f12cc4..c08cdd9b251750 100644 --- a/webxr/resources/webxr_test_constants.js +++ b/webxr/resources/webxr_test_constants.js @@ -163,33 +163,9 @@ const ALL_FEATURES = [ 'depth-sensing', 'secondary-views', 'camera-access', - 'layers', - 'plane-detection' + 'layers' ]; -const DEFAULT_FLOOR_PLANE = { - type: "plane", - faces: [ - { vertices: [{x: -1, y: 0, z: -1}, {x: 1, y: 0, z: -1}, {x: 1, y: 0, z: 1}] }, - { vertices: [{x: -1, y: 0, z: -1}, {x: 1, y: 0, z: 1}, {x: -1, y: 0, z: 1}] } - ], - planeInfo: { - orientation: "horizontal", - origin: { position: [0, 0, 0], orientation: [0, 0, 0, 1] }, - polygon: [ - {x: -1, z: -1}, - {x: 1, z: -1}, - {x: 1, z: 1}, - {x: -1, z: 1} - ], - semanticLabel: "floor" - } -}; - -const DEFAULT_WORLD_WITH_FLOOR = { - hitTestRegions: [ DEFAULT_FLOOR_PLANE ] -}; - const TRACKED_IMMERSIVE_DEVICE = { supportsImmersive: true, supportedModes: [ "inline", "immersive-vr"],