| Index: Source/core/frame/LocalFrame.cpp
|
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
|
| index af2ea348f072d7a8d19cea84d2083385b6738f8b..09c78c8d4f8ed7b0cb884c85ee56f153ecf98978 100644
|
| --- a/Source/core/frame/LocalFrame.cpp
|
| +++ b/Source/core/frame/LocalFrame.cpp
|
| @@ -164,11 +164,21 @@ void LocalFrame::setView(PassRefPtr<FrameView> view)
|
|
|
| void LocalFrame::sendOrientationChangeEvent()
|
| {
|
| - if (!RuntimeEnabledFeatures::orientationEventEnabled())
|
| + if (!RuntimeEnabledFeatures::orientationEventEnabled() && !RuntimeEnabledFeatures::screenOrientationEnabled())
|
| return;
|
|
|
| - if (DOMWindow* window = domWindow())
|
| - window->dispatchEvent(Event::create(EventTypeNames::orientationchange));
|
| + DOMWindow* window = domWindow();
|
| + if (!window)
|
| + return;
|
| + window->dispatchEvent(Event::create(EventTypeNames::orientationchange));
|
| +
|
| + // Notify subframes.
|
| + Vector<RefPtr<LocalFrame> > childFrames;
|
| + for (LocalFrame* child = tree().firstChild(); child; child = child->tree().nextSibling())
|
| + childFrames.append(child);
|
| +
|
| + for (size_t i = 0; i < childFrames.size(); ++i)
|
| + childFrames[i]->sendOrientationChangeEvent();
|
| }
|
|
|
| void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio)
|
|
|