| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 420 |
| 421 bool ImageLoader::shouldLoadImmediately(const KURL& url) const | 421 bool ImageLoader::shouldLoadImmediately(const KURL& url) const |
| 422 { | 422 { |
| 423 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM | 423 // We force any image loads which might require alt content through the asyn
chronous path so that we can add the shadow DOM |
| 424 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. | 424 // for the alt-text content when style recalc is over and DOM mutation is al
lowed again. |
| 425 if (!url.isNull()) { | 425 if (!url.isNull()) { |
| 426 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); | 426 Resource* resource = memoryCache()->resourceForURL(url, m_element->docum
ent().fetcher()->getCacheIdentifier()); |
| 427 if (resource && !resource->errorOccurred()) | 427 if (resource && !resource->errorOccurred()) |
| 428 return true; | 428 return true; |
| 429 } | 429 } |
| 430 return (isHTMLObjectElement(m_element) || isHTMLEmbedElement(m_element) || u
rl.protocolIsData()); | 430 return (isHTMLObjectElement(m_element) || isHTMLEmbedElement(m_element)); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void ImageLoader::imageNotifyFinished(ImageResource* resource) | 433 void ImageLoader::imageNotifyFinished(ImageResource* resource) |
| 434 { | 434 { |
| 435 WTF_LOG(ResourceLoading, "ImageLoader::imageNotifyFinished %p; m_hasPendingL
oadEvent=%d", | 435 WTF_LOG(ResourceLoading, "ImageLoader::imageNotifyFinished %p; m_hasPendingL
oadEvent=%d", |
| 436 this, m_hasPendingLoadEvent); | 436 this, m_hasPendingLoadEvent); |
| 437 | 437 |
| 438 ASSERT(m_failedLoadURL.isEmpty()); | 438 ASSERT(m_failedLoadURL.isEmpty()); |
| 439 ASSERT(resource == m_image.get()); | 439 ASSERT(resource == m_image.get()); |
| 440 | 440 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 603 |
| 604 void ImageLoader::elementDidMoveToNewDocument() | 604 void ImageLoader::elementDidMoveToNewDocument() |
| 605 { | 605 { |
| 606 if (m_loadDelayCounter) | 606 if (m_loadDelayCounter) |
| 607 m_loadDelayCounter->documentChanged(m_element->document()); | 607 m_loadDelayCounter->documentChanged(m_element->document()); |
| 608 clearFailedLoadURL(); | 608 clearFailedLoadURL(); |
| 609 setImage(0); | 609 setImage(0); |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace blink | 612 } // namespace blink |
| OLD | NEW |