const AtomicString& ScreenOrientation::orientation(Screen& screen) { ScreenOrientation& screenOrientation = ScreenOrientation::from(screen); if (!screenOrientation.frame()) { // FIXME: we should try to return a better guess, like the latest known value. return orientationTypeToString(blink::WebScreenOrientationPortraitPrimary); } ScreenOrientationController& controller = ScreenOrientationController::from(*screenOrientation.frame()); return orientationTypeToString(controller.orientation()); }
String ScreenOrientation::type() const { return orientationTypeToString(m_type); }