Skip to content

Specify the simulated device viewport #37

@asajeffrey

Description

@asajeffrey

Over in web-platform-tests/wpt#18004, a test that checks that the test device viewport matches the requested resolution was reverted:

-        assert_equals(viewport.width, params.resolution.width);
-        assert_equals(viewport.height, params.resolution.height);
+        assert_greater_than_equal(viewport.width, 1);
+        assert_greater_than_equal(viewport.height, 1);

The reason for reverting it is the spec text:

// This represents the native resolution of the device, but may not reflect the viewport exposed to the page.
// https://immersive-web.github.io/webxr/#xrviewport
dictionary FakeXRDeviceResolution {
    required long width;
    required long height;
};

Can this be changed to specify that the requested resolution should be the resolution of the viewport?

The reason for wanting this is to catch a WebXR implementation bug, where the framebuffer provided to WebXR has a viewport sized to the canvas, rather than for the device (Servo had this bug until recently, which is why I added this test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions