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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return toRenderEmbeddedObject(m_pluginNode->renderer())->widget(); | 152 return toRenderEmbeddedObject(m_pluginNode->renderer())->widget(); |
153 } | 153 } |
154 return 0; | 154 return 0; |
155 } | 155 } |
156 | 156 |
157 Node* PluginDocument::pluginNode() | 157 Node* PluginDocument::pluginNode() |
158 { | 158 { |
159 return m_pluginNode.get(); | 159 return m_pluginNode.get(); |
160 } | 160 } |
161 | 161 |
162 void PluginDocument::detach() | 162 void PluginDocument::detach(const AttachContext& context) |
163 { | 163 { |
164 // Release the plugin node so that we don't have a circular reference. | 164 // Release the plugin node so that we don't have a circular reference. |
165 m_pluginNode = 0; | 165 m_pluginNode = 0; |
166 if (FrameLoader* loader = frame()->loader()) | 166 if (FrameLoader* loader = frame()->loader()) |
167 loader->client()->redirectDataToPlugin(0); | 167 loader->client()->redirectDataToPlugin(0); |
168 HTMLDocument::detach(); | 168 HTMLDocument::detach(context); |
169 } | 169 } |
170 | 170 |
171 void PluginDocument::cancelManualPluginLoad() | 171 void PluginDocument::cancelManualPluginLoad() |
172 { | 172 { |
173 // PluginDocument::cancelManualPluginLoad should only be called once, but th
ere are issues | 173 // PluginDocument::cancelManualPluginLoad should only be called once, but th
ere are issues |
174 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. | 174 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. |
175 if (!shouldLoadPluginManually()) | 175 if (!shouldLoadPluginManually()) |
176 return; | 176 return; |
177 | 177 |
178 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); | 178 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); |
179 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); | 179 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); |
180 setShouldLoadPluginManually(false); | 180 setShouldLoadPluginManually(false); |
181 } | 181 } |
182 | 182 |
183 } | 183 } |
OLD | NEW |