Changeset 62499 in webkit
- Timestamp:
- Jul 5, 2010 1:02:11 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62498 r62499 1 2010-07-05 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add basic "in row" mode to support <td> insertion 6 https://bugs.webkit.org/show_bug.cgi?id=41588 7 8 Added tables01.dat to test a previously untested 9 <table><th> case. I expect we'll add many more table 10 tests there as we complete our implementation. 11 12 * html5lib/runner-expected-html5.txt: 13 * html5lib/runner-expected.txt: 14 * html5lib/runner.html: 15 * html5lib/resources/tables01.dat: Added. 16 1 17 2010-07-05 Eric Seidel <eric@webkit.org> 2 18 -
trunk/LayoutTests/html5lib/runner-expected-html5.txt
r62498 r62499 68 68 | <b> 69 69 | <table> 70 | <tbody> 71 | <tr> 72 | <td> 70 73 Expected: 71 74 | <html> … … 87 90 | <b> 88 91 | <table> 92 | <tbody> 93 | <tr> 94 | <td> 89 95 Expected: 90 96 | <html> … … 222 228 | <a> 223 229 | <table> 230 | <tbody> 231 | <tr> 232 | <td> 224 233 Expected: 225 234 | <html> … … 283 292 | "hello" 284 293 | <table> 285 | <!-- X --> 294 | <tbody> 295 | <tr> 296 | <th> 297 | <!-- X --> 286 298 Expected: 287 299 | <!-- - --> … … 919 931 | "aba" 920 932 | <table> 933 | <tbody> 934 | <tr> 935 | <td> 921 936 Expected: 922 937 | <html> … … 950 965 | "aba" 951 966 | <table> 967 | <tbody> 968 | <tr> 969 | <td> 952 970 Expected: 953 971 | <html> … … 973 991 | <body> 974 992 | <table> 993 | <tbody> 994 | <tr> 995 | <td> 975 996 Expected: 976 997 | <html> … … 1056 1077 | <body> 1057 1078 | <table> 1079 | <tbody> 1080 | <tr> 1081 | <td> 1058 1082 Expected: 1059 1083 | <html> … … 1099 1123 | <b> 1100 1124 | <table> 1125 | <tbody> 1126 | <tr> 1127 | <td> 1101 1128 Expected: 1102 1129 | <html> … … 1118 1145 | <b> 1119 1146 | <table> 1147 | <tbody> 1148 | <tr> 1149 | <td> 1120 1150 Expected: 1121 1151 | <html> … … 1239 1269 | <a> 1240 1270 | <table> 1271 | <tbody> 1272 | <tr> 1273 | <td> 1241 1274 Expected: 1242 1275 | <html> … … 1300 1333 | <h1> 1301 1334 | <table> 1335 | <tbody> 1336 | <tr> 1337 | <td> 1302 1338 Expected: 1303 1339 | <html> … … 1347 1383 | <tbody> 1348 1384 | <tr> 1385 | <td> 1349 1386 Expected: 1350 1387 | <html> … … 1412 1449 | <body> 1413 1450 | <table> 1451 | <tbody> 1452 | <tr> 1414 1453 Expected: 1415 1454 | <html> … … 1422 1461 | <p> 1423 1462 resources/tests2.dat: 1424 31425 1463 4 1426 1464 8 … … 1443 1481 58 1444 1482 1445 Test 3 of 59 in resources/tests2.dat failed. Input:1446 <table><td>1447 Got:1448 | <html>1449 | <head>1450 | <body>1451 | <table>1452 Expected:1453 | <html>1454 | <head>1455 | <body>1456 | <table>1457 | <tbody>1458 | <tr>1459 | <td>1460 1461 1483 Test 4 of 59 in resources/tests2.dat failed. Input: 1462 1484 <table><td>test</tbody></table> … … 1466 1488 | <body> 1467 1489 | <table> 1490 | <tbody> 1491 | <tr> 1492 | <td> 1468 1493 Expected: 1469 1494 | <html> … … 1525 1550 | <body> 1526 1551 | <table> 1552 | <tbody> 1553 | <tr> 1554 | <td> 1527 1555 Expected: 1528 1556 | <html> … … 1541 1569 | <body> 1542 1570 | <table> 1571 | <tbody> 1572 | <tr> 1543 1573 Expected: 1544 1574 | <!DOCTYPE html> … … 1795 1825 | <body> 1796 1826 | <table> 1827 | <tbody> 1828 | <tr> 1829 | <td> 1797 1830 Expected: 1798 1831 | <!DOCTYPE html> … … 2105 2138 13 2106 2139 14 2107 152108 2140 16 2109 2141 17 2110 2142 19 2111 2143 23 2112 242113 2144 26 2114 2145 27 … … 2239 2270 | <button> 2240 2271 2241 Test 15 of 51 in resources/tests6.dat failed. Input:2242 <table><tr><td></th>2243 Got:2244 | <html>2245 | <head>2246 | <body>2247 | <table>2248 Expected:2249 | <html>2250 | <head>2251 | <body>2252 | <table>2253 | <tbody>2254 | <tr>2255 | <td>2256 2257 2272 Test 16 of 51 in resources/tests6.dat failed. Input: 2258 2273 <table><caption><td> … … 2321 2336 | <div> 2322 2337 2323 Test 24 of 51 in resources/tests6.dat failed. Input:2324 <table><tr><td></body></caption></col></colgroup></html>2325 Got:2326 | <html>2327 | <head>2328 | <body>2329 | <table>2330 Expected:2331 | <html>2332 | <head>2333 | <body>2334 | <table>2335 | <tbody>2336 | <tr>2337 | <td>2338 2339 2338 Test 26 of 51 in resources/tests6.dat failed. Input: 2340 2339 <table><colgroup>foo … … 2374 2373 | <body> 2375 2374 | <table> 2375 | <tbody> 2376 | <tr> 2376 2377 Expected: 2377 2378 | <html> … … 2390 2391 | <body> 2391 2392 | <table> 2393 | <tbody> 2394 | <tr> 2395 | <td> 2392 2396 Expected: 2393 2397 | <html> … … 2532 2536 | <body> 2533 2537 | <table> 2538 | <tbody> 2539 | <tr> 2540 | <td> 2534 2541 Expected: 2535 2542 | <!DOCTYPE html> … … 2746 2753 | <body> 2747 2754 | <table> 2755 | <tbody> 2756 | <tr> 2748 2757 Expected: 2749 2758 | <!DOCTYPE html> … … 2807 2816 | <body> 2808 2817 | <table> 2818 | <tbody> 2819 | <tr> 2820 | <td> 2809 2821 Expected: 2810 2822 | <html> … … 2825 2837 | <body> 2826 2838 | <table> 2839 | <tbody> 2840 | <tr> 2841 | <td> 2827 2842 Expected: 2828 2843 | <html> … … 2848 2863 | "A" 2849 2864 | <table> 2865 | <tbody> 2866 | <tr> 2850 2867 Expected: 2851 2868 | <html> … … 2865 2882 | "A" 2866 2883 | <table> 2884 | <tbody> 2885 | <tr> 2867 2886 Expected: 2868 2887 | <html> … … 3259 3278 | <tbody> 3260 3279 | <tr> 3280 | <td> 3261 3281 Expected: 3262 3282 | <!DOCTYPE html> … … 3284 3304 | <tbody> 3285 3305 | <tr> 3306 | <td> 3286 3307 Expected: 3287 3308 | <!DOCTYPE html> … … 3410 3431 | <body> 3411 3432 | <table> 3433 | <tbody> 3434 | <tr> 3435 | <td> 3412 3436 Expected: 3413 3437 | <!DOCTYPE html> … … 3772 3796 | <tbody> 3773 3797 | <tr> 3798 | <td> 3774 3799 Expected: 3775 3800 | <!DOCTYPE html> … … 3797 3822 | <tbody> 3798 3823 | <tr> 3824 | <td> 3799 3825 Expected: 3800 3826 | <!DOCTYPE html> … … 3923 3949 | <body> 3924 3950 | <table> 3951 | <tbody> 3952 | <tr> 3953 | <td> 3925 3954 Expected: 3926 3955 | <!DOCTYPE html> … … 5063 5092 | "spam" 5064 5093 | <table> 5094 | <tbody> 5095 | <tr> 5096 | <td> 5065 5097 Expected: 5066 5098 | <!DOCTYPE html> … … 5114 5146 | "spam" 5115 5147 | <table> 5148 | <tbody> 5149 | <tr> 5150 | <td> 5116 5151 Expected: 5117 5152 | <!DOCTYPE html> … … 5289 5324 | <body> 5290 5325 | <table> 5326 | <tbody> 5327 | <tr> 5291 5328 Expected: 5292 5329 | <!DOCTYPE html> … … 5329 5366 | <div> 5330 5367 | <table> 5368 | <tbody> 5369 | <tr> 5370 | <td> 5331 5371 Expected: 5332 5372 | <!DOCTYPE html> … … 5375 5415 | <body> 5376 5416 | <table> 5417 | <tbody> 5418 | <tr> 5419 | <td> 5377 5420 Expected: 5378 5421 | <!DOCTYPE html> … … 5585 5628 | <table> 5586 5629 resources/inbody01.dat: PASS 5630 5631 resources/tables01.dat: PASS 5587 5632 #EOF -
trunk/LayoutTests/html5lib/runner-expected.txt
r62498 r62499 4937 4937 | <table> 4938 4938 resources/inbody01.dat: PASS 4939 4940 resources/tables01.dat: PASS -
trunk/LayoutTests/html5lib/runner.html
r62498 r62499 61 61 'resources/comments01.dat', 62 62 'resources/adoption01.dat', 63 'resources/inbody01.dat' 63 'resources/inbody01.dat', 64 'resources/tables01.dat' 64 65 ], 65 66 tests = [], -
trunk/WebCore/ChangeLog
r62498 r62499 1 2010-07-05 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Add basic "in row" mode to support <td> and <th> insertion 6 https://bugs.webkit.org/show_bug.cgi?id=41588 7 8 Also fixed <td> or <th> as a direct child of <table>. 9 10 Most of this was covered by html5lib/runner.html tests, 11 but I had to add a new tables01.dat to cover the <th> cases. 12 13 * html/HTMLElementStack.cpp: 14 (WebCore::HTMLNames::isTableRowScopeMarker): 15 (WebCore::HTMLElementStack::popUntilTableRowScopeMarker): 16 * html/HTMLElementStack.h: 17 * html/HTMLTreeBuilder.cpp: 18 (WebCore::HTMLTreeBuilder::processStartTag): 19 1 20 2010-07-05 Eric Seidel <eric@webkit.org> 2 21 -
trunk/WebCore/html/HTMLElementStack.cpp
r62474 r62499 77 77 } 78 78 79 inline bool isTableRowScopeMarker(Element* element) 80 { 81 return element->hasTagName(trTag) 82 || element->hasTagName(htmlTag); 83 } 84 79 85 } 80 86 … … 163 169 // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#clear-the-stack-back-to-a-table-body-context 164 170 while (!isTableBodyScopeMarker(top())) 171 pop(); 172 } 173 174 void HTMLElementStack::popUntilTableRowScopeMarker() 175 { 176 // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#clear-the-stack-back-to-a-table-row-context 177 while (!isTableRowScopeMarker(top())) 165 178 pop(); 166 179 } -
trunk/WebCore/html/HTMLElementStack.h
r62474 r62499 85 85 void popUntilTableScopeMarker(); // "clear the stack back to a table context" in the spec. 86 86 void popUntilTableBodyScopeMarker(); // "clear the stack back to a table body context" in the spec. 87 void popUntilTableRowScopeMarker(); // "clear the stack back to a table row context" in the spec. 87 88 void popHTMLHeadElement(); 88 89 void popHTMLBodyElement(); -
trunk/WebCore/html/HTMLTreeBuilder.cpp
r62498 r62499 757 757 } 758 758 if (token.name() == tdTag || token.name() == thTag || token.name() == trTag) { 759 notImplemented(); 759 AtomicHTMLToken fakeToken(HTMLToken::StartTag, tbodyTag.localName()); 760 processStartTag(fakeToken); 761 ASSERT(insertionMode() == InTableBodyMode); 762 processStartTag(token); 760 763 return; 761 764 } … … 799 802 } 800 803 if (token.name() == captionTag || token.name() == colTag || token.name() == colgroupTag || isTableBodyContextTag(token.name())) { 801 // FIXME: The spec is unclear as to what is supposed to happen here.802 804 notImplemented(); 803 805 return; 804 806 } 805 807 notImplemented(); // process using "in table" rules 808 break; 809 case InRowMode: 810 if (token.name() == thTag || token.name() == tdTag) { 811 m_openElements.popUntilTableRowScopeMarker(); 812 insertElement(token); 813 m_insertionMode = InCellMode; 814 m_activeFormattingElements.appendMarker(); 815 } 816 if (token.name() == captionTag || token.name() == colTag || token.name() == colgroupTag || isTableBodyContextTag(token.name())) { 817 notImplemented(); 818 return; 819 } 820 notImplemented(); 806 821 break; 807 822 case AfterBodyMode:
Note: See TracChangeset
for help on using the changeset viewer.