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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; | 304 IntegrityMetadataSet metadataSet; |
305 if (!integrityAttr.isEmpty()) { | 305 if (!integrityAttr.isEmpty()) { |
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 if (m_resource && !integrityAttr.isEmpty()) | |
312 m_resource->setIntegrityMetadata(metadataSet); | |
313 | 311 |
314 m_isExternalScript = true; | 312 m_isExternalScript = true; |
315 } | 313 } |
316 | 314 |
317 if (m_resource) | 315 if (m_resource) |
318 return true; | 316 return true; |
319 | 317 |
320 dispatchErrorEvent(); | 318 dispatchErrorEvent(); |
321 return false; | 319 return false; |
322 } | 320 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 if (isHTMLScriptLoader(element)) | 495 if (isHTMLScriptLoader(element)) |
498 return toHTMLScriptElement(element)->loader(); | 496 return toHTMLScriptElement(element)->loader(); |
499 | 497 |
500 if (isSVGScriptLoader(element)) | 498 if (isSVGScriptLoader(element)) |
501 return toSVGScriptElement(element)->loader(); | 499 return toSVGScriptElement(element)->loader(); |
502 | 500 |
503 return 0; | 501 return 0; |
504 } | 502 } |
505 | 503 |
506 } // namespace blink | 504 } // namespace blink |
OLD | NEW |