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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers | 45 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers |
46 // when using fallback content. | 46 // when using fallback content. |
47 if (!renderer() || !renderer()->isRenderPart()) | 47 if (!renderer() || !renderer()->isRenderPart()) |
48 return 0; | 48 return 0; |
49 return toRenderPart(renderer()); | 49 return toRenderPart(renderer()); |
50 } | 50 } |
51 | 51 |
52 void HTMLFrameOwnerElement::willRemove() | 52 void HTMLFrameOwnerElement::willRemove() |
53 { | 53 { |
54 if (Frame* frame = contentFrame()) { | 54 if (Frame* frame = contentFrame()) { |
| 55 RefPtr<Frame> protect(frame); |
| 56 frame->loader()->frameDetached(); |
55 frame->disconnectOwnerElement(); | 57 frame->disconnectOwnerElement(); |
56 frame->loader()->frameDetached(); | |
57 } | 58 } |
58 | 59 |
59 HTMLElement::willRemove(); | 60 HTMLElement::willRemove(); |
60 } | 61 } |
61 | 62 |
62 HTMLFrameOwnerElement::~HTMLFrameOwnerElement() | 63 HTMLFrameOwnerElement::~HTMLFrameOwnerElement() |
63 { | 64 { |
64 if (m_contentFrame) | 65 if (m_contentFrame) |
65 m_contentFrame->disconnectOwnerElement(); | 66 m_contentFrame->disconnectOwnerElement(); |
66 } | 67 } |
(...skipping 25 matching lines...) Expand all Loading... |
92 Document* doc = contentDocument(); | 93 Document* doc = contentDocument(); |
93 if (doc && doc->isSVGDocument()) | 94 if (doc && doc->isSVGDocument()) |
94 return static_cast<SVGDocument*>(doc); | 95 return static_cast<SVGDocument*>(doc); |
95 // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument | 96 // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument |
96 ec = NOT_SUPPORTED_ERR; | 97 ec = NOT_SUPPORTED_ERR; |
97 return 0; | 98 return 0; |
98 } | 99 } |
99 #endif | 100 #endif |
100 | 101 |
101 } // namespace WebCore | 102 } // namespace WebCore |
OLD | NEW |