| Index: Source/modules/screen_orientation/ScreenOrientation.cpp
|
| diff --git a/Source/modules/screen_orientation/ScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenOrientation.cpp
|
| index 356344e4c36176ca4a1413c3dfd667ac09ea4f7b..8114c51173ea3ec852d08703d41b2dfd5692afb9 100644
|
| --- a/Source/modules/screen_orientation/ScreenOrientation.cpp
|
| +++ b/Source/modules/screen_orientation/ScreenOrientation.cpp
|
| @@ -116,13 +116,15 @@
|
| {
|
| }
|
|
|
| -OrientationInformation* ScreenOrientation::orientation(Screen& screen)
|
| +const AtomicString& ScreenOrientation::orientation(Screen& screen)
|
| {
|
| ScreenOrientation& screenOrientation = ScreenOrientation::from(screen);
|
| if (!screenOrientation.frame()) {
|
| - return 0;
|
| + // FIXME: we should try to return a better guess, like the latest known value.
|
| + return orientationTypeToString(blink::WebScreenOrientationPortraitPrimary);
|
| }
|
| - return ScreenOrientationController::from(*screenOrientation.frame()).orientation();
|
| + ScreenOrientationController& controller = ScreenOrientationController::from(*screenOrientation.frame());
|
| + return orientationTypeToString(controller.orientation());
|
| }
|
|
|
| ScriptPromise ScreenOrientation::lockOrientation(ScriptState* state, Screen& screen, const AtomicString& lockString)
|
|
|