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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 if (m_element->fastHasAttribute(HTMLNames::crossoriginAttr) | 270 if (m_element->fastHasAttribute(HTMLNames::crossoriginAttr) |
271 && !m_element->document()->securityOrigin()->canRequest(image()->respons
e().url()) | 271 && !m_element->document()->securityOrigin()->canRequest(image()->respons
e().url()) |
272 && !resource->passesAccessControlCheck(m_element->document()->securityOr
igin())) { | 272 && !resource->passesAccessControlCheck(m_element->document()->securityOr
igin())) { |
273 | 273 |
274 setImageWithoutConsideringPendingLoadEvent(0); | 274 setImageWithoutConsideringPendingLoadEvent(0); |
275 | 275 |
276 m_hasPendingErrorEvent = true; | 276 m_hasPendingErrorEvent = true; |
277 errorEventSender().dispatchEventSoon(this); | 277 errorEventSender().dispatchEventSoon(this); |
278 | 278 |
279 DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Cross-origin
image load denied by Cross-Origin Resource Sharing policy."))); | 279 DEFINE_STATIC_LOCAL(String, consoleMessage, ("Cross-origin image load de
nied by Cross-Origin Resource Sharing policy.")); |
280 m_element->document()->addConsoleMessage(SecurityMessageSource, ErrorMes
sageLevel, consoleMessage); | 280 m_element->document()->addConsoleMessage(SecurityMessageSource, ErrorMes
sageLevel, consoleMessage); |
281 | 281 |
282 ASSERT(!m_hasPendingLoadEvent); | 282 ASSERT(!m_hasPendingLoadEvent); |
283 | 283 |
284 // Only consider updating the protection ref-count of the Element immedi
ately before returning | 284 // Only consider updating the protection ref-count of the Element immedi
ately before returning |
285 // from this function as doing so might result in the destruction of thi
s ImageLoader. | 285 // from this function as doing so might result in the destruction of thi
s ImageLoader. |
286 updatedHasPendingEvent(); | 286 updatedHasPendingEvent(); |
287 return; | 287 return; |
288 } | 288 } |
289 | 289 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 handle->notifyImageSourceChanged(); | 478 handle->notifyImageSourceChanged(); |
479 } | 479 } |
480 } | 480 } |
481 | 481 |
482 inline void ImageLoader::clearFailedLoadURL() | 482 inline void ImageLoader::clearFailedLoadURL() |
483 { | 483 { |
484 m_failedLoadURL = AtomicString(); | 484 m_failedLoadURL = AtomicString(); |
485 } | 485 } |
486 | 486 |
487 } | 487 } |
OLD | NEW |