| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 | 172 |
| 173 DocumentParser* PluginDocument::createParser() | 173 DocumentParser* PluginDocument::createParser() |
| 174 { | 174 { |
| 175 return PluginDocumentParser::create(this); | 175 return PluginDocumentParser::create(this); |
| 176 } | 176 } |
| 177 | 177 |
| 178 Widget* PluginDocument::pluginWidget() | 178 Widget* PluginDocument::pluginWidget() |
| 179 { | 179 { |
| 180 if (m_pluginNode && m_pluginNode->layoutObject()) { | 180 if (m_pluginNode && m_pluginNode->layoutObject()) { |
| 181 ASSERT(m_pluginNode->layoutObject()->isEmbeddedObject()); | 181 CHECK(m_pluginNode->layoutObject()->isEmbeddedObject()); |
| 182 return toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget(); | 182 return toLayoutEmbeddedObject(m_pluginNode->layoutObject())->widget(); |
| 183 } | 183 } |
| 184 return 0; | 184 return 0; |
| 185 } | 185 } |
| 186 | 186 |
| 187 Node* PluginDocument::pluginNode() | 187 Node* PluginDocument::pluginNode() |
| 188 { | 188 { |
| 189 return m_pluginNode.get(); | 189 return m_pluginNode.get(); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void PluginDocument::detachLayoutTree(const AttachContext& context) | 192 void PluginDocument::detachLayoutTree(const AttachContext& context) |
| 193 { | 193 { |
| 194 // Release the plugin node so that we don't have a circular reference. | 194 // Release the plugin node so that we don't have a circular reference. |
| 195 m_pluginNode = nullptr; | 195 m_pluginNode = nullptr; |
| 196 HTMLDocument::detachLayoutTree(context); | 196 HTMLDocument::detachLayoutTree(context); |
| 197 } | 197 } |
| 198 | 198 |
| 199 DEFINE_TRACE(PluginDocument) | 199 DEFINE_TRACE(PluginDocument) |
| 200 { | 200 { |
| 201 visitor->trace(m_pluginNode); | 201 visitor->trace(m_pluginNode); |
| 202 HTMLDocument::trace(visitor); | 202 HTMLDocument::trace(visitor); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |