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

Unified Diff: Source/core/html/HTMLFrameOwnerElement.cpp

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed a null check Created 6 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 | « Source/core/html/HTMLFrameOwnerElement.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFrameOwnerElement.cpp
diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp
index 5ebb4b8f4c7bf91a31cee1f4b671af40f206152d..b50bda38d543857972253eb8703415de8af6f061 100644
--- a/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -51,7 +51,7 @@ RenderPart* HTMLFrameOwnerElement::renderPart() const
return toRenderPart(renderer());
}
-void HTMLFrameOwnerElement::setContentFrame(LocalFrame& frame)
+void HTMLFrameOwnerElement::setContentFrame(Frame& frame)
{
// Make sure we will not end up with two frames referencing the same owner element.
ASSERT(!m_contentFrame || m_contentFrame->ownerElement() != this);
@@ -80,9 +80,10 @@ void HTMLFrameOwnerElement::disconnectContentFrame()
// unload event in the subframe which could execute script that could then
// reach up into this document and then attempt to look back down. We should
// see if this behavior is really needed as Gecko does not allow this.
- if (LocalFrame* frame = contentFrame()) {
- RefPtr<LocalFrame> protect(frame);
- frame->loader().frameDetached();
+ if (Frame* frame = contentFrame()) {
+ RefPtr<Frame> protect(frame);
+ if (frame->isLocalFrame())
+ toLocalFrame(frame)->loader().frameDetached();
frame->disconnectOwnerElement();
}
}
@@ -124,8 +125,9 @@ SVGDocument* HTMLFrameOwnerElement::getSVGDocument(ExceptionState& exceptionStat
bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const AtomicString& frameName, bool lockBackForwardList)
{
RefPtr<LocalFrame> parentFrame = document().frame();
- if (contentFrame()) {
- contentFrame()->navigationScheduler().scheduleLocationChange(&document(), url.string(), Referrer(document().outgoingReferrer(), document().referrerPolicy()), lockBackForwardList);
+ // FIXME(kenrb): The necessary semantics for RemoteFrames have not been worked out yet, but this will likely need some logic to handle them.
+ if (contentFrame() && contentFrame()->isLocalFrame()) {
+ toLocalFrame(contentFrame())->navigationScheduler().scheduleLocationChange(&document(), url.string(), Referrer(document().outgoingReferrer(), document().referrerPolicy()), lockBackForwardList);
return true;
}
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698