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 23949 - Setting orientation to secondary view angles
Summary: Setting orientation to secondary view angles
Status: NEW
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 24121
  Show dependency treegraph
 
Reported: 2013-12-02 11:48 UTC by Andreas Tolfsen
Modified: 2013-12-17 00:12 UTC (History)
6 users (show)

See Also:


Attachments

Description Andreas Tolfsen 2013-12-02 11:48:11 UTC
WebDriver currently supports setting the screen orientation to either
portrait or landscape mode on devices that support this configuration.
Many devices support further rotation by 90° so that the top of the
device aligns with the bottom border of the viewport.

In Android this is refered to as secondary orientations.  My
suggestion is to use *-primary and *-secondary as optional additions
to specify the type of orientation.  This would recognize:

    PORTRAIT
    LANDSCAPE
    PORTRAIT-PRIMARY
    LANDSCAPE-PRIMARY
    PORTRAIT-SECONDARY
    LANDSCAPE-SECONDARY

The PORTRAIT and LANDSCAPE orientations would default to
PORTRAIT-PRIMARY and LANDSCAPE-PRIMARY.
Comment 1 Marc Fisher 2013-12-02 19:16:48 UTC
This was discussed at the F2F in Boston, and it was decided to make essentially this change, with reference to the screen orientation spec: https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html
Comment 2 Andreas Tolfsen 2013-12-03 13:23:20 UTC
Having the ability to unlock the device's orientation could be nice.
WebDriver's current setScreenOrientation(or) call would presumably
lock the device in the given orientation, without providing a way to
reset/unlock its orientation state.

Keeping a WebDriver API for this is still necessary because of the
device barrier.  But is there any reason we can't mimick the screen
orientation spec's API in this case?