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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check in History.cpp Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/Location.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 SecurityContext* LocalFrame::securityContext() const 291 SecurityContext* LocalFrame::securityContext() const
292 { 292 {
293 return document(); 293 return document();
294 } 294 }
295 295
296 bool LocalFrame::checkLoadComplete() 296 bool LocalFrame::checkLoadComplete()
297 { 297 {
298 return loader().checkLoadCompleteForThisFrame(); 298 return loader().checkLoadCompleteForThisFrame();
299 } 299 }
300 300
301 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha r* reason)
302 {
303 if (!targetFrame.isLocalFrame())
304 return;
305
306 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame);
307 String message = "Unsafe JavaScript attempt to initiate navigation for frame with URL '" + targetLocalFrame.document()->url().string() + "' from frame with URL '" + document()->url().string() + "'. " + reason + "\n";
308
309 // FIXME: should we print to the console of the document performing the navi gation instead?
310 targetLocalFrame.localDOMWindow()->printErrorMessage(message);
311 }
312
301 void LocalFrame::disconnectOwnerElement() 313 void LocalFrame::disconnectOwnerElement()
302 { 314 {
303 if (owner()) { 315 if (owner()) {
304 if (Document* document = this->document()) 316 if (Document* document = this->document())
305 document->topDocument().clearAXObjectCache(); 317 document->topDocument().clearAXObjectCache();
306 #if ENABLE(OILPAN) 318 #if ENABLE(OILPAN)
307 // First give the plugin elements holding persisted, 319 // First give the plugin elements holding persisted,
308 // renderer-less plugins the opportunity to dispose of them. 320 // renderer-less plugins the opportunity to dispose of them.
309 for (const auto& pluginElement : m_pluginElements) 321 for (const auto& pluginElement : m_pluginElements)
310 pluginElement->disconnectContentFrame(); 322 pluginElement->disconnectContentFrame();
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 // We detach the FrameView's custom scroll bars as early as 811 // We detach the FrameView's custom scroll bars as early as
800 // possible to prevent m_doc->detach() from messing with the view 812 // possible to prevent m_doc->detach() from messing with the view
801 // such that its scroll bars won't be torn down. 813 // such that its scroll bars won't be torn down.
802 // 814 //
803 // FIXME: We should revisit this. 815 // FIXME: We should revisit this.
804 if (m_view) 816 if (m_view)
805 m_view->prepareForDetach(); 817 m_view->prepareForDetach();
806 } 818 }
807 819
808 } // namespace blink 820 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698