Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1401)

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 381753002: Revert of [screen-orientation] Update implementation to match recent spec changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/screen_orientation/ScreenScreenOrientation.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 5ff02bd49e5a2921711f241ab2e908aa7e5cc975..ba48c3cb59054cfdc24b06f04a1bbe9967519abf 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1374,16 +1374,8 @@
void WebLocalFrameImpl::sendOrientationChangeEvent()
{
- if (!frame())
- return;
-
- // Screen Orientation API
- if (ScreenOrientationController::from(*frame()))
- ScreenOrientationController::from(*frame())->notifyOrientationChanged();
-
- // Legacy window.orientation API.
- if (frame()->domWindow())
- frame()->domWindow()->dispatchEvent(Event::create(EventTypeNames::orientationchange));
+ if (frame())
+ frame()->sendOrientationChangeEvent();
}
void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOrigin& intendedTargetOrigin, const WebDOMEvent& event)
@@ -1544,9 +1536,9 @@
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));
+ if (RuntimeEnabledFeatures::screenOrientationEnabled())
+ ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : 0);
provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
-
- ScreenOrientationController::provideTo(*m_frame, m_client ? m_client->webScreenOrientationClient() : 0);
}
}
« no previous file with comments | « Source/modules/screen_orientation/ScreenScreenOrientation.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698