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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 bool ImageLoader::shouldLoadImmediately(const KURL& url) const | 461 bool ImageLoader::shouldLoadImmediately(const KURL& url) const |
462 { | 462 { |
463 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM | 463 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM |
464 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. | 464 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. |
465 if (!url.isNull()) { | 465 if (!url.isNull()) { |
466 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); | 466 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); |
467 if (resource && !resource->errorOccurred()) | 467 if (resource && !resource->errorOccurred()) |
468 return true; | 468 return true; |
469 } | 469 } |
470 return (m_loadingImageDocument || isHTMLObjectElement(m_element) || isHTMLEm
bedElement(m_element)); | 470 return (m_loadingImageDocument || isHTMLObjectElement(m_element) || isHTMLEm
bedElement(m_element) || url.protocolIsData()); |
471 } | 471 } |
472 | 472 |
473 void ImageLoader::notifyFinished(Resource* resource) | 473 void ImageLoader::notifyFinished(Resource* resource) |
474 { | 474 { |
475 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d", | 475 WTF_LOG(Timers, "ImageLoader::notifyFinished %p; m_hasPendingLoadEvent=%d", |
476 this, m_hasPendingLoadEvent); | 476 this, m_hasPendingLoadEvent); |
477 | 477 |
478 ASSERT(m_failedLoadURL.isEmpty()); | 478 ASSERT(m_failedLoadURL.isEmpty()); |
479 ASSERT(resource == m_image.get()); | 479 ASSERT(resource == m_image.get()); |
480 | 480 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 void ImageLoader::sourceImageChanged() | 677 void ImageLoader::sourceImageChanged() |
678 { | 678 { |
679 for (auto& client : m_clients) { | 679 for (auto& client : m_clients) { |
680 ImageLoaderClient* handle = client; | 680 ImageLoaderClient* handle = client; |
681 handle->notifyImageSourceChanged(); | 681 handle->notifyImageSourceChanged(); |
682 } | 682 } |
683 } | 683 } |
684 | 684 |
685 } // namespace blink | 685 } // namespace blink |
OLD | NEW |