-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure "Focused and Visible" addresses OS-level focus #747
Comments
Note: The answer to this question might affect either the #visibility-and-focus section of the privacy explainer |
Hey John, can you take point on figuring out the answer to this as soon as possible? We'd like to make sure it's covered in the next Working Draft. |
Still trying to work out whether the HTML spec for Focus addresses this explicitly. A few notes in the meantime:
|
@NellWaliczek it's possible this is an HTML spec issue (I'm glad you brought this up!) Even if the spec does cover this elsewhere, I don't see harm in clarifying within the explainer and possibly the spec. WDYT? If you agree, one approach would be to add a line, something like:
|
Okay, so after a lot of research, toying around, and introspection, here's my impressions of what should happen here: The primary concern is inline sessions. This is because immersive sessions imply some level of exclusivity to the device sensors, and periods where the immersive session is active but should not be receiving poses (a state which is up the UA/XR platform to determine) should be represented by the So that leaves us evaluating the security needs for inline, which line up extremely closely with that of generic sensors, which John linked above. Currently we are using nearly identical language to them, and if we were to discover a deficiency in that definition then it's likely that we would want to fix it universally and not just for our spec, so this really does seem like a HTML spec issue if anything is indeed under specified. It is worth noting that every UA on every OS I've been able to test all DO consider OS focus as part of the document's focused state, so behavioral consistency is not a concern here for me so much as that of documentation consistency. It's worth filing an issue about. There is one potential tweak we may want to make to the spec for clarity, however. Currently we (and Generic Sensors) link to the "currently focused area" definition, but that doesn't seem to account for nested documents of the same origin. It feels like we want to rely on the behavior used by the |
HTML spec issue filed here: whatwg/html#5049 |
Upon further inspection, it looks like the "currently focused area" algorithm is actually recursive in the same way as the "has focus steps" algorithm. (See specifically step 2: "If the designated focused area of the document is a browsing context container with a non-null nested browsing context, then let candidate be the active document of that browsing context container's nested browsing context, and redo this step.") As a result I think no change is needed to the WebXR spec for this specific issue now that the relevant HTML spec issue has been filed, and am inclined to close it. @NellWaliczek or @Manishearth, any concerns? |
Seems fine. May be worth adding a note somewhere. |
Makes sense |
Pose data should not be available during an XRSession if the browser itself is out of focus (at the OS-level) otherwise that pose data might be used for input sniffing or gaze tracking of other applications.
For example, in the following scenario:
... the definition of 'focused' needs to be reviewed to ensure that in this situation, the XR session is not considered 'in focus'.
Note: The existing definition of 'focused' might already cover this. I'm filing this issue so that we can confirm.
The text was updated successfully, but these errors were encountered: