| Index: Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
|
| index 1e5f9c60c0715e9ff3513bfe192d2cd2355adebd..81bda1e28820080cebc26a4cbd35296087b76584 100644
|
| --- a/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/Source/web/WebLocalFrameImpl.cpp
|
| @@ -1372,8 +1372,16 @@ void WebLocalFrameImpl::resetMatchCount()
|
|
|
| void WebLocalFrameImpl::sendOrientationChangeEvent()
|
| {
|
| - if (frame())
|
| - frame()->sendOrientationChangeEvent();
|
| + if (!frame())
|
| + return;
|
| +
|
| + // Screen Orientation API
|
| + if (ScreenOrientationController::from(*frame()))
|
| + ScreenOrientationController::from(*frame())->notifyOrientationChanged();
|
| +
|
| + // Legacy window.orientation API.
|
| + if (RuntimeEnabledFeatures::orientationEventEnabled() && frame()->domWindow())
|
| + frame()->domWindow()->dispatchEvent(Event::create(EventTypeNames::orientationchange));
|
| }
|
|
|
| void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOrigin& intendedTargetOrigin, const WebDOMEvent& event)
|
| @@ -1535,9 +1543,10 @@ void WebLocalFrameImpl::setWebCoreFrame(PassRefPtr<WebCore::LocalFrame> frame)
|
| provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
|
| m_geolocationClientProxy->setController(GeolocationController::from(m_frame.get()));
|
| provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->webMIDIClient() : 0));
|
| + provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
|
| +
|
| if (RuntimeEnabledFeatures::screenOrientationEnabled())
|
| ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : 0);
|
| - provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
|
| }
|
| }
|
|
|
|
|