| 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 reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 ASSERT(m_hasPendingLoadEvent || !loadEventSender().hasPendingEvents(this)); | 122 ASSERT(m_hasPendingLoadEvent || !loadEventSender().hasPendingEvents(this)); |
| 123 if (m_hasPendingLoadEvent) | 123 if (m_hasPendingLoadEvent) |
| 124 loadEventSender().cancelEvent(this); | 124 loadEventSender().cancelEvent(this); |
| 125 | 125 |
| 126 ASSERT(m_hasPendingErrorEvent || !errorEventSender().hasPendingEvents(this))
; | 126 ASSERT(m_hasPendingErrorEvent || !errorEventSender().hasPendingEvents(this))
; |
| 127 if (m_hasPendingErrorEvent) | 127 if (m_hasPendingErrorEvent) |
| 128 errorEventSender().cancelEvent(this); | 128 errorEventSender().cancelEvent(this); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ImageLoader::trace(Visitor* visitor) | |
| 132 { | |
| 133 visitor->trace(m_element); | |
| 134 } | |
| 135 | |
| 136 void ImageLoader::setImage(ImageResource* newImage) | 131 void ImageLoader::setImage(ImageResource* newImage) |
| 137 { | 132 { |
| 138 setImageWithoutConsideringPendingLoadEvent(newImage); | 133 setImageWithoutConsideringPendingLoadEvent(newImage); |
| 139 | 134 |
| 140 // Only consider updating the protection ref-count of the Element immediatel
y before returning | 135 // Only consider updating the protection ref-count of the Element immediatel
y before returning |
| 141 // from this function as doing so might result in the destruction of this Im
ageLoader. | 136 // from this function as doing so might result in the destruction of this Im
ageLoader. |
| 142 updatedHasPendingEvent(); | 137 updatedHasPendingEvent(); |
| 143 } | 138 } |
| 144 | 139 |
| 145 void ImageLoader::setImageWithoutConsideringPendingLoadEvent(ImageResource* newI
mage) | 140 void ImageLoader::setImageWithoutConsideringPendingLoadEvent(ImageResource* newI
mage) |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void ImageLoader::sourceImageChanged() | 493 void ImageLoader::sourceImageChanged() |
| 499 { | 494 { |
| 500 HashSet<ImageLoaderClient*>::iterator end = m_clients.end(); | 495 HashSet<ImageLoaderClient*>::iterator end = m_clients.end(); |
| 501 for (HashSet<ImageLoaderClient*>::iterator it = m_clients.begin(); it != end
; ++it) { | 496 for (HashSet<ImageLoaderClient*>::iterator it = m_clients.begin(); it != end
; ++it) { |
| 502 ImageLoaderClient* handle = *it; | 497 ImageLoaderClient* handle = *it; |
| 503 handle->notifyImageSourceChanged(); | 498 handle->notifyImageSourceChanged(); |
| 504 } | 499 } |
| 505 } | 500 } |
| 506 | 501 |
| 507 } | 502 } |
| OLD | NEW |