| Index: Source/core/frame/Frame.cpp
|
| diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
|
| index 52813512bddfb80d0136b76830dcb1c1b229ae0c..b6c43ba338388c588ec383fd8d5e5647424a9fcd 100644
|
| --- a/Source/core/frame/Frame.cpp
|
| +++ b/Source/core/frame/Frame.cpp
|
| @@ -181,7 +181,17 @@ void Frame::detachFromFrameHost()
|
| bool Frame::isMainFrame() const
|
| {
|
| Page* page = this->page();
|
| - return page && this == page->mainFrame();
|
| + return (page && this == page->mainFrame()) || isLocalRoot();
|
| +}
|
| +
|
| +bool Frame::isLocalRoot() const {
|
| + if (isRemoteFrame())
|
| + return false;
|
| +
|
| + if (!tree().parent())
|
| + return true;
|
| +
|
| + return tree().parent()->isRemoteFrame();
|
| }
|
|
|
| void Frame::disconnectOwnerElement()
|
|
|