Changeset 278765 in webkit
- Timestamp:
- Jun 11, 2021, 10:41:18 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r278764 r278765 1 2021-06-11 Cathie Chen <cathiechen@igalia.com> 2 3 Use HTMLDimension to parse different HTML attribute length values 4 https://bugs.webkit.org/show_bug.cgi?id=226810 5 6 Reviewed by Darin Adler. 7 8 * platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/pixel-length-attributes-expected.txt: 9 1 10 2021-06-11 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/ChangeLog
r278742 r278765 1 2021-06-11 Cathie Chen <cathiechen@igalia.com> 2 3 Use HTMLDimension to parse different HTML attribute length values 4 https://bugs.webkit.org/show_bug.cgi?id=226810 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/html/rendering/dimension-attributes-expected.txt: 9 * web-platform-tests/html/rendering/pixel-length-attributes-expected.txt: 10 1 11 2021-06-10 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/dimension-attributes-expected.txt
r267646 r278765 5 5 PASS <hr width="200.25"> mapping to width 6 6 FAIL <hr width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 7 FAIL <hr width="200."> mapping to width assert_equals: expected "200px" but got "auto" 7 PASS <hr width="200."> mapping to width 8 8 PASS <hr width="200in"> mapping to width 9 9 PASS <hr width="200.25in"> mapping to width … … 38 38 PASS <hr width=".%"> mapping to width 39 39 PASS <hr width=".x"> mapping to width 40 FAIL <hr width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 41 FAIL <hr width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 40 PASS <hr width=".5"> mapping to width 41 PASS <hr width=".5%"> mapping to width 42 42 PASS <iframe width="200"> mapping to width 43 43 PASS <iframe width="1007"> mapping to width … … 45 45 PASS <iframe width="200.25"> mapping to width 46 46 FAIL <iframe width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 47 FAIL <iframe width="200."> mapping to width assert_equals: expected "200px" but got "auto" 47 PASS <iframe width="200."> mapping to width 48 48 PASS <iframe width="200in"> mapping to width 49 49 PASS <iframe width="200.25in"> mapping to width … … 78 78 PASS <iframe width=".%"> mapping to width 79 79 PASS <iframe width=".x"> mapping to width 80 FAIL <iframe width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 81 FAIL <iframe width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 80 PASS <iframe width=".5"> mapping to width 81 PASS <iframe width=".5%"> mapping to width 82 82 PASS <iframe height="200"> mapping to height 83 83 PASS <iframe height="1007"> mapping to height … … 85 85 PASS <iframe height="200.25"> mapping to height 86 86 FAIL <iframe height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 87 FAIL <iframe height="200."> mapping to height assert_equals: expected "200px" but got "auto" 87 PASS <iframe height="200."> mapping to height 88 88 PASS <iframe height="200in"> mapping to height 89 89 PASS <iframe height="200.25in"> mapping to height … … 118 118 PASS <iframe height=".%"> mapping to height 119 119 PASS <iframe height=".x"> mapping to height 120 FAIL <iframe height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 121 FAIL <iframe height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 120 PASS <iframe height=".5"> mapping to height 121 PASS <iframe height=".5%"> mapping to height 122 122 PASS <input width="200"> mapping to width 123 123 PASS <input width="1007"> mapping to width … … 125 125 PASS <input width="200.25"> mapping to width 126 126 FAIL <input width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 127 FAIL <input width="200."> mapping to width assert_equals: expected "200px" but got "auto" 127 PASS <input width="200."> mapping to width 128 128 PASS <input width="200in"> mapping to width 129 129 PASS <input width="200.25in"> mapping to width … … 158 158 PASS <input width=".%"> mapping to width 159 159 PASS <input width=".x"> mapping to width 160 FAIL <input width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 161 FAIL <input width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 160 PASS <input width=".5"> mapping to width 161 PASS <input width=".5%"> mapping to width 162 162 PASS <input height="200"> mapping to height 163 163 PASS <input height="1007"> mapping to height … … 165 165 PASS <input height="200.25"> mapping to height 166 166 FAIL <input height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 167 FAIL <input height="200."> mapping to height assert_equals: expected "200px" but got "auto" 167 PASS <input height="200."> mapping to height 168 168 PASS <input height="200in"> mapping to height 169 169 PASS <input height="200.25in"> mapping to height … … 198 198 PASS <input height=".%"> mapping to height 199 199 PASS <input height=".x"> mapping to height 200 FAIL <input height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 201 FAIL <input height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 200 PASS <input height=".5"> mapping to height 201 PASS <input height=".5%"> mapping to height 202 202 PASS <marquee width="200"> mapping to width 203 203 PASS <marquee width="1007"> mapping to width … … 205 205 PASS <marquee width="200.25"> mapping to width 206 206 FAIL <marquee width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 207 FAIL <marquee width="200."> mapping to width assert_equals: expected "200px" but got "auto" 207 PASS <marquee width="200."> mapping to width 208 208 PASS <marquee width="200in"> mapping to width 209 209 PASS <marquee width="200.25in"> mapping to width … … 238 238 PASS <marquee width=".%"> mapping to width 239 239 PASS <marquee width=".x"> mapping to width 240 FAIL <marquee width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 241 FAIL <marquee width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 240 PASS <marquee width=".5"> mapping to width 241 PASS <marquee width=".5%"> mapping to width 242 242 PASS <marquee height="200"> mapping to height 243 243 PASS <marquee height="1007"> mapping to height … … 245 245 PASS <marquee height="200.25"> mapping to height 246 246 FAIL <marquee height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 247 FAIL <marquee height="200."> mapping to height assert_equals: expected "200px" but got "auto" 247 PASS <marquee height="200."> mapping to height 248 248 PASS <marquee height="200in"> mapping to height 249 249 PASS <marquee height="200.25in"> mapping to height … … 278 278 PASS <marquee height=".%"> mapping to height 279 279 PASS <marquee height=".x"> mapping to height 280 FAIL <marquee height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 281 FAIL <marquee height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 280 PASS <marquee height=".5"> mapping to height 281 PASS <marquee height=".5%"> mapping to height 282 282 PASS <video width="200"> mapping to width 283 283 PASS <video width="1007"> mapping to width … … 285 285 PASS <video width="200.25"> mapping to width 286 286 FAIL <video width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 287 FAIL <video width="200."> mapping to width assert_equals: expected "200px" but got "auto" 287 PASS <video width="200."> mapping to width 288 288 PASS <video width="200in"> mapping to width 289 289 PASS <video width="200.25in"> mapping to width … … 318 318 PASS <video width=".%"> mapping to width 319 319 PASS <video width=".x"> mapping to width 320 FAIL <video width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 321 FAIL <video width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 320 PASS <video width=".5"> mapping to width 321 PASS <video width=".5%"> mapping to width 322 322 PASS <video height="200"> mapping to height 323 323 PASS <video height="1007"> mapping to height … … 325 325 PASS <video height="200.25"> mapping to height 326 326 FAIL <video height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 327 FAIL <video height="200."> mapping to height assert_equals: expected "200px" but got "auto" 327 PASS <video height="200."> mapping to height 328 328 PASS <video height="200in"> mapping to height 329 329 PASS <video height="200.25in"> mapping to height … … 358 358 PASS <video height=".%"> mapping to height 359 359 PASS <video height=".x"> mapping to height 360 FAIL <video height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 361 FAIL <video height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 360 PASS <video height=".5"> mapping to height 361 PASS <video height=".5%"> mapping to height 362 362 PASS <object width="200"> mapping to width 363 363 PASS <object width="1007"> mapping to width … … 365 365 PASS <object width="200.25"> mapping to width 366 366 FAIL <object width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 367 FAIL <object width="200."> mapping to width assert_equals: expected "200px" but got "auto" 367 PASS <object width="200."> mapping to width 368 368 PASS <object width="200in"> mapping to width 369 369 PASS <object width="200.25in"> mapping to width … … 398 398 PASS <object width=".%"> mapping to width 399 399 PASS <object width=".x"> mapping to width 400 FAIL <object width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 401 FAIL <object width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 400 PASS <object width=".5"> mapping to width 401 PASS <object width=".5%"> mapping to width 402 402 PASS <object height="200"> mapping to height 403 403 PASS <object height="1007"> mapping to height … … 405 405 PASS <object height="200.25"> mapping to height 406 406 FAIL <object height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 407 FAIL <object height="200."> mapping to height assert_equals: expected "200px" but got "auto" 407 PASS <object height="200."> mapping to height 408 408 PASS <object height="200in"> mapping to height 409 409 PASS <object height="200.25in"> mapping to height … … 438 438 PASS <object height=".%"> mapping to height 439 439 PASS <object height=".x"> mapping to height 440 FAIL <object height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 441 FAIL <object height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 440 PASS <object height=".5"> mapping to height 441 PASS <object height=".5%"> mapping to height 442 442 PASS <embed width="200"> mapping to width 443 443 PASS <embed width="1007"> mapping to width … … 445 445 PASS <embed width="200.25"> mapping to width 446 446 FAIL <embed width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 447 FAIL <embed width="200."> mapping to width assert_equals: expected "200px" but got "auto" 447 PASS <embed width="200."> mapping to width 448 448 PASS <embed width="200in"> mapping to width 449 449 PASS <embed width="200.25in"> mapping to width … … 478 478 PASS <embed width=".%"> mapping to width 479 479 PASS <embed width=".x"> mapping to width 480 FAIL <embed width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 481 FAIL <embed width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 480 PASS <embed width=".5"> mapping to width 481 PASS <embed width=".5%"> mapping to width 482 482 PASS <embed height="200"> mapping to height 483 483 PASS <embed height="1007"> mapping to height … … 485 485 PASS <embed height="200.25"> mapping to height 486 486 FAIL <embed height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 487 FAIL <embed height="200."> mapping to height assert_equals: expected "200px" but got "auto" 487 PASS <embed height="200."> mapping to height 488 488 PASS <embed height="200in"> mapping to height 489 489 PASS <embed height="200.25in"> mapping to height … … 518 518 PASS <embed height=".%"> mapping to height 519 519 PASS <embed height=".x"> mapping to height 520 FAIL <embed height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 521 FAIL <embed height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 520 PASS <embed height=".5"> mapping to height 521 PASS <embed height=".5%"> mapping to height 522 522 PASS <img width="200"> mapping to width 523 523 PASS <img width="1007"> mapping to width … … 525 525 PASS <img width="200.25"> mapping to width 526 526 FAIL <img width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 527 FAIL <img width="200."> mapping to width assert_equals: expected "200px" but got "auto" 527 PASS <img width="200."> mapping to width 528 528 PASS <img width="200in"> mapping to width 529 529 PASS <img width="200.25in"> mapping to width … … 558 558 PASS <img width=".%"> mapping to width 559 559 PASS <img width=".x"> mapping to width 560 FAIL <img width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 561 FAIL <img width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 560 PASS <img width=".5"> mapping to width 561 PASS <img width=".5%"> mapping to width 562 562 PASS <img height="200"> mapping to height 563 563 PASS <img height="1007"> mapping to height … … 565 565 PASS <img height="200.25"> mapping to height 566 566 FAIL <img height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 567 FAIL <img height="200."> mapping to height assert_equals: expected "200px" but got "auto" 567 PASS <img height="200."> mapping to height 568 568 PASS <img height="200in"> mapping to height 569 569 PASS <img height="200.25in"> mapping to height … … 598 598 PASS <img height=".%"> mapping to height 599 599 PASS <img height=".x"> mapping to height 600 FAIL <img height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 601 FAIL <img height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 600 PASS <img height=".5"> mapping to height 601 PASS <img height=".5%"> mapping to height 602 602 PASS <td width="200"> mapping to width 603 603 PASS <td width="1007"> mapping to width … … 605 605 PASS <td width="200.25"> mapping to width 606 606 FAIL <td width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 607 FAIL <td width="200."> mapping to width assert_equals: expected "200px" but got "auto" 607 PASS <td width="200."> mapping to width 608 608 PASS <td width="200in"> mapping to width 609 609 PASS <td width="200.25in"> mapping to width … … 645 645 PASS <td height="200.25"> mapping to height 646 646 FAIL <td height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 647 FAIL <td height="200."> mapping to height assert_equals: expected "200px" but got "auto" 647 PASS <td height="200."> mapping to height 648 648 PASS <td height="200in"> mapping to height 649 649 PASS <td height="200.25in"> mapping to height … … 685 685 PASS <table width="200.25"> mapping to width 686 686 FAIL <table width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 687 FAIL <table width="200."> mapping to width assert_equals: expected "200px" but got "auto" 687 PASS <table width="200."> mapping to width 688 688 PASS <table width="200in"> mapping to width 689 689 PASS <table width="200.25in"> mapping to width … … 715 715 PASS <table width=".%"> mapping to width 716 716 PASS <table width=".x"> mapping to width 717 FAIL <table width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 718 FAIL <table width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 717 PASS <table width=".5"> mapping to width 718 PASS <table width=".5%"> mapping to width 719 719 FAIL <table width="0"> mapping to width assert_equals: expected "auto" but got "0px" 720 720 FAIL <table width="0%"> mapping to width assert_equals: expected "auto" but got "0%" … … 725 725 PASS <table height="200.25"> mapping to height 726 726 FAIL <table height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 727 FAIL <table height="200."> mapping to height assert_equals: expected "200px" but got "auto" 727 PASS <table height="200."> mapping to height 728 728 PASS <table height="200in"> mapping to height 729 729 PASS <table height="200.25in"> mapping to height … … 755 755 PASS <table height=".%"> mapping to height 756 756 PASS <table height=".x"> mapping to height 757 FAIL <table height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 758 FAIL <table height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 757 PASS <table height=".5"> mapping to height 758 PASS <table height=".5%"> mapping to height 759 759 FAIL <table height="0"> mapping to height assert_equals: expected "auto" but got "0px" 760 760 FAIL <table height="0%"> mapping to height assert_equals: expected "auto" but got "0%" … … 765 765 PASS <tr height="200.25"> mapping to height 766 766 FAIL <tr height="200.7"> mapping to height assert_equals: expected "200.7px" but got "200.6999969482422px" 767 FAIL <tr height="200."> mapping to height assert_equals: expected "200px" but got "auto" 767 PASS <tr height="200."> mapping to height 768 768 PASS <tr height="200in"> mapping to height 769 769 PASS <tr height="200.25in"> mapping to height … … 795 795 PASS <tr height=".%"> mapping to height 796 796 PASS <tr height=".x"> mapping to height 797 FAIL <tr height=".5"> mapping to height assert_equals: expected "auto" but got "0.5px" 798 FAIL <tr height=".5%"> mapping to height assert_equals: expected "auto" but got "0.5%" 797 PASS <tr height=".5"> mapping to height 798 PASS <tr height=".5%"> mapping to height 799 799 FAIL <tr height="0"> mapping to height assert_equals: expected "auto" but got "0px" 800 800 FAIL <tr height="0%"> mapping to height assert_equals: expected "auto" but got "0%" … … 805 805 PASS <col width="200.25"> mapping to width 806 806 FAIL <col width="200.7"> mapping to width assert_equals: expected "200.7px" but got "200.6999969482422px" 807 FAIL <col width="200."> mapping to width assert_equals: expected "200px" but got "auto" 807 PASS <col width="200."> mapping to width 808 808 PASS <col width="200in"> mapping to width 809 809 PASS <col width="200.25in"> mapping to width … … 835 835 PASS <col width=".%"> mapping to width 836 836 PASS <col width=".x"> mapping to width 837 FAIL <col width=".5"> mapping to width assert_equals: expected "auto" but got "0.5px" 838 FAIL <col width=".5%"> mapping to width assert_equals: expected "auto" but got "0.5%" 837 PASS <col width=".5"> mapping to width 838 PASS <col width=".5%"> mapping to width 839 839 FAIL <col width="0"> mapping to width assert_equals: expected "auto" but got "0px" 840 840 FAIL <col width="0%"> mapping to width assert_equals: expected "auto" but got "0%" … … 845 845 PASS <embed hspace="200.25"> mapping to marginLeft 846 846 FAIL <embed hspace="200.7"> mapping to marginLeft assert_equals: expected "200.7px" but got "200.6999969482422px" 847 FAIL <embed hspace="200."> mapping to marginLeft assert_equals: expected "200px" but got "0px" 847 PASS <embed hspace="200."> mapping to marginLeft 848 848 PASS <embed hspace="200in"> mapping to marginLeft 849 849 PASS <embed hspace="200.25in"> mapping to marginLeft … … 878 878 PASS <embed hspace=".%"> mapping to marginLeft 879 879 PASS <embed hspace=".x"> mapping to marginLeft 880 FAIL <embed hspace=".5"> mapping to marginLeft assert_equals: expected "0px" but got "0.5px" 881 FAIL <embed hspace=".5%"> mapping to marginLeft assert_equals: expected "0px" but got "0.5%" 880 PASS <embed hspace=".5"> mapping to marginLeft 881 PASS <embed hspace=".5%"> mapping to marginLeft 882 882 PASS <embed hspace="200"> mapping to marginRight 883 883 PASS <embed hspace="1007"> mapping to marginRight … … 885 885 PASS <embed hspace="200.25"> mapping to marginRight 886 886 FAIL <embed hspace="200.7"> mapping to marginRight assert_equals: expected "200.7px" but got "200.6999969482422px" 887 FAIL <embed hspace="200."> mapping to marginRight assert_equals: expected "200px" but got "0px" 887 PASS <embed hspace="200."> mapping to marginRight 888 888 PASS <embed hspace="200in"> mapping to marginRight 889 889 PASS <embed hspace="200.25in"> mapping to marginRight … … 918 918 PASS <embed hspace=".%"> mapping to marginRight 919 919 PASS <embed hspace=".x"> mapping to marginRight 920 FAIL <embed hspace=".5"> mapping to marginRight assert_equals: expected "0px" but got "0.5px" 921 FAIL <embed hspace=".5%"> mapping to marginRight assert_equals: expected "0px" but got "0.5%" 920 PASS <embed hspace=".5"> mapping to marginRight 921 PASS <embed hspace=".5%"> mapping to marginRight 922 922 PASS <embed vspace="200"> mapping to marginTop 923 923 PASS <embed vspace="1007"> mapping to marginTop … … 925 925 PASS <embed vspace="200.25"> mapping to marginTop 926 926 FAIL <embed vspace="200.7"> mapping to marginTop assert_equals: expected "200.7px" but got "200.6999969482422px" 927 FAIL <embed vspace="200."> mapping to marginTop assert_equals: expected "200px" but got "0px" 927 PASS <embed vspace="200."> mapping to marginTop 928 928 PASS <embed vspace="200in"> mapping to marginTop 929 929 PASS <embed vspace="200.25in"> mapping to marginTop … … 958 958 PASS <embed vspace=".%"> mapping to marginTop 959 959 PASS <embed vspace=".x"> mapping to marginTop 960 FAIL <embed vspace=".5"> mapping to marginTop assert_equals: expected "0px" but got "0.5px" 961 FAIL <embed vspace=".5%"> mapping to marginTop assert_equals: expected "0px" but got "0.5%" 960 PASS <embed vspace=".5"> mapping to marginTop 961 PASS <embed vspace=".5%"> mapping to marginTop 962 962 PASS <embed vspace="200"> mapping to marginBottom 963 963 PASS <embed vspace="1007"> mapping to marginBottom … … 965 965 PASS <embed vspace="200.25"> mapping to marginBottom 966 966 FAIL <embed vspace="200.7"> mapping to marginBottom assert_equals: expected "200.7px" but got "200.6999969482422px" 967 FAIL <embed vspace="200."> mapping to marginBottom assert_equals: expected "200px" but got "0px" 967 PASS <embed vspace="200."> mapping to marginBottom 968 968 PASS <embed vspace="200in"> mapping to marginBottom 969 969 PASS <embed vspace="200.25in"> mapping to marginBottom … … 998 998 PASS <embed vspace=".%"> mapping to marginBottom 999 999 PASS <embed vspace=".x"> mapping to marginBottom 1000 FAIL <embed vspace=".5"> mapping to marginBottom assert_equals: expected "0px" but got "0.5px" 1001 FAIL <embed vspace=".5%"> mapping to marginBottom assert_equals: expected "0px" but got "0.5%" 1000 PASS <embed vspace=".5"> mapping to marginBottom 1001 PASS <embed vspace=".5%"> mapping to marginBottom 1002 1002 PASS <img hspace="200"> mapping to marginLeft 1003 1003 PASS <img hspace="1007"> mapping to marginLeft … … 1005 1005 PASS <img hspace="200.25"> mapping to marginLeft 1006 1006 FAIL <img hspace="200.7"> mapping to marginLeft assert_equals: expected "200.7px" but got "200.6999969482422px" 1007 FAIL <img hspace="200."> mapping to marginLeft assert_equals: expected "200px" but got "0px" 1007 PASS <img hspace="200."> mapping to marginLeft 1008 1008 PASS <img hspace="200in"> mapping to marginLeft 1009 1009 PASS <img hspace="200.25in"> mapping to marginLeft … … 1038 1038 PASS <img hspace=".%"> mapping to marginLeft 1039 1039 PASS <img hspace=".x"> mapping to marginLeft 1040 FAIL <img hspace=".5"> mapping to marginLeft assert_equals: expected "0px" but got "0.5px" 1041 FAIL <img hspace=".5%"> mapping to marginLeft assert_equals: expected "0px" but got "0.5%" 1040 PASS <img hspace=".5"> mapping to marginLeft 1041 PASS <img hspace=".5%"> mapping to marginLeft 1042 1042 PASS <img hspace="200"> mapping to marginRight 1043 1043 PASS <img hspace="1007"> mapping to marginRight … … 1045 1045 PASS <img hspace="200.25"> mapping to marginRight 1046 1046 FAIL <img hspace="200.7"> mapping to marginRight assert_equals: expected "200.7px" but got "200.6999969482422px" 1047 FAIL <img hspace="200."> mapping to marginRight assert_equals: expected "200px" but got "0px" 1047 PASS <img hspace="200."> mapping to marginRight 1048 1048 PASS <img hspace="200in"> mapping to marginRight 1049 1049 PASS <img hspace="200.25in"> mapping to marginRight … … 1078 1078 PASS <img hspace=".%"> mapping to marginRight 1079 1079 PASS <img hspace=".x"> mapping to marginRight 1080 FAIL <img hspace=".5"> mapping to marginRight assert_equals: expected "0px" but got "0.5px" 1081 FAIL <img hspace=".5%"> mapping to marginRight assert_equals: expected "0px" but got "0.5%" 1080 PASS <img hspace=".5"> mapping to marginRight 1081 PASS <img hspace=".5%"> mapping to marginRight 1082 1082 PASS <img vspace="200"> mapping to marginTop 1083 1083 PASS <img vspace="1007"> mapping to marginTop … … 1085 1085 PASS <img vspace="200.25"> mapping to marginTop 1086 1086 FAIL <img vspace="200.7"> mapping to marginTop assert_equals: expected "200.7px" but got "200.6999969482422px" 1087 FAIL <img vspace="200."> mapping to marginTop assert_equals: expected "200px" but got "0px" 1087 PASS <img vspace="200."> mapping to marginTop 1088 1088 PASS <img vspace="200in"> mapping to marginTop 1089 1089 PASS <img vspace="200.25in"> mapping to marginTop … … 1118 1118 PASS <img vspace=".%"> mapping to marginTop 1119 1119 PASS <img vspace=".x"> mapping to marginTop 1120 FAIL <img vspace=".5"> mapping to marginTop assert_equals: expected "0px" but got "0.5px" 1121 FAIL <img vspace=".5%"> mapping to marginTop assert_equals: expected "0px" but got "0.5%" 1120 PASS <img vspace=".5"> mapping to marginTop 1121 PASS <img vspace=".5%"> mapping to marginTop 1122 1122 PASS <img vspace="200"> mapping to marginBottom 1123 1123 PASS <img vspace="1007"> mapping to marginBottom … … 1125 1125 PASS <img vspace="200.25"> mapping to marginBottom 1126 1126 FAIL <img vspace="200.7"> mapping to marginBottom assert_equals: expected "200.7px" but got "200.6999969482422px" 1127 FAIL <img vspace="200."> mapping to marginBottom assert_equals: expected "200px" but got "0px" 1127 PASS <img vspace="200."> mapping to marginBottom 1128 1128 PASS <img vspace="200in"> mapping to marginBottom 1129 1129 PASS <img vspace="200.25in"> mapping to marginBottom … … 1158 1158 PASS <img vspace=".%"> mapping to marginBottom 1159 1159 PASS <img vspace=".x"> mapping to marginBottom 1160 FAIL <img vspace=".5"> mapping to marginBottom assert_equals: expected "0px" but got "0.5px" 1161 FAIL <img vspace=".5%"> mapping to marginBottom assert_equals: expected "0px" but got "0.5%" 1160 PASS <img vspace=".5"> mapping to marginBottom 1161 PASS <img vspace=".5%"> mapping to marginBottom 1162 1162 PASS <object hspace="200"> mapping to marginLeft 1163 1163 PASS <object hspace="1007"> mapping to marginLeft … … 1165 1165 PASS <object hspace="200.25"> mapping to marginLeft 1166 1166 FAIL <object hspace="200.7"> mapping to marginLeft assert_equals: expected "200.7px" but got "200.6999969482422px" 1167 FAIL <object hspace="200."> mapping to marginLeft assert_equals: expected "200px" but got "0px" 1167 PASS <object hspace="200."> mapping to marginLeft 1168 1168 PASS <object hspace="200in"> mapping to marginLeft 1169 1169 PASS <object hspace="200.25in"> mapping to marginLeft … … 1198 1198 PASS <object hspace=".%"> mapping to marginLeft 1199 1199 PASS <object hspace=".x"> mapping to marginLeft 1200 FAIL <object hspace=".5"> mapping to marginLeft assert_equals: expected "0px" but got "0.5px" 1201 FAIL <object hspace=".5%"> mapping to marginLeft assert_equals: expected "0px" but got "0.5%" 1200 PASS <object hspace=".5"> mapping to marginLeft 1201 PASS <object hspace=".5%"> mapping to marginLeft 1202 1202 PASS <object hspace="200"> mapping to marginRight 1203 1203 PASS <object hspace="1007"> mapping to marginRight … … 1205 1205 PASS <object hspace="200.25"> mapping to marginRight 1206 1206 FAIL <object hspace="200.7"> mapping to marginRight assert_equals: expected "200.7px" but got "200.6999969482422px" 1207 FAIL <object hspace="200."> mapping to marginRight assert_equals: expected "200px" but got "0px" 1207 PASS <object hspace="200."> mapping to marginRight 1208 1208 PASS <object hspace="200in"> mapping to marginRight 1209 1209 PASS <object hspace="200.25in"> mapping to marginRight … … 1238 1238 PASS <object hspace=".%"> mapping to marginRight 1239 1239 PASS <object hspace=".x"> mapping to marginRight 1240 FAIL <object hspace=".5"> mapping to marginRight assert_equals: expected "0px" but got "0.5px" 1241 FAIL <object hspace=".5%"> mapping to marginRight assert_equals: expected "0px" but got "0.5%" 1240 PASS <object hspace=".5"> mapping to marginRight 1241 PASS <object hspace=".5%"> mapping to marginRight 1242 1242 PASS <object vspace="200"> mapping to marginTop 1243 1243 PASS <object vspace="1007"> mapping to marginTop … … 1245 1245 PASS <object vspace="200.25"> mapping to marginTop 1246 1246 FAIL <object vspace="200.7"> mapping to marginTop assert_equals: expected "200.7px" but got "200.6999969482422px" 1247 FAIL <object vspace="200."> mapping to marginTop assert_equals: expected "200px" but got "0px" 1247 PASS <object vspace="200."> mapping to marginTop 1248 1248 PASS <object vspace="200in"> mapping to marginTop 1249 1249 PASS <object vspace="200.25in"> mapping to marginTop … … 1278 1278 PASS <object vspace=".%"> mapping to marginTop 1279 1279 PASS <object vspace=".x"> mapping to marginTop 1280 FAIL <object vspace=".5"> mapping to marginTop assert_equals: expected "0px" but got "0.5px" 1281 FAIL <object vspace=".5%"> mapping to marginTop assert_equals: expected "0px" but got "0.5%" 1280 PASS <object vspace=".5"> mapping to marginTop 1281 PASS <object vspace=".5%"> mapping to marginTop 1282 1282 PASS <object vspace="200"> mapping to marginBottom 1283 1283 PASS <object vspace="1007"> mapping to marginBottom … … 1285 1285 PASS <object vspace="200.25"> mapping to marginBottom 1286 1286 FAIL <object vspace="200.7"> mapping to marginBottom assert_equals: expected "200.7px" but got "200.6999969482422px" 1287 FAIL <object vspace="200."> mapping to marginBottom assert_equals: expected "200px" but got "0px" 1287 PASS <object vspace="200."> mapping to marginBottom 1288 1288 PASS <object vspace="200in"> mapping to marginBottom 1289 1289 PASS <object vspace="200.25in"> mapping to marginBottom … … 1318 1318 PASS <object vspace=".%"> mapping to marginBottom 1319 1319 PASS <object vspace=".x"> mapping to marginBottom 1320 FAIL <object vspace=".5"> mapping to marginBottom assert_equals: expected "0px" but got "0.5px" 1321 FAIL <object vspace=".5%"> mapping to marginBottom assert_equals: expected "0px" but got "0.5%" 1320 PASS <object vspace=".5"> mapping to marginBottom 1321 PASS <object vspace=".5%"> mapping to marginBottom 1322 1322 PASS <input hspace="200"> mapping to marginLeft 1323 1323 PASS <input hspace="1007"> mapping to marginLeft … … 1325 1325 PASS <input hspace="200.25"> mapping to marginLeft 1326 1326 FAIL <input hspace="200.7"> mapping to marginLeft assert_equals: expected "200.7px" but got "200.6999969482422px" 1327 FAIL <input hspace="200."> mapping to marginLeft assert_equals: expected "200px" but got "0px" 1327 PASS <input hspace="200."> mapping to marginLeft 1328 1328 PASS <input hspace="200in"> mapping to marginLeft 1329 1329 PASS <input hspace="200.25in"> mapping to marginLeft … … 1358 1358 PASS <input hspace=".%"> mapping to marginLeft 1359 1359 PASS <input hspace=".x"> mapping to marginLeft 1360 FAIL <input hspace=".5"> mapping to marginLeft assert_equals: expected "0px" but got "0.5px" 1361 FAIL <input hspace=".5%"> mapping to marginLeft assert_equals: expected "0px" but got "0.5%" 1360 PASS <input hspace=".5"> mapping to marginLeft 1361 PASS <input hspace=".5%"> mapping to marginLeft 1362 1362 PASS <input hspace="200"> mapping to marginRight 1363 1363 PASS <input hspace="1007"> mapping to marginRight … … 1365 1365 PASS <input hspace="200.25"> mapping to marginRight 1366 1366 FAIL <input hspace="200.7"> mapping to marginRight assert_equals: expected "200.7px" but got "200.6999969482422px" 1367 FAIL <input hspace="200."> mapping to marginRight assert_equals: expected "200px" but got "0px" 1367 PASS <input hspace="200."> mapping to marginRight 1368 1368 PASS <input hspace="200in"> mapping to marginRight 1369 1369 PASS <input hspace="200.25in"> mapping to marginRight … … 1398 1398 PASS <input hspace=".%"> mapping to marginRight 1399 1399 PASS <input hspace=".x"> mapping to marginRight 1400 FAIL <input hspace=".5"> mapping to marginRight assert_equals: expected "0px" but got "0.5px" 1401 FAIL <input hspace=".5%"> mapping to marginRight assert_equals: expected "0px" but got "0.5%" 1400 PASS <input hspace=".5"> mapping to marginRight 1401 PASS <input hspace=".5%"> mapping to marginRight 1402 1402 PASS <input vspace="200"> mapping to marginTop 1403 1403 PASS <input vspace="1007"> mapping to marginTop … … 1405 1405 PASS <input vspace="200.25"> mapping to marginTop 1406 1406 FAIL <input vspace="200.7"> mapping to marginTop assert_equals: expected "200.7px" but got "200.6999969482422px" 1407 FAIL <input vspace="200."> mapping to marginTop assert_equals: expected "200px" but got "0px" 1407 PASS <input vspace="200."> mapping to marginTop 1408 1408 PASS <input vspace="200in"> mapping to marginTop 1409 1409 PASS <input vspace="200.25in"> mapping to marginTop … … 1438 1438 PASS <input vspace=".%"> mapping to marginTop 1439 1439 PASS <input vspace=".x"> mapping to marginTop 1440 FAIL <input vspace=".5"> mapping to marginTop assert_equals: expected "0px" but got "0.5px" 1441 FAIL <input vspace=".5%"> mapping to marginTop assert_equals: expected "0px" but got "0.5%" 1440 PASS <input vspace=".5"> mapping to marginTop 1441 PASS <input vspace=".5%"> mapping to marginTop 1442 1442 PASS <input vspace="200"> mapping to marginBottom 1443 1443 PASS <input vspace="1007"> mapping to marginBottom … … 1445 1445 PASS <input vspace="200.25"> mapping to marginBottom 1446 1446 FAIL <input vspace="200.7"> mapping to marginBottom assert_equals: expected "200.7px" but got "200.6999969482422px" 1447 FAIL <input vspace="200."> mapping to marginBottom assert_equals: expected "200px" but got "0px" 1447 PASS <input vspace="200."> mapping to marginBottom 1448 1448 PASS <input vspace="200in"> mapping to marginBottom 1449 1449 PASS <input vspace="200.25in"> mapping to marginBottom … … 1478 1478 PASS <input vspace=".%"> mapping to marginBottom 1479 1479 PASS <input vspace=".x"> mapping to marginBottom 1480 FAIL <input vspace=".5"> mapping to marginBottom assert_equals: expected "0px" but got "0.5px" 1481 FAIL <input vspace=".5%"> mapping to marginBottom assert_equals: expected "0px" but got "0.5%" 1480 PASS <input vspace=".5"> mapping to marginBottom 1481 PASS <input vspace=".5%"> mapping to marginBottom 1482 1482 PASS <marquee hspace="200"> mapping to marginLeft 1483 1483 PASS <marquee hspace="1007"> mapping to marginLeft … … 1485 1485 PASS <marquee hspace="200.25"> mapping to marginLeft 1486 1486 FAIL <marquee hspace="200.7"> mapping to marginLeft assert_equals: expected "200.7px" but got "200.6999969482422px" 1487 FAIL <marquee hspace="200."> mapping to marginLeft assert_equals: expected "200px" but got "0px" 1487 PASS <marquee hspace="200."> mapping to marginLeft 1488 1488 PASS <marquee hspace="200in"> mapping to marginLeft 1489 1489 PASS <marquee hspace="200.25in"> mapping to marginLeft … … 1518 1518 PASS <marquee hspace=".%"> mapping to marginLeft 1519 1519 PASS <marquee hspace=".x"> mapping to marginLeft 1520 FAIL <marquee hspace=".5"> mapping to marginLeft assert_equals: expected "0px" but got "0.5px" 1521 FAIL <marquee hspace=".5%"> mapping to marginLeft assert_equals: expected "0px" but got "0.5%" 1520 PASS <marquee hspace=".5"> mapping to marginLeft 1521 PASS <marquee hspace=".5%"> mapping to marginLeft 1522 1522 PASS <marquee hspace="200"> mapping to marginRight 1523 1523 PASS <marquee hspace="1007"> mapping to marginRight … … 1525 1525 PASS <marquee hspace="200.25"> mapping to marginRight 1526 1526 FAIL <marquee hspace="200.7"> mapping to marginRight assert_equals: expected "200.7px" but got "200.6999969482422px" 1527 FAIL <marquee hspace="200."> mapping to marginRight assert_equals: expected "200px" but got "0px" 1527 PASS <marquee hspace="200."> mapping to marginRight 1528 1528 PASS <marquee hspace="200in"> mapping to marginRight 1529 1529 PASS <marquee hspace="200.25in"> mapping to marginRight … … 1558 1558 PASS <marquee hspace=".%"> mapping to marginRight 1559 1559 PASS <marquee hspace=".x"> mapping to marginRight 1560 FAIL <marquee hspace=".5"> mapping to marginRight assert_equals: expected "0px" but got "0.5px" 1561 FAIL <marquee hspace=".5%"> mapping to marginRight assert_equals: expected "0px" but got "0.5%" 1560 PASS <marquee hspace=".5"> mapping to marginRight 1561 PASS <marquee hspace=".5%"> mapping to marginRight 1562 1562 PASS <marquee vspace="200"> mapping to marginTop 1563 1563 PASS <marquee vspace="1007"> mapping to marginTop … … 1565 1565 PASS <marquee vspace="200.25"> mapping to marginTop 1566 1566 FAIL <marquee vspace="200.7"> mapping to marginTop assert_equals: expected "200.7px" but got "200.6999969482422px" 1567 FAIL <marquee vspace="200."> mapping to marginTop assert_equals: expected "200px" but got "0px" 1567 PASS <marquee vspace="200."> mapping to marginTop 1568 1568 PASS <marquee vspace="200in"> mapping to marginTop 1569 1569 PASS <marquee vspace="200.25in"> mapping to marginTop … … 1598 1598 PASS <marquee vspace=".%"> mapping to marginTop 1599 1599 PASS <marquee vspace=".x"> mapping to marginTop 1600 FAIL <marquee vspace=".5"> mapping to marginTop assert_equals: expected "0px" but got "0.5px" 1601 FAIL <marquee vspace=".5%"> mapping to marginTop assert_equals: expected "0px" but got "0.5%" 1600 PASS <marquee vspace=".5"> mapping to marginTop 1601 PASS <marquee vspace=".5%"> mapping to marginTop 1602 1602 PASS <marquee vspace="200"> mapping to marginBottom 1603 1603 PASS <marquee vspace="1007"> mapping to marginBottom … … 1605 1605 PASS <marquee vspace="200.25"> mapping to marginBottom 1606 1606 FAIL <marquee vspace="200.7"> mapping to marginBottom assert_equals: expected "200.7px" but got "200.6999969482422px" 1607 FAIL <marquee vspace="200."> mapping to marginBottom assert_equals: expected "200px" but got "0px" 1607 PASS <marquee vspace="200."> mapping to marginBottom 1608 1608 PASS <marquee vspace="200in"> mapping to marginBottom 1609 1609 PASS <marquee vspace="200.25in"> mapping to marginBottom … … 1638 1638 PASS <marquee vspace=".%"> mapping to marginBottom 1639 1639 PASS <marquee vspace=".x"> mapping to marginBottom 1640 FAIL <marquee vspace=".5"> mapping to marginBottom assert_equals: expected "0px" but got "0.5px" 1641 FAIL <marquee vspace=".5%"> mapping to marginBottom assert_equals: expected "0px" but got "0.5%" 1640 PASS <marquee vspace=".5"> mapping to marginBottom 1641 PASS <marquee vspace=".5%"> mapping to marginBottom 1642 1642 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/pixel-length-attributes-expected.txt
r267646 r278765 171 171 PASS <body marginwidth="1007"> mapping to marginLeft 172 172 PASS <body marginwidth=" 00523 "> mapping to marginLeft 173 FAIL <body marginwidth="200."> mapping to marginLeft assert_equals: expected "200px" but got "8px" 173 PASS <body marginwidth="200."> mapping to marginLeft 174 174 FAIL <body marginwidth="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" 175 175 FAIL <body marginwidth="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.6999969482422px" … … 192 192 PASS <body marginwidth="1007"> mapping to marginRight 193 193 PASS <body marginwidth=" 00523 "> mapping to marginRight 194 FAIL <body marginwidth="200."> mapping to marginRight assert_equals: expected "200px" but got "8px" 194 PASS <body marginwidth="200."> mapping to marginRight 195 195 FAIL <body marginwidth="200.25"> mapping to marginRight assert_equals: expected "200px" but got "200.25px" 196 196 FAIL <body marginwidth="200.7"> mapping to marginRight assert_equals: expected "200px" but got "200.6999969482422px" … … 213 213 PASS <body leftmargin="1007"> mapping to marginLeft 214 214 PASS <body leftmargin=" 00523 "> mapping to marginLeft 215 FAIL <body leftmargin="200."> mapping to marginLeft assert_equals: expected "200px" but got "8px" 215 PASS <body leftmargin="200."> mapping to marginLeft 216 216 FAIL <body leftmargin="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" 217 217 FAIL <body leftmargin="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.6999969482422px" … … 255 255 PASS <body marginheight="1007"> mapping to marginTop 256 256 PASS <body marginheight=" 00523 "> mapping to marginTop 257 FAIL <body marginheight="200."> mapping to marginTop assert_equals: expected "200px" but got "8px" 257 PASS <body marginheight="200."> mapping to marginTop 258 258 FAIL <body marginheight="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" 259 259 FAIL <body marginheight="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.6999969482422px" … … 276 276 PASS <body marginheight="1007"> mapping to marginBottom 277 277 PASS <body marginheight=" 00523 "> mapping to marginBottom 278 FAIL <body marginheight="200."> mapping to marginBottom assert_equals: expected "200px" but got "8px" 278 PASS <body marginheight="200."> mapping to marginBottom 279 279 FAIL <body marginheight="200.25"> mapping to marginBottom assert_equals: expected "200px" but got "200.25px" 280 280 FAIL <body marginheight="200.7"> mapping to marginBottom assert_equals: expected "200px" but got "200.6999969482422px" … … 297 297 PASS <body topmargin="1007"> mapping to marginTop 298 298 PASS <body topmargin=" 00523 "> mapping to marginTop 299 FAIL <body topmargin="200."> mapping to marginTop assert_equals: expected "200px" but got "8px" 299 PASS <body topmargin="200."> mapping to marginTop 300 300 FAIL <body topmargin="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" 301 301 FAIL <body topmargin="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.6999969482422px" -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/pixel-length-attributes-expected.txt
r267658 r278765 171 171 PASS <body marginwidth="1007"> mapping to marginLeft 172 172 PASS <body marginwidth=" 00523 "> mapping to marginLeft 173 FAIL <body marginwidth="200."> mapping to marginLeft assert_equals: expected "200px" but got "8px" 173 PASS <body marginwidth="200."> mapping to marginLeft 174 174 FAIL <body marginwidth="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" 175 175 FAIL <body marginwidth="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.6999969482422px" … … 192 192 PASS <body marginwidth="1007"> mapping to marginRight 193 193 PASS <body marginwidth=" 00523 "> mapping to marginRight 194 FAIL <body marginwidth="200."> mapping to marginRight assert_equals: expected "200px" but got "8px" 194 PASS <body marginwidth="200."> mapping to marginRight 195 195 FAIL <body marginwidth="200.25"> mapping to marginRight assert_equals: expected "200px" but got "200.25px" 196 196 FAIL <body marginwidth="200.7"> mapping to marginRight assert_equals: expected "200px" but got "200.6999969482422px" … … 213 213 PASS <body leftmargin="1007"> mapping to marginLeft 214 214 PASS <body leftmargin=" 00523 "> mapping to marginLeft 215 FAIL <body leftmargin="200."> mapping to marginLeft assert_equals: expected "200px" but got "8px" 215 PASS <body leftmargin="200."> mapping to marginLeft 216 216 FAIL <body leftmargin="200.25"> mapping to marginLeft assert_equals: expected "200px" but got "200.25px" 217 217 FAIL <body leftmargin="200.7"> mapping to marginLeft assert_equals: expected "200px" but got "200.6999969482422px" … … 255 255 PASS <body marginheight="1007"> mapping to marginTop 256 256 PASS <body marginheight=" 00523 "> mapping to marginTop 257 FAIL <body marginheight="200."> mapping to marginTop assert_equals: expected "200px" but got "8px" 257 PASS <body marginheight="200."> mapping to marginTop 258 258 FAIL <body marginheight="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" 259 259 FAIL <body marginheight="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.6999969482422px" … … 276 276 PASS <body marginheight="1007"> mapping to marginBottom 277 277 PASS <body marginheight=" 00523 "> mapping to marginBottom 278 FAIL <body marginheight="200."> mapping to marginBottom assert_equals: expected "200px" but got "8px" 278 PASS <body marginheight="200."> mapping to marginBottom 279 279 FAIL <body marginheight="200.25"> mapping to marginBottom assert_equals: expected "200px" but got "200.25px" 280 280 FAIL <body marginheight="200.7"> mapping to marginBottom assert_equals: expected "200px" but got "200.6999969482422px" … … 297 297 PASS <body topmargin="1007"> mapping to marginTop 298 298 PASS <body topmargin=" 00523 "> mapping to marginTop 299 FAIL <body topmargin="200."> mapping to marginTop assert_equals: expected "200px" but got "8px" 299 PASS <body topmargin="200."> mapping to marginTop 300 300 FAIL <body topmargin="200.25"> mapping to marginTop assert_equals: expected "200px" but got "200.25px" 301 301 FAIL <body topmargin="200.7"> mapping to marginTop assert_equals: expected "200px" but got "200.6999969482422px" -
trunk/Source/WebCore/ChangeLog
r278764 r278765 1 2021-06-11 Cathie Chen <cathiechen@igalia.com> 2 3 Use HTMLDimension to parse different HTML attribute length values 4 https://bugs.webkit.org/show_bug.cgi?id=226810 5 6 Reviewed by Darin Adler. 7 8 This patch uses HTMLDimension to parse different kind of html length values which are defined in [1]. 9 Then according the length types to determine if the value is valid. 10 11 [1] https://www.w3.org/TR/html4/sgml/dtd.html#Length 12 13 * html/HTMLElement.cpp: 14 (WebCore::HTMLElement::addHTMLLengthToStyle): 15 (WebCore::HTMLElement::addHTMLLengthToStyle): Add HTMLLength (including percentage values and pixel values) to style. 16 (WebCore::HTMLElement::addHTMLMultiLengthToStyle): Add MultiLength (including percentage, pixel and relative values) to style. 17 (WebCore::HTMLElement::addHTMLPixelsToStyle): Add pixel values to style. 18 (WebCore::HTMLElement::addHTMLNumberToStyle): Add number (including percentage values and numbers) to style. 19 * html/HTMLElement.h: 20 * html/HTMLImageElement.cpp: 21 (WebCore::HTMLImageElement::collectPresentationalHintsForAttribute): <img>'s width and height attributes are multiLength. 22 * html/HTMLMarqueeElement.cpp: 23 (WebCore::HTMLMarqueeElement::collectPresentationalHintsForAttribute): scrolldelayAttr and loopAttr are numbers. 24 * html/HTMLTableColElement.cpp: 25 (WebCore::HTMLTableColElement::collectPresentationalHintsForAttribute): <col>'s width and height attributes are multiLength. 26 * html/HTMLTableElement.cpp: 27 (WebCore::HTMLTableElement::collectPresentationalHintsForAttribute): <table>'s cellspacingAttr only supports pixel values. 28 * html/parser/HTMLParserIdioms.cpp: 29 (WebCore::parseHTMLDimensionInternal): 30 (WebCore::parseHTMLDimension): 31 (WebCore::parseHTMLMultiLength): MultiLength doesn't support relative_length (number + *), but make sure relative_length not be treated as a pixel value. 32 * html/parser/HTMLParserIdioms.h: 33 1 34 2021-06-11 Youenn Fablet <youenn@apple.com> 2 35 -
trunk/Source/WebCore/html/HTMLElement.cpp
r278747 r278765 1017 1017 } 1018 1018 1019 void HTMLElement::addHTMLLengthToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, const String& value) 1020 { 1021 // FIXME: This function should not spin up the CSS parser, but should instead just figure out the correct 1022 // length unit and make the appropriate parsed value. 1023 1024 if (StringImpl* string = value.impl()) { 1025 unsigned parsedLength = 0; 1026 1027 while (parsedLength < string->length() && (*string)[parsedLength] <= ' ') 1028 ++parsedLength; 1029 1030 for (; parsedLength < string->length(); ++parsedLength) { 1031 UChar cc = (*string)[parsedLength]; 1032 if (cc > '9') 1033 break; 1034 if (cc < '0') { 1035 if (cc == '%' || cc == '*') 1036 ++parsedLength; 1037 if (cc != '.') 1038 break; 1039 } 1040 } 1041 1042 if (parsedLength != string->length()) { 1043 addPropertyToPresentationalHintStyle(style, propertyID, string->substring(0, parsedLength)); 1044 return; 1045 } 1046 } 1047 1048 addPropertyToPresentationalHintStyle(style, propertyID, value); 1019 void HTMLElement::addHTMLLengthToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, StringView value, AllowPercentage allowPercentage, UseCSSPXAsUnitType useCSSPX, IsMultiLength isMultiLength) 1020 { 1021 auto dimensionValue = isMultiLength == IsMultiLength::No ? parseHTMLDimension(value) : parseHTMLMultiLength(value); 1022 if (!dimensionValue) 1023 return; 1024 if (dimensionValue->type == HTMLDimension::Type::Percentage) { 1025 if (allowPercentage == AllowPercentage::Yes) 1026 addPropertyToPresentationalHintStyle(style, propertyID, dimensionValue->number, CSSUnitType::CSS_PERCENTAGE); 1027 return; 1028 } 1029 if (useCSSPX == UseCSSPXAsUnitType::Yes) 1030 addPropertyToPresentationalHintStyle(style, propertyID, dimensionValue->number, CSSUnitType::CSS_PX); 1031 else 1032 addPropertyToPresentationalHintStyle(style, propertyID, dimensionValue->number, CSSUnitType::CSS_NUMBER); 1033 } 1034 1035 // https://www.w3.org/TR/html4/sgml/dtd.html#Length, including pixel and percentage values. 1036 void HTMLElement::addHTMLLengthToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, StringView value) 1037 { 1038 addHTMLLengthToStyle(style, propertyID, value, AllowPercentage::Yes, UseCSSPXAsUnitType::Yes, IsMultiLength::No); 1039 } 1040 1041 // https://www.w3.org/TR/html4/sgml/dtd.html#MultiLength, including pixel, percentage, and relative values. 1042 void HTMLElement::addHTMLMultiLengthToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, StringView value) 1043 { 1044 addHTMLLengthToStyle(style, propertyID, value, AllowPercentage::Yes, UseCSSPXAsUnitType::Yes, IsMultiLength::Yes); 1045 } 1046 1047 // https://www.w3.org/TR/html4/sgml/dtd.html#Pixels, including pixel value. 1048 void HTMLElement::addHTMLPixelsToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, StringView value) 1049 { 1050 addHTMLLengthToStyle(style, propertyID, value, AllowPercentage::No, UseCSSPXAsUnitType::Yes, IsMultiLength::No); 1051 } 1052 1053 // This is specific to <marquee> attributes, including pixel and CSS_NUMBER values. 1054 void HTMLElement::addHTMLNumberToStyle(MutableStyleProperties& style, CSSPropertyID propertyID, StringView value) 1055 { 1056 addHTMLLengthToStyle(style, propertyID, value, AllowPercentage::Yes, UseCSSPXAsUnitType::No, IsMultiLength::No); 1049 1057 } 1050 1058 -
trunk/Source/WebCore/html/HTMLElement.h
r278747 r278765 151 151 HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); 152 152 153 void addHTMLLengthToStyle(MutableStyleProperties&, CSSPropertyID, const String& value); 153 void addHTMLLengthToStyle(MutableStyleProperties&, CSSPropertyID, StringView value); 154 void addHTMLMultiLengthToStyle(MutableStyleProperties&, CSSPropertyID, StringView value); 155 void addHTMLPixelsToStyle(MutableStyleProperties&, CSSPropertyID, StringView value); 156 void addHTMLNumberToStyle(MutableStyleProperties&, CSSPropertyID, StringView value); 157 154 158 void addHTMLColorToStyle(MutableStyleProperties&, CSSPropertyID, const String& color); 155 159 … … 183 187 static void populateEventHandlerNameMap(EventHandlerNameMap&, const QualifiedName* const table[], size_t tableSize); 184 188 static EventHandlerNameMap createEventHandlerNameMap(); 189 190 enum class AllowPercentage : bool { No, Yes }; 191 enum class UseCSSPXAsUnitType : bool { No, Yes }; 192 enum class IsMultiLength : bool { No, Yes }; 193 void addHTMLLengthToStyle(MutableStyleProperties&, CSSPropertyID, StringView value, AllowPercentage, UseCSSPXAsUnitType, IsMultiLength); 185 194 }; 186 195 -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r278277 r278765 117 117 { 118 118 if (name == widthAttr) { 119 addHTML LengthToStyle(style, CSSPropertyWidth, value);119 addHTMLMultiLengthToStyle(style, CSSPropertyWidth, value); 120 120 applyAspectRatioFromWidthAndHeightAttributesToStyle(style); 121 121 } else if (name == heightAttr) { 122 addHTML LengthToStyle(style, CSSPropertyHeight, value);122 addHTMLMultiLengthToStyle(style, CSSPropertyHeight, value); 123 123 applyAspectRatioFromWidthAndHeightAttributesToStyle(style); 124 124 } else if (name == borderAttr) -
trunk/Source/WebCore/html/HTMLMarqueeElement.cpp
r278277 r278765 96 96 } else if (name == scrolldelayAttr) { 97 97 if (!value.isEmpty()) 98 addHTML LengthToStyle(style, CSSPropertyWebkitMarqueeSpeed, value);98 addHTMLNumberToStyle(style, CSSPropertyWebkitMarqueeSpeed, value); 99 99 } else if (name == loopAttr) { 100 100 if (!value.isEmpty()) { … … 102 102 addPropertyToPresentationalHintStyle(style, CSSPropertyWebkitMarqueeRepetition, CSSValueInfinite); 103 103 else 104 addHTML LengthToStyle(style, CSSPropertyWebkitMarqueeRepetition, value);104 addHTMLNumberToStyle(style, CSSPropertyWebkitMarqueeRepetition, value); 105 105 } 106 106 } else if (name == behaviorAttr) { -
trunk/Source/WebCore/html/HTMLTableColElement.cpp
r278277 r278765 65 65 { 66 66 if (name == widthAttr) 67 addHTMLLengthToStyle(style, CSSPropertyWidth, value); 67 addHTMLMultiLengthToStyle(style, CSSPropertyWidth, value); 68 else if (name == heightAttr) 69 addHTMLMultiLengthToStyle(style, CSSPropertyHeight, value); 68 70 else 69 71 HTMLTablePartElement::collectPresentationalHintsForAttribute(name, value, style); -
trunk/Source/WebCore/html/HTMLTableElement.cpp
r278277 r278765 327 327 } else if (name == cellspacingAttr) { 328 328 if (!value.isEmpty()) 329 addHTML LengthToStyle(style, CSSPropertyBorderSpacing, value);329 addHTMLPixelsToStyle(style, CSSPropertyBorderSpacing, value); 330 330 } else if (name == vspaceAttr) { 331 331 addHTMLLengthToStyle(style, CSSPropertyMarginTop, value); -
trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp
r278689 r278765 513 513 } 514 514 515 std::optional<HTMLDimension> parseHTMLDimension(StringView dimensionString) 515 enum class IsMultiLength : bool { No, Yes }; 516 static std::optional<HTMLDimension> parseHTMLDimensionInternal(StringView dimensionString, IsMultiLength isMultiLength) 516 517 { 517 518 std::optional<HTMLDimensionParsingResult> result; … … 524 525 return std::nullopt; 525 526 527 // The relative_length is not supported, here to make sure number + * does not map to number 528 if (isMultiLength == IsMultiLength::Yes && result->parsedLength < length && dimensionString[result->parsedLength] == '*') 529 return std::nullopt; 530 526 531 HTMLDimension dimension; 527 532 dimension.number = result->number; … … 532 537 } 533 538 534 } 539 std::optional<HTMLDimension> parseHTMLDimension(StringView dimensionString) 540 { 541 return parseHTMLDimensionInternal(dimensionString, IsMultiLength::No); 542 } 543 544 std::optional<HTMLDimension> parseHTMLMultiLength(StringView multiLengthString) 545 { 546 return parseHTMLDimensionInternal(multiLengthString, IsMultiLength::Yes); 547 } 548 549 } -
trunk/Source/WebCore/html/parser/HTMLParserIdioms.h
r278689 r278765 94 94 }; 95 95 std::optional<HTMLDimension> parseHTMLDimension(StringView); 96 std::optional<HTMLDimension> parseHTMLMultiLength(StringView); 96 97 97 98 // Inline implementations of some of the functions declared above.
Note:
See TracChangeset
for help on using the changeset viewer.