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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 createDocumentStructure(); | 128 createDocumentStructure(); |
129 | 129 |
130 if (!length) | 130 if (!length) |
131 return; | 131 return; |
132 if (PluginView* view = pluginView()) | 132 if (PluginView* view = pluginView()) |
133 view->didReceiveData(data, length); | 133 view->didReceiveData(data, length); |
134 } | 134 } |
135 | 135 |
136 void PluginDocumentParser::finish() | 136 void PluginDocumentParser::finish() |
137 { | 137 { |
138 if (PluginView* view = pluginView()) { | 138 m_embedElement = nullptr; |
139 const ResourceError& error = document()->loader()->mainDocumentError(); | |
Nate Chapin
2015/11/18 00:03:58
It seems really weird that this if() block is here
| |
140 if (error.isNull()) | |
141 view->didFinishLoading(); | |
dcheng
2015/11/18 18:38:18
I think (but it's hard to tell) that these are the
Nate Chapin
2015/11/18 23:28:50
Done.
| |
142 else | |
143 view->didFailLoading(error); | |
144 m_embedElement = nullptr; | |
145 } | |
146 RawDataDocumentParser::finish(); | 139 RawDataDocumentParser::finish(); |
147 } | 140 } |
148 | 141 |
149 PluginView* PluginDocumentParser::pluginView() const | 142 PluginView* PluginDocumentParser::pluginView() const |
150 { | 143 { |
151 if (Widget* widget = toPluginDocument(document())->pluginWidget()) { | 144 if (Widget* widget = toPluginDocument(document())->pluginWidget()) { |
152 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); | 145 ASSERT_WITH_SECURITY_IMPLICATION(widget->isPluginContainer()); |
153 return toPluginView(widget); | 146 return toPluginView(widget); |
154 } | 147 } |
155 return 0; | 148 return 0; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 HTMLDocument::detach(context); | 181 HTMLDocument::detach(context); |
189 } | 182 } |
190 | 183 |
191 DEFINE_TRACE(PluginDocument) | 184 DEFINE_TRACE(PluginDocument) |
192 { | 185 { |
193 visitor->trace(m_pluginNode); | 186 visitor->trace(m_pluginNode); |
194 HTMLDocument::trace(visitor); | 187 HTMLDocument::trace(visitor); |
195 } | 188 } |
196 | 189 |
197 } | 190 } |
OLD | NEW |