| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 { | 79 { |
| 80 if (!m_accessedImage || !m_image->isImageResource() || !document.fetcher()) | 80 if (!m_accessedImage || !m_image->isImageResource() || !document.fetcher()) |
| 81 return; | 81 return; |
| 82 if (document.fetcher()->cachedResource(KURL(ParsedURLString, m_absoluteURL))
) | 82 if (document.fetcher()->cachedResource(KURL(ParsedURLString, m_absoluteURL))
) |
| 83 return; | 83 return; |
| 84 | 84 |
| 85 ImageResource* resource = m_image->cachedImage(); | 85 ImageResource* resource = m_image->cachedImage(); |
| 86 if (!resource) | 86 if (!resource) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 const ResourceRequest& lastResourceRequest = resource->lastResourceRequest()
; |
| 89 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isEmpty
() ? FetchInitiatorTypeNames::css : m_initiatorName, resource->options()); | 90 FetchRequest request(ResourceRequest(m_absoluteURL), m_initiatorName.isEmpty
() ? FetchInitiatorTypeNames::css : m_initiatorName, resource->options()); |
| 90 MixedContentChecker::shouldBlockFetch(document.frame(), resource->lastResour
ceRequest(), | 91 MixedContentChecker::shouldBlockFetch(document.frame(), lastResourceRequest.
requestContext(), lastResourceRequest.frameType(), |
| 91 resource->lastResourceRequest().url(), MixedContentChecker::SendReport); | 92 lastResourceRequest.url(), MixedContentChecker::SendReport); |
| 92 document.fetcher()->requestLoadStarted(resource, request, ResourceFetcher::R
esourceLoadingFromCache); | 93 document.fetcher()->requestLoadStarted(resource, request, ResourceFetcher::R
esourceLoadingFromCache); |
| 93 } | 94 } |
| 94 | 95 |
| 95 bool CSSImageValue::hasFailedOrCanceledSubresources() const | 96 bool CSSImageValue::hasFailedOrCanceledSubresources() const |
| 96 { | 97 { |
| 97 if (!m_image || !m_image->isImageResource()) | 98 if (!m_image || !m_image->isImageResource()) |
| 98 return false; | 99 return false; |
| 99 if (Resource* cachedResource = toStyleFetchedImage(m_image)->cachedImage()) | 100 if (Resource* cachedResource = toStyleFetchedImage(m_image)->cachedImage()) |
| 100 return cachedResource->loadFailedOrCanceled(); | 101 return cachedResource->loadFailedOrCanceled(); |
| 101 return true; | 102 return true; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 126 { | 127 { |
| 127 KURL url = document.completeURL(m_relativeURL); | 128 KURL url = document.completeURL(m_relativeURL); |
| 128 if (url == m_absoluteURL) | 129 if (url == m_absoluteURL) |
| 129 return; | 130 return; |
| 130 m_absoluteURL = url.string(); | 131 m_absoluteURL = url.string(); |
| 131 m_accessedImage = false; | 132 m_accessedImage = false; |
| 132 m_image.clear(); | 133 m_image.clear(); |
| 133 } | 134 } |
| 134 | 135 |
| 135 } // namespace blink | 136 } // namespace blink |
| OLD | NEW |