| 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 13 matching lines...) Expand all Loading... |
| 24 #include "config.h" | 24 #include "config.h" |
| 25 #include "core/html/HTMLFrameElementBase.h" | 25 #include "core/html/HTMLFrameElementBase.h" |
| 26 | 26 |
| 27 #include "HTMLNames.h" | 27 #include "HTMLNames.h" |
| 28 #include "bindings/v8/ScriptController.h" | 28 #include "bindings/v8/ScriptController.h" |
| 29 #include "bindings/v8/ScriptEventListener.h" | 29 #include "bindings/v8/ScriptEventListener.h" |
| 30 #include "core/dom/Attribute.h" | 30 #include "core/dom/Attribute.h" |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/frame/FrameView.h" | 32 #include "core/frame/FrameView.h" |
| 33 #include "core/frame/LocalFrame.h" | 33 #include "core/frame/LocalFrame.h" |
| 34 #include "core/html/HTMLFrameJavaScriptURLOpener.h" |
| 34 #include "core/html/parser/HTMLParserIdioms.h" | 35 #include "core/html/parser/HTMLParserIdioms.h" |
| 35 #include "core/loader/FrameLoader.h" | 36 #include "core/loader/FrameLoader.h" |
| 36 #include "core/page/FocusController.h" | 37 #include "core/page/FocusController.h" |
| 37 #include "core/page/Page.h" | 38 #include "core/page/Page.h" |
| 38 #include "core/rendering/RenderPart.h" | 39 #include "core/rendering/RenderPart.h" |
| 39 | 40 |
| 40 namespace WebCore { | 41 namespace WebCore { |
| 41 | 42 |
| 42 using namespace HTMLNames; | 43 using namespace HTMLNames; |
| 43 | 44 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 145 } |
| 145 | 146 |
| 146 void HTMLFrameElementBase::didNotifySubtreeInsertionsToDocument() | 147 void HTMLFrameElementBase::didNotifySubtreeInsertionsToDocument() |
| 147 { | 148 { |
| 148 if (!document().frame()) | 149 if (!document().frame()) |
| 149 return; | 150 return; |
| 150 | 151 |
| 151 if (!SubframeLoadingDisabler::canLoadFrame(*this)) | 152 if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
| 152 return; | 153 return; |
| 153 | 154 |
| 154 setNameAndOpenURL(); | 155 if (!protocolIsJavaScript(m_URL)) { |
| 156 setNameAndOpenURL(); |
| 157 return; |
| 158 } |
| 159 |
| 160 HTMLFrameJavaScriptURLOpener::instance().request(this); |
| 155 } | 161 } |
| 156 | 162 |
| 157 void HTMLFrameElementBase::attach(const AttachContext& context) | 163 void HTMLFrameElementBase::attach(const AttachContext& context) |
| 158 { | 164 { |
| 159 HTMLFrameOwnerElement::attach(context); | 165 HTMLFrameOwnerElement::attach(context); |
| 160 | 166 |
| 161 if (RenderPart* part = renderPart()) { | 167 if (RenderPart* part = renderPart()) { |
| 162 if (Frame* frame = contentFrame()) { | 168 if (Frame* frame = contentFrame()) { |
| 163 if (frame->isLocalFrame()) | 169 if (frame->isLocalFrame()) |
| 164 part->setWidget(toLocalFrame(frame)->view()); | 170 part->setWidget(toLocalFrame(frame)->view()); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 222 |
| 217 int HTMLFrameElementBase::height() | 223 int HTMLFrameElementBase::height() |
| 218 { | 224 { |
| 219 document().updateLayoutIgnorePendingStylesheets(); | 225 document().updateLayoutIgnorePendingStylesheets(); |
| 220 if (!renderBox()) | 226 if (!renderBox()) |
| 221 return 0; | 227 return 0; |
| 222 return renderBox()->height(); | 228 return renderBox()->height(); |
| 223 } | 229 } |
| 224 | 230 |
| 225 } // namespace WebCore | 231 } // namespace WebCore |
| OLD | NEW |