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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 imageResource->resetAnimation(); | 235 imageResource->resetAnimation(); |
236 } | 236 } |
237 | 237 |
238 static void configureRequest(FetchRequest& request, ImageLoader::BypassMainWorld
Behavior bypassBehavior, Element& element, const ClientHintsPreferences& clientH
intsPreferences) | 238 static void configureRequest(FetchRequest& request, ImageLoader::BypassMainWorld
Behavior bypassBehavior, Element& element, const ClientHintsPreferences& clientH
intsPreferences) |
239 { | 239 { |
240 if (bypassBehavior == ImageLoader::BypassMainWorldCSP) | 240 if (bypassBehavior == ImageLoader::BypassMainWorldCSP) |
241 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); | 241 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); |
242 | 242 |
243 CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(element.fa
stGetAttribute(HTMLNames::crossoriginAttr)); | 243 CrossOriginAttributeValue crossOrigin = crossOriginAttributeValue(element.fa
stGetAttribute(HTMLNames::crossoriginAttr)); |
244 if (crossOrigin != CrossOriginAttributeNotSet) | 244 if (crossOrigin != CrossOriginAttributeNotSet) |
245 request.setCrossOriginAccessControl(element.document().securityOrigin(),
crossOrigin); | 245 request.setCrossOriginAccessControl(element.document().getSecurityOrigin
(), crossOrigin); |
246 | 246 |
247 if (clientHintsPreferences.shouldSendResourceWidth() && isHTMLImageElement(e
lement)) | 247 if (clientHintsPreferences.shouldSendResourceWidth() && isHTMLImageElement(e
lement)) |
248 request.setResourceWidth(toHTMLImageElement(element).getResourceWidth())
; | 248 request.setResourceWidth(toHTMLImageElement(element).getResourceWidth())
; |
249 } | 249 } |
250 | 250 |
251 inline void ImageLoader::dispatchErrorEvent() | 251 inline void ImageLoader::dispatchErrorEvent() |
252 { | 252 { |
253 m_hasPendingErrorEvent = true; | 253 m_hasPendingErrorEvent = true; |
254 errorEventSender().dispatchEventSoon(this); | 254 errorEventSender().dispatchEventSoon(this); |
255 } | 255 } |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 | 626 |
627 void ImageLoader::elementDidMoveToNewDocument() | 627 void ImageLoader::elementDidMoveToNewDocument() |
628 { | 628 { |
629 if (m_loadDelayCounter) | 629 if (m_loadDelayCounter) |
630 m_loadDelayCounter->documentChanged(m_element->document()); | 630 m_loadDelayCounter->documentChanged(m_element->document()); |
631 clearFailedLoadURL(); | 631 clearFailedLoadURL(); |
632 setImage(0); | 632 setImage(0); |
633 } | 633 } |
634 | 634 |
635 } // namespace blink | 635 } // namespace blink |
OLD | NEW |