| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 view->didFinishLoading(); | 136 view->didFinishLoading(); |
| 137 else | 137 else |
| 138 view->didFailLoading(error); | 138 view->didFailLoading(error); |
| 139 m_embedElement = 0; | 139 m_embedElement = 0; |
| 140 } | 140 } |
| 141 RawDataDocumentParser::finish(); | 141 RawDataDocumentParser::finish(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 PluginView* PluginDocumentParser::pluginView() const | 144 PluginView* PluginDocumentParser::pluginView() const |
| 145 { | 145 { |
| 146 if (Widget* widget = static_cast<PluginDocument*>(document())->pluginWidget(
)) { | 146 if (Widget* widget = toPluginDocument(document())->pluginWidget()) { |
| 147 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); | 147 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); |
| 148 return static_cast<PluginView*>(widget); | 148 return toPluginView(widget); |
| 149 } | 149 } |
| 150 return 0; | 150 return 0; |
| 151 } | 151 } |
| 152 | 152 |
| 153 PluginDocument::PluginDocument(const DocumentInit& initializer) | 153 PluginDocument::PluginDocument(const DocumentInit& initializer) |
| 154 : HTMLDocument(initializer, PluginDocumentClass) | 154 : HTMLDocument(initializer, PluginDocumentClass) |
| 155 , m_shouldLoadPluginManually(true) | 155 , m_shouldLoadPluginManually(true) |
| 156 { | 156 { |
| 157 setCompatibilityMode(QuirksMode); | 157 setCompatibilityMode(QuirksMode); |
| 158 lockCompatibilityMode(); | 158 lockCompatibilityMode(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |