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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // finalization. Too late to access various heap objects at that | 286 // finalization. Too late to access various heap objects at that |
287 // stage. | 287 // stage. |
288 m_loader.clear(); | 288 m_loader.clear(); |
289 } | 289 } |
290 | 290 |
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() | |
297 { | |
298 return loader().checkLoadCompleteForThisFrame(); | |
299 } | |
300 | |
301 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) | 296 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) |
302 { | 297 { |
303 if (!targetFrame.isLocalFrame()) | 298 if (!targetFrame.isLocalFrame()) |
304 return; | 299 return; |
305 | 300 |
306 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame); | 301 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"; | 302 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 | 303 |
309 // FIXME: should we print to the console of the document performing the navi
gation instead? | 304 // FIXME: should we print to the console of the document performing the navi
gation instead? |
310 targetLocalFrame.localDOMWindow()->printErrorMessage(message); | 305 targetLocalFrame.localDOMWindow()->printErrorMessage(message); |
311 } | 306 } |
312 | 307 |
| 308 bool LocalFrame::isLoadingAsChild() const |
| 309 { |
| 310 return isLoading() || !document()->isLoadCompleted(); |
| 311 } |
| 312 |
313 void LocalFrame::disconnectOwnerElement() | 313 void LocalFrame::disconnectOwnerElement() |
314 { | 314 { |
315 if (owner()) { | 315 if (owner()) { |
316 if (Document* document = this->document()) | 316 if (Document* document = this->document()) |
317 document->topDocument().clearAXObjectCache(); | 317 document->topDocument().clearAXObjectCache(); |
318 #if ENABLE(OILPAN) | 318 #if ENABLE(OILPAN) |
319 // First give the plugin elements holding persisted, | 319 // First give the plugin elements holding persisted, |
320 // renderer-less plugins the opportunity to dispose of them. | 320 // renderer-less plugins the opportunity to dispose of them. |
321 for (const auto& pluginElement : m_pluginElements) | 321 for (const auto& pluginElement : m_pluginElements) |
322 pluginElement->disconnectContentFrame(); | 322 pluginElement->disconnectContentFrame(); |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 // We detach the FrameView's custom scroll bars as early as | 817 // We detach the FrameView's custom scroll bars as early as |
818 // possible to prevent m_doc->detach() from messing with the view | 818 // possible to prevent m_doc->detach() from messing with the view |
819 // such that its scroll bars won't be torn down. | 819 // such that its scroll bars won't be torn down. |
820 // | 820 // |
821 // FIXME: We should revisit this. | 821 // FIXME: We should revisit this. |
822 if (m_view) | 822 if (m_view) |
823 m_view->prepareForDetach(); | 823 m_view->prepareForDetach(); |
824 } | 824 } |
825 | 825 |
826 } // namespace blink | 826 } // namespace blink |
OLD | NEW |