Changeset 30563 in webkit


Ignore:
Timestamp:
Feb 25, 2008 5:14:27 AM (16 years ago)
Author:
mrowe@apple.com
Message:

2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com>

Reviewed by Darin Adler.

In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
to decide whether to save prependingSrc or not. The later behavior is not right
because, in scriptHandler and scriptExecution, even the pendingScripts queue is
empty, the testBit:LoadingExtScript might be TRUE.

Test: fast/tokenizer/nested-multiple-scripts.html

  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of checking state.loadingExtScript(). (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of checking state.loadingExtScript().

2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com>

Reviewed by Darin Adler.

  • fast/tokenizer/nested-multiple-scripts-expected.txt: Added.
  • fast/tokenizer/nested-multiple-scripts.html: Added.
  • fast/tokenizer/resources/external-script-1.js: Added.
  • fast/tokenizer/resources/external-script-2.js: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r30556 r30563  
     12008-02-25  Johnny Ding  <johnnyding.webkit@gmail.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - bug http://bugs.webkit.org/show_bug.cgi?id=17444
     6        Test for multiple nested scripts which are in a external script.
     7
     8        * fast/tokenizer/nested-multiple-scripts-expected.txt: Added.
     9        * fast/tokenizer/nested-multiple-scripts.html: Added.
     10        * fast/tokenizer/resources/external-script-1.js: Added.
     11        * fast/tokenizer/resources/external-script-2.js: Added.
     12
    1132008-02-24  Michael Knaup  <michael.knaup@mac.com>
    214
  • trunk/WebCore/ChangeLog

    r30559 r30563  
     12008-02-25  Johnny Ding  <johnnyding.webkit@gmail.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=17444
     6
     7        In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
     8        whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
     9        and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
     10        to decide whether to save prependingSrc or not. The later behavior is not right
     11        because, in scriptHandler and scriptExecution, even the pendingScripts queue is
     12        empty, the testBit:LoadingExtScript might be TRUE.
     13
     14        Test: fast/tokenizer/nested-multiple-scripts.html
     15
     16        * html/HTMLTokenizer.cpp:
     17        (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
     18        checking state.loadingExtScript().
     19        (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
     20        checking state.loadingExtScript().
     21
    1222008-02-24  Darin Adler  <darin@apple.com>
    223
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r30486 r30563  
    489489        // because we want to prepend to pendingSrc rather than appending
    490490        // if there's no previous prependingSrc
    491         if (state.loadingExtScript()) {
     491        if (!pendingScripts.isEmpty()) {
    492492            if (currentPrependingSrc) {
    493493                currentPrependingSrc->append(prependingSrc);
     
    548548        // because we want to prepend to pendingSrc rather than appending
    549549        // if there's no previous prependingSrc
    550         if (state.loadingExtScript()) {
     550        if (!pendingScripts.isEmpty()) {
    551551            if (currentPrependingSrc)
    552552                currentPrependingSrc->append(prependingSrc);
Note: See TracChangeset for help on using the changeset viewer.