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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 AtomicString imageSourceURL = m_element->imageSourceURL(); | 235 AtomicString imageSourceURL = m_element->imageSourceURL(); |
236 KURL url = imageSourceToKURL(imageSourceURL); | 236 KURL url = imageSourceToKURL(imageSourceURL); |
237 ResourcePtr<ImageResource> newImage = 0; | 237 ResourcePtr<ImageResource> newImage = 0; |
238 if (!url.isNull()) { | 238 if (!url.isNull()) { |
239 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. | 239 // Unlike raw <img>, we block mixed content inside of <picture> or <img
srcset>. |
240 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); | 240 ResourceLoaderOptions resourceLoaderOptions = ResourceFetcher::defaultRe
sourceOptions(); |
241 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isEmpty()) | 241 if (isHTMLPictureElement(element()->parentNode()) || !element()->fastGet
Attribute(HTMLNames::srcsetAttr).isEmpty()) |
242 resourceLoaderOptions.mixedContentBlockingTreatment = TreatAsActiveC
ontent; | 242 resourceLoaderOptions.mixedContentBlockingTreatment = TreatAsActiveC
ontent; |
243 FetchRequest request(ResourceRequest(url), element()->localName(), resou
rceLoaderOptions); | 243 FetchRequest request(ResourceRequest(url), element()->localName(), resou
rceLoaderOptions); |
| 244 request.mutableResourceRequest().setRequestContext(blink::WebURLRequest:
:RequestContextImage); |
244 configureRequest(request, bypassBehavior, *m_element); | 245 configureRequest(request, bypassBehavior, *m_element); |
245 | 246 |
246 if (m_loadingImageDocument) | 247 if (m_loadingImageDocument) |
247 newImage = createImageResourceForImageDocument(document, request); | 248 newImage = createImageResourceForImageDocument(document, request); |
248 else | 249 else |
249 newImage = document.fetcher()->fetchImage(request); | 250 newImage = document.fetcher()->fetchImage(request); |
250 | 251 |
251 if (!newImage && !pageIsBeingDismissed(&document)) | 252 if (!newImage && !pageIsBeingDismissed(&document)) |
252 crossSiteOrCSPViolationOccured(imageSourceURL); | 253 crossSiteOrCSPViolationOccured(imageSourceURL); |
253 else | 254 else |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 } | 550 } |
550 | 551 |
551 #if ENABLE(OILPAN) | 552 #if ENABLE(OILPAN) |
552 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() | 553 ImageLoader::ImageLoaderClientRemover::~ImageLoaderClientRemover() |
553 { | 554 { |
554 m_loader.willRemoveClient(m_client); | 555 m_loader.willRemoveClient(m_client); |
555 } | 556 } |
556 #endif | 557 #endif |
557 | 558 |
558 } | 559 } |
OLD | NEW |