Changeset 62076 in webkit


Ignore:
Timestamp:
Jun 28, 2010 7:00:09 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-06-28 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Fix ASSERT so we can run more HTML5lib tests
https://bugs.webkit.org/show_bug.cgi?id=41325

Uncomment <title> tag that was triggering ASSERT.
Uncomment test groups that were triggering ASSERTs.
Update expected results to show how many more tests we have left to
fix. :)

  • html5lib/webkit-runner-expected-html5.txt:
  • html5lib/webkit-runner.html:

2010-06-28 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Fix ASSERT so we can run more HTML5lib tests
https://bugs.webkit.org/show_bug.cgi?id=41325

We can't call Node::addChild because that function contains a bunch of
logic from the old parser. Instead, this patch creates a new version
of addChild that's does less validating (that's the tree builder's
job).

  • dom/ContainerNode.cpp: (WebCore::ContainerNode::parserAddChild):
  • dom/ContainerNode.h:
  • dom/Node.cpp: (WebCore::Node::parserAddChild):
  • dom/Node.h:
  • html/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::attach):
Location:
trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62051 r62076  
     12010-06-28  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix ASSERT so we can run more HTML5lib tests
     6        https://bugs.webkit.org/show_bug.cgi?id=41325
     7
     8        Uncomment <title> tag that was triggering ASSERT.
     9        Uncomment test groups that were triggering ASSERTs.
     10        Update expected results to show how many more tests we have left to
     11        fix.  :)
     12
     13        * html5lib/webkit-runner-expected-html5.txt:
     14        * html5lib/webkit-runner.html:
     15
    1162010-06-28  Adam Barth  <abarth@webkit.org>
    217
  • trunk/LayoutTests/html5lib/webkit-runner-expected-html5.txt

    r62051 r62076  
    22CONSOLE MESSAGE: line 2: FOO<span>BAR</span>BAZ
    33Content-Type: text/plain
     4resources/tests2.dat:
     53
     64
     78
     89
     910
     1011
     1113
     1214
     1317
     1418
     1519
     1620
     1721
     1822
     1924
     2025
     2126
     2227
     2329
     2432
     2533
     2634
     2735
     2836
     2937
     3040
     3142
     3246
     3347
     3448
     3549
     3650
     3751
     3852
     3953
     4054
     4155
     4257
     4358
     44
     45resources/tests3.dat:
     461
     472
     483
     4916
     5017
     5118
     5219
     5320
     5421
     5522
     56
     57resources/tests4.dat:
     583
     595
     606
     617
     62
     63resources/tests6.dat:
     641
     652
     666
     678
     689
     6910
     7011
     7112
     7213
     7314
     7415
     7516
     7617
     7719
     7820
     7922
     8023
     8124
     8226
     8327
     8428
     8530
     8633
     8736
     8837
     8938
     9040
     9141
     9242
     9344
     9445
     9546
     9647
     9748
     9849
     9951
     100
     101resources/tests7.dat:
     1022
     1033
     1044
     1055
     1066
     1077
     1088
     1099
     11010
     11113
     11214
     11315
     11416
     11517
     11618
     11719
     11820
     11921
     12024
     12125
     12226
     12327
     12428
     12529
     12630
     127
     128resources/tests8.dat:
     1291
     1302
     1313
     1324
     1335
     1346
     1357
     1368
     1379
     138
     139resources/tests11.dat:
     1401
     1412
     1423
     1434
     1445
     1456
     1467
     1478
     1489
     149
     150resources/tests12.dat:
     1511
     1522
     153
     154resources/tests14.dat:
     1553
     1566
     157
     158resources/tests16.dat:
     1593
     1604
     1615
     1626
     1637
     1648
     1659
     16610
     16712
     16813
     16914
     17015
     17116
     17217
     17325
     17427
     17528
     17642
     17744
     17845
     17956
     18057
     18158
     18297
     18398
     18499
     185100
     186101
     187102
     188103
     189104
     190106
     191107
     192108
     193109
     194110
     195111
     196119
     197121
     198122
     199136
     200138
     201139
     202148
     203149
     204150
     205187
     206188
     207189
     208
    4209resources/webkit01.dat:
    521015
  • trunk/LayoutTests/html5lib/webkit-runner.html

    r62051 r62076  
    2121THE SOFTWARE.
    2222-->
    23 <!-- <title>html5lib test runner</title> -->
     23<title>html5lib test runner</title>
    2424<script src=resources/dom2string.js></script>
    2525<script>
     
    4040var test_files = [
    4141        // 'resources/tests1.dat',
    42         // 'resources/tests2.dat',
    43         // 'resources/tests3.dat',
    44         // 'resources/tests4.dat',
     42        'resources/tests2.dat',
     43        'resources/tests3.dat',
     44        'resources/tests4.dat',
    4545        // 'resources/tests5.dat',
    46         // 'resources/tests6.dat',
    47         // 'resources/tests7.dat',
    48         // 'resources/tests8.dat',
     46        'resources/tests6.dat',
     47        'resources/tests7.dat',
     48        'resources/tests8.dat',
    4949        // 'resources/tests9.dat',
    5050        // 'resources/tests10.dat',
    51         // 'resources/tests11.dat',
    52         // 'resources/tests12.dat',
    53         // 'resources/tests14.dat',
     51        'resources/tests11.dat',
     52        'resources/tests12.dat',
     53        'resources/tests14.dat',
    5454        // 'resources/tests15.dat',
    55         // 'resources/tests16.dat',
     55        'resources/tests16.dat',
    5656        'resources/webkit01.dat',
    5757        'resources/doctype01.dat',
  • trunk/WebCore/ChangeLog

    r62073 r62076  
     12010-06-28  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix ASSERT so we can run more HTML5lib tests
     6        https://bugs.webkit.org/show_bug.cgi?id=41325
     7
     8        We can't call Node::addChild because that function contains a bunch of
     9        logic from the old parser.  Instead, this patch creates a new version
     10        of addChild that's does less validating (that's the tree builder's
     11        job).
     12
     13        * dom/ContainerNode.cpp:
     14        (WebCore::ContainerNode::parserAddChild):
     15        * dom/ContainerNode.h:
     16        * dom/Node.cpp:
     17        (WebCore::Node::parserAddChild):
     18        * dom/Node.h:
     19        * html/HTMLTreeBuilder.h:
     20        (WebCore::HTMLTreeBuilder::attach):
     21
    1222010-06-28  David Levin  <levin@chromium.org>
    223
  • trunk/WebCore/dom/ContainerNode.cpp

    r60943 r62076  
    538538}
    539539
     540void ContainerNode::parserAddChild(PassRefPtr<Node> newChild)
     541{
     542    ASSERT(newChild);
     543    // This function is only used during parsing.
     544    // It does not send any DOM mutation events.
     545
     546    forbidEventDispatch();
     547    Node* last = m_lastChild;
     548    appendChildToContainer<Node, ContainerNode>(newChild.get(), this);
     549    allowEventDispatch();
     550
     551    document()->incDOMTreeVersion();
     552    if (inDocument())
     553        newChild->insertedIntoDocument();
     554    childrenChanged(true, last, 0, 1);
     555}
     556
    540557ContainerNode* ContainerNode::addChild(PassRefPtr<Node> newChild)
    541558{
  • trunk/WebCore/dom/ContainerNode.h

    r49208 r62076  
    5050
    5151    virtual ContainerNode* addChild(PassRefPtr<Node>);
     52    virtual void parserAddChild(PassRefPtr<Node>);
     53
    5254    bool hasChildNodes() const { return m_firstChild; }
    5355    virtual void attach();
  • trunk/WebCore/dom/Node.cpp

    r61777 r62076  
    645645}
    646646
     647void Node::parserAddChild(PassRefPtr<Node>)
     648{
     649    ASSERT_NOT_REACHED();
     650}
     651
    647652bool Node::isContentEditable() const
    648653{
  • trunk/WebCore/dom/Node.h

    r61777 r62076  
    266266    // Returns the appropriate container node for future insertions as you parse, or 0 for failure.
    267267    virtual ContainerNode* addChild(PassRefPtr<Node>);
     268    // addChild is tied into the logic of the LegacyHTMLTreeBuilder.  We need
     269    // a "clean" version to use for the HTML5 version of the HTMLTreeBuilder.
     270    virtual void parserAddChild(PassRefPtr<Node>);
    268271
    269272    // Called by the parser when this element's close tag is reached,
  • trunk/WebCore/html/HTMLTreeBuilder.h

    r62045 r62076  
    182182    {
    183183        RefPtr<ChildType> child = prpChild;
    184         parent->addChild(child);
     184        parent->parserAddChild(child);
    185185        // It's slightly unfortunate that we need to hold a reference to child
    186186        // here to call attach().  We should investigate whether we can rely on
Note: See TracChangeset for help on using the changeset viewer.