| Index: Source/core/frame/LocalDOMWindow.cpp
|
| diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
|
| index 49b4499e49c13c678d9234990b740ba32c13130e..13eda6968a6bdd0afa7ac6d7f2ac641969e0c142 100644
|
| --- a/Source/core/frame/LocalDOMWindow.cpp
|
| +++ b/Source/core/frame/LocalDOMWindow.cpp
|
| @@ -645,8 +645,9 @@ void LocalDOMWindow::sendOrientationChangeEvent()
|
| dispatchEvent(Event::create(EventTypeNames::orientationchange));
|
|
|
| for (size_t i = 0; i < childFrames.size(); ++i) {
|
| - if (childFrames[i]->domWindow())
|
| - childFrames[i]->domWindow()->sendOrientationChangeEvent();
|
| + if (!childFrames[i]->isLocalFrame())
|
| + continue;
|
| + toLocalFrame(childFrames[i].get())->localDOMWindow()->sendOrientationChangeEvent();
|
| }
|
| }
|
|
|
| @@ -1855,24 +1856,25 @@ PassRefPtrWillBeRawPtr<LocalDOMWindow> LocalDOMWindow::open(const String& urlStr
|
| }
|
| // FIXME: Navigating RemoteFrames is not yet supported.
|
| if (targetFrame && targetFrame->isLocalFrame()) {
|
| - if (!activeDocument->canNavigate(*targetFrame))
|
| + LocalFrame* localTargetFrame = toLocalFrame(targetFrame);
|
| + if (!activeDocument->canNavigate(*localTargetFrame))
|
| return nullptr;
|
|
|
| KURL completedURL = firstFrame->document()->completeURL(urlString);
|
|
|
| - if (targetFrame->domWindow()->isInsecureScriptAccess(*callingWindow, completedURL))
|
| - return targetFrame->domWindow();
|
| + if (localTargetFrame->localDOMWindow()->isInsecureScriptAccess(*callingWindow, completedURL))
|
| + return localTargetFrame->localDOMWindow();
|
|
|
| if (urlString.isEmpty())
|
| - return targetFrame->domWindow();
|
| + return localTargetFrame->localDOMWindow();
|
|
|
| - toLocalFrame(targetFrame)->navigationScheduler().scheduleLocationChange(activeDocument, completedURL, false);
|
| - return targetFrame->domWindow();
|
| + localTargetFrame->navigationScheduler().scheduleLocationChange(activeDocument, completedURL, false);
|
| + return localTargetFrame->localDOMWindow();
|
| }
|
|
|
| WindowFeatures windowFeatures(windowFeaturesString);
|
| LocalFrame* result = createWindow(urlString, frameName, windowFeatures, *callingWindow, *firstFrame, *frame());
|
| - return result ? result->domWindow() : 0;
|
| + return result ? result->localDOMWindow() : 0;
|
| }
|
|
|
| void LocalDOMWindow::showModalDialog(const String& urlString, const String& dialogFeaturesString,
|
| @@ -1907,8 +1909,9 @@ LocalDOMWindow* LocalDOMWindow::anonymousIndexedGetter(uint32_t index)
|
| return 0;
|
|
|
| Frame* child = frame()->tree().scopedChild(index);
|
| + // FIXME: Temporary hack to stage the conversions.
|
| if (child)
|
| - return child->domWindow();
|
| + return static_cast<LocalDOMWindow*>(child->domWindow());
|
|
|
| return 0;
|
| }
|
|
|