Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 { | 123 { |
| 124 if (!length) | 124 if (!length) |
| 125 return; | 125 return; |
| 126 | 126 |
| 127 Frame* frame = document()->frame(); | 127 Frame* frame = document()->frame(); |
| 128 Settings* settings = frame->settings(); | 128 Settings* settings = frame->settings(); |
| 129 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl ed(), document()->url())) | 129 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl ed(), document()->url())) |
| 130 return; | 130 return; |
| 131 | 131 |
| 132 document()->cachedImage()->appendData(data, length); | 132 document()->cachedImage()->appendData(data, length); |
| 133 // Make sure image renderer gets created - crbug.com/320244 | |
|
esprehn
2014/02/22 02:48:28
// Make sure the image renderer gets created becau
| |
| 134 document()->updateStyleIfNeeded(); | |
| 133 document()->imageUpdated(); | 135 document()->imageUpdated(); |
| 134 } | 136 } |
| 135 | 137 |
| 136 void ImageDocumentParser::finish() | 138 void ImageDocumentParser::finish() |
| 137 { | 139 { |
| 138 if (!isStopped() && document()->imageElement()) { | 140 if (!isStopped() && document()->imageElement()) { |
| 139 ImageResource* cachedImage = document()->cachedImage(); | 141 ImageResource* cachedImage = document()->cachedImage(); |
| 140 cachedImage->finish(); | 142 cachedImage->finish(); |
| 141 cachedImage->setResponse(document()->frame()->loader().documentLoader()- >response()); | 143 cachedImage->setResponse(document()->frame()->loader().documentLoader()- >response()); |
| 142 | 144 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 } | 384 } |
| 383 | 385 |
| 384 bool ImageEventListener::operator==(const EventListener& listener) | 386 bool ImageEventListener::operator==(const EventListener& listener) |
| 385 { | 387 { |
| 386 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener)) | 388 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener)) |
| 387 return m_doc == imageEventListener->m_doc; | 389 return m_doc == imageEventListener->m_doc; |
| 388 return false; | 390 return false; |
| 389 } | 391 } |
| 390 | 392 |
| 391 } | 393 } |
| OLD | NEW |