| 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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 // Weak, unowned pointer. Must outlive |this|. | 146 // Weak, unowned pointer. Must outlive |this|. |
| 147 const FetchRequest* m_fetchRequest; | 147 const FetchRequest* m_fetchRequest; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 ImageResource* ImageResource::fetch(FetchRequest& request, | 150 ImageResource* ImageResource::fetch(FetchRequest& request, |
| 151 ResourceFetcher* fetcher) { | 151 ResourceFetcher* fetcher) { |
| 152 if (request.resourceRequest().requestContext() == | 152 if (request.resourceRequest().requestContext() == |
| 153 WebURLRequest::RequestContextUnspecified) { | 153 WebURLRequest::RequestContextUnspecified) { |
| 154 request.mutableResourceRequest().setRequestContext( | 154 request.setRequestContext(WebURLRequest::RequestContextImage); |
| 155 WebURLRequest::RequestContextImage); | |
| 156 } | 155 } |
| 157 if (fetcher->context().pageDismissalEventBeingDispatched()) { | 156 if (fetcher->context().pageDismissalEventBeingDispatched()) { |
| 158 KURL requestURL = request.resourceRequest().url(); | 157 KURL requestURL = request.resourceRequest().url(); |
| 159 if (requestURL.isValid()) { | 158 if (requestURL.isValid()) { |
| 160 ResourceRequestBlockedReason blockReason = fetcher->context().canRequest( | 159 ResourceRequestBlockedReason blockReason = fetcher->context().canRequest( |
| 161 Resource::Image, request.resourceRequest(), requestURL, | 160 Resource::Image, request.resourceRequest(), requestURL, |
| 162 request.options(), | 161 request.options(), |
| 163 /* Don't send security violation reports for speculative preloads */ | 162 /* Don't send security violation reports for speculative preloads */ |
| 164 request.isSpeculativePreload() | 163 request.isSpeculativePreload() |
| 165 ? SecurityViolationReportingPolicy::SuppressReporting | 164 ? SecurityViolationReportingPolicy::SuppressReporting |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 // reloading in Step 3 due to notifyObservers()'s | 592 // reloading in Step 3 due to notifyObservers()'s |
| 594 // schedulingReloadOrShouldReloadBrokenPlaceholder() check. | 593 // schedulingReloadOrShouldReloadBrokenPlaceholder() check. |
| 595 // 3. reloadIfLoFiOrPlaceholderImage() is called via ResourceFetcher | 594 // 3. reloadIfLoFiOrPlaceholderImage() is called via ResourceFetcher |
| 596 // (a) via didFinishLoading() called in decodeError(), or | 595 // (a) via didFinishLoading() called in decodeError(), or |
| 597 // (b) after returning ImageResource::updateImage(). | 596 // (b) after returning ImageResource::updateImage(). |
| 598 decodeError(allDataReceived); | 597 decodeError(allDataReceived); |
| 599 } | 598 } |
| 600 } | 599 } |
| 601 | 600 |
| 602 } // namespace blink | 601 } // namespace blink |
| OLD | NEW |