| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 static void configureRequest(FetchRequest& request, ImageLoader::BypassMainWorld
Behavior bypassBehavior, Element& element, const ClientHintsPreferences& clientH
intsPreferences) | 264 static void configureRequest(FetchRequest& request, ImageLoader::BypassMainWorld
Behavior bypassBehavior, Element& element, const ClientHintsPreferences& clientH
intsPreferences) |
| 265 { | 265 { |
| 266 if (bypassBehavior == ImageLoader::BypassMainWorldCSP) | 266 if (bypassBehavior == ImageLoader::BypassMainWorldCSP) |
| 267 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); | 267 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); |
| 268 | 268 |
| 269 CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(element.fa
stGetAttribute(HTMLNames::crossoriginAttr)); | 269 CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(element.fa
stGetAttribute(HTMLNames::crossoriginAttr)); |
| 270 if (crossOrigin != CrossOriginAttributeNotSet) | 270 if (crossOrigin != CrossOriginAttributeNotSet) |
| 271 request.setCrossOriginAccessControl(element.document().securityOrigin(),
crossOrigin); | 271 request.setCrossOriginAccessControl(element.document().securityOrigin(),
crossOrigin); |
| 272 | 272 |
| 273 if (clientHintsPreferences.shouldSendResourceWidth() && isHTMLImageElement(e
lement)) | 273 if (clientHintsPreferences.shouldSendResourceWidth() && isHTMLImageElement(e
lement)) |
| 274 request.setResourceWidth(toHTMLImageElement(element).resourceWidth()); | 274 request.setResourceWidth(toHTMLImageElement(element).getResourceWidth())
; |
| 275 } | 275 } |
| 276 | 276 |
| 277 inline void ImageLoader::dispatchErrorEvent() | 277 inline void ImageLoader::dispatchErrorEvent() |
| 278 { | 278 { |
| 279 m_hasPendingErrorEvent = true; | 279 m_hasPendingErrorEvent = true; |
| 280 errorEventSender().dispatchEventSoon(this); | 280 errorEventSender().dispatchEventSoon(this); |
| 281 } | 281 } |
| 282 | 282 |
| 283 inline void ImageLoader::crossSiteOrCSPViolationOccurred(AtomicString imageSourc
eURL) | 283 inline void ImageLoader::crossSiteOrCSPViolationOccurred(AtomicString imageSourc
eURL) |
| 284 { | 284 { |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 689 |
| 690 void ImageLoader::sourceImageChanged() | 690 void ImageLoader::sourceImageChanged() |
| 691 { | 691 { |
| 692 for (auto& client : m_clients) { | 692 for (auto& client : m_clients) { |
| 693 ImageLoaderClient* handle = client; | 693 ImageLoaderClient* handle = client; |
| 694 handle->notifyImageSourceChanged(); | 694 handle->notifyImageSourceChanged(); |
| 695 } | 695 } |
| 696 } | 696 } |
| 697 | 697 |
| 698 } // namespace blink | 698 } // namespace blink |
| OLD | NEW |