| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 return; | 124 return; |
| 125 | 125 |
| 126 LocalFrame* frame = document()->frame(); | 126 LocalFrame* frame = document()->frame(); |
| 127 Settings* settings = frame->settings(); | 127 Settings* settings = frame->settings(); |
| 128 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl
ed(), document()->url())) | 128 if (!frame->loader().client()->allowImage(!settings || settings->imagesEnabl
ed(), document()->url())) |
| 129 return; | 129 return; |
| 130 | 130 |
| 131 document()->cachedImage()->appendData(data, length); | 131 document()->cachedImage()->appendData(data, length); |
| 132 // Make sure the image renderer gets created because we need the renderer | 132 // Make sure the image renderer gets created because we need the renderer |
| 133 // to read the aspect ratio. See crbug.com/320244 | 133 // to read the aspect ratio. See crbug.com/320244 |
| 134 document()->updateStyleIfNeeded(); | 134 document()->updateRenderTreeIfNeeded(); |
| 135 document()->imageUpdated(); | 135 document()->imageUpdated(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void ImageDocumentParser::finish() | 138 void ImageDocumentParser::finish() |
| 139 { | 139 { |
| 140 if (!isStopped() && document()->imageElement()) { | 140 if (!isStopped() && document()->imageElement()) { |
| 141 ImageResource* cachedImage = document()->cachedImage(); | 141 ImageResource* cachedImage = document()->cachedImage(); |
| 142 cachedImage->finish(); | 142 cachedImage->finish(); |
| 143 cachedImage->setResponse(document()->frame()->loader().documentLoader()-
>response()); | 143 cachedImage->setResponse(document()->frame()->loader().documentLoader()-
>response()); |
| 144 | 144 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 384 } |
| 385 | 385 |
| 386 bool ImageEventListener::operator==(const EventListener& listener) | 386 bool ImageEventListener::operator==(const EventListener& listener) |
| 387 { | 387 { |
| 388 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 388 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
| 389 return m_doc == imageEventListener->m_doc; | 389 return m_doc == imageEventListener->m_doc; |
| 390 return false; | 390 return false; |
| 391 } | 391 } |
| 392 | 392 |
| 393 } | 393 } |
| OLD | NEW |