This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24610 - What happens when unlockOrientation() is called but no orientation is locked?
Summary: What happens when unlockOrientation() is called but no orientation is locked?
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Screen Orientation (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Mounir Lamouri
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 20:44 UTC by Chris Dumez
Modified: 2014-02-17 10:44 UTC (History)
3 users (show)

See Also:


Attachments

Description Chris Dumez 2014-02-10 20:44:37 UTC
What happens when unlockOrientation() is called but no orientation is locked?
The specification does not clearly mention this case, I assume we should return early (silently).
Comment 1 Mounir Lamouri 2014-02-17 10:30:46 UTC
The specification says:
"""
The unlockOrientation() method, when invoked, must disable the current lock applied on the screen with lockOrientation.
"""

There is obviously nothing to do if the screen orientation was not locked using lockOrientation().

Please reopen if you think this is not correct.
Comment 2 Marcos Caceres 2014-02-17 10:44:51 UTC
I think just add: "Otherwise, if the screen orientation is not already in the default orientation, do nothing and return." Or something like that. 

Also, it should really say that unlocking returns to the default orientation. We rely on the concept of default orientation in the manifest spec, particularly to allow orientation changes. 

(unrelated: can you put "<dfn>default orientation</dnf>" into the spec so I can link to the definition from the manifest spec).