| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) | 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return false; | 63 return false; |
| 64 } | 64 } |
| 65 | 65 |
| 66 LocalFrame* parentFrame = document().frame(); | 66 LocalFrame* parentFrame = document().frame(); |
| 67 if (parentFrame) | 67 if (parentFrame) |
| 68 return parentFrame->isURLAllowed(completeURL); | 68 return parentFrame->isURLAllowed(completeURL); |
| 69 | 69 |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void HTMLFrameElementBase::openURL(bool lockBackForwardList) | 73 void HTMLFrameElementBase::openURL(bool replaceCurrentItem) |
| 74 { | 74 { |
| 75 if (!isURLAllowed()) | 75 if (!isURLAllowed()) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 if (m_URL.isEmpty()) | 78 if (m_URL.isEmpty()) |
| 79 m_URL = AtomicString(blankURL().string()); | 79 m_URL = AtomicString(blankURL().string()); |
| 80 | 80 |
| 81 LocalFrame* parentFrame = document().frame(); | 81 LocalFrame* parentFrame = document().frame(); |
| 82 if (!parentFrame) | 82 if (!parentFrame) |
| 83 return; | 83 return; |
| 84 | 84 |
| 85 // Support for <frame src="javascript:string"> | 85 // Support for <frame src="javascript:string"> |
| 86 KURL scriptURL; | 86 KURL scriptURL; |
| 87 KURL url = document().completeURL(m_URL); | 87 KURL url = document().completeURL(m_URL); |
| 88 if (protocolIsJavaScript(m_URL)) { | 88 if (protocolIsJavaScript(m_URL)) { |
| 89 scriptURL = url; | 89 scriptURL = url; |
| 90 url = blankURL(); | 90 url = blankURL(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList)) | 93 if (!loadOrRedirectSubframe(url, m_frameName, replaceCurrentItem)) |
| 94 return; | 94 return; |
| 95 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame(
)) | 95 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame(
)) |
| 96 return; | 96 return; |
| 97 toLocalFrame(contentFrame())->script().executeScriptIfJavaScriptURL(scriptUR
L); | 97 toLocalFrame(contentFrame())->script().executeScriptIfJavaScriptURL(scriptUR
L); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi
cString& value) | 100 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi
cString& value) |
| 101 { | 101 { |
| 102 if (name == srcdocAttr) { | 102 if (name == srcdocAttr) { |
| 103 setLocation("about:srcdoc"); | 103 setLocation("about:srcdoc"); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void HTMLFrameElementBase::defaultEventHandler(Event* event) | 213 void HTMLFrameElementBase::defaultEventHandler(Event* event) |
| 214 { | 214 { |
| 215 if (contentFrame() && contentFrame()->isRemoteFrame()) { | 215 if (contentFrame() && contentFrame()->isRemoteFrame()) { |
| 216 toRemoteFrame(contentFrame())->forwardInputEvent(event); | 216 toRemoteFrame(contentFrame())->forwardInputEvent(event); |
| 217 return; | 217 return; |
| 218 } | 218 } |
| 219 HTMLFrameOwnerElement::defaultEventHandler(event); | 219 HTMLFrameOwnerElement::defaultEventHandler(event); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |