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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 #include "config.h" | 22 #include "config.h" |
23 #include "core/loader/ImageLoader.h" | 23 #include "core/loader/ImageLoader.h" |
24 | 24 |
25 #include "HTMLNames.h" | |
26 #include "core/dom/Document.h" | 25 #include "core/dom/Document.h" |
27 #include "core/dom/Element.h" | 26 #include "core/dom/Element.h" |
28 #include "core/events/Event.h" | 27 #include "core/events/Event.h" |
29 #include "core/events/EventSender.h" | 28 #include "core/events/EventSender.h" |
30 #include "core/fetch/CrossOriginAccessControl.h" | 29 #include "core/fetch/CrossOriginAccessControl.h" |
31 #include "core/fetch/FetchRequest.h" | 30 #include "core/fetch/FetchRequest.h" |
32 #include "core/fetch/ResourceFetcher.h" | 31 #include "core/fetch/ResourceFetcher.h" |
33 #include "core/html/HTMLObjectElement.h" | 32 #include "core/html/HTMLObjectElement.h" |
34 #include "core/html/parser/HTMLParserIdioms.h" | 33 #include "core/html/parser/HTMLParserIdioms.h" |
35 #include "core/rendering/RenderImage.h" | 34 #include "core/rendering/RenderImage.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 return; | 372 return; |
374 } | 373 } |
375 if (m_image) { | 374 if (m_image) { |
376 m_image->removeClient(this); | 375 m_image->removeClient(this); |
377 m_image = 0; | 376 m_image = 0; |
378 } | 377 } |
379 | 378 |
380 loadEventSender().cancelEvent(this); | 379 loadEventSender().cancelEvent(this); |
381 m_hasPendingLoadEvent = false; | 380 m_hasPendingLoadEvent = false; |
382 | 381 |
383 if (m_element->hasTagName(HTMLNames::objectTag)) | 382 if (isHTMLObjectElement(*m_element)) |
384 toHTMLObjectElement(m_element)->renderFallbackContent(); | 383 toHTMLObjectElement(*m_element).renderFallbackContent(); |
385 | 384 |
386 // Only consider updating the protection ref-count of the Element immediatel
y before returning | 385 // Only consider updating the protection ref-count of the Element immediatel
y before returning |
387 // from this function as doing so might result in the destruction of this Im
ageLoader. | 386 // from this function as doing so might result in the destruction of this Im
ageLoader. |
388 updatedHasPendingEvent(); | 387 updatedHasPendingEvent(); |
389 } | 388 } |
390 | 389 |
391 void ImageLoader::dispatchPendingLoadEvent() | 390 void ImageLoader::dispatchPendingLoadEvent() |
392 { | 391 { |
393 if (!m_hasPendingLoadEvent) | 392 if (!m_hasPendingLoadEvent) |
394 return; | 393 return; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 handle->notifyImageSourceChanged(); | 463 handle->notifyImageSourceChanged(); |
465 } | 464 } |
466 } | 465 } |
467 | 466 |
468 inline void ImageLoader::clearFailedLoadURL() | 467 inline void ImageLoader::clearFailedLoadURL() |
469 { | 468 { |
470 m_failedLoadURL = AtomicString(); | 469 m_failedLoadURL = AtomicString(); |
471 } | 470 } |
472 | 471 |
473 } | 472 } |
OLD | NEW |