| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // FIXME(sky): This used to prefer DocumentLoader::frame | 162 // FIXME(sky): This used to prefer DocumentLoader::frame |
| 163 // over importsController->master()->frame(), but in our | 163 // over importsController->master()->frame(), but in our |
| 164 // world we should always just have one frame. | 164 // world we should always just have one frame. |
| 165 if (!m_document) | 165 if (!m_document) |
| 166 return 0; | 166 return 0; |
| 167 return m_document->frame(); | 167 return m_document->frame(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 FetchContext& ResourceFetcher::context() const | 170 FetchContext& ResourceFetcher::context() const |
| 171 { | 171 { |
| 172 if (LocalFrame* frame = this->frame()) | |
| 173 return frame->fetchContext(); | |
| 174 return FetchContext::nullInstance(); | 172 return FetchContext::nullInstance(); |
| 175 } | 173 } |
| 176 | 174 |
| 177 ResourcePtr<ImageResource> ResourceFetcher::fetchImage(FetchRequest& request) | 175 ResourcePtr<ImageResource> ResourceFetcher::fetchImage(FetchRequest& request) |
| 178 { | 176 { |
| 179 request.setDefer(clientDefersImage(request.resourceRequest().url()) ? FetchR
equest::DeferredByClient : FetchRequest::NoDefer); | 177 request.setDefer(clientDefersImage(request.resourceRequest().url()) ? FetchR
equest::DeferredByClient : FetchRequest::NoDefer); |
| 180 ResourcePtr<Resource> resource = requestResource(Resource::Image, request); | 178 ResourcePtr<Resource> resource = requestResource(Resource::Image, request); |
| 181 return resource && resource->type() == Resource::Image ? toImageResource(res
ource) : 0; | 179 return resource && resource->type() == Resource::Image ? toImageResource(res
ource) : 0; |
| 182 } | 180 } |
| 183 | 181 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 case Revalidate: | 757 case Revalidate: |
| 760 ++m_revalidateCount; | 758 ++m_revalidateCount; |
| 761 return; | 759 return; |
| 762 case Use: | 760 case Use: |
| 763 ++m_useCount; | 761 ++m_useCount; |
| 764 return; | 762 return; |
| 765 } | 763 } |
| 766 } | 764 } |
| 767 | 765 |
| 768 } | 766 } |
| OLD | NEW |