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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 document->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "R
efused to execute script from '" + m_cachedScript->url().elidedString() + "' bec
ause its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and
strict MIME type checking is enabled."); | 317 document->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "R
efused to execute script from '" + m_cachedScript->url().elidedString() + "' bec
ause its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and
strict MIME type checking is enabled."); |
318 return; | 318 return; |
319 } | 319 } |
320 | 320 |
321 if (frame) { | 321 if (frame) { |
322 IgnoreDestructiveWriteCountIncrementer ignoreDesctructiveWriteCountIncre
menter(m_isExternalScript ? document.get() : 0); | 322 IgnoreDestructiveWriteCountIncrementer ignoreDesctructiveWriteCountIncre
menter(m_isExternalScript ? document.get() : 0); |
323 | 323 |
324 if (isHTMLScriptLoader(m_element)) | 324 if (isHTMLScriptLoader(m_element)) |
325 document->pushCurrentScript(toHTMLScriptElement(m_element)); | 325 document->pushCurrentScript(toHTMLScriptElement(m_element)); |
326 | 326 |
| 327 if (!m_element->fastGetAttribute(HTMLNames::crossoriginAttr).isNull() &&
sourceCode.cachedScript() && sourceCode.cachedScript()->passesAccessControlChec
k(m_element->document()->securityOrigin())) |
| 328 m_element->document()->didLoadScriptThatPassedAccessControlCheck(sou
rceCode.cachedScript()->url()); |
| 329 |
327 // Create a script from the script element node, using the script | 330 // Create a script from the script element node, using the script |
328 // block's source and the script block's type. | 331 // block's source and the script block's type. |
329 // Note: This is where the script is compiled and actually executed. | 332 // Note: This is where the script is compiled and actually executed. |
330 frame->script()->executeScriptInMainWorld(sourceCode); | 333 frame->script()->executeScriptInMainWorld(sourceCode); |
331 | 334 |
332 if (isHTMLScriptLoader(m_element)) { | 335 if (isHTMLScriptLoader(m_element)) { |
333 ASSERT(document->currentScript() == m_element); | 336 ASSERT(document->currentScript() == m_element); |
334 document->popCurrentScript(); | 337 document->popCurrentScript(); |
335 } | 338 } |
336 } | 339 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 if (isHTMLScriptLoader(element)) | 428 if (isHTMLScriptLoader(element)) |
426 return toHTMLScriptElement(element)->loader(); | 429 return toHTMLScriptElement(element)->loader(); |
427 | 430 |
428 if (isSVGScriptLoader(element)) | 431 if (isSVGScriptLoader(element)) |
429 return toSVGScriptElement(element)->loader(); | 432 return toSVGScriptElement(element)->loader(); |
430 | 433 |
431 return 0; | 434 return 0; |
432 } | 435 } |
433 | 436 |
434 } | 437 } |
OLD | NEW |