Refactor fullscreen rejection handling to use WebIDL react pattern#269
Open
marcoscaceres wants to merge 5 commits intogh-pagesfrom
Open
Refactor fullscreen rejection handling to use WebIDL react pattern#269marcoscaceres wants to merge 5 commits intogh-pagesfrom
marcoscaceres wants to merge 5 commits intogh-pagesfrom
Conversation
5 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Screen Orientation specification to use the modern WebIDL 'react' pattern for handling fullscreen request rejections, replacing the previous flag-based approach. The change enables cleaner specification text while maintaining all existing algorithm behavior and better alignment with modern WebIDL patterns.
Key Changes:
- Replaces implicit flag-based fullscreen rejection handling with explicit WebIDL 'react' pattern
- Expands the fullscreen pre-lock condition definition from a simple reference to a detailed algorithmic specification
- Adds explicit handling for rejecting orientation lock promises when fullscreen requests are rejected or when documents exit fullscreen
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
7c2c201 to
d8194fc
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
47c32c9 to
4e7480c
Compare
This commit modernizes how the Screen Orientation specification responds to fullscreen request rejections by using the WebIDL 'react' concept instead of the previous flag-based approach. Changes: - Replace flag-based 'pending fullscreen request flag unset due to rejection' pattern - Use WebIDL 'react' pattern with 'pending fullscreen request promise' - Update reference to use proper 'pending fullscreen request flag' terminology - Extract duplicated descendant document logic into helper algorithm 'reject descendant document orientation promises' - Add clarifying notes for algorithm logic and same-origin security restrictions - Maintain all existing algorithm behavior while modernizing the specification architecture This enables cleaner, more maintainable specification text that follows modern WebIDL patterns for promise-based APIs and eliminates code duplication. The change complements the fullscreen spec changes in whatwg/fullscreen that add both the exported flag and promise definitions needed for this integration. Fixes #254 Fixes #255
4e7480c to
bc4282b
Compare
8351c97 to
c7baccf
Compare
This commit modernizes how the Screen Orientation specification responds to fullscreen request rejections by using the WebIDL 'react' concept instead of the previous flag-based approach. Changes: - Replace flag-based 'pending fullscreen request flag unset due to rejection' pattern - Use WebIDL 'react' pattern with 'pending fullscreen request promise' - Update reference to use proper 'pending fullscreen request flag' terminology - Extract duplicated descendant document logic into helper algorithm 'reject descendant document orientation promises' - Remove redundant fullscreen exit handling (already handled by Fullscreen spec) - Add clarifying notes for algorithm logic and same-origin security restrictions - Maintain all existing algorithm behavior while modernizing the specification architecture This enables cleaner, more maintainable specification text that follows modern WebIDL patterns for promise-based APIs and eliminates code duplication. The change complements the fullscreen spec changes in whatwg/fullscreen that add both the exported flag and promise definitions needed for this integration. Fixes #254 Fixes #255
c7baccf to
c1b9455
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit modernizes how the Screen Orientation specification responds to fullscreen request rejections by using the WebIDL 'react' concept instead of the previous flag-based approach.
Depends on whatwg/fullscreen#251
Changes:
This enables cleaner, more maintainable specification text that follows modern WebIDL patterns for promise-based APIs. The change complements the fullscreen spec changes in whatwg/fullscreen that add both the exported flag and promise definitions needed for this integration.
Closes #254
Closes #255
The following tasks have been completed:
Implementation commitment:
Preview | Diff