OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights |
5 * reserved. | 5 * reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 return; | 393 return; |
394 | 394 |
395 // Prevent the creation of a ResourceLoader (and therefore a network request) | 395 // Prevent the creation of a ResourceLoader (and therefore a network request) |
396 // for ImageDocument loads. In this case, the image contents have already been | 396 // for ImageDocument loads. In this case, the image contents have already been |
397 // requested as a main resource and ImageDocumentParser will take care of | 397 // requested as a main resource and ImageDocumentParser will take care of |
398 // funneling the main resource bytes into m_image, so just create an | 398 // funneling the main resource bytes into m_image, so just create an |
399 // ImageResource to be populated later. | 399 // ImageResource to be populated later. |
400 if (m_loadingImageDocument && updateBehavior != UpdateForcedReload) { | 400 if (m_loadingImageDocument && updateBehavior != UpdateForcedReload) { |
401 ImageResource* imageResource = | 401 ImageResource* imageResource = |
402 ImageResource::create(imageSourceToKURL(m_element->imageSourceURL())); | 402 ImageResource::create(imageSourceToKURL(m_element->imageSourceURL())); |
403 imageResource->setStatus(Resource::Pending); | 403 imageResource->setStatus(ResourceStatus::Pending); |
404 m_imageResourceForImageDocument = imageResource; | 404 m_imageResourceForImageDocument = imageResource; |
405 setImage(imageResource->getContent()); | 405 setImage(imageResource->getContent()); |
406 return; | 406 return; |
407 } | 407 } |
408 | 408 |
409 // If we have a pending task, we have to clear it -- either we're now loading | 409 // If we have a pending task, we have to clear it -- either we're now loading |
410 // immediately, or we need to reset the task's state. | 410 // immediately, or we need to reset the task's state. |
411 if (m_pendingTask) { | 411 if (m_pendingTask) { |
412 m_pendingTask->clearLoader(); | 412 m_pendingTask->clearLoader(); |
413 m_pendingTask.reset(); | 413 m_pendingTask.reset(); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 634 } |
635 | 635 |
636 void ImageLoader::elementDidMoveToNewDocument() { | 636 void ImageLoader::elementDidMoveToNewDocument() { |
637 if (m_loadDelayCounter) | 637 if (m_loadDelayCounter) |
638 m_loadDelayCounter->documentChanged(m_element->document()); | 638 m_loadDelayCounter->documentChanged(m_element->document()); |
639 clearFailedLoadURL(); | 639 clearFailedLoadURL(); |
640 setImage(0); | 640 setImage(0); |
641 } | 641 } |
642 | 642 |
643 } // namespace blink | 643 } // namespace blink |
OLD | NEW |