Closed Bug 1802832 Opened 1 year ago Closed 1 year ago

Check orientation permission before throwing NotSupportedError

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file)

https://w3c.github.io/screen-orientation/#lock-method

  1. If document has the sandboxed orientation lock browsing context flag set, or doesn't meet the pre-lock conditions, or locking would be a security risk, return a promise rejected with a "SecurityError" DOMException and abort these steps.
  2. If the user agent does not support locking the screen orientation to orientation, return a promise rejected with a "NotSupportedError" DOMException and abort these steps.

Previous spec was different order.

Makoto-san, do you know who maintains around it? If so, could you redirect this ni? to the person to consider the priority and severity.

Flags: needinfo?(m_kato)

Before updating spec, the order was

  1. Throw NotSupportedError if user agent doesn't support lock()
  2. Check orientation lock permission.

But After updated (https://w3c.github.io/screen-orientation/#lock-method),
the order is

  1. Check orientation lock permission.
  2. Throw NotSupportedError if user agent doesn't support lock()

So we should check orientation permission / pre-lock conditions before
throwing NotSupportedError.

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Severity: -- → S3
Flags: needinfo?(m_kato)
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: