| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool
lockBackForwardList); | 70 bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool
lockBackForwardList); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 virtual bool isKeyboardFocusable() const OVERRIDE; | 73 virtual bool isKeyboardFocusable() const OVERRIDE; |
| 74 virtual bool isFrameOwnerElement() const OVERRIDE { return true; } | 74 virtual bool isFrameOwnerElement() const OVERRIDE { return true; } |
| 75 | 75 |
| 76 Frame* m_contentFrame; | 76 Frame* m_contentFrame; |
| 77 SandboxFlags m_sandboxFlags; | 77 SandboxFlags m_sandboxFlags; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 inline HTMLFrameOwnerElement* toHTMLFrameOwnerElement(Node* node) | 80 DEFINE_NODE_TYPE_CASTS(HTMLFrameOwnerElement, isFrameOwnerElement()); |
| 81 { | |
| 82 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isFrameOwnerElement()); | |
| 83 return static_cast<HTMLFrameOwnerElement*>(node); | |
| 84 } | |
| 85 | |
| 86 inline const HTMLFrameOwnerElement* toHTMLFrameOwnerElement(const Node* node) | |
| 87 { | |
| 88 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isFrameOwnerElement()); | |
| 89 return static_cast<const HTMLFrameOwnerElement*>(node); | |
| 90 } | |
| 91 | 81 |
| 92 class SubframeLoadingDisabler { | 82 class SubframeLoadingDisabler { |
| 93 public: | 83 public: |
| 94 explicit SubframeLoadingDisabler(Node* root) | 84 explicit SubframeLoadingDisabler(Node* root) |
| 95 : m_root(root) | 85 : m_root(root) |
| 96 { | 86 { |
| 97 disabledSubtreeRoots().add(m_root); | 87 disabledSubtreeRoots().add(m_root); |
| 98 } | 88 } |
| 99 | 89 |
| 100 ~SubframeLoadingDisabler() | 90 ~SubframeLoadingDisabler() |
| (...skipping 16 matching lines...) Expand all Loading... |
| 117 DEFINE_STATIC_LOCAL(HashCountedSet<Node*>, nodes, ()); | 107 DEFINE_STATIC_LOCAL(HashCountedSet<Node*>, nodes, ()); |
| 118 return nodes; | 108 return nodes; |
| 119 } | 109 } |
| 120 | 110 |
| 121 Node* m_root; | 111 Node* m_root; |
| 122 }; | 112 }; |
| 123 | 113 |
| 124 } // namespace WebCore | 114 } // namespace WebCore |
| 125 | 115 |
| 126 #endif // HTMLFrameOwnerElement_h | 116 #endif // HTMLFrameOwnerElement_h |
| OLD | NEW |