WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2006 20:35:12 +0000 (20:35 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2006 20:35:12 +0000 (20:35 +0000)
commit517f74333cfc75b99a029182889c31582aa54a4a
tree44ab66eaa5b6bd67e85ce545071a1d2b90884a77
parentbe93174f3da4f8f26dd80fc13344274c2c282d2d
WebCore:

2006-06-21  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=6058
        XMLTokenizer runs all <script> tags at once instead of as they're encountered

        * dom/xml_tokenizer.cpp:
        (WebCore::XMLTokenizer::XMLTokenizer):
        Initialize new members.

        (WebCore::XMLTokenizer::endElementNs):
        If we've encountered a script tag, execute the script here. If the script
        tag refers to an external resource, pause the parser while loading it.

        (WebCore::XMLTokenizer::end):
        Move code from finish() to here

        (WebCore::XMLTokenizer::finish):
        Only call end() if the parser isn't paused.

        (WebCore::XMLTokenizer::notifyFinished):
        Evaluate the script here and resume the parser.

        (WebCore::XMLTokenizer::resumeParsing):
        If finish() was called, call end() after writing all data.

LayoutTests:

2006-06-21  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=6058
        XMLTokenizer runs all <script> tags at once instead of as they're encountered

        * dom/svg/level3/xpath/svgunit.js:
        The XPath tests depend on the document being loaded before running the tests.
        Add a "load" event listener and run the test in the handler.

        * fast/canvas/quadraticCurveTo.xml:
        Add onload handler and run tests there.

        * fast/innerHTML/004-expected.txt:
        * fast/innerHTML/004.xhtml:
        Add load event listener and run test there.

        * fast/parser/external-entities-expected.txt:
        This now dumps as text because the script is ran before the parse error is encountered.

        * fast/parser/resources/xhtml-scripts.js: Added.
        * fast/parser/xhtml-scripts-expected.txt: Added.
        * fast/parser/xhtml-scripts.xhtml: Added.
        Add new tests.

        * svg/custom/text-hit-test.svg:
        Run test in onload handler.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/svg/level3/xpath/svgunit.js
LayoutTests/fast/canvas/quadraticCurveTo.xml
LayoutTests/fast/innerHTML/004-expected.txt
LayoutTests/fast/innerHTML/004.xhtml
LayoutTests/fast/parser/external-entities-expected.txt
LayoutTests/fast/parser/resources/xhtml-scripts.js [new file with mode: 0644]
LayoutTests/fast/parser/xhtml-scripts-expected.txt [new file with mode: 0644]
LayoutTests/fast/parser/xhtml-scripts.xhtml [new file with mode: 0644]
LayoutTests/svg/custom/text-hit-test.svg
WebCore/ChangeLog
WebCore/dom/xml_tokenizer.cpp