| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 using namespace HTMLNames; | 44 using namespace HTMLNames; |
| 45 | 45 |
| 46 // FIXME: Share more code with MediaDocumentParser. | 46 // FIXME: Share more code with MediaDocumentParser. |
| 47 class PluginDocumentParser : public RawDataDocumentParser { | 47 class PluginDocumentParser : public RawDataDocumentParser { |
| 48 public: | 48 public: |
| 49 static PassRefPtrWillBeRawPtr<PluginDocumentParser> create(PluginDocument* d
ocument) | 49 static PassRefPtrWillBeRawPtr<PluginDocumentParser> create(PluginDocument* d
ocument) |
| 50 { | 50 { |
| 51 return adoptRefWillBeNoop(new PluginDocumentParser(document)); | 51 return adoptRefWillBeNoop(new PluginDocumentParser(document)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void trace(Visitor* visitor) override | 54 DEFINE_INLINE_VIRTUAL_TRACE() |
| 55 { | 55 { |
| 56 visitor->trace(m_embedElement); | 56 visitor->trace(m_embedElement); |
| 57 RawDataDocumentParser::trace(visitor); | 57 RawDataDocumentParser::trace(visitor); |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 PluginDocumentParser(Document* document) | 61 PluginDocumentParser(Document* document) |
| 62 : RawDataDocumentParser(document) | 62 : RawDataDocumentParser(document) |
| 63 , m_embedElement(nullptr) | 63 , m_embedElement(nullptr) |
| 64 { | 64 { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 return m_pluginNode.get(); | 178 return m_pluginNode.get(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void PluginDocument::detach(const AttachContext& context) | 181 void PluginDocument::detach(const AttachContext& context) |
| 182 { | 182 { |
| 183 // Release the plugin node so that we don't have a circular reference. | 183 // Release the plugin node so that we don't have a circular reference. |
| 184 m_pluginNode = nullptr; | 184 m_pluginNode = nullptr; |
| 185 HTMLDocument::detach(context); | 185 HTMLDocument::detach(context); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void PluginDocument::trace(Visitor* visitor) | 188 DEFINE_TRACE(PluginDocument) |
| 189 { | 189 { |
| 190 visitor->trace(m_pluginNode); | 190 visitor->trace(m_pluginNode); |
| 191 HTMLDocument::trace(visitor); | 191 HTMLDocument::trace(visitor); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } | 194 } |
| OLD | NEW |