| 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 * |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 448 |
| 449 bool ImageLoader::shouldLoadImmediately(const KURL& url) const | 449 bool ImageLoader::shouldLoadImmediately(const KURL& url) const |
| 450 { | 450 { |
| 451 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM | 451 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM |
| 452 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. | 452 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. |
| 453 if (!url.isNull()) { | 453 if (!url.isNull()) { |
| 454 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); | 454 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); |
| 455 if (resource && !resource->errorOccurred()) | 455 if (resource && !resource->errorOccurred()) |
| 456 return true; | 456 return true; |
| 457 } | 457 } |
| 458 return (m_loadingImageDocument || isHTMLObjectElement(m_element) || isHTMLEm
bedElement(m_element) || url.protocolIsData()); | 458 return (m_loadingImageDocument || isHTMLObjectElement(m_element) || isHTMLEm
bedElement(m_element)); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void ImageLoader::notifyFinished(Resource* resource) | 461 void ImageLoader::notifyFinished(Resource* resource) |
| 462 { | 462 { |
| 463 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d", | 463 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d", |
| 464 this, m_hasPendingLoadEvent); | 464 this, m_hasPendingLoadEvent); |
| 465 | 465 |
| 466 ASSERT(m_failedLoadURL.isEmpty()); | 466 ASSERT(m_failedLoadURL.isEmpty()); |
| 467 ASSERT(resource == m_image.get()); | 467 ASSERT(resource == m_image.get()); |
| 468 | 468 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 664 |
| 665 void ImageLoader::sourceImageChanged() | 665 void ImageLoader::sourceImageChanged() |
| 666 { | 666 { |
| 667 for (auto& client : m_clients) { | 667 for (auto& client : m_clients) { |
| 668 ImageLoaderClient* handle = client; | 668 ImageLoaderClient* handle = client; |
| 669 handle->notifyImageSourceChanged(); | 669 handle->notifyImageSourceChanged(); |
| 670 } | 670 } |
| 671 } | 671 } |
| 672 | 672 |
| 673 } // namespace blink | 673 } // namespace blink |
| OLD | NEW |