| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (crossOrigin != CrossOriginAttributeNotSet) | 294 if (crossOrigin != CrossOriginAttributeNotSet) |
| 295 request.setCrossOriginAccessControl(elementDocument->securityOrigin(
), crossOrigin); | 295 request.setCrossOriginAccessControl(elementDocument->securityOrigin(
), crossOrigin); |
| 296 request.setCharset(scriptCharset()); | 296 request.setCharset(scriptCharset()); |
| 297 | 297 |
| 298 bool scriptPassesCSP = elementDocument->contentSecurityPolicy()->allowSc
riptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)); | 298 bool scriptPassesCSP = elementDocument->contentSecurityPolicy()->allowSc
riptWithNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr)); |
| 299 if (scriptPassesCSP) | 299 if (scriptPassesCSP) |
| 300 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); | 300 request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy); |
| 301 request.setDefer(defer); | 301 request.setDefer(defer); |
| 302 | 302 |
| 303 String integrityAttr = m_element->fastGetAttribute(HTMLNames::integrityA
ttr); | 303 String integrityAttr = m_element->fastGetAttribute(HTMLNames::integrityA
ttr); |
| 304 IntegrityMetadataSet metadataSet; | |
| 305 if (!integrityAttr.isEmpty()) { | 304 if (!integrityAttr.isEmpty()) { |
| 305 IntegrityMetadataSet metadataSet; |
| 306 SubresourceIntegrity::parseIntegrityAttribute(integrityAttr, metadat
aSet, elementDocument.get()); | 306 SubresourceIntegrity::parseIntegrityAttribute(integrityAttr, metadat
aSet, elementDocument.get()); |
| 307 request.setIntegrityMetadata(metadataSet); | 307 request.setIntegrityMetadata(metadataSet); |
| 308 } | 308 } |
| 309 | 309 |
| 310 m_resource = ScriptResource::fetch(request, elementDocument->fetcher()); | 310 m_resource = ScriptResource::fetch(request, elementDocument->fetcher()); |
| 311 | 311 |
| 312 m_isExternalScript = true; | 312 m_isExternalScript = true; |
| 313 } | 313 } |
| 314 | 314 |
| 315 if (m_resource) | 315 if (m_resource) |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 if (isHTMLScriptLoader(element)) | 513 if (isHTMLScriptLoader(element)) |
| 514 return toHTMLScriptElement(element)->loader(); | 514 return toHTMLScriptElement(element)->loader(); |
| 515 | 515 |
| 516 if (isSVGScriptLoader(element)) | 516 if (isSVGScriptLoader(element)) |
| 517 return toSVGScriptElement(element)->loader(); | 517 return toSVGScriptElement(element)->loader(); |
| 518 | 518 |
| 519 return 0; | 519 return 0; |
| 520 } | 520 } |
| 521 | 521 |
| 522 } // namespace blink | 522 } // namespace blink |
| OLD | NEW |