| 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, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class ImageLoader; | 55 class ImageLoader; |
| 56 class LayoutImageResource; | 56 class LayoutImageResource; |
| 57 | 57 |
| 58 template<typename T> class EventSender; | 58 template<typename T> class EventSender; |
| 59 typedef EventSender<ImageLoader> ImageEventSender; | 59 typedef EventSender<ImageLoader> ImageEventSender; |
| 60 | 60 |
| 61 class CORE_EXPORT ImageLoader : public NoBaseWillBeGarbageCollectedFinalized<Ima
geLoader>, public ImageResourceClient { | 61 class CORE_EXPORT ImageLoader : public NoBaseWillBeGarbageCollectedFinalized<Ima
geLoader>, public ImageResourceClient { |
| 62 public: | 62 public: |
| 63 explicit ImageLoader(Element*); | 63 explicit ImageLoader(Element*); |
| 64 virtual ~ImageLoader(); | 64 virtual ~ImageLoader(); |
| 65 |
| 66 // We must run the destructor in the eager sweeping phase and call |
| 67 // m_image->removeClient(this). Otherwise, the ImageResource can invoke |
| 68 // didAddClient() for the ImageLoader that is about to die in the current |
| 69 // lazy sweeping, and the didAddClient() can access on-heap objects that |
| 70 // have already been finalized in the current lazy sweeping. |
| 71 EAGERLY_FINALIZE(); |
| 65 DECLARE_TRACE(); | 72 DECLARE_TRACE(); |
| 66 | 73 |
| 67 enum UpdateFromElementBehavior { | 74 enum UpdateFromElementBehavior { |
| 68 // This should be the update behavior when the element is attached to a
document, or when DOM mutations trigger a new load. | 75 // This should be the update behavior when the element is attached to a
document, or when DOM mutations trigger a new load. |
| 69 // Starts loading if a load hasn't already been started. | 76 // Starts loading if a load hasn't already been started. |
| 70 UpdateNormal, | 77 UpdateNormal, |
| 71 // This should be the update behavior when the resource was changed (via
'src', 'srcset' or 'sizes'). | 78 // This should be the update behavior when the resource was changed (via
'src', 'srcset' or 'sizes'). |
| 72 // Starts a new load even if a previous load of the same resource have f
ailed, to match Firefox's behavior. | 79 // Starts a new load even if a previous load of the same resource have f
ailed, to match Firefox's behavior. |
| 73 // FIXME - Verify that this is the right behavior according to the spec. | 80 // FIXME - Verify that this is the right behavior according to the spec. |
| 74 UpdateIgnorePreviousError, | 81 UpdateIgnorePreviousError, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 bool m_imageComplete : 1; | 192 bool m_imageComplete : 1; |
| 186 bool m_loadingImageDocument : 1; | 193 bool m_loadingImageDocument : 1; |
| 187 bool m_elementIsProtected : 1; | 194 bool m_elementIsProtected : 1; |
| 188 bool m_suppressErrorEvents : 1; | 195 bool m_suppressErrorEvents : 1; |
| 189 unsigned m_highPriorityClientCount; | 196 unsigned m_highPriorityClientCount; |
| 190 }; | 197 }; |
| 191 | 198 |
| 192 } | 199 } |
| 193 | 200 |
| 194 #endif | 201 #endif |
| OLD | NEW |