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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 bool HTMLFrameElementBase::isURLAllowed() const | 54 bool HTMLFrameElementBase::isURLAllowed() const |
55 { | 55 { |
56 if (m_URL.isEmpty()) | 56 if (m_URL.isEmpty()) |
57 return true; | 57 return true; |
58 | 58 |
59 const KURL& completeURL = document().completeURL(m_URL); | 59 const KURL& completeURL = document().completeURL(m_URL); |
60 | 60 |
61 if (protocolIsJavaScript(completeURL)) { | 61 if (protocolIsJavaScript(completeURL)) { |
62 Document* contentDoc = this->contentDocument(); | 62 if (contentFrame() && !ScriptController::canAccessFromCurrentOrigin(toIs
olate(&document()), contentFrame())) |
63 if (contentDoc && !ScriptController::canAccessFromCurrentOrigin(contentD
oc->frame())) | |
64 return false; | 63 return false; |
65 } | 64 } |
66 | 65 |
67 LocalFrame* parentFrame = document().frame(); | 66 LocalFrame* parentFrame = document().frame(); |
68 if (parentFrame) | 67 if (parentFrame) |
69 return parentFrame->isURLAllowed(completeURL); | 68 return parentFrame->isURLAllowed(completeURL); |
70 | 69 |
71 return true; | 70 return true; |
72 } | 71 } |
73 | 72 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 frameOwnerPropertiesChanged(); | 247 frameOwnerPropertiesChanged(); |
249 } | 248 } |
250 | 249 |
251 void HTMLFrameElementBase::setMarginHeight(int marginHeight) | 250 void HTMLFrameElementBase::setMarginHeight(int marginHeight) |
252 { | 251 { |
253 m_marginHeight = marginHeight; | 252 m_marginHeight = marginHeight; |
254 frameOwnerPropertiesChanged(); | 253 frameOwnerPropertiesChanged(); |
255 } | 254 } |
256 | 255 |
257 } // namespace blink | 256 } // namespace blink |
OLD | NEW |