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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 frame->loader()->client()->redirectDataToPlugin(widget); | 129 frame->loader()->client()->redirectDataToPlugin(widget); |
130 // In a plugin document, the main resource is the plugin. If we have
a null widget, that means | 130 // In a plugin document, the main resource is the plugin. If we have
a null widget, that means |
131 // the loading of the plugin was cancelled, which gives us a null ma
inResourceLoader(), so we | 131 // the loading of the plugin was cancelled, which gives us a null ma
inResourceLoader(), so we |
132 // need to have this call in a null check of the widget or of mainRe
sourceLoader(). | 132 // need to have this call in a null check of the widget or of mainRe
sourceLoader(). |
133 frame->loader()->activeDocumentLoader()->setMainResourceDataBufferin
gPolicy(DoNotBufferData); | 133 frame->loader()->activeDocumentLoader()->setMainResourceDataBufferin
gPolicy(DoNotBufferData); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 | 137 |
138 PluginDocument::PluginDocument(Frame* frame, const KURL& url) | 138 PluginDocument::PluginDocument(Frame* frame, const KURL& url) |
139 : HTMLDocument(frame, url) | 139 : HTMLDocument(frame, url, PluginDocumentClass) |
140 , m_shouldLoadPluginManually(true) | 140 , m_shouldLoadPluginManually(true) |
141 { | 141 { |
142 setCompatibilityMode(QuirksMode); | 142 setCompatibilityMode(QuirksMode); |
143 lockCompatibilityMode(); | 143 lockCompatibilityMode(); |
144 } | 144 } |
145 | 145 |
146 PassRefPtr<DocumentParser> PluginDocument::createParser() | 146 PassRefPtr<DocumentParser> PluginDocument::createParser() |
147 { | 147 { |
148 return PluginDocumentParser::create(this); | 148 return PluginDocumentParser::create(this); |
149 } | 149 } |
(...skipping 27 matching lines...) Expand all Loading... |
177 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. | 177 // with how many times we call beforeload on object elements. <rdar://proble
m/8441094>. |
178 if (!shouldLoadPluginManually()) | 178 if (!shouldLoadPluginManually()) |
179 return; | 179 return; |
180 | 180 |
181 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); | 181 DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); |
182 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); | 182 documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(doc
umentLoader->request())); |
183 setShouldLoadPluginManually(false); | 183 setShouldLoadPluginManually(false); |
184 } | 184 } |
185 | 185 |
186 } | 186 } |
OLD | NEW |