| 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 25 matching lines...) Expand all Loading... |
| 36 { | 36 { |
| 37 } | 37 } |
| 38 | 38 |
| 39 HTMLImageLoader::~HTMLImageLoader() | 39 HTMLImageLoader::~HTMLImageLoader() |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 void HTMLImageLoader::dispatchLoadEvent() | 43 void HTMLImageLoader::dispatchLoadEvent() |
| 44 { | 44 { |
| 45 WTF_LOG(Timers, "HTMLImageLoader::dispatchLoadEvent %p", this); | 45 WTF_LOG(Timers, "HTMLImageLoader::dispatchLoadEvent %p", this); |
| 46 | |
| 47 // HTMLVideoElement uses this class to load the poster image, but it should
not fire events for loading or failure. | |
| 48 if (isHTMLVideoElement(*element())) | |
| 49 return; | |
| 50 | |
| 51 bool errorOccurred = image()->errorOccurred(); | 46 bool errorOccurred = image()->errorOccurred(); |
| 52 element()->dispatchEvent(Event::create(errorOccurred ? EventTypeNames::error
: EventTypeNames::load)); | 47 element()->dispatchEvent(Event::create(errorOccurred ? EventTypeNames::error
: EventTypeNames::load)); |
| 53 } | 48 } |
| 54 | 49 |
| 55 String HTMLImageLoader::sourceURI(const AtomicString& attr) const | 50 String HTMLImageLoader::sourceURI(const AtomicString& attr) const |
| 56 { | 51 { |
| 57 return stripLeadingAndTrailingHTMLSpaces(attr); | 52 return stripLeadingAndTrailingHTMLSpaces(attr); |
| 58 } | 53 } |
| 59 | 54 |
| 60 void HTMLImageLoader::notifyFinished(Resource*) | 55 void HTMLImageLoader::notifyFinished(Resource*) |
| 61 { | 56 { |
| 62 ImageLoader::notifyFinished(image()); | 57 ImageLoader::notifyFinished(image()); |
| 63 } | 58 } |
| 64 | 59 |
| 65 } | 60 } |
| OLD | NEW |