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
Prevent hidden documents from locking the screen orientation #6283
Prevent hidden documents from locking the screen orientation #6283
Conversation
EWS run on previous version of this PR (hash f065b9c) |
EWS run on previous version of this PR (hash aa52579) |
That mac-wk1 failure is a bit odd:
@hortont424, would the lack of a browsing context be a wk1 thing (even thought the script is running in page)? Any suggestions? |
EWS run on previous version of this PR (hash 3f9f188) |
promise->reject(Exception { SecurityError, "Only visible documents can lock the screen orientation"_s }); | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this patch, but we could try to use DOMPromiseDeferred::settle in manager->lock().
Maybe by adding settle(std::optional) to it?
LayoutTests/TestExpectations
Outdated
@@ -6041,3 +6041,7 @@ http/tests/loading/oauth.html [ DumpJSConsoleLogInStdErr ] | |||
http/tests/security/contentSecurityPolicy/video-with-https-url-allowed-by-csp-media-src-star.html [ DumpJSConsoleLogInStdErr ] | |||
imported/w3c/web-platform-tests/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html [ DumpJSConsoleLogInStdErr ] | |||
imported/w3c/web-platform-tests/html/infrastructure/urls/terminology-0/document-base-url-initiated-grand-parent.https.window.html [ DumpJSConsoleLogInStdErr ] | |||
|
|||
# Screen orientation | |||
## We don't implment test_driver.minimize_window() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is window.internals.setPageVisibility
good enough to implement test_driver.minimize_window?
If so, could we try implementing it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look. We might be able to use the same semantics ((ab)using page visibility), but I don't think we can use window.internal
, as it needs to be done through TestDriver
.
Is my understanding correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js to use window.internals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed we can, I recently discovered. π Iβll patch something up.
EWS run on previous version of this PR (hash 92adf27) |
EWS run on previous version of this PR (hash f5d053f) |
EWS run on previous version of this PR (hash 262d5ec) |
EWS run on previous version of this PR (hash 11758f8) |
LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js
Outdated
Show resolved
Hide resolved
LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js
Outdated
Show resolved
Hide resolved
EWS run on previous version of this PR (hash aae8614) |
EWS run on previous version of this PR (hash 389781b) |
EWS run on current version of this PR (hash c7728e5) |
https://bugs.webkit.org/show_bug.cgi?id=247248 rdar://102019707 Reviewed by Youenn Fablet. * LayoutTests/fast/screen-orientation/hidden-document-check-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js: (window.test_driver_internal.action_sequence): (async if): (window.test_driver_internal.minimize_window): (window.test_driver_internal.set_window_rect): * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/hidden_document-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/hidden_document.html: Added. * LayoutTests/platform/ios/TestExpectations: * Source/WebCore/page/ScreenOrientation.cpp: (WebCore::ScreenOrientation::lock): Canonical link: https://commits.webkit.org/257019@main
Committed 257019@main (a68ef76): https://commits.webkit.org/257019@main Reviewed commits have been landed. Closing PR #6283 and removing active labels. |
a68ef76
c7728e5
π§ͺ mac-wk1