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 7bad5aca77dce11ed2935931a2bf342365b596c2..89cef83f1dc1ce693ed756d641a22bf19fae53b6 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 |