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

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

Issue 1802953003: RemoteBridgeFrameOwner: keep better track of the attached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Doing work in constructors is evil. Created 4 years, 9 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 | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index e979f6716a0d9fa8d6451eb186c244003be1c169..f89aeca20b0f146cd01e8296a1ac3299a7e5f8b3 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -114,10 +114,9 @@ void Frame::detachChildren()
void Frame::disconnectOwnerElement()
{
if (m_owner) {
- if (m_owner->isLocal())
- toHTMLFrameOwnerElement(m_owner)->clearContentFrame();
+ m_owner->clearContentFrame();
+ m_owner = nullptr;
}
- m_owner = nullptr;
}
Page* Frame::page() const
@@ -309,12 +308,10 @@ Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
frameCounter().increment();
#endif
- if (m_owner) {
- if (m_owner->isLocal())
- toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
- } else {
+ if (m_owner)
+ m_owner->setContentFrame(*this);
+ else
page()->setMainFrame(this);
- }
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698