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, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 toHTMLInputElement(GetElement())->EnsureFallbackContent(); | 68 toHTMLInputElement(GetElement())->EnsureFallbackContent(); |
69 } | 69 } |
70 | 70 |
71 void HTMLImageLoader::ImageNotifyFinished(ImageResourceContent*) { | 71 void HTMLImageLoader::ImageNotifyFinished(ImageResourceContent*) { |
72 ImageResourceContent* cached_image = GetImage(); | 72 ImageResourceContent* cached_image = GetImage(); |
73 Element* element = this->GetElement(); | 73 Element* element = this->GetElement(); |
74 ImageLoader::ImageNotifyFinished(cached_image); | 74 ImageLoader::ImageNotifyFinished(cached_image); |
75 | 75 |
76 bool load_error = cached_image->ErrorOccurred(); | 76 bool load_error = cached_image->ErrorOccurred(); |
77 if (isHTMLImageElement(*element)) { | 77 if (isHTMLImageElement(*element)) { |
| 78 toHTMLImageElement(element)->ImageNotifyFinished(!load_error); |
78 if (load_error) | 79 if (load_error) |
79 toHTMLImageElement(element)->EnsureCollapsedOrFallbackContent(); | 80 toHTMLImageElement(element)->EnsureCollapsedOrFallbackContent(); |
80 else | 81 else |
81 toHTMLImageElement(element)->EnsurePrimaryContent(); | 82 toHTMLImageElement(element)->EnsurePrimaryContent(); |
82 } | 83 } |
83 | 84 |
84 if (isHTMLInputElement(*element)) { | 85 if (isHTMLInputElement(*element)) { |
85 if (load_error) | 86 if (load_error) |
86 toHTMLInputElement(element)->EnsureFallbackContent(); | 87 toHTMLInputElement(element)->EnsureFallbackContent(); |
87 else | 88 else |
88 toHTMLInputElement(element)->EnsurePrimaryContent(); | 89 toHTMLInputElement(element)->EnsurePrimaryContent(); |
89 } | 90 } |
90 | 91 |
91 if ((load_error || cached_image->GetResponse().HttpStatusCode() >= 400) && | 92 if ((load_error || cached_image->GetResponse().HttpStatusCode() >= 400) && |
92 isHTMLObjectElement(*element)) | 93 isHTMLObjectElement(*element)) |
93 toHTMLObjectElement(element)->RenderFallbackContent(); | 94 toHTMLObjectElement(element)->RenderFallbackContent(); |
94 } | 95 } |
95 | 96 |
96 } // namespace blink | 97 } // namespace blink |
OLD | NEW |