Changeset 62533 in webkit
- Timestamp:
- Jul 6, 2010 12:39:06 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62532 r62533 1 2010-07-06 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Implement InCaptionMode 6 https://bugs.webkit.org/show_bug.cgi?id=41660 7 8 Massive test progression due to fixing Mr. Adoption Agency. 9 10 * html5lib/runner-expected-html5.txt: 11 1 12 2010-07-06 Adam Barth <abarth@webkit.org> 2 13 -
trunk/LayoutTests/html5lib/runner-expected-html5.txt
r62532 r62533 7 7 21 8 8 23 9 2410 9 25 11 10 28 … … 16 15 50 17 16 51 18 5319 17 56 20 5821 5922 18 60 23 19 61 24 6725 6826 6927 7028 7129 20 72 30 21 73 … … 35 26 79 36 27 80 37 8138 28 82 39 29 86 … … 42 32 94 43 33 96 44 9745 34 98 46 35 100 … … 109 98 | "X" 110 99 | <a> 111 | <a> 112 | "Y" 113 | "Z" 100 | "Y" 101 | "Z" 114 102 Expected: 115 103 | <html> … … 123 111 | "Y" 124 112 | "Z" 125 126 Test 24 of 113 in resources/tests1.dat failed. Input:127 <b><button></b></button></b>128 Got:129 | <html>130 | <head>131 | <body>132 | <b>133 | <b>134 | <button>135 Expected:136 | <html>137 | <head>138 | <body>139 | <b>140 | <button>141 113 142 114 Test 25 of 113 in resources/tests1.dat failed. Input: … … 219 191 | x="" 220 192 | "0" 221 | <a> 222 | <b> 223 | "1" 224 | <b> 225 | <a> 226 | y="" 227 | "2" 193 | <b> 194 | "1" 195 | <a> 196 | y="" 197 | "2" 228 198 Expected: 229 199 | <html> … … 251 221 | "hello" 252 222 | <table> 253 | <font> 254 | <b> 223 | "excite!" 224 | <b> 225 | "me!" 255 226 | <tbody> 256 227 | <tr> … … 347 318 | "TEST" 348 319 349 Test 53 of 113 in resources/tests1.dat failed. Input:350 <b id=a><p><b id=b></p></b>TEST351 Got:352 | <html>353 | <head>354 | <body>355 | <b>356 | id="a"357 | <p>358 | <b>359 | <b>360 | id="b"361 | "TEST"362 Expected:363 | <html>364 | <head>365 | <body>366 | <b>367 | id="a"368 | <p>369 | <b>370 | id="b"371 | "TEST"372 373 320 Test 56 of 113 in resources/tests1.dat failed. Input: 374 321 <font><p>hello<b>cruel</font>world … … 378 325 | <body> 379 326 | <font> 380 | <p> 327 | <p> 328 | <font> 381 329 | "hello" 382 | <font> 383 | <b> 384 | "cruel" 385 | "world" 330 | <b> 331 | "cruelworld" 386 332 Expected: 387 333 | <html> … … 397 343 | "world" 398 344 399 Test 58 of 113 in resources/tests1.dat failed. Input: 400 <b>A<cite>B<div>C 401 Got: 402 | <html> 403 | <head> 404 | <body> 405 | <b> 406 | "A" 407 | <b> 408 | <cite> 409 | "B" 410 | <div> 411 | "C" 412 Expected: 345 Test 60 of 113 in resources/tests1.dat failed. Input: 346 <b>A<cite>B<div>C</b>D 347 Got: 413 348 | <html> 414 349 | <head> … … 418 353 | <cite> 419 354 | "B" 420 | <div> 421 | "C" 422 423 Test 59 of 113 in resources/tests1.dat failed. Input: 424 <b>A<cite>B<div>C</cite>D 425 Got: 426 | <html> 427 | <head> 428 | <body> 429 | <b> 430 | "A" 355 | <div> 431 356 | <b> 432 | <cite> 433 | "B" 434 | <div> 435 | "CD" 436 Expected: 437 | <html> 438 | <head> 439 | <body> 440 | <b> 441 | "A" 442 | <cite> 443 | "B" 444 | <div> 445 | "CD" 446 447 Test 60 of 113 in resources/tests1.dat failed. Input: 448 <b>A<cite>B<div>C</b>D 449 Got: 450 | <html> 451 | <head> 452 | <body> 453 | <b> 454 | "A" 455 | <b> 456 | <cite> 457 | "B" 458 | <div> 459 | <b> 460 | "CD" 357 | "CD" 461 358 Expected: 462 359 | <html> … … 480 377 | <cite> 481 378 | <b> 482 | < b>483 | < cite>484 | < b>379 | <cite> 380 | <i> 381 | <cite> 485 382 | <i> 486 | <i> 487 | <cite> 488 | <i> 489 | <i> 490 | <i> 491 | <cite> 492 | <i> 493 | <i> 494 | <i> 495 | <i> 496 | <i> 497 | <div> 498 | <b> 499 | "XTEST" 383 | <cite> 384 | <i> 385 | <i> 386 | <i> 387 | <i> 388 | <div> 389 | <b> 390 | "XTEST" 500 391 Expected: 501 392 | <html> … … 518 409 | "TEST" 519 410 520 Test 67 of 113 in resources/tests1.dat failed. Input: 521 <DIV> abc <B> def <I> 522 Got: 523 | <html> 524 | <head> 525 | <body> 526 | <div> 527 | " abc " 528 | <b> 529 | " def " 530 | <b> 531 | <i> 532 Expected: 533 | <html> 534 | <head> 535 | <body> 536 | <div> 537 | " abc " 538 | <b> 539 | " def " 540 | <i> 541 542 Test 68 of 113 in resources/tests1.dat failed. Input: 543 <DIV> abc <B> def <I> ghi 544 Got: 545 | <html> 546 | <head> 547 | <body> 548 | <div> 549 | " abc " 550 | <b> 551 | " def " 552 | <b> 553 | <i> 554 | " ghi" 555 Expected: 556 | <html> 557 | <head> 558 | <body> 559 | <div> 560 | " abc " 561 | <b> 562 | " def " 563 | <i> 564 | " ghi" 565 566 Test 69 of 113 in resources/tests1.dat failed. Input: 567 <DIV> abc <B> def <I> ghi <P> 568 Got: 569 | <html> 570 | <head> 571 | <body> 572 | <div> 573 | " abc " 574 | <b> 575 | " def " 576 | <b> 577 | <i> 578 | " ghi " 579 | <p> 580 Expected: 581 | <html> 582 | <head> 583 | <body> 584 | <div> 585 | " abc " 586 | <b> 587 | " def " 588 | <i> 589 | " ghi " 590 | <p> 591 592 Test 70 of 113 in resources/tests1.dat failed. Input: 593 <DIV> abc <B> def <I> ghi <P> jkl 594 Got: 595 | <html> 596 | <head> 597 | <body> 598 | <div> 599 | " abc " 600 | <b> 601 | " def " 602 | <b> 603 | <i> 604 | " ghi " 605 | <p> 606 | " jkl" 607 Expected: 608 | <html> 609 | <head> 610 | <body> 611 | <div> 612 | " abc " 613 | <b> 614 | " def " 615 | <i> 616 | " ghi " 617 | <p> 618 | " jkl" 619 620 Test 71 of 113 in resources/tests1.dat failed. Input: 621 <DIV> abc <B> def <I> ghi <P> jkl </B> 622 Got: 623 | <html> 624 | <head> 625 | <body> 626 | <div> 627 | " abc " 628 | <b> 629 | " def " 630 | <b> 631 | <i> 632 | " ghi " 633 | <i> 634 | <p> 635 | <b> 636 | " jkl " 637 Expected: 411 Test 72 of 113 in resources/tests1.dat failed. Input: 412 <DIV> abc <B> def <I> ghi <P> jkl </B> mno 413 Got: 638 414 | <html> 639 415 | <head> … … 648 424 | <p> 649 425 | <b> 650 | " jkl " 651 652 Test 72 of 113 in resources/tests1.dat failed. Input: 653 <DIV> abc <B> def <I> ghi <P> jkl </B> mno 654 Got: 655 | <html> 656 | <head> 657 | <body> 658 | <div> 659 | " abc " 660 | <b> 661 | " def " 662 | <b> 663 | <i> 664 | " ghi " 665 | <i> 666 | <p> 667 | <b> 668 | " jkl mno" 426 | " jkl mno" 669 427 Expected: 670 428 | <html> … … 693 451 | <b> 694 452 | " def " 695 | <b>696 | <i>697 | " ghi "698 453 | <i> 699 | <p> 700 | <i> 701 | <b> 702 | " jkl mno " 454 | " ghi " 455 | <i> 456 | <p> 457 | <i> 458 | <b> 459 | " jkl mno " 703 460 Expected: 704 461 | <html> … … 728 485 | <b> 729 486 | " def " 730 | <b>731 | <i>732 | " ghi "733 487 | <i> 734 | <p> 735 | <i> 736 | <b> 737 | " jkl mno pqr" 488 | " ghi " 489 | <i> 490 | <p> 491 | <i> 492 | <b> 493 | " jkl mno pqr" 738 494 Expected: 739 495 | <html> … … 764 520 | <b> 765 521 | " def " 766 | <b>767 | <i>768 | " ghi "769 522 | <i> 770 | <p> 771 | <i> 772 | <b> 773 | " jkl mno pqr " 523 | " ghi " 524 | <i> 525 | <p> 526 | <i> 527 | <b> 528 | " jkl mno pqr " 774 529 Expected: 775 530 | <html> … … 800 555 | <b> 801 556 | " def " 802 | <b>803 | <i>804 | " ghi "805 557 | <i> 806 | <p> 807 | <i> 808 | <b> 809 | " jkl mno pqr " 810 | " stu" 558 | " ghi " 559 | <i> 560 | <p> 561 | <i> 562 | <b> 563 | " jkl mno pqr " 564 | " stu" 811 565 Expected: 812 566 | <html> … … 839 593 | <table> 840 594 | <a> 841 | <a>842 | href="foo"595 | href="foo" 596 | "br" 843 597 | <tbody> 844 598 | <tr> … … 903 657 | <a> 904 658 | href="blah" 659 | "aba" 905 660 | <tbody> 906 661 | <tr> … … 927 682 | "aoe" 928 683 929 Test 81 of 113 in resources/tests1.dat failed. Input:930 <a href=a>aa<marquee>aa<a href=b>bb</marquee>aa931 Got:932 | <html>933 | <head>934 | <body>935 | <a>936 | href="a"937 | "aa"938 | <a>939 | <marquee>940 | "aa"941 | <a>942 | <a>943 | href="b"944 | "bb"945 | "aa"946 Expected:947 | <html>948 | <head>949 | <body>950 | <a>951 | href="a"952 | "aa"953 | <marquee>954 | "aa"955 | <a>956 | href="b"957 | "bb"958 | "aa"959 960 684 Test 82 of 113 in resources/tests1.dat failed. Input: 961 685 <wbr><strike><code></strike><code><strike></code> … … 966 690 | <wbr> 967 691 | <strike> 692 | <code> 693 | <code> 968 694 | <strike> 969 | <code>970 | <code>971 | <code>972 | <strike>973 695 Expected: 974 696 | <html> … … 1016 738 | <table> 1017 739 | <a> 1018 | <a>1019 740 | <p> 1020 741 | <a> 742 | <a> 1021 743 | <div> 1022 744 | <a> 745 | <a> 746 | <a> 1023 747 Expected: 1024 748 | <html> … … 1086 810 | <p> 1087 811 | <a> 1088 | <a>1089 812 Expected: 1090 813 | <html> … … 1095 818 | <a> 1096 819 | <a> 1097 1098 Test 97 of 113 in resources/tests1.dat failed. Input:1099 <b><button></b></button></b>1100 Got:1101 | <html>1102 | <head>1103 | <body>1104 | <b>1105 | <b>1106 | <button>1107 Expected:1108 | <html>1109 | <head>1110 | <body>1111 | <b>1112 | <button>1113 820 1114 821 Test 98 of 113 in resources/tests1.dat failed. Input: … … 1192 899 | <li> 1193 900 | <b> 1194 | <b> 1195 | <em> 1196 | <li> 901 | <em> 902 | <li> 1197 903 Expected: 1198 904 | <html> … … 1359 1065 resources/tests2.dat: 1360 1066 4 1361 81362 1067 9 1363 1068 11 … … 1365 1070 34 1366 1071 36 1367 381368 1072 47 1369 1073 48 … … 1391 1095 | "test" 1392 1096 1393 Test 8 of 59 in resources/tests2.dat failed. Input:1394 <!DOCTYPE html><font><p><b>test</font>1395 Got:1396 | <!DOCTYPE html>1397 | <html>1398 | <head>1399 | <body>1400 | <font>1401 | <p>1402 | <font>1403 | <b>1404 | "test"1405 Expected:1406 | <!DOCTYPE html>1407 | <html>1408 | <head>1409 | <body>1410 | <font>1411 | <p>1412 | <font>1413 | <b>1414 | "test"1415 1416 1097 Test 9 of 59 in resources/tests2.dat failed. Input: 1417 1098 <!DOCTYPE html><dt><div><dd> … … 1441 1122 | <table> 1442 1123 | <plaintext> 1124 | "<td>" 1443 1125 Expected: 1444 1126 | <html> … … 1478 1160 | <table> 1479 1161 | <caption> 1162 | "test TEST" 1163 | <tbody> 1164 | <tr> 1165 | <td> 1480 1166 Expected: 1481 1167 | <!DOCTYPE html> … … 1513 1199 | <option> 1514 1200 | <option> 1515 1516 Test 38 of 59 in resources/tests2.dat failed. Input:1517 <!DOCTYPE html><font><input><input></font>1518 Got:1519 | <!DOCTYPE html>1520 | <html>1521 | <head>1522 | <body>1523 | <font>1524 | <font>1525 | <input>1526 | <font>1527 | <input>1528 Expected:1529 | <!DOCTYPE html>1530 | <html>1531 | <head>1532 | <body>1533 | <font>1534 | <input>1535 | <input>1536 1201 1537 1202 Test 47 of 59 in resources/tests2.dat failed. Input: … … 1713 1378 | <nobr> 1714 1379 | <nobr> 1715 | <nobr>1716 | <nobr>1717 1380 Expected: 1718 1381 | <!DOCTYPE html> … … 1733 1396 | <nobr> 1734 1397 | <nobr> 1735 | <nobr> 1736 | <nobr> 1737 | <nobr> 1398 | <nobr> 1738 1399 Expected: 1739 1400 | <!DOCTYPE html> … … 1869 1530 13 1870 1531 14 1871 161872 171873 191874 231875 1532 26 1876 1533 27 … … 2001 1658 | <button> 2002 1659 2003 Test 16 of 51 in resources/tests6.dat failed. Input:2004 <table><caption><td>2005 Got:2006 | <html>2007 | <head>2008 | <body>2009 | <table>2010 | <caption>2011 Expected:2012 | <html>2013 | <head>2014 | <body>2015 | <table>2016 | <caption>2017 | <tbody>2018 | <tr>2019 | <td>2020 2021 Test 17 of 51 in resources/tests6.dat failed. Input:2022 <table><caption><div>2023 Got:2024 | <html>2025 | <head>2026 | <body>2027 | <table>2028 | <caption>2029 Expected:2030 | <html>2031 | <head>2032 | <body>2033 | <table>2034 | <caption>2035 | <div>2036 2037 Test 19 of 51 in resources/tests6.dat failed. Input:2038 <table><caption><div></caption>2039 Got:2040 | <html>2041 | <head>2042 | <body>2043 | <table>2044 | <caption>2045 Expected:2046 | <html>2047 | <head>2048 | <body>2049 | <table>2050 | <caption>2051 | <div>2052 2053 Test 23 of 51 in resources/tests6.dat failed. Input:2054 <table><caption><div></div>2055 Got:2056 | <html>2057 | <head>2058 | <body>2059 | <table>2060 | <caption>2061 Expected:2062 | <html>2063 | <head>2064 | <body>2065 | <table>2066 | <caption>2067 | <div>2068 2069 1660 Test 26 of 51 in resources/tests6.dat failed. Input: 2070 1661 <table><colgroup>foo … … 2207 1798 7 2208 1799 8 2209 92210 1800 10 2211 1801 15 … … 2266 1856 | <body> 2267 1857 | <table> 1858 | "X" 2268 1859 | <tbody> 2269 1860 | <tr> … … 2311 1902 | <body> 2312 1903 2313 Test 9 of 30 in resources/tests7.dat failed. Input:2314 <!doctype html><table><style> <tr>x </style> </table>2315 Got:2316 | <!DOCTYPE html>2317 | <html>2318 | <head>2319 | <body>2320 | <table>2321 | <style>2322 | " <tr>x "2323 Expected:2324 | <!DOCTYPE html>2325 | <html>2326 | <head>2327 | <body>2328 | <table>2329 | <style>2330 | " <tr>x "2331 | " "2332 2333 1904 Test 10 of 30 in resources/tests7.dat failed. Input: 2334 1905 <!doctype html><table><TBODY><script> <tr>x </script> </table> … … 2377 1948 | <body> 2378 1949 | <table> 1950 | "X" 2379 1951 Expected: 2380 1952 | <!DOCTYPE html> … … 2395 1967 | <body> 2396 1968 | <table> 1969 | " " 2397 1970 Expected: 2398 1971 | <!DOCTYPE html> … … 2413 1986 | <body> 2414 1987 | <table> 1988 | " " 2415 1989 Expected: 2416 1990 | <!DOCTYPE html> … … 2684 2258 | <table> 2685 2259 | <div> 2260 | "x" 2686 2261 | <div> 2262 | "xx" 2687 2263 Expected: 2688 2264 | <html> … … 2703 2279 | "x" 2704 2280 | <table> 2281 | "x" 2705 2282 Expected: 2706 2283 | <html> … … 2718 2295 | "x" 2719 2296 | <table> 2297 | "x" 2720 2298 Expected: 2721 2299 | <html> … … 2849 2427 | <math> 2850 2428 | <mi> 2429 | "foo" 2851 2430 Expected: 2852 2431 | <!DOCTYPE html> … … 2869 2448 | <math> 2870 2449 | <mi> 2450 | "foo" 2871 2451 | <mi> 2452 | "bar" 2872 2453 Expected: 2873 2454 | <!DOCTYPE html> … … 2991 2572 | <table> 2992 2573 | <caption> 2574 | <math> 2575 | <mi> 2576 | "foo" 2577 | <mi> 2578 | "bar" 2579 | <p> 2580 | "baz" 2993 2581 Expected: 2994 2582 | <!DOCTYPE html> … … 3015 2603 | <table> 3016 2604 | <caption> 2605 | <math> 2606 | <mi> 2607 | "foo" 2608 | <mi> 2609 | "bar" 2610 | <p> 2611 | "baz" 2612 | <p> 2613 | "quux" 3017 2614 Expected: 3018 2615 | <!DOCTYPE html> … … 3041 2638 | <table> 3042 2639 | <caption> 2640 | <math> 2641 | <mi> 2642 | "foo" 2643 | <mi> 2644 | "bar" 2645 | "baz" 2646 | <p> 2647 | "quux" 3043 2648 Expected: 3044 2649 | <!DOCTYPE html> … … 3360 2965 | <svg> 3361 2966 | <g> 2967 | "foo" 3362 2968 Expected: 3363 2969 | <!DOCTYPE html> … … 3380 2986 | <svg> 3381 2987 | <g> 2988 | "foo" 3382 2989 | <g> 2990 | "bar" 3383 2991 Expected: 3384 2992 | <!DOCTYPE html> … … 3502 3110 | <table> 3503 3111 | <caption> 3112 | <svg> 3113 | <g> 3114 | "foo" 3115 | <g> 3116 | "bar" 3117 | <p> 3118 | "baz" 3504 3119 Expected: 3505 3120 | <!DOCTYPE html> … … 3526 3141 | <table> 3527 3142 | <caption> 3143 | <svg> 3144 | <g> 3145 | "foo" 3146 | <g> 3147 | "bar" 3148 | <p> 3149 | "baz" 3150 | <p> 3151 | "quux" 3528 3152 Expected: 3529 3153 | <!DOCTYPE html> … … 3552 3176 | <table> 3553 3177 | <caption> 3178 | <svg> 3179 | <g> 3180 | "foo" 3181 | <g> 3182 | "bar" 3183 | "baz" 3184 | <p> 3185 | "quux" 3554 3186 Expected: 3555 3187 | <!DOCTYPE html> … … 4855 4487 | <p> 4856 4488 | <b> 4857 | <b> 4858 | <i> 4859 | <i> 4860 | <u> 4489 | <i> 4490 | <u> 4861 4491 | " " 4862 4492 | <p> … … 4887 4517 | <p> 4888 4518 | <b> 4889 | <b> 4890 | <i> 4891 | <i> 4892 | <u> 4519 | <i> 4520 | <u> 4893 4521 | " 4894 4522 " … … 4932 4560 | <body> 4933 4561 | <table> 4562 | " X" 4934 4563 | <meta> 4935 4564 Expected: … … 4950 4579 | <body> 4951 4580 | <table> 4581 | " x" 4952 4582 Expected: 4953 4583 | <!DOCTYPE html> … … 4966 4596 | <body> 4967 4597 | <table> 4598 | " x " 4968 4599 Expected: 4969 4600 | <!DOCTYPE html> … … 5002 4633 | <body> 5003 4634 | <table> 5004 | <style> 5005 | " <tr>x " 5006 Expected: 5007 | <!DOCTYPE html> 5008 | <html> 5009 | <head> 5010 | <body> 5011 | "X" 5012 | <table> 4635 | "X" 5013 4636 | <style> 5014 4637 | " <tr>x " 5015 4638 | " " 4639 Expected: 4640 | <!DOCTYPE html> 4641 | <html> 4642 | <head> 4643 | <body> 4644 | "X" 4645 | <table> 4646 | <style> 4647 | " <tr>x " 4648 | " " 5016 4649 5017 4650 Test 12 of 14 in resources/tests15.dat failed. Input: … … 5025 4658 | <table> 5026 4659 | <a> 4660 | "foo" 4661 | " " 5027 4662 | <tbody> 5028 4663 | <tr> … … 5044 4679 | " " 5045 4680 resources/tests16.dat: 5046 1875047 4681 188 5048 5049 Test 187 of 189 in resources/tests16.dat failed. Input:5050 <!doctype html><table>5051 5052 Got:5053 | <!DOCTYPE html>5054 | <html>5055 | <head>5056 | <body>5057 | <table>5058 Expected:5059 | <!DOCTYPE html>5060 | <html>5061 | <head>5062 | <body>5063 | <table>5064 | "5065 "5066 4682 5067 4683 Test 188 of 189 in resources/tests16.dat failed. Input: … … 5165 4781 | <a> 5166 4782 | "1" 5167 | <a> 5168 | <button> 5169 | "23" 4783 | <button> 4784 | "23" 5170 4785 Expected: 5171 4786 | <html> … … 5186 4801 | <a> 5187 4802 | "1" 5188 | <a> 5189 | <b> 5190 | "2" 5191 | "3" 4803 | <b> 4804 | "2" 4805 | "3" 5192 4806 Expected: 5193 4807 | <html> … … 5238 4852 | <p> 5239 4853 | <a> 4854 | "23" 5240 4855 | <table> 5241 4856 | <a> 4857 | "1" 5242 4858 Expected: 5243 4859 | <html> -
trunk/WebCore/ChangeLog
r62532 r62533 1 2010-07-06 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Implement InCaptionMode 6 https://bugs.webkit.org/show_bug.cgi?id=41660 7 8 Implementing this mode also turned up a subtle bug in the adoption 9 agency code. 10 11 * html/HTMLTreeBuilder.cpp: 12 (WebCore::HTMLTreeBuilder::processStartTag): 13 (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): 14 (WebCore::HTMLTreeBuilder::processEndTag): 15 (WebCore::HTMLTreeBuilder::processCharacter): 16 (WebCore::HTMLTreeBuilder::indexOfFirstUnopenFormattingElement): 17 - We're supposed to reutrn the first *unopened* formatting element. 18 The old code returned the first *opened* formatting element. 19 * html/HTMLTreeBuilder.h: 20 1 21 2010-07-06 Adam Barth <abarth@webkit.org> 2 22 -
trunk/WebCore/html/HTMLTreeBuilder.cpp
r62532 r62533 866 866 processStartTagForInBody(token); 867 867 break; 868 case InCaptionMode: 869 ASSERT(insertionMode() == InCaptionMode); 870 if (token.name() == captionTag || token.name() == colTag || token.name() == colgroupTag || token.name() == tbodyTag || token.name() == tdTag || token.name() == tfootTag || token.name() == thTag || token.name() == theadTag || token.name() == trTag) { 871 parseError(token); 872 if (!processCaptionEndTagForInCaption()) { 873 ASSERT(m_isParsingFragment); 874 return; 875 } 876 processStartTag(token); 877 return; 878 } 879 processStartTagForInBody(token); 880 break; 868 881 case InColumnGroupMode: 882 ASSERT(insertionMode() == InColumnGroupMode); 869 883 if (token.name() == htmlTag) { 870 884 insertHTMLStartTagInBody(token); … … 1418 1432 } 1419 1433 1434 bool HTMLTreeBuilder::processCaptionEndTagForInCaption() 1435 { 1436 if (!m_openElements.inTableScope(captionTag.localName())) { 1437 ASSERT(m_isParsingFragment); 1438 // FIXME: parse error 1439 return false; 1440 } 1441 generateImpliedEndTags(); 1442 // FIXME: parse error if (!currentElement()->hasTagName(captionTag)) 1443 m_openElements.popUntil(captionTag.localName()); 1444 m_openElements.pop(); 1445 m_activeFormattingElements.clearToLastMarker(); 1446 m_insertionMode = InTableMode; 1447 return true; 1448 } 1449 1420 1450 void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token) 1421 1451 { … … 1487 1517 processEndTagForInBody(token); 1488 1518 break; 1519 case InCaptionMode: 1520 ASSERT(insertionMode() == InCaptionMode); 1521 if (token.name() == captionTag) { 1522 processCaptionEndTagForInCaption(); 1523 return; 1524 } 1525 if (token.name() == tableTag) { 1526 parseError(token); 1527 if (!processCaptionEndTagForInCaption()) { 1528 ASSERT(m_isParsingFragment); 1529 return; 1530 } 1531 processEndTag(token); 1532 return; 1533 } 1534 if (token.name() == bodyTag || token.name() == colTag || token.name() == colgroupTag || token.name() == htmlTag || token.name() == tbodyTag || token.name() == tdTag || token.name() == tfootTag || token.name() == thTag || token.name() == theadTag || token.name() == trTag) { 1535 parseError(token); 1536 return; 1537 } 1538 processEndTagForInBody(token); 1539 break; 1489 1540 case AfterBodyMode: 1490 1541 ASSERT(insertionMode() == AfterBodyMode); … … 1647 1698 // Fall through 1648 1699 case InBodyMode: 1649 ASSERT(insertionMode() == InBodyMode); 1700 case InTableMode: 1701 case InCaptionMode: 1702 ASSERT(insertionMode() == InBodyMode || insertionMode() == InTableMode || insertionMode() == InCaptionMode); 1650 1703 notImplemented(); 1651 1704 insertTextNode(token); … … 1950 2003 const HTMLFormattingElementList::Entry& entry = m_activeFormattingElements[index]; 1951 2004 if (entry.isMarker() || m_openElements.contains(entry.element())) { 1952 firstUnopenElementIndex = index ;1953 return true;2005 firstUnopenElementIndex = index + 1; 2006 return firstUnopenElementIndex < m_activeFormattingElements.size(); 1954 2007 } 1955 2008 } while (index); -
trunk/WebCore/html/HTMLTreeBuilder.h
r62532 r62533 128 128 void processIsindexStartTagForBody(AtomicHTMLToken&); 129 129 bool processBodyEndTagForInBody(AtomicHTMLToken&); 130 bool processCaptionEndTagForInCaption(); 130 131 void processAnyOtherEndTagForInBody(AtomicHTMLToken&); 131 132
Note: See TracChangeset
for help on using the changeset viewer.