| Index: third_party/WebKit/Source/core/loader/ImageLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
|
| index 649ffdb112c799e2283f1eeeb039b77d5c5d5a62..296a26d1d3ed5e4277e875d80a80ea782b5c9407 100644
|
| --- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
|
| @@ -231,9 +231,10 @@ static void configureRequest(
|
|
|
| CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(
|
| element.fastGetAttribute(HTMLNames::crossoriginAttr));
|
| - if (crossOrigin != CrossOriginAttributeNotSet)
|
| + if (crossOrigin != CrossOriginAttributeNotSet) {
|
| request.setCrossOriginAccessControl(element.document().getSecurityOrigin(),
|
| crossOrigin);
|
| + }
|
|
|
| if (clientHintsPreferences.shouldSendResourceWidth() &&
|
| isHTMLImageElement(element))
|
| @@ -299,9 +300,10 @@ void ImageLoader::doUpdateFromElement(BypassMainWorldBehavior bypassBehavior,
|
| resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
|
| }
|
|
|
| - if (referrerPolicy != ReferrerPolicyDefault)
|
| + if (referrerPolicy != ReferrerPolicyDefault) {
|
| resourceRequest.setHTTPReferrer(SecurityPolicy::generateReferrer(
|
| referrerPolicy, url, document.outgoingReferrer()));
|
| + }
|
|
|
| if (isHTMLPictureElement(element()->parentNode()) ||
|
| !element()->fastGetAttribute(HTMLNames::srcsetAttr).isNull())
|
| @@ -486,9 +488,10 @@ void ImageLoader::imageNotifyFinished(ImageResource* resource) {
|
| loadEventSender().cancelEvent(this);
|
| m_hasPendingLoadEvent = false;
|
|
|
| - if (resource->resourceError().isAccessCheck())
|
| + if (resource->resourceError().isAccessCheck()) {
|
| crossSiteOrCSPViolationOccurred(
|
| AtomicString(resource->resourceError().failingURL()));
|
| + }
|
|
|
| // The error event should not fire if the image data update is a result of
|
| // environment change.
|
|
|