Changeset 62521 in webkit


Ignore:
Timestamp:
Jul 5, 2010 10:31:08 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-05 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Implement in select in table
https://bugs.webkit.org/show_bug.cgi?id=41646

Add some tests for this mode. We fail all these tests currently
because there's no way to get into this mode. :(

  • html5lib/resources/tables01.dat:
  • html5lib/runner-expected-html5.txt:
  • html5lib/runner-expected.txt:

2010-07-05 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Implement in select in table
https://bugs.webkit.org/show_bug.cgi?id=41646

This mode is mostly a fall-through to the InSelectMode.

  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processCharacter): (WebCore::HTMLTreeBuilder::processEndOfFile):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62520 r62521  
     12010-07-05  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Implement in select in table
     6        https://bugs.webkit.org/show_bug.cgi?id=41646
     7
     8        Add some tests for this mode.  We fail all these tests currently
     9        because there's no way to get into this mode.  :(
     10
     11        * html5lib/resources/tables01.dat:
     12        * html5lib/runner-expected-html5.txt:
     13        * html5lib/runner-expected.txt:
     14
    1152010-07-05  Adam Barth  <abarth@webkit.org>
    216
  • trunk/LayoutTests/html5lib/resources/tables01.dat

    r62507 r62521  
    6868|         <tr>
    6969|           <td>
     70
     71#data
     72<table><select><option>3</select></table>
     73#errors
     74#document
     75| <html>
     76|   <head>
     77|   <body>
     78|     <select>
     79|       <option>
     80|         "3"
     81|     <table>
     82
     83#data
     84<table><select><table></table></select></table>
     85#errors
     86#document
     87| <html>
     88|   <head>
     89|   <body>
     90|     <select>
     91|     <table>
     92|     <table>
     93
     94#data
     95<table><select></table>
     96#errors
     97#document
     98| <html>
     99|   <head>
     100|   <body>
     101|     <select>
     102|     <table>
     103
     104#data
     105<table><select><option>A<tr><td>B</td></tr></table>
     106#errors
     107#document
     108| <html>
     109|   <head>
     110|   <body>
     111|     <select>
     112|       <option>
     113|         "A"
     114|     <table>
     115|       <tbody>
     116|         <tr>
     117|           <td>
     118|             "B"
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r62520 r62521  
    52955295resources/tables01.dat:
    529652964
    5297 
    5298 Test 4 of 6 in resources/tables01.dat failed. Input:
     52977
     52988
     52999
     530010
     5301
     5302Test 4 of 10 in resources/tables01.dat failed. Input:
    52995303<table><colgroup></html>foo
    53005304Got:
     
    53115315|     <table>
    53125316|       <colgroup>
     5317
     5318Test 7 of 10 in resources/tables01.dat failed. Input:
     5319<table><select><option>3</select></table>
     5320Got:
     5321| <html>
     5322|   <head>
     5323|   <body>
     5324|     <table>
     5325Expected:
     5326| <html>
     5327|   <head>
     5328|   <body>
     5329|     <select>
     5330|       <option>
     5331|         "3"
     5332|     <table>
     5333
     5334Test 8 of 10 in resources/tables01.dat failed. Input:
     5335<table><select><table></table></select></table>
     5336Got:
     5337| <html>
     5338|   <head>
     5339|   <body>
     5340|     <table>
     5341Expected:
     5342| <html>
     5343|   <head>
     5344|   <body>
     5345|     <select>
     5346|     <table>
     5347|     <table>
     5348
     5349Test 9 of 10 in resources/tables01.dat failed. Input:
     5350<table><select></table>
     5351Got:
     5352| <html>
     5353|   <head>
     5354|   <body>
     5355|     <table>
     5356Expected:
     5357| <html>
     5358|   <head>
     5359|   <body>
     5360|     <select>
     5361|     <table>
     5362
     5363Test 10 of 10 in resources/tables01.dat failed. Input:
     5364<table><select><option>A<tr><td>B</td></tr></table>
     5365Got:
     5366| <html>
     5367|   <head>
     5368|   <body>
     5369|     <table>
     5370|       <tbody>
     5371|         <tr>
     5372|           <td>
     5373Expected:
     5374| <html>
     5375|   <head>
     5376|   <body>
     5377|     <select>
     5378|       <option>
     5379|         "A"
     5380|     <table>
     5381|       <tbody>
     5382|         <tr>
     5383|           <td>
     5384|             "B"
    53135385#EOF
  • trunk/LayoutTests/html5lib/runner-expected.txt

    r62520 r62521  
    50025002resources/tables01.dat:
    500350033
    5004 
    5005 Test 3 of 6 in resources/tables01.dat failed. Input:
     50047
     50058
     50069
     5007
     5008Test 3 of 10 in resources/tables01.dat failed. Input:
    50065009<table><col foo='bar'>
    50075010Got:
     
    50205023|         <col>
    50215024|           foo="bar"
     5025
     5026Test 7 of 10 in resources/tables01.dat failed. Input:
     5027<table><select><option>3</select></table>
     5028Got:
     5029| <html>
     5030|   <head>
     5031|   <body>
     5032|     <select>
     5033|       <option>
     5034|         "3"
     5035|     <table>
     5036|       <tbody>
     5037Expected:
     5038| <html>
     5039|   <head>
     5040|   <body>
     5041|     <select>
     5042|       <option>
     5043|         "3"
     5044|     <table>
     5045
     5046Test 8 of 10 in resources/tables01.dat failed. Input:
     5047<table><select><table></table></select></table>
     5048Got:
     5049| <html>
     5050|   <head>
     5051|   <body>
     5052|     <select>
     5053|     <table>
     5054|       <tbody>
     5055|     <table>
     5056Expected:
     5057| <html>
     5058|   <head>
     5059|   <body>
     5060|     <select>
     5061|     <table>
     5062|     <table>
     5063
     5064Test 9 of 10 in resources/tables01.dat failed. Input:
     5065<table><select></table>
     5066Got:
     5067| <html>
     5068|   <head>
     5069|   <body>
     5070|     <select>
     5071|     <table>
     5072|       <tbody>
     5073Expected:
     5074| <html>
     5075|   <head>
     5076|   <body>
     5077|     <select>
     5078|     <table>
  • trunk/WebCore/ChangeLog

    r62520 r62521  
     12010-07-05  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Implement in select in table
     6        https://bugs.webkit.org/show_bug.cgi?id=41646
     7
     8        This mode is mostly a fall-through to the InSelectMode.
     9
     10        * html/HTMLTreeBuilder.cpp:
     11        (WebCore::HTMLTreeBuilder::processStartTag):
     12        (WebCore::HTMLTreeBuilder::processEndTag):
     13        (WebCore::HTMLTreeBuilder::processCharacter):
     14        (WebCore::HTMLTreeBuilder::processEndOfFile):
     15
    1162010-07-05  Adam Barth  <abarth@webkit.org>
    217
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r62520 r62521  
    900900        parseError(token);
    901901        break;
     902    case InSelectInTableMode:
     903        ASSERT(insertionMode() == InSelectInTableMode);
     904        if (token.name() == captionTag || token.name() == tableTag || token.name() == tbodyTag || token.name() == tfootTag || token.name() == theadTag || token.name() == trTag || token.name() == tdTag || token.name() == thTag) {
     905            parseError(token);
     906            AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
     907            processEndTag(endSelect);
     908            processStartTag(token);
     909            return;
     910        }
     911        // Fall through
    902912    case InSelectMode:
    903         ASSERT(insertionMode() == InSelectMode);
     913        ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode);
    904914        if (token.name() == htmlTag) {
    905915            insertHTMLStartTagInBody(token);
     
    14631473        parseError(token);
    14641474        break;
     1475    case InSelectInTableMode:
     1476        ASSERT(insertionMode() == InSelectInTableMode);
     1477        if (token.name() == captionTag || token.name() == tableTag || token.name() == tbodyTag || token.name() == tfootTag || token.name() == theadTag || token.name() == trTag || token.name() == tdTag || token.name() == thTag) {
     1478            parseError(token);
     1479            if (m_openElements.inTableScope(token.name())) {
     1480                AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
     1481                processEndTag(endSelect);
     1482                processEndTag(token);
     1483            }
     1484            return;
     1485        }
     1486        // Fall through.
    14651487    case InSelectMode:
    1466         ASSERT(insertionMode() == InSelectMode);
     1488        ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode);
    14671489        if (token.name() == optgroupTag) {
    14681490            if (currentElement()->hasTagName(optionTag))
     
    15651587        parseError(token);
    15661588        break;
     1589    case InSelectInTableMode:
    15671590    case InSelectMode:
    1568         ASSERT(insertionMode() == InSelectMode);
     1591        ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode);
    15691592        insertTextNode(token);
    15701593        break;
     
    16201643        ASSERT(insertionMode() == AfterFramesetMode || insertionMode() == AfterAfterFramesetMode);
    16211644        break;
     1645    case InSelectInTableMode:
    16221646    case InSelectMode:
    1623         ASSERT(insertionMode() == InSelectMode);
     1647        ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode);
    16241648        if (currentElement() != m_openElements.htmlElement())
    16251649            parseError(token);
Note: See TracChangeset for help on using the changeset viewer.