| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 170         return toRenderEmbeddedObject(m_pluginNode->renderer())->widget(); | 170         return toRenderEmbeddedObject(m_pluginNode->renderer())->widget(); | 
| 171     } | 171     } | 
| 172     return 0; | 172     return 0; | 
| 173 } | 173 } | 
| 174 | 174 | 
| 175 Node* PluginDocument::pluginNode() | 175 Node* PluginDocument::pluginNode() | 
| 176 { | 176 { | 
| 177     return m_pluginNode.get(); | 177     return m_pluginNode.get(); | 
| 178 } | 178 } | 
| 179 | 179 | 
| 180 void PluginDocument::detach(const AttachContext& context) | 180 void PluginDocument::destroyRenderTree(const AttachContext& context) | 
| 181 { | 181 { | 
| 182     // Release the plugin node so that we don't have a circular reference. | 182     // Release the plugin node so that we don't have a circular reference. | 
| 183     m_pluginNode = 0; | 183     m_pluginNode = 0; | 
| 184     HTMLDocument::detach(context); | 184     HTMLDocument::destroyRenderTree(context); | 
| 185 } | 185 } | 
| 186 | 186 | 
| 187 void PluginDocument::cancelManualPluginLoad() | 187 void PluginDocument::cancelManualPluginLoad() | 
| 188 { | 188 { | 
| 189     // PluginDocument::cancelManualPluginLoad should only be called once, but th
     ere are issues | 189     // PluginDocument::cancelManualPluginLoad should only be called once, but th
     ere are issues | 
| 190     // with how many times we call beforeload on object elements. <rdar://proble
     m/8441094>. | 190     // with how many times we call beforeload on object elements. <rdar://proble
     m/8441094>. | 
| 191     if (!shouldLoadPluginManually()) | 191     if (!shouldLoadPluginManually()) | 
| 192         return; | 192         return; | 
| 193 | 193 | 
| 194     DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); | 194     DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); | 
| 195     documentLoader->cancelMainResourceLoad(ResourceError::cancelledError(documen
     tLoader->request().url())); | 195     documentLoader->cancelMainResourceLoad(ResourceError::cancelledError(documen
     tLoader->request().url())); | 
| 196     setShouldLoadPluginManually(false); | 196     setShouldLoadPluginManually(false); | 
| 197 } | 197 } | 
| 198 | 198 | 
| 199 } | 199 } | 
| OLD | NEW | 
|---|