Closed Bug 1750670 Opened 3 years ago Closed 2 years ago

Better support orientation.lock('natural')

Categories

(GeckoView :: General, defect, P2)

Unspecified
All

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Whiteboard: [geckoview:m98] [geckoview:2022h2?])

Attachments

(1 file)

natural is defined as (from https://w3c.github.io/screen-orientation/#dfn-natural)

Natural is an orientation that refers to either portrait-primary or landscape-primary depending on the device's usual orientation. This orientation is usually provided by the underlying operating system.

Actually, GeckoView maps it as (https://searchfox.org/mozilla-central/rev/afbff3f3ae087181d9988fe19e09cc15927fb7ff/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java#874-875
)

    } else if (geckoOrientation == ScreenOrientation.DEFAULT.value) {
      return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;

SCREEN_ORIENTATION_UNSPECIFIED seems to mean unlock, so it isn't correct. So we should use better orientation type in GeckoView implement. or set landscape/portrait on natural in DOM side.

Also, Chromium considers this well.

Blocks: 1744125
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → calu
Priority: P3 → P1
Whiteboard: [geckoview:m98]
Whiteboard: [geckoview:m98] → [geckoview:m98][geckoview:m99]
Assignee: calu → nobody
Priority: P1 → P2
Whiteboard: [geckoview:m98][geckoview:m99] → [geckoview:m98]
Whiteboard: [geckoview:m98] → [geckoview:m98] [geckoview:2022h2?]

Assigning this bug to Makoto. He will decide whether we need to prioritize it for 2022 H2.

Assignee: nobody → m_kato

natural is defined as (from https://w3c.github.io/screen-orientation/#dfn-natural)

A computer monitor are commonly naturally landscape-primary, while a mobile
phones are commonly naturally portrait-primary.

But GeckoView sets SCREEN_ORIENTATION_UNSPECIFIED that is unlock orientation.

Like Blink, we should set landscape-primary or portrait-primary (depends on
current monitor).

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/80a977fdc7f4 Better support orientation.lock('natural'). r=geckoview-reviewers,calu
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: