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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // stage. | 279 // stage. |
280 loader().clear(); | 280 loader().clear(); |
281 #endif | 281 #endif |
282 } | 282 } |
283 | 283 |
284 SecurityContext* LocalFrame::securityContext() const | 284 SecurityContext* LocalFrame::securityContext() const |
285 { | 285 { |
286 return document(); | 286 return document(); |
287 } | 287 } |
288 | 288 |
| 289 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) |
| 290 { |
| 291 if (!targetFrame.isLocalFrame()) |
| 292 return; |
| 293 |
| 294 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame); |
| 295 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"; |
| 296 |
| 297 // FIXME: should we print to the console of the document performing the navi
gation instead? |
| 298 targetLocalFrame.localDOMWindow()->printErrorMessage(message); |
| 299 } |
| 300 |
289 void LocalFrame::disconnectOwnerElement() | 301 void LocalFrame::disconnectOwnerElement() |
290 { | 302 { |
291 if (owner()) { | 303 if (owner()) { |
292 if (Document* document = this->document()) | 304 if (Document* document = this->document()) |
293 document->topDocument().clearAXObjectCache(); | 305 document->topDocument().clearAXObjectCache(); |
294 #if ENABLE(OILPAN) | 306 #if ENABLE(OILPAN) |
295 // First give the plugin elements holding persisted, | 307 // First give the plugin elements holding persisted, |
296 // renderer-less plugins the opportunity to dispose of them. | 308 // renderer-less plugins the opportunity to dispose of them. |
297 for (const auto& pluginElement : m_pluginElements) | 309 for (const auto& pluginElement : m_pluginElements) |
298 pluginElement->disconnectContentFrame(); | 310 pluginElement->disconnectContentFrame(); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 // We detach the FrameView's custom scroll bars as early as | 795 // We detach the FrameView's custom scroll bars as early as |
784 // possible to prevent m_doc->detach() from messing with the view | 796 // possible to prevent m_doc->detach() from messing with the view |
785 // such that its scroll bars won't be torn down. | 797 // such that its scroll bars won't be torn down. |
786 // | 798 // |
787 // FIXME: We should revisit this. | 799 // FIXME: We should revisit this. |
788 if (m_view) | 800 if (m_view) |
789 m_view->prepareForDetach(); | 801 m_view->prepareForDetach(); |
790 } | 802 } |
791 | 803 |
792 } // namespace blink | 804 } // namespace blink |
OLD | NEW |