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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 PluginView* PluginDocumentParser::pluginView() const | 150 PluginView* PluginDocumentParser::pluginView() const |
151 { | 151 { |
152 if (Widget* widget = static_cast<PluginDocument*>(document())->pluginWidget(
)) { | 152 if (Widget* widget = static_cast<PluginDocument*>(document())->pluginWidget(
)) { |
153 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); | 153 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); |
154 return static_cast<PluginView*>(widget); | 154 return static_cast<PluginView*>(widget); |
155 } | 155 } |
156 return 0; | 156 return 0; |
157 } | 157 } |
158 | 158 |
159 PluginDocument::PluginDocument(Frame* frame, const KURL& url) | 159 PluginDocument::PluginDocument(const DocumentInit& initializer) |
160 : HTMLDocument(frame, url, PluginDocumentClass) | 160 : HTMLDocument(initializer, PluginDocumentClass) |
161 , m_shouldLoadPluginManually(true) | 161 , m_shouldLoadPluginManually(true) |
162 { | 162 { |
163 setCompatibilityMode(QuirksMode); | 163 setCompatibilityMode(QuirksMode); |
164 lockCompatibilityMode(); | 164 lockCompatibilityMode(); |
165 } | 165 } |
166 | 166 |
167 PassRefPtr<DocumentParser> PluginDocument::createParser() | 167 PassRefPtr<DocumentParser> PluginDocument::createParser() |
168 { | 168 { |
169 return PluginDocumentParser::create(this); | 169 return PluginDocumentParser::create(this); |
170 } | 170 } |
(...skipping 25 matching lines...) Expand all Loading... |
196 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. | 196 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. |
197 if (!shouldLoadPluginManually()) | 197 if (!shouldLoadPluginManually()) |
198 return; | 198 return; |
199 | 199 |
200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); | 200 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); |
201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); | 201 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); |
202 setShouldLoadPluginManually(false); | 202 setShouldLoadPluginManually(false); |
203 } | 203 } |
204 | 204 |
205 } | 205 } |
OLD | NEW |