| Index: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
|
| diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
|
| index e4cfa69a1b6f0ac59bc1bfc9b031b3e0df0148b9..123f8b591e4cb51c3ce548081bbb370a31d58f47 100644
|
| --- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
|
| +++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationControllerImpl.cpp
|
| @@ -62,6 +62,12 @@ WebScreenOrientationType ScreenOrientationControllerImpl::ComputeOrientation(
|
|
|
| bool is_tall_display = rotation % 180 ? rect.Height() < rect.Width()
|
| : rect.Height() > rect.Width();
|
| +
|
| + // https://w3c.github.io/screen-orientation/#dfn-current-orientation-angle
|
| + // allows the UA to associate *-primary and *-secondary values at will. Blink
|
| + // arbitrarily chooses rotation 0 to always be portrait-primary or
|
| + // landscape-primary, and portrait-primary + 90 to be landscape-primary, which
|
| + // together fully determine the relationship.
|
| switch (rotation) {
|
| case 0:
|
| return is_tall_display ? kWebScreenOrientationPortraitPrimary
|
|
|