2011-04-20 Yury Semikhatsky <yurys@chromium.org>
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 11:52:04 +0000 (11:52 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 11:52:04 +0000 (11:52 +0000)
commite2bed7fca98c21a880dab452e74f047733865c18
tree8a9c251bcee8067807a770bd27076f3137781e28
parentc13c606af92a429256a6dd2faa3097d90e573c0c
2011-04-20  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Tony Gentilcore.

        Error event in <script> element shouldn't bubble
        https://bugs.webkit.org/show_bug.cgi?id=51040

        * fast/events/onerror-bubbling-expected.txt:
        * fast/events/onerror-bubbling.html:
        * svg/dom/SVGScriptElement/script-load-and-error-events.svg: error event is dispatched on the
        corresponding SVGScriptElement and shouldn't bubble, so the global error handler should
        never be invoked for script load errors. This behaviour is consistent with HTMLScriptElement element.
        * svg/dom/SVGScriptElement/script-onerror-bubbling-expected.txt: Added.
        * svg/dom/SVGScriptElement/script-onerror-bubbling.svg: Added.
2011-04-20  Yury Semikhatsky  <yurys@chromium.org>

        Reviewed by Tony Gentilcore.

        Error event in <script> element shouldn't bubble
        https://bugs.webkit.org/show_bug.cgi?id=51040

        Test: svg/dom/SVGScriptElement/script-onerror-bubbling.svg

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::dispatchErrorEvent): the method now has same implementation for all script
        elements, script load error event doesn' bubble.
        * dom/ScriptElement.h:
        * html/HTMLScriptElement.cpp:
        * html/HTMLScriptElement.h:
        * html/parser/HTMLScriptRunner.cpp:
        (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
        * svg/SVGScriptElement.cpp:
        (WebCore::SVGScriptElement::parseMappedAttribute): SVG script element now supports onerror
        hanlder which behaves the same way as onerror in HTML script element: it's invoked when
        script loading fails and the event doesn't bubble.
        * svg/SVGScriptElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/onerror-bubbling-expected.txt
LayoutTests/fast/events/onerror-bubbling.html
LayoutTests/svg/dom/SVGScriptElement/script-load-and-error-events.svg
LayoutTests/svg/dom/SVGScriptElement/script-onerror-bubbling-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/SVGScriptElement/script-onerror-bubbling.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/ScriptElement.h
Source/WebCore/html/HTMLScriptElement.cpp
Source/WebCore/html/HTMLScriptElement.h
Source/WebCore/html/parser/HTMLScriptRunner.cpp
Source/WebCore/svg/SVGScriptElement.cpp
Source/WebCore/svg/SVGScriptElement.h