Closed marcoscaceres closed 1 year ago
I guess this doesn't apply to unlock()
because that shouldn't be possible? Maybe assert it? (Although maybe it's possible with manifest apps?)
I guess this doesn't apply to unlock() because that shouldn't be possible? Maybe assert it? (Although maybe it's possible with manifest apps?)
I was thinking it shouldn't be possible because to hide the page/app it once locked, a user would need to exit fullscreen. But yeah, the assumption doesn't hold when there are multiple virtual desktops.
It may be safer just to prevent it in both cases.
Prepared test https://github.com/web-platform-tests/wpt/pull/36734
@saschanaz or @makotokato, @michaelwasserman, could you please file bugs in your respective engine repos if you support the change?
Sent a patch for WebKit https://github.com/WebKit/WebKit/pull/6283
This change has been merged in WebKit.
BTW, https://github.com/web-platform-tests/wpt/pull/36734's test (hidden_document.html
) is still unclear for me. "hidden documents must not unlock the screen orientation" and "Once maximized, a minimized window can lock or unlock the screen orientation again" don't set pre-lock condition (All browser requires full screen). So I think the latest version of these tests are always failure due to no fullscreen.
Does it forget adding documenttElement.requestFullscreen
before orientation.lock
call?
And, why don't we care hidden state in "8.3 Applying an orientation lock" section like fully active if it is in parallel case?
@makotokato, apologies, just coming back to this.
Thanks for pointing out the issues with the tests and in section "8.3 Applying an orientation lock". I think that was just an oversight. Having a look now.
@makotokato, about the tests, I've gone over them again and you are right... they were making incorrect assumptions. For example, on macOs at least, it appears one cannot minimize a window once it's in fullscreen. One needs to first exit fullscreen and then the window can be minimized.
Anyway, I'll delete those two tests.
And, why don't we care hidden state in "8.3 Applying an orientation lock" section like fully active if it is in parallel case?
Yeah, good catch. I think instead what needs to happen there is that if the preconditions are not longer met (which is remaining visible and in fullscreen).
@makotokato, I've filed https://github.com/w3c/screen-orientation/issues/243 to follow up on your comment above. I'll draft up a separate pull request for that.
About the tests, I sent https://github.com/web-platform-tests/wpt/pull/38511
Closes #221
The following tasks have been completed:
Implementation commitment:
Preview | Diff