| 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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
| 6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::cr
ossoriginAttr); | 290 AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::cr
ossoriginAttr); |
| 291 if (!crossOriginMode.isNull()) | 291 if (!crossOriginMode.isNull()) |
| 292 request.setCrossOriginAccessControl(elementDocument->securityOrigin(
), crossOriginMode); | 292 request.setCrossOriginAccessControl(elementDocument->securityOrigin(
), crossOriginMode); |
| 293 request.setCharset(scriptCharset()); | 293 request.setCharset(scriptCharset()); |
| 294 | 294 |
| 295 bool scriptPassesCSP = elementDocument->contentSecurityPolicy()->allowSc
riptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)); | 295 bool scriptPassesCSP = elementDocument->contentSecurityPolicy()->allowSc
riptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)); |
| 296 if (scriptPassesCSP) | 296 if (scriptPassesCSP) |
| 297 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); | 297 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); |
| 298 request.setDefer(defer); | 298 request.setDefer(defer); |
| 299 | 299 |
| 300 m_resource = elementDocument->fetcher()->fetchScript(request); | 300 m_resource = ScriptResource::fetch(request, elementDocument->fetcher()); |
| 301 m_isExternalScript = true; | 301 m_isExternalScript = true; |
| 302 } | 302 } |
| 303 | 303 |
| 304 if (m_resource) | 304 if (m_resource) |
| 305 return true; | 305 return true; |
| 306 | 306 |
| 307 dispatchErrorEvent(); | 307 dispatchErrorEvent(); |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 | 310 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 if (isHTMLScriptLoader(element)) | 496 if (isHTMLScriptLoader(element)) |
| 497 return toHTMLScriptElement(element)->loader(); | 497 return toHTMLScriptElement(element)->loader(); |
| 498 | 498 |
| 499 if (isSVGScriptLoader(element)) | 499 if (isSVGScriptLoader(element)) |
| 500 return toSVGScriptElement(element)->loader(); | 500 return toSVGScriptElement(element)->loader(); |
| 501 | 501 |
| 502 return 0; | 502 return 0; |
| 503 } | 503 } |
| 504 | 504 |
| 505 } // namespace blink | 505 } // namespace blink |
| OLD | NEW |