Changeset 62562 in webkit


Ignore:
Timestamp:
Jul 6, 2010 10:25:48 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-06 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Make <a> auto-close any parent <a> tag
https://bugs.webkit.org/show_bug.cgi?id=41684

I first fixed <a> to auto-close surrounding <a> tags.
That caused about 3 more test passes and one new test failure.
The test failure was due to <marque> not adding a marker
to the active formatting elements.

So I made a one-line change to fix <marque>. However that hit an
ASSERT due to a bug in indexOfFirstUnopenFormattingElement.
Fixing indexOfFirstUnopenFormattingElement fixed another bunch of
Adoption Agency related tests (clearly this was the second typo
which was causing all the adoption agency failures).


However fixing <marque> and indexOfFirstUnopenFormattingElement,
added yet another failure due to missing support for </p>
automatically adding an implicit <p> tag. Fixing </p> finally
got the tests to a stable (all improving) state.

In the end, these 4 minor (and very well tested) tweaks fixed a total
of 9 subtests in html5lib/runner.html.
Another subtest progressed, but did not fully pass due to missing
<table> foster-parenting support.

  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): (WebCore::HTMLTreeBuilder::processEndTagForInBody): (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):

2010-07-06 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Make <a> auto-close any parent <a> tag
https://bugs.webkit.org/show_bug.cgi?id=41684

  • html5lib/runner-expected-html5.txt:
    • Update expectations now that we pass 9 more subtests.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62548 r62562  
     12010-07-06  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Make <a> auto-close any parent <a> tag
     6        https://bugs.webkit.org/show_bug.cgi?id=41684
     7
     8        * html5lib/runner-expected-html5.txt:
     9         - Update expectations now that we pass 9 more subtests.
     10
    1112010-07-06  Vitaly Repeshko  <vitalyr@chromium.org>
    212
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r62540 r62562  
    6620
    7721
    8 23
    9 25
    10 28
    11830
    12 31
    13932
    141033
     
    181479
    191580
    20 82
    211686
    221790
    231893
    241994
    25 96
    26 98
    27 100
    2820103
    2921104
     
    3123109
    3224110
    33 111
    3425112
    3526
     
    7869|               <i>
    7970|       "X"
    80 
    81 Test 23 of 113 in resources/tests1.dat failed. Input:
    82 <a><p>X<a>Y</a>Z</p></a>
    83 Got:
    84 | <html>
    85 |   <head>
    86 |   <body>
    87 |     <a>
    88 |       <p>
    89 |         "X"
    90 |         <a>
    91 |           "Y"
    92 |         "Z"
    93 Expected:
    94 | <html>
    95 |   <head>
    96 |   <body>
    97 |     <a>
    98 |     <p>
    99 |       <a>
    100 |         "X"
    101 |       <a>
    102 |         "Y"
    103 |       "Z"
    104 
    105 Test 25 of 113 in resources/tests1.dat failed. Input:
    106 <p><b><div><marquee></p></b></div>X
    107 Got:
    108 | <html>
    109 |   <head>
    110 |   <body>
    111 |     <p>
    112 |       <b>
    113 |     <div>
    114 |       <marquee>
    115 |         "X"
    116 Expected:
    117 | <html>
    118 |   <head>
    119 |   <body>
    120 |     <p>
    121 |       <b>
    122 |     <div>
    123 |       <b>
    124 |         <marquee>
    125 |           <p>
    126 |           "X"
    127 
    128 Test 28 of 113 in resources/tests1.dat failed. Input:
    129 <p><hr></p>
    130 Got:
    131 | <html>
    132 |   <head>
    133 |   <body>
    134 |     <p>
    135 |     <hr>
    136 Expected:
    137 | <html>
    138 |   <head>
    139 |   <body>
    140 |     <p>
    141 |     <hr>
    142 |     <p>
    14371
    14472Test 30 of 113 in resources/tests1.dat failed. Input:
     
    172100|     <a>
    173101|       "Y"
    174 
    175 Test 31 of 113 in resources/tests1.dat failed. Input:
    176 <a X>0<b>1<a Y>2
    177 Got:
    178 | <html>
    179 |   <head>
    180 |   <body>
    181 |     <a>
    182 |       x=""
    183 |       "0"
    184 |       <b>
    185 |         "1"
    186 |         <a>
    187 |           y=""
    188 |           "2"
    189 Expected:
    190 | <html>
    191 |   <head>
    192 |   <body>
    193 |     <a>
    194 |       x=""
    195 |       "0"
    196 |       <b>
    197 |         "1"
    198 |     <b>
    199 |       <a>
    200 |         y=""
    201 |         "2"
    202102
    203103Test 32 of 113 in resources/tests1.dat failed. Input:
     
    416316|       "aoe"
    417317
    418 Test 82 of 113 in resources/tests1.dat failed. Input:
    419 <wbr><strike><code></strike><code><strike></code>
    420 Got:
    421 | <html>
    422 |   <head>
    423 |   <body>
    424 |     <wbr>
    425 |     <strike>
    426 |       <code>
    427 |     <code>
    428 |       <strike>
    429 Expected:
    430 | <html>
    431 |   <head>
    432 |   <body>
    433 |     <wbr>
    434 |     <strike>
    435 |       <code>
    436 |     <code>
    437 |       <code>
    438 |         <strike>
    439 
    440318Test 86 of 113 in resources/tests1.dat failed. Input:
    441319<table><tr><tr><td><td><span><th><span>X</table>
     
    472350|       <table>
    473351|         <a>
    474 |       <p>
    475 |         <a>
    476 |           <a>
    477 |       <div>
    478 |         <a>
    479 |           <a>
    480 |             <a>
     352|     <p>
     353|       <a>
     354|     <div>
     355|       <a>
    481356Expected:
    482357| <html>
     
    534409|             <td>
    535410|               <i>
    536 
    537 Test 96 of 113 in resources/tests1.dat failed. Input:
    538 <a><p><a></a></p></a>
    539 Got:
    540 | <html>
    541 |   <head>
    542 |   <body>
    543 |     <a>
    544 |       <p>
    545 |         <a>
    546 Expected:
    547 | <html>
    548 |   <head>
    549 |   <body>
    550 |     <a>
    551 |     <p>
    552 |       <a>
    553 |       <a>
    554 
    555 Test 98 of 113 in resources/tests1.dat failed. Input:
    556 <p><b><div><marquee></p></b></div>
    557 Got:
    558 | <html>
    559 |   <head>
    560 |   <body>
    561 |     <p>
    562 |       <b>
    563 |     <div>
    564 |       <marquee>
    565 Expected:
    566 | <html>
    567 |   <head>
    568 |   <body>
    569 |     <p>
    570 |       <b>
    571 |     <div>
    572 |       <b>
    573 |         <marquee>
    574 |           <p>
    575 
    576 Test 100 of 113 in resources/tests1.dat failed. Input:
    577 <p><hr></p>
    578 Got:
    579 | <html>
    580 |   <head>
    581 |   <body>
    582 |     <p>
    583 |     <hr>
    584 Expected:
    585 | <html>
    586 |   <head>
    587 |   <body>
    588 |     <p>
    589 |     <hr>
    590 |     <p>
    591411
    592412Test 103 of 113 in resources/tests1.dat failed. Input:
     
    734554|           <td>
    735555|       <colgroup>
    736 
    737 Test 111 of 113 in resources/tests1.dat failed. Input:
    738 </strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
    739 Got:
    740 | <html>
    741 |   <head>
    742 |   <body>
    743 |     <br>
    744 Expected:
    745 | <html>
    746 |   <head>
    747 |   <body>
    748 |     <br>
    749 |     <p>
    750556
    751557Test 112 of 113 in resources/tests1.dat failed. Input:
  • trunk/WebCore/ChangeLog

    r62561 r62562  
     12010-07-06  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Make <a> auto-close any parent <a> tag
     6        https://bugs.webkit.org/show_bug.cgi?id=41684
     7
     8        I first fixed <a> to auto-close surrounding <a> tags.
     9        That caused about 3 more test passes and one new test failure.
     10        The test failure was due to <marque> not adding a marker
     11        to the active formatting elements.
     12
     13        So I made a one-line change to fix <marque>.  However that hit an
     14        ASSERT due to a bug in indexOfFirstUnopenFormattingElement.
     15        Fixing indexOfFirstUnopenFormattingElement fixed another bunch of
     16        Adoption Agency related tests (clearly this was the second typo
     17        which was causing all the adoption agency failures).
     18       
     19        However fixing <marque> and indexOfFirstUnopenFormattingElement,
     20        added yet another failure due to missing support for </p>
     21        automatically adding an implicit <p> tag.  Fixing </p> finally
     22        got the tests to a stable (all improving) state.
     23
     24        In the end, these 4 minor (and very well tested) tweaks fixed a total
     25        of 9 subtests in html5lib/runner.html.
     26        Another subtest progressed, but did not fully pass due to missing
     27        <table> foster-parenting support.
     28
     29        * html/HTMLTreeBuilder.cpp:
     30        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
     31        (WebCore::HTMLTreeBuilder::processEndTagForInBody):
     32        (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement):
     33
    1342010-07-02  Philippe Normand  <pnormand@igalia.com>
    235
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r62540 r62562  
    607607    }
    608608    if (token.name() == aTag) {
    609         notImplemented();
     609        Element* activeATag = m_activeFormattingElements.closestElementInScopeWithName(aTag.localName());
     610        if (activeATag) {
     611            parseError(token);
     612            processFakeEndTag(aTag);
     613            m_activeFormattingElements.remove(activeATag);
     614            if (m_openElements.contains(activeATag))
     615                m_openElements.remove(activeATag);
     616        }
    610617        reconstructTheActiveFormattingElements();
    611618        insertFormattingElement(token);
     
    626633        reconstructTheActiveFormattingElements();
    627634        insertElement(token);
    628         notImplemented();
     635        m_activeFormattingElements.appendMarker();
    629636        m_framesetOk = false;
    630637        return;
     
    13711378        if (!m_openElements.inScope(token.name())) {
    13721379            parseError(token);
    1373             notImplemented();
     1380            processFakeStartTag(pTag);
     1381            ASSERT(m_openElements.inScope(token.name()));
     1382            processEndTag(token);
    13741383            return;
    13751384        }
     
    20572066        }
    20582067    } while (index);
    2059     return false;
     2068    firstUnopenElementIndex = index;
     2069    return true;
    20602070}
    20612071
Note: See TracChangeset for help on using the changeset viewer.