I have to admit that I am reading this spec thinking about rounded
display[1] (aka. watch) and this probably requires brainstorms instead
of this nitpicking, but whatever.

The current spec seems to leave screen.orientation.lock("landscape")
undefined for the case when the screen width and height are equal
because the steps of "update the orientation information" make "current
orientation type" always "portrait-primary" or "portrait-secondary" for
such case:

  # 2. Otherwise, if the screen width is less than or equal to the
  # screen height, set the document's current orientation type to
  # portrait-primary or portrait-secondary.

  ("update the orientation information" step 2)

I think we shoud drop "or equal to" here and, if necessary, say
something like "for the purpose of this specification, it is assumed
that the physical device has unequal width and height. User agent MUST
treat one physical side or another as if its greater.", but this is
awkward so I think just dropping "or equal to" is fine.

Some more editorial comments:

In step 1 of "update the orientation information"

  # 1. If the screen width is greater than the screen height, set the
  # document's current orientation type to landscape-primary or
  # landscape-secondary.

I had trouble realizing that the "screen width" here is a variable and
depends on how viewport is rendered (I had assumed it means "device
width", I guess). This probably needs a xref to "screen" in 4. Concepts.
Or would it be fine if we just use 'screen.width' and 'screen.height' here?

In step 3 of "update the orientation information"

  # 3. Set the document's current orientation angle to the clockwise
  # angle in degrees between the orientation of the viewport as it is
  # drawn and the natural orientation of the device (i.e., the top of
  # the physical screen).

I am still having trouble visualizing what "clockwise angle in degrees
between the orientation of the viewport" means and I wonder if it would
be easier if this is rephrased using "angle from". A picture here would
be the best (perhaps adapted from a DeviceOrientation one?).

In step 6 of "lock the orientation"

  # 6. Otherwise, depending on platform conventions, change how the
  # viewport is drawn in order to make it match another screen
  # orientation type. However, it has to be part of orientations.

I think we should consider revert this change[2]. Having no MAY (or may)
here reads like a must to me, and so it sounds kinda confusing even if
there's "depending on platform conventions".

[1] http://dev.w3.org/csswg/css-round-display/

Software Engineer, Shenzhen, BGI

Reply via email to