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 } | 286 } |
287 | 287 |
288 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) | 288 void LocalFrame::printNavigationErrorMessage(const Frame& targetFrame, const cha
r* reason) |
289 { | 289 { |
290 if (!targetFrame.isLocalFrame()) | 290 if (!targetFrame.isLocalFrame()) |
291 return; | 291 return; |
292 | 292 |
293 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame); | 293 const LocalFrame& targetLocalFrame = toLocalFrameTemporary(targetFrame); |
294 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"; | 294 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"; |
295 | 295 |
296 // FIXME: should we print to the console of the document performing the navi
gation instead? | 296 localDOMWindow()->printErrorMessage(message); |
297 targetLocalFrame.localDOMWindow()->printErrorMessage(message); | |
298 } | 297 } |
299 | 298 |
300 bool LocalFrame::isLoadingAsChild() const | 299 bool LocalFrame::isLoadingAsChild() const |
301 { | 300 { |
302 return isLoading() || !document()->isLoadCompleted(); | 301 return isLoading() || !document()->isLoadCompleted(); |
303 } | 302 } |
304 | 303 |
305 WindowProxyManager* LocalFrame::windowProxyManager() const | 304 WindowProxyManager* LocalFrame::windowProxyManager() const |
306 { | 305 { |
307 return m_script->windowProxyManager(); | 306 return m_script->windowProxyManager(); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 , m_shouldSendDPRHint(false) | 817 , m_shouldSendDPRHint(false) |
819 , m_shouldSendRWHint(false) | 818 , m_shouldSendRWHint(false) |
820 { | 819 { |
821 if (isLocalRoot()) | 820 if (isLocalRoot()) |
822 m_instrumentingAgents = InstrumentingAgents::create(); | 821 m_instrumentingAgents = InstrumentingAgents::create(); |
823 else | 822 else |
824 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 823 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
825 } | 824 } |
826 | 825 |
827 } // namespace blink | 826 } // namespace blink |
OLD | NEW |