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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 ImageResource* ImageResourceForImageDocument() const { | 89 ImageResource* ImageResourceForImageDocument() const { |
90 return image_resource_for_image_document_; | 90 return image_resource_for_image_document_; |
91 } | 91 } |
92 // Cancels pending load events, and doesn't dispatch new ones. | 92 // Cancels pending load events, and doesn't dispatch new ones. |
93 void SetImage(ImageResourceContent*); | 93 void SetImage(ImageResourceContent*); |
94 | 94 |
95 bool IsLoadingImageDocument() { return loading_image_document_; } | 95 bool IsLoadingImageDocument() { return loading_image_document_; } |
96 void SetLoadingImageDocument() { loading_image_document_ = true; } | 96 void SetLoadingImageDocument() { loading_image_document_ = true; } |
97 | 97 |
98 bool HasPendingActivity() const { | 98 bool HasPendingActivity() const { |
99 return has_pending_load_event_ || has_pending_error_event_ || pending_task_; | 99 return (image_ && !image_complete_) || has_pending_load_event_ || |
| 100 has_pending_error_event_ || pending_task_; |
100 } | 101 } |
101 | 102 |
102 bool HasPendingError() const { return has_pending_error_event_; } | 103 bool HasPendingError() const { return has_pending_error_event_; } |
103 | 104 |
104 bool HadError() const { return !failed_load_url_.IsEmpty(); } | 105 bool HadError() const { return !failed_load_url_.IsEmpty(); } |
105 | 106 |
106 void DispatchPendingEvent(ImageEventSender*); | 107 void DispatchPendingEvent(ImageEventSender*); |
107 | 108 |
108 static void DispatchPendingLoadEvents(); | 109 static void DispatchPendingLoadEvents(); |
109 static void DispatchPendingErrorEvents(); | 110 static void DispatchPendingErrorEvents(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 bool has_pending_error_event_ : 1; | 191 bool has_pending_error_event_ : 1; |
191 bool image_complete_ : 1; | 192 bool image_complete_ : 1; |
192 bool loading_image_document_ : 1; | 193 bool loading_image_document_ : 1; |
193 bool element_is_protected_ : 1; | 194 bool element_is_protected_ : 1; |
194 bool suppress_error_events_ : 1; | 195 bool suppress_error_events_ : 1; |
195 }; | 196 }; |
196 | 197 |
197 } // namespace blink | 198 } // namespace blink |
198 | 199 |
199 #endif | 200 #endif |
OLD | NEW |