OLD | NEW |
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 SecurityContext* LocalFrame::securityContext() const | 289 SecurityContext* LocalFrame::securityContext() const |
290 { | 290 { |
291 return document(); | 291 return document(); |
292 } | 292 } |
293 | 293 |
294 bool LocalFrame::checkLoadComplete() | 294 bool LocalFrame::checkLoadComplete() |
295 { | 295 { |
296 return loader().checkLoadCompleteForThisFrame(); | 296 return loader().checkLoadCompleteForThisFrame(); |
297 } | 297 } |
298 | 298 |
| 299 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) |
| 300 { |
| 301 if (!targetFrame.isLocalFrame()) |
| 302 return; |
| 303 |
| 304 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame); |
| 305 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"; |
| 306 |
| 307 // FIXME: should we print to the console of the document performing the navi
gation instead? |
| 308 targetLocalFrame.localDOMWindow()->printErrorMessage(message); |
| 309 } |
| 310 |
299 void LocalFrame::disconnectOwnerElement() | 311 void LocalFrame::disconnectOwnerElement() |
300 { | 312 { |
301 if (owner()) { | 313 if (owner()) { |
302 if (Document* document = this->document()) | 314 if (Document* document = this->document()) |
303 document->topDocument().clearAXObjectCache(); | 315 document->topDocument().clearAXObjectCache(); |
304 #if ENABLE(OILPAN) | 316 #if ENABLE(OILPAN) |
305 // First give the plugin elements holding persisted, | 317 // First give the plugin elements holding persisted, |
306 // renderer-less plugins the opportunity to dispose of them. | 318 // renderer-less plugins the opportunity to dispose of them. |
307 for (const auto& pluginElement : m_pluginElements) | 319 for (const auto& pluginElement : m_pluginElements) |
308 pluginElement->disconnectContentFrame(); | 320 pluginElement->disconnectContentFrame(); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 // We detach the FrameView's custom scroll bars as early as | 805 // We detach the FrameView's custom scroll bars as early as |
794 // possible to prevent m_doc->detach() from messing with the view | 806 // possible to prevent m_doc->detach() from messing with the view |
795 // such that its scroll bars won't be torn down. | 807 // such that its scroll bars won't be torn down. |
796 // | 808 // |
797 // FIXME: We should revisit this. | 809 // FIXME: We should revisit this. |
798 if (m_view) | 810 if (m_view) |
799 m_view->prepareForDetach(); | 811 m_view->prepareForDetach(); |
800 } | 812 } |
801 | 813 |
802 } // namespace blink | 814 } // namespace blink |
OLD | NEW |