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

Unified Diff: Source/core/frame/Frame.cpp

Issue 137143002: Remove compile time flag ORIENTATION_EVENT and use runtime flag instead. Update layout test case to… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/core/frame/Frame.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index f01a0ee6ed650fd27f961909d35649c9985ade3f..45c423fca2042ed72cd6fc6a7b05227e7c4d571f 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -117,9 +117,7 @@ inline Frame::Frame(PassRefPtr<FrameInit> frameInit)
, m_frameInit(frameInit)
, m_pageZoomFactor(parentPageZoomFactor(this))
, m_textZoomFactor(parentTextZoomFactor(this))
-#if ENABLE(ORIENTATION_EVENTS)
, m_orientation(0)
-#endif
, m_inViewSourceMode(false)
, m_remotePlatformLayer(0)
{
@@ -212,14 +210,15 @@ void Frame::setView(PassRefPtr<FrameView> view)
m_view->setVisibleContentScaleFactor(page()->pageScaleFactor());
}
-#if ENABLE(ORIENTATION_EVENTS)
void Frame::sendOrientationChangeEvent(int orientation)
{
+ if (!RuntimeEnabledFeatures::orientationEventEnabled())
+ return;
+
m_orientation = orientation;
if (DOMWindow* window = domWindow())
window->dispatchEvent(Event::create(EventTypeNames::orientationchange));
}
-#endif // ENABLE(ORIENTATION_EVENTS)
FrameHost* Frame::host() const
{
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698