| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 class SubframeLoadingDisabler { | 130 class SubframeLoadingDisabler { |
| 131 STACK_ALLOCATED(); | 131 STACK_ALLOCATED(); |
| 132 | 132 |
| 133 public: | 133 public: |
| 134 explicit SubframeLoadingDisabler(Node& root) | 134 explicit SubframeLoadingDisabler(Node& root) |
| 135 : SubframeLoadingDisabler(&root) {} | 135 : SubframeLoadingDisabler(&root) {} |
| 136 | 136 |
| 137 explicit SubframeLoadingDisabler(Node* root) : m_root(root) { | 137 explicit SubframeLoadingDisabler(Node* root) : m_root(root) { |
| 138 if (m_root) | 138 if (m_root) |
| 139 disabledSubtreeRoots().add(m_root); | 139 disabledSubtreeRoots().insert(m_root); |
| 140 } | 140 } |
| 141 | 141 |
| 142 ~SubframeLoadingDisabler() { | 142 ~SubframeLoadingDisabler() { |
| 143 if (m_root) | 143 if (m_root) |
| 144 disabledSubtreeRoots().remove(m_root); | 144 disabledSubtreeRoots().remove(m_root); |
| 145 } | 145 } |
| 146 | 146 |
| 147 static bool canLoadFrame(HTMLFrameOwnerElement& owner) { | 147 static bool canLoadFrame(HTMLFrameOwnerElement& owner) { |
| 148 for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) { | 148 for (Node* node = &owner; node; node = node->parentOrShadowHostNode()) { |
| 149 if (disabledSubtreeRoots().contains(node)) | 149 if (disabledSubtreeRoots().contains(node)) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 167 | 167 |
| 168 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, | 168 DEFINE_TYPE_CASTS(HTMLFrameOwnerElement, |
| 169 FrameOwner, | 169 FrameOwner, |
| 170 owner, | 170 owner, |
| 171 owner->isLocal(), | 171 owner->isLocal(), |
| 172 owner.isLocal()); | 172 owner.isLocal()); |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| 175 | 175 |
| 176 #endif // HTMLFrameOwnerElement_h | 176 #endif // HTMLFrameOwnerElement_h |
| OLD | NEW |