Skip to content

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Oct 17, 2025

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:

  • 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
  • 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. 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:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@marcoscaceres marcoscaceres force-pushed the fix-fullscreen-prelock-conditions branch from 7c2c201 to d8194fc Compare October 17, 2025 05:24
@marcoscaceres marcoscaceres requested a review from Copilot October 17, 2025 05:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@marcoscaceres marcoscaceres force-pushed the fix-fullscreen-prelock-conditions branch from 47c32c9 to 4e7480c Compare October 17, 2025 05:31
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
@marcoscaceres marcoscaceres force-pushed the fix-fullscreen-prelock-conditions branch from 4e7480c to bc4282b Compare October 17, 2025 05:32
@marcoscaceres marcoscaceres force-pushed the fix-fullscreen-prelock-conditions branch from 8351c97 to c7baccf Compare October 17, 2025 05:44
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
@marcoscaceres marcoscaceres force-pushed the fix-fullscreen-prelock-conditions branch from c7baccf to c1b9455 Compare October 17, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant