1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662
|
=== Safari-111 ===
2003-10-24 Richard Williamson <rjw@apple.com>
Fixed 3425358. Don't try to create page cache for pages that
have a nil view().
Reviewed by Hyatt.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge saveDocumentToPageCache]):
2003-10-24 David Hyatt <hyatt@apple.com>
Fix for 3133375, the minwidth computation for pres is wrong. There were a couple of bugs here.
One is that pres only should have a breakable character if they contain a newline. Otherwise they're
treated essentially like nowrap. The other was that m_beginMinWidth and m_endMinWidth needed to be
set to the maxwidth of the first line and the maxwidth of the last line respectively for pres instead of
being only the first and last words.
Reviewed by mjs
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
2003-10-24 David Hyatt <hyatt@apple.com>
Two fixes to the computation of min/max width for text runs.
(1) Make sure that pre runs don't add in word-spacing to the last word on a line (e.g., when a newline explicitly
breaks a pre).
(2) Fix a bug where breakable characters weren't getting factored into minwidth properly. When a word got broken
because of a breakable character, we were treating the breakable character like a space, and not including its
width as part of the minimum width of the text run.
Reviewed by john
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
2003-10-23 David Hyatt <hyatt@apple.com>
This patch fixes the pseudo-elements ::first-line and ::first-letter to inherit styles properly. More
specifically it does the following:
(1) Implements caching of pseudo-styles once computed off the style() which originated the pseudo-style.
The old code did this, and this was a regression from my previous patch.
(2) Fixes first-letter checking so that it happens at layout time rather than during render object
construction time, since that makes first-letter more dynamic and causes it to be discovered in cases
where it was being missed before. This fixes the front page of meyerweb.com.
(3) Make first-letter inherit from first-line like it's supposed to, and also make first-line styles
cross blocks and inherit properly from enclosing containers.
(4) Make first-letter changes cause a detach/attach to fire just as when the display changes. I generalized
the notion of needing to detach on a style change by making it a new kind of hint in dom_nodeimpl's style
diff function.
(5) Fixed isBlockFlow to return true for inline-blocks.
Reviewed by john
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::addChildToFlow):
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::getFirstLineBox):
(khtml::RenderBlock::firstLineBlock):
(khtml::RenderBlock::updateFirstLetter):
* khtml/rendering/render_block.h:
(khtml::RenderBlock::isBlockFlow):
* khtml/rendering/render_line.cpp:
(InlineFlowBox::paintBackgroundAndBorder):
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
* khtml/rendering/render_object.cpp:
(RenderObject::RenderObject):
(RenderObject::firstLineBlock):
(RenderObject::updateFirstLetter):
(RenderObject::dump):
(RenderObject::setStyle):
(RenderObject::recalcMinMaxWidths):
(RenderObject::style):
(RenderObject::getPseudoStyle):
* khtml/rendering/render_object.h:
(khtml::RenderObject::overhangingContents):
* khtml/rendering/render_style.cpp:
(pseudoBit):
* khtml/rendering/render_style.h:
(khtml::RenderStyle::):
* khtml/rendering/render_table.cpp:
(RenderTable::firstLineBlock):
(RenderTable::updateFirstLetter):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
(RenderText::htmlFont):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::diff):
* khtml/xml/dom_nodeimpl.h:
(DOM::NodeImpl::):
2003-10-23 Ken Kocienda <kocienda@apple.com>
Reviewed by David
Fix for these bugs:
<rdar://problem/3171929>: Safari picks a different button in a
form when you hit return if the first button has no name
<rdar://problem/3200386>: investigate which button is activated
when hitting return in form text input fields
HTML spec says that buttons must have names to be considered
successful. However, other browsers do not impose this constraint.
Therefore, we behave differently, and can use different buttons than
the author intended.
* khtml/html/html_formimpl.cpp:
(HTMLButtonElementImpl::isSuccessfulSubmitButton)
(HTMLInputElementImpl::isSuccessfulSubmitButton)
2003-10-22 David Hyatt <hyatt@apple.com>
Fix for 3460726, the user agent string was returning nil.
Fix for 3386544, empty documents did not get a layout, and so they looked white. Also fixed the positioning
of widgets to account for border/padding in updateWidgetPositions.
Fix for espn.com crasher, 3458143, caused by layout object not being properly cleared when layouts were
unscheduled.
Reviewed by darin
* khtml/khtmlview.cpp:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::RenderCanvas):
* khtml/rendering/render_replaced.cpp:
(RenderWidget::updateWidgetPositions):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::userAgent):
2003-10-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by
- fixed 3460664 - Exception handlers not properly removed
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::mouseMoved): Don't return from exception block
(KWQKHTMLPart::khtmlMouseReleaseEvent): Add exception blocking (whoops)
2003-10-22 John Sullivan <sullivan@apple.com>
- fixed 3460652 -- REGRESSION (100-110+): Can't tab out of a
frameset page
Reviewed by Darin (actually he made the change on my machine)
* khtml/html/html_baseimpl.cpp:
(HTMLFrameSetElementImpl::defaultEventHandler):
only set defaultHandled for the one event that we actually
handle (mouse event to resize frame borders); this was always
being set, hence preventing key events from being used elsewhere.
2003-10-22 Richard Williamson <rjw@apple.com>
Fixed 3454067. RenderText's repaint wasn't called because of recent changes to de-virtualize repaint. Modified getAbsoluteRepaintRect() to return containing block's getAbsoluteRepaintRect().
Also removed the long standing +1 from QFontMetrics::height().
Reviewed by Hyatt.
* khtml/rendering/render_text.cpp:
(RenderText::getAbsoluteRepaintRect):
* khtml/rendering/render_text.h:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::height):
2003-10-22 David Hyatt <hyatt@apple.com>
Fix visibility to be done when widgets are added or when styles are set rather than at paint time. Fixes
the ads painting on top of content at tvguide.com.
Reviewed by cblu
* khtml/rendering/render_replaced.cpp:
(RenderWidget::setQWidget):
(RenderWidget::setStyle):
(RenderWidget::paintObject):
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm:
(QWidget::QWidget):
(QWidget::show):
(QWidget::hide):
2003-10-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
Finished exception blocking changes, so now I can finally say:
- fixed 3137084 - Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark
- fixed 3308848 - nil-deref in KHTMLView::topLevelWidget
- fixed 3311511 - nil deref inside KJS::Screen
- fixed 3397422 - 7B51: Safari crashed in KJS::ObjectImp::mark()
- fixed 3408373 - Panther7B58 : Safari Crashed in KJS::ObjectImp::mark
- fixed 3409307 - 7B55: safari crashed in KJS::Interpreter::globalExec() (idle, nothing particular going on)
- fixed 3410160 - 7B60 Safari crashed in KHTMLPart::parentPart called from JS while in the background
- fixed 3413224 - unrepro crash in KJS::Window::mark
- fixed 3419940 - unrepro crash in KJS::Collector::allocate trying to access http://www.lindyinthepalms.com
- fixed 3420123 - Panther7B66: Safari crashed while going to http://www.tangents.co.uk/index2.html
- fixed 3423225 - Safari crash in vtable for KWQMapImpl (vtable for KWQMapImpl + 8).
- fixed 3437190 - nil-deref on quit in calling marked() from ScopeChain::mark()
* WebCore.pbproj/project.pbxproj:
* kwq/KWQFontMetrics.mm:
* kwq/KWQPainter.mm:
(QPainter::drawPixmap):
(QPainter::drawTiledPixmap):
(QPainter::_updateRenderer):
* kwq/WebCoreTextRenderer.h:
2003-10-21 David Hyatt <hyatt@apple.com>
http://placenamehere.com/safari/fixedbgtest.html is now fixed with a patch from the KHTML trunk.
Fixed backgrounds repeated when they weren't supposed to.
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackgroundExtended):
2003-10-21 David Hyatt <hyatt@apple.com>
Change pseudo-element style resolution to be lazy and to not occur until the style is actually asked
for by the front end render objects. Also fix first-letter to inherit properly from first-line styles.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::initForStyleResolve):
(khtml::CSSStyleSelector::styleForElement):
(khtml::CSSStyleSelector::pseudoStyleForElement):
(khtml::CSSStyleSelector::checkSelector):
(khtml::CSSStyleSelector::checkOneSelector):
* khtml/css/cssstyleselector.h:
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::addChildToFlow):
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
(RenderObject::createInlineBox):
(RenderObject::style):
(RenderObject::getPseudoStyle):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(pseudoBit):
(RenderStyle::hasPseudoStyle):
(RenderStyle::setHasPseudoStyle):
(RenderStyle::getPseudoStyle):
(RenderStyle::addPseudoStyle):
* khtml/rendering/render_style.h:
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
* khtml/rendering/render_text.cpp:
(InlineTextBox::paintSelection):
(RenderText::paintObject):
(RenderText::htmlFont):
2003-10-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
More exception blocking.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::~KWQKHTMLPart):
(KWQKHTMLPart::generateFrameName):
(KWQKHTMLPart::openURL):
(KWQKHTMLPart::openURLRequest):
(regExpForLabels):
(KWQKHTMLPart::clearRecordedFormValues):
(KWQKHTMLPart::recordFormValue):
(KWQKHTMLPart::submitForm):
(KHTMLPart::frameDetached):
(KWQKHTMLPart::urlSelected):
(KWQKHTMLPart::createPart):
(KWQKHTMLPart::setTitle):
(KWQKHTMLPart::setStatusBarText):
(KWQKHTMLPart::scheduleClose):
(KWQKHTMLPart::unfocusWindow):
(KWQKHTMLPart::jumpToSelection):
(KWQKHTMLPart::redirectionTimerStartedOrStopped):
(KWQKHTMLPart::userAgent):
(KWQKHTMLPart::mimeTypeForFileName):
(KWQKHTMLPart::nextKeyView):
(KWQKHTMLPart::currentEventIsMouseDownInWidget):
(KWQKHTMLPart::openURLFromPageCache):
(KWQKHTMLPart::saveDocumentState):
(KWQKHTMLPart::restoreDocumentState):
(KWQKHTMLPart::requestedURLString):
(KWQKHTMLPart::incomingReferrer):
(KWQKHTMLPart::runJavaScriptAlert):
(KWQKHTMLPart::runJavaScriptConfirm):
(KWQKHTMLPart::runJavaScriptPrompt):
(KWQKHTMLPart::createEmptyDocument):
(KWQKHTMLPart::keyEvent):
(KWQKHTMLPart::khtmlMousePressEvent):
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
(KWQKHTMLPart::lastEventIsMouseUp):
(findViewInSubviews):
(KWQKHTMLPart::khtmlMouseMoveEvent):
(KWQKHTMLPart::passSubframeEventToSubframe):
(KWQKHTMLPart::buttonForCurrentEvent):
(KWQKHTMLPart::stateForCurrentEvent):
(KWQKHTMLPart::mouseDown):
(KWQKHTMLPart::mouseDragged):
(KWQKHTMLPart::mouseUp):
(KWQKHTMLPart::sendFakeEventsAfterWidgetTracking):
(KWQKHTMLPart::mouseMoved):
(KWQKHTMLPart::sendContextMenuEvent):
(fileWrapperForElement):
(KWQKHTMLPart::attributedString):
(KWQKHTMLPart::keyboardUIMode):
2003-10-21 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3176170>: OBJECT tag with no or empty TYPE is mishandled
Reviewed by rjw.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart): call renamed frameRequiredForMIMEType:URL:
* kwq/WebCoreBridge.h: renamed frameRequiredForMIMEType: to frameRequiredForMIMEType:URL:
2003-10-20 David Hyatt <hyatt@apple.com>
Fix generated content (before/after) so that it no longer has any restrictions on it. CSS2.1 lifted
restrictions preventing the floating/positioning of generated content.
Reviewed by rjw
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::adjustRenderStyle):
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
2003-10-20 Ken Kocienda <kocienda@apple.com>
Reviewed by David
* khtml/dom/dom2_events.cpp:
(UIEvent::keyCode): Change over to use ascii value for key code.
(UIEvent::which): Ditto.
(KeyboardEvent::KeyboardEvent): New key event class which
tracks the DOM Level 3 spec more closely.
(KeyboardEvent::operator = ): New function.
(KeyboardEvent::~KeyboardEvent): New function.
(KeyboardEvent::ctrlKey): New function.
(KeyboardEvent::shiftKey): New function.
(KeyboardEvent::altKey): New function.
(KeyboardEvent::metaKey): New function.
(KeyboardEvent::altGraphKey): New function.
(KeyboardEvent::initKeyboardEvent): New function.
* khtml/dom/dom2_events.h: Ditto.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::defaultEventHandler): Use key
identifiers to test which key was pressed, instead of removed keyVal().
(HTMLInputElementImpl::defaultEventHandler): Ditto.
(HTMLSelectElementImpl::defaultEventHandler): Ditto.
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::defaultEventHandler): Change casts to match new
class name. Use key identifiers to test which key was pressed,
instead of removed keyVal(). Use new modifier accessors.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Some reorganization of the constants in the
switch statements. Name change for these to remove the KHTML_ prefix
from the key up and key down events will happen soon.
(EventImpl::idToType): Ditto.
(KeyboardEventImpl::KeyboardEventImpl): New key event class which
tracks the DOM Level 3 spec more closely.
(KeyboardEventImpl::~KeyboardEventImpl): Ditto.
(KeyboardEventImpl::initKeyboardEvent): Ditto.
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::): Some reorganization of the constants in the
switch statements. Name change for these to remove the KHTML_ prefix
from the key up and key down events will happen soon.
(DOM::KeyboardEventImpl::keyIdentifier): New function.
(DOM::KeyboardEventImpl::keyLocation): New function.
(DOM::KeyboardEventImpl::ctrlKey): New function.
(DOM::KeyboardEventImpl::shiftKey): New function.
(DOM::KeyboardEventImpl::altKey): New function.
(DOM::KeyboardEventImpl::metaKey): New function.
(DOM::KeyboardEventImpl::altGraphKey): New function.
(DOM::KeyboardEventImpl::qKeyEvent): New function.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createEvent): Now can create keyboard events.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchKeyEvent): Class name changes.
* kwq/KWQEvent.h: Added QString identifier member.
* kwq/KWQEvent.mm:
(hexDigit): Added helper.
(identifierForKeyText): Added new function to map keys to DOM
key identifiers as listed in the DOM spec.
(QKeyEvent::identifier): Added accessor.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::stateForCurrentEvent): Added check to see if
a key press is on one of the numeric keypad keys.
* kwq/KWQLogging.h: Added log constant for DOM events.
* kwq/KWQLogging.m: Ditto
2003-10-20 David Hyatt <hyatt@apple.com>
Make first-letter and before/after work with text transforms.
Reviewed by mjs
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::addChildToFlow):
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_text.cpp:
(RenderText::setStyle):
(RenderText::isTextFragment):
(RenderText::originalString):
(RenderText::setText):
(m_generatedContentStr):
(m_start):
(RenderTextFragment::~RenderTextFragment):
(RenderTextFragment::isTextFragment):
(RenderTextFragment::originalString):
* khtml/rendering/render_text.h:
(khtml::RenderTextFragment::start):
(khtml::RenderTextFragment::end):
(khtml::RenderTextFragment::contentString):
* khtml/xml/dom_nodeimpl.h:
(DOM::NodeImpl::setRenderer):
2003-10-19 David Hyatt <hyatt@apple.com>
Remove the "flow-around-floats" hack for lists. Other browsers don't do this.
Reviewed by darin
* khtml/css/quirks.css:
2003-10-19 David Hyatt <hyatt@apple.com>
Fix for a regression/crash on tivocommunity.com caused by faulty border-collapse code in the collapsedRightBorder
case. I forgot to deal with colspans.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTable::cellRight):
(RenderTableCell::collapsedRightBorder):
2003-10-19 David Hyatt <hyatt@apple.com>
Patch from KHTML trunk that makes textareas work properly even when they have no render objects.
* khtml/html/html_formimpl.cpp:
(HTMLTextAreaElementImpl::encoding):
(HTMLTextAreaElementImpl::value):
2003-10-18 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3454444 -- contents of mailto form shows up in Mail title instead of body (IE sends mail directly)
* kwq/KWQKURL.mm: (KURL::parse): Changed non-hierarchical code to consider everything
after a question mark as a query, just the way the hierarchical code does. This makes
the code that constructs the mailto URL work properly.
2003-10-18 David Hyatt <hyatt@apple.com>
Fix the intrinsic minmax width computation for blocks and XUL boxes to actually check fixed min/max CSS widths.
Reviewed by darin
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::calcMinMaxWidth):
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::calcMinMaxWidth):
2003-10-18 David Hyatt <hyatt@apple.com>
Change the names of the border-spacing properties to border-horizontal-spacing and border-vertical-spacing.
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
2003-10-18 David Hyatt <hyatt@apple.com>
Fix for diveintomark className parsing bug. class="bigblue blue" would fail to match a rule with .blue.
The bug was in the selector matching code for class attributes.
Also fixing a minmax width bug for blocks on the mozilla.org Web site. XUL boxes had the same bug as
well.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::checkOneSelector):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::calcMinMaxWidth):
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::calcMinMaxWidth):
2003-10-18 David Hyatt <hyatt@apple.com>
Fix for 3443502, generated content sometimes doesn't generate. The bug is caused by an
uninitialized variable. m_isContinuation needed to be set to false in the RenderInline
constructor.
* khtml/rendering/render_inline.cpp:
(m_isContinuation):
2003-10-17 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- make text areas set the base writing direction based on the direction in the CSS style
* kwq/KWQTextArea.h: Added setBaseWritingDirection method.
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]): Use _KWQ_setTypingParagraphStyle.
(-[KWQTextArea setWordWrap:]): Use _KWQ_setTypingParagraphStyle.
(-[KWQTextArea setBaseWritingDirection:]): Added. New method that sets the base writing
direction in both the style of the text and the typing attributes.
(-[NSTextView _KWQ_typingParagraphStyle]): Added. Helper method to make setBaseWritingDirection:
a little less gigantic.
(-[NSTextView _KWQ_setTypingParagraphStyle:]): Ditto.
(-[NSTextStorage _KWQ_setBaseWritingDirection:]): Ditto.
* kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Set both alignment and base writing direction.
2003-10-17 David Hyatt <hyatt@apple.com>
Implement horizontal and vertical border-spacing. Allow them to be specified individually.
Reviewed by mjs
------
Fix the calcWidth method of tables to account for horizontal margins properly.
Reviewed by john
------
Implement border collapsing in tables.
Reviewed by kocienda
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/rendering/render_box.cpp:
(RenderBox::paintBoxDecorations):
* khtml/rendering/render_form.cpp:
(RenderFieldset::paintBorderMinusLegend):
* khtml/rendering/render_object.cpp:
(RenderObject::paintBorder):
(RenderObject::collectBorders):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::operator==):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::CollapsedBorderValue::precedence):
(khtml::CollapsedBorderValue::width):
(khtml::CollapsedBorderValue::style):
(khtml::CollapsedBorderValue::exists):
(khtml::CollapsedBorderValue::color):
(khtml::CollapsedBorderValue::isTransparent):
(khtml::CollapsedBorderValue::operator==):
(khtml::RenderStyle::borderLeft):
(khtml::RenderStyle::borderRight):
(khtml::RenderStyle::borderTop):
(khtml::RenderStyle::borderBottom):
(khtml::RenderStyle::horizontalBorderSpacing):
(khtml::RenderStyle::verticalBorderSpacing):
(khtml::RenderStyle::setHorizontalBorderSpacing):
(khtml::RenderStyle::setVerticalBorderSpacing):
* khtml/rendering/render_table.cpp:
(RenderTable::RenderTable):
(RenderTable::setStyle):
(RenderTable::calcWidth):
(RenderTable::paint):
(RenderTable::borderLeft):
(RenderTable::borderRight):
(RenderTable::borderTop):
(RenderTable::borderBottom):
(RenderTable::cellAbove):
(RenderTable::cellBelow):
(RenderTable::cellLeft):
(RenderTable::cellRight):
(RenderTableSection::setCellWidths):
(RenderTableSection::calcRowHeight):
(RenderTableSection::layoutRows):
(compareBorders):
(RenderTableCell::collapsedLeftBorder):
(RenderTableCell::collapsedRightBorder):
(RenderTableCell::collapsedTopBorder):
(RenderTableCell::collapsedBottomBorder):
(RenderTableCell::borderLeft):
(RenderTableCell::borderRight):
(RenderTableCell::borderTop):
(RenderTableCell::borderBottom):
(collapsedBorderStyle):
(CollapsedBorder::CollapsedBorder):
(CollapsedBorders:::count):
(CollapsedBorders::addBorder):
(CollapsedBorders::nextBorder):
(addBorderStyle):
(RenderTableCell::collectBorders):
(RenderTableCell::paintCollapsedBorder):
(RenderTableCell::paintObject):
(RenderTableCell::paintBoxDecorations):
* khtml/rendering/render_table.h:
(khtml::RenderTable::hBorderSpacing):
(khtml::RenderTable::vBorderSpacing):
(khtml::RenderTable::bordersPaddingAndSpacing):
(khtml::RenderTable::currentBorderStyle):
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::layout):
(AutoTableLayout::calcEffectiveWidth):
(AutoTableLayout::layout):
2003-10-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
More exception blocking.
* kwq/KWQFont.mm:
(QFont::isFixedPitch):
(QFont::getNSFont):
* kwq/KWQKJobClasses.mm:
(KIO::TransferJob::~TransferJob):
* kwq/KWQLoader.mm:
(KWQServeRequest):
(KWQCheckIfReloading):
(KWQCheckCacheObjectStatus):
(KWQRetainResponse):
(KWQReleaseResponse):
(KWQResponseMIMEType):
=== Safari-110 ===
2003-10-16 Darin Adler <darin@apple.com>
Reviewed by vicki.
- fix buildit build failure
* kwq/KWQScrollView.mm:
(QScrollView::resizeContents):
2003-10-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- change "volatile X * volatile" to "X * volatile" in cases where the
pointer needs to be volatile but the object pointed to do does not
* kwq/KWQKConfigBase.mm: (KConfig::readEntry):
* kwq/KWQKCursor.mm: (+[NSCursor _WebCore_cursorWithName:hotSpot:]):
* kwq/KWQKLocale.mm:
(inputElementAltText):
(resetButtonDefaultLabel):
(searchableIndexIntroduction):
(submitButtonDefaultLabel):
(KLocale::language):
* kwq/KWQLineEdit.mm: (QLineEdit::text):
* kwq/KWQScrollView.mm:
(QScrollView::setContentsPos):
(QScrollView::addChild):
(QScrollView::updateContents):
(QScrollView::contentsToViewport):
(QScrollView::viewportToContents):
(QScrollView::getDocumentView):
* kwq/KWQTextEdit.mm:
(QTextEdit::text):
(QTextEdit::textWithHardLineBreaks):
* kwq/KWQWidget.mm: (QWidget::getOuterView):
Removed the excess volatiles and excess casts that go with them.
* kwq/KWQKCookieJar.mm: (KWQKCookieJar::cookie): Do the same, but also
remove an unnecessary nil check that is the same as QString::fromNSString's
default behavior.
2003-10-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
More objc-exception-blocking excitement.
* kwq/KWQKConfigBase.mm:
(KConfig::readEntry):
(KConfig::readNumEntry):
(RefreshPlugins):
* kwq/KWQKCursor.mm:
(+[NSCursor _WebCore_cursorWithName:hotSpot:]):
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet):
* kwq/KWQKLocale.mm:
(inputElementAltText):
(resetButtonDefaultLabel):
(searchableIndexIntroduction):
(submitButtonDefaultLabel):
(KLocale::language):
* kwq/KWQRegion.mm:
(QRegion::QRegion):
2003-10-14 David Hyatt <hyatt@apple.com>
Fix an obvious little typo with smallCaps inheritance. Richard reviewed.
Also merge in Dirk's patch to fix a crasher caused by an obvious deref mistake.
Reviewed by rjw and nobody
* khtml/css/cssstyleselector.cpp:
(khtml::convertToLength):
(khtml::CSSStyleSelector::applyRule):
2003-10-14 Ken Kocienda <kocienda@apple.com>
Reviewed by Hyatt
* khtml/dom/dom_misc.h: Declared TristateFlag enum used to implement
inheritance behavior for inheritable attributes like designMode.
* khtml/dom/html_document.cpp:
(HTMLDocument::designMode): Added getter.
(HTMLDocument::setDesignMode): Added setter.
* khtml/dom/html_document.h: Added declarations for designMode getter and setter.
* khtml/dom/html_element.cpp:
(HTMLElement::isContentEditable): Added convenience.
(HTMLElement::contentEditable): Added getter.
(HTMLElement::setContentEditable): Added setter.
* khtml/dom/html_element.h: Added declarations for contentEditable accessors.
* khtml/ecma/kjs_html.cpp: Added js support for contentEditable and designMode.
(KJS::HTMLDocument::tryGet)
(KJS::HTMLDocument::putValue)
(KJS::HTMLElement::getValueProperty)
(KJS::HTMLElement::putValue)
* khtml/ecma/kjs_html.h:
(KJS::HTMLDocument::): Added DesignMode to attribuute enum.
(KJS::HTMLElement::): Added ContentEditable to attribute enum.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::designMode): Added getter.
(HTMLDocumentImpl::setDesignMode): Added setter.
* khtml/html/html_documentimpl.h: Declared designMode accessors.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::HTMLElementImpl):
(HTMLElementImpl::parseAttribute): Added support for contentEditable.
(HTMLElementImpl::isContentEditable): Added. Implements inheritance feature
for this attribute.
(HTMLElementImpl::contentEditable): Getter for contentEditable attribute.
(HTMLElementImpl::setContentEditable): Setter for contentEditable attribute.
* khtml/html/html_elementimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::setEditMode): Added.
(KHTMLPart::editMode): Added. Implements inheritance behavior for
attribute.
(KHTMLPart::inEditMode): Helper that calls on editMode function.
(KHTMLPart::parentPart): Made const.
* khtml/khtml_part.h: Rolled in a couple of typo fixes. Added
declarations for the changes made in the implementation file.
* khtml/khtmlpart_p.h:
(KHTMLPartPrivate::KHTMLPartPrivate): Declared editMode flag.
Also added support for editMode flag in initializers and copy function.
* khtml/misc/htmlattrs.in: Added contentEditable as an attribute name.
2003-10-13 David Hyatt <hyatt@apple.com>
Fix for a small-caps rendering error when used in conjunction with ::first-line. Always update
the Font variable even when QFonts are the same, since small-caps is not stored in QFonts.
Reviewed by rjw
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
2003-10-13 Richard Williamson (Home0 <rjw@apple.com>
Updated layout tests actuals to reflect implementation of small-caps style.
* layout-tests/css1/font_properties/font-expected.txt:
* layout-tests/css1/font_properties/font_variant-expected.txt:
* layout-tests/css1/pseudo/firstline-expected.txt:
* layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
2003-10-13 Richard Williamson <rjw@apple.com>
Added support for small-caps.
Reviewed by John.
* khtml/rendering/font.h:
(khtml::Font::isSmallCaps):
* khtml/rendering/render_text.cpp:
(RenderText::shouldUseMonospaceCache):
2003-10-12 Darin Adler <darin@apple.com>
* layout-tests/fast/js/date-parse-test.html: Fixed a couple of silly mistakes.
* kwq/character-sets.txt: New version of file from www.iana.org. No substantive change.
Also, now that we don't use MIB numbers any more, I could leave out our one local change,
the MIB number we added for ISO-10646-J-1.
2003-10-10 David Hyatt <hyatt@apple.com>
Beginning of work on border collapsing. This patch makes sure that cell spacing between cells is
ignored and that padding on tables is ignored. This ensures that there is no space between cells
or between the edges of cells and the border of the table itself.
Reviewed by john
* khtml/rendering/render_style.h:
(khtml::RenderStyle::setBitDefaults):
* khtml/rendering/render_table.cpp:
(RenderTable::setStyle):
(RenderTable::layout):
* khtml/rendering/render_table.h:
(khtml::RenderTable::collapseBorders):
(khtml::RenderTable::bordersPaddingAndSpacing):
2003-10-10 David Hyatt <hyatt@apple.com>
Fix for table regression 3449444, as well as a patch to support padding on tables and to stop
honoring borders on row groups (both of which are correct for the "separate" border model).
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
(RenderTableSection::calcRowHeight):
(RenderTableSection::layoutRows):
* khtml/rendering/render_table.h:
(khtml::RenderTable::bordersPaddingAndSpacing):
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::calcMinMaxWidth):
(FixedTableLayout::layout):
(AutoTableLayout::calcMinMaxWidth):
(AutoTableLayout::layout):
Reviewed by darin
2003-10-10 David Hyatt <hyatt@apple.com>
Patch to move the widgets during layout instead of at paint time.
Reviewed by darin
* khtml/khtmlview.cpp:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::repaintViewRectangle):
* khtml/rendering/render_form.cpp:
(RenderFormElement::baselinePosition):
(RenderFormElement::layout):
* khtml/rendering/render_object.cpp:
(RenderObject::updateWidgetPositions):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::layout):
(RenderWidget::updateWidgetPositions):
* khtml/rendering/render_replaced.h:
* kwq/KWQCheckBox.h:
* kwq/KWQCheckBox.mm:
(QCheckBox::baselinePosition):
* kwq/KWQComboBox.h:
* kwq/KWQComboBox.mm:
(QComboBox::baselinePosition):
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(KWQFileButton::baselinePosition):
* kwq/KWQLineEdit.h:
* kwq/KWQLineEdit.mm:
(QLineEdit::baselinePosition):
* kwq/KWQPushButton.h:
* kwq/KWQPushButton.mm:
(QPushButton::baselinePosition):
* kwq/KWQRadioButton.h:
* kwq/KWQRadioButton.mm:
(QRadioButton::baselinePosition):
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm:
(QWidget::baselinePosition):
(QWidget::setFrameGeometry):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
2003-10-10 David Hyatt <hyatt@apple.com>
Make sure the i-beam cursor is only forced if you have a selection.
Reviewed by John
* khtml/khtmlview.cpp
2003-10-10 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3440703>: Textarea form controls do not respect disabled attribute
* khtml/rendering/render_form.cpp:
(RenderTextArea::updateFromElement): Check for disabled attribute.
* kwq/KWQTextArea.h:
* kwq/KWQTextArea.mm:
(-[KWQTextArea setEnabled:]): Added.
(-[KWQTextArea isEnabled]): Added.
(-[KWQTextArea drawRect:]): Draws a disabled-looking bezel when disabled.
(-[KWQTextAreaTextView becomeFirstResponder]): Return NO if disabled.
(-[KWQTextAreaTextView mouseDown:]): Block events if disabled.
(-[KWQTextAreaTextView keyDown:]): Ditto.
(-[KWQTextAreaTextView keyUp:]): Ditto.
(-[KWQTextAreaTextView setEnabled:]): Added. Pass value through to editable
attribute on text view.
(-[KWQTextAreaTextView isEnabled]): Added.
(-[KWQTextAreaTextView drawRect:]): Set the text color to a disabled color
when disabled.
* kwq/KWQTextEdit.h:
* kwq/KWQTextEdit.mm:
(QTextEdit::isDisabled): Added.
(QTextEdit::setDisabled): Added.
2003-10-10 Maciej Stachowiak <mjs@apple.com>
- fixed 3449405 - REGRESSION: reproducible crash changing focus w/ button on page, e.g. on www.aa.com
More fallout from the exception blocking.
* kwq/KWQButton.mm:
(QButton::focusPolicy): Don't return from exception block (caught
by Darin).
2003-10-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3449280 -- REGRESSION: crash copying a selection that ends in a <br>
* khtml/rendering/render_br.h: Add checkSelectionPointIgnoringContinuations.
* khtml/rendering/render_br.cpp: (RenderBR::checkSelectionPointIgnoringContinuations):
Override to never return an offset of 1. We can't use a character offset because the
DOM doesn't know that we're implemented as a text object. So an offset of 1 turns into
"after this element".
2003-10-09 Maciej Stachowiak <mjs@apple.com>
- fixed crash I just added.
* kwq/KWQWidget.mm:
(QWidget::setCursor): Move BLOCK_NS_EXCEPTIONS macros so
you don't `break' out of the blocking code.
2003-10-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
More Cocoa exception blocking work.
* kwq/KWQFrame.mm:
(QFrame::setFrameStyle):
* kwq/KWQLineEdit.mm:
(QLineEdit::QLineEdit):
(QLineEdit::~QLineEdit):
(QLineEdit::setEchoMode):
(QLineEdit::setFont):
(QLineEdit::setText):
(QLineEdit::text):
(QLineEdit::isReadOnly):
(QLineEdit::setReadOnly):
(QLineEdit::maxLength):
(QLineEdit::selectAll):
(QLineEdit::edited):
(QLineEdit::setEdited):
(QLineEdit::sizeForCharacterWidth):
(QLineEdit::baselinePosition):
(QLineEdit::setAlignment):
* kwq/KWQListBox.mm:
(QListBox::QListBox):
(QListBox::~QListBox):
(QListBox::count):
(QListBox::clear):
(QListBox::setSelectionMode):
(QListBox::insertItem):
(QListBox::insertGroupLabel):
(QListBox::endBatchInsert):
(QListBox::setSelected):
(QListBox::isSelected):
(QListBox::setEnabled):
(QListBox::sizeForNumberOfLines):
(QListBox::focusPolicy):
* kwq/KWQPushButton.mm:
(QPushButton::QPushButton):
(QPushButton::sizeHint):
(QPushButton::baselinePosition):
(QPushButton::dimensions):
* kwq/KWQRadioButton.mm:
(QRadioButton::QRadioButton):
(QRadioButton::setChecked):
(QRadioButton::isChecked):
(QRadioButton::dimensions):
* kwq/KWQScrollBar.mm:
(-[KWQScrollBar initWithQScrollBar:]):
(:m_valueChanged):
(QScrollBar::~QScrollBar):
(QScrollBar::setValue):
(QScrollBar::setKnobProportion):
(QScrollBar::scrollbarHit):
* kwq/KWQScrollView.mm:
(QScrollView::visibleWidth):
(QScrollView::visibleHeight):
(QScrollView::contentsWidth):
(QScrollView::contentsHeight):
(QScrollView::contentsX):
(QScrollView::contentsY):
(QScrollView::setContentsPos):
(QScrollView::setVScrollBarMode):
(QScrollView::setHScrollBarMode):
(QScrollView::setScrollBarsMode):
(QScrollView::vScrollBarMode):
(QScrollView::hScrollBarMode):
(QScrollView::hasVerticalScrollBar):
(QScrollView::hasHorizontalScrollBar):
(QScrollView::suppressScrollBars):
(QScrollView::addChild):
(QScrollView::removeChild):
(QScrollView::resizeContents):
(QScrollView::updateContents):
(QScrollView::contentsToViewport):
(QScrollView::viewportToContents):
(QScrollView::setStaticBackground):
(QScrollView::ensureVisible):
(QScrollView::getDocumentView):
* kwq/KWQTextEdit.mm:
(QTextEdit::QTextEdit):
(QTextEdit::setText):
(QTextEdit::text):
(QTextEdit::textWithHardLineBreaks):
(QTextEdit::getCursorPosition):
(QTextEdit::setCursorPosition):
(QTextEdit::wordWrap):
(QTextEdit::setWordWrap):
(QTextEdit::isReadOnly):
(QTextEdit::setReadOnly):
(QTextEdit::selectAll):
(QTextEdit::setFont):
(QTextEdit::setAlignment):
(QTextEdit::sizeWithColumnsAndRows):
* kwq/KWQWidget.mm:
(QWidget::QWidget):
(QWidget::~QWidget):
(QWidget::setActiveWindow):
(QWidget::setEnabled):
(QWidget::isEnabled):
(QWidget::frameGeometry):
(QWidget::hasFocus):
(QWidget::setFocus):
(QWidget::focusPolicy):
(QWidget::isVisible):
(QWidget::setCursor):
(QWidget::cursor):
(QWidget::setFrameGeometry):
(QWidget::mapFromGlobal):
(QWidget::setView):
(QWidget::getOuterView):
(QWidget::lockDrawingFocus):
(QWidget::unlockDrawingFocus):
(QWidget::disableFlushDrawing):
(QWidget::enableFlushDrawing):
(QWidget::setDrawingAlpha):
(QWidget::paint):
(QWidget::sendConsumedMouseUp):
2003-10-09 David Hyatt <hyatt@apple.com>
Stop printing extra spaces before list items. Fixes ordered lists with list-style-position: inside.
Reviewed by mjs
* khtml/rendering/render_list.cpp:
2003-10-09 David Hyatt <hyatt@apple.com>
Make definition of kMin and kMax match the KHTML trunk. Someone still needs to eliminate uses of QMIN
and QMAX from the code.
* kwq/KWQDef.h:
(kMin):
(kMax):
2003-10-09 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3333897>: should support navigator.plugins.refresh as a way to add a plugin without restarting Safari
Reviewed by rjw.
* khtml/ecma/kjs_navigator.cpp:
(PluginBase::refresh): new
(PluginsFunc::tryCall): call refresh
* kwq/KWQKConfigBase.h:
* kwq/KWQKConfigBase.mm:
(RefreshPlugins): new
* kwq/WebCoreViewFactory.h:
=== Safari-109 ===
2003-10-08 David Hyatt <hyatt@apple.com>
Fix for 3436723, the shrink-to-fit algorithm for positioned elements did not match
the algorithm specified in section 10.3.7 of the CSS2.1 specification. The min-width
of the element was not being taken into account like it should have been.
Reviewed by mjs
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteHorizontal):
2003-10-08 David Hyatt <hyatt@apple.com>
Implement min/max width and min/max height support for replaced elements.
Reviewed by ken
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
(RenderBox::calcReplacedWidthUsing):
(RenderBox::calcReplacedHeight):
(RenderBox::calcReplacedHeightUsing):
(RenderBox::availableHeight):
(RenderBox::availableHeightUsing):
* khtml/rendering/render_box.h:
2003-10-08 Maciej Stachowiak <mjs@apple.com>
Fix development build.
* kwq/KWQExceptions.h: Correct assertion args.
2003-10-08 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
Start on blocking Cocoa exceptions when calling ObjC from C++ to
avoid unreproducible crashes when this happens.
* kwq/KWQExceptions.h: Added. Helper macros for exception blocking.
* WebCore.pbproj/project.pbxproj: Add new header
In all these files, block exceptions when calling ObjC from C++,
or explain why not.
* kwq/KWQAccObjectCache.mm:
* kwq/KWQApplication.mm:
* kwq/KWQButton.mm:
(QButton::QButton):
(QButton::~QButton):
(QButton::setText):
(QButton::text):
(QButton::clicked):
(QButton::simulateClick):
(QButton::setFont):
(QButton::focusPolicy):
* kwq/KWQCheckBox.mm:
(QCheckBox::QCheckBox):
(QCheckBox::setChecked):
(QCheckBox::isChecked):
(QCheckBox::dimensions):
* kwq/KWQColor.mm:
* kwq/KWQComboBox.mm:
(QComboBox::QComboBox):
(QComboBox::~QComboBox):
(QComboBox::insertItem):
(QComboBox::sizeHint):
(QComboBox::setCurrentItem):
(QComboBox::updateCurrentItem):
(QComboBox::setFont):
(QComboBox::dimensions):
* kwq/KWQCursor.mm:
* kwq/KWQFile.mm:
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton):
(KWQFileButton::~KWQFileButton):
(KWQFileButton::setFilename):
(KWQFileButton::sizeForCharacterWidth):
(KWQFileButton::frameGeometry):
(KWQFileButton::setFrameGeometry):
(KWQFileButton::baselinePosition):
(KWQFileButton::filenameChanged):
* kwq/KWQKCookieJar.mm:
(KWQKCookieJar::cookie):
(KWQKCookieJar::setCookie):
(KWQKCookieJar::cookieEnabled):
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow):
(KHTMLPartBrowserExtension::setIconURL):
(KHTMLPartBrowserExtension::setTypedIconURL):
* kwq/KWQKHistoryProvider.mm:
(KParts::HistoryProvider::contains):
* kwq/KWQKPartsBrowserInterface.mm:
(KParts::BrowserInterface::callMethod):
* kwq/KWQKStandardDirs.mm:
* kwq/KWQKURL.mm:
* kwq/KWQKWinModule.mm:
(KWinModule::workArea):
* kwq/KWQObject.mm:
* kwq/KWQString.mm:
(QString::getNSString):
* kwq/KWQTimer.mm:
* kwq/KWQWindowWidget.mm:
2003-10-07 David Hyatt <hyatt@apple.com>
Fix for link dragging regression in the titles of links. More accessibility
improvements.
Reviewed by darin
* khtml/khtml_part.cpp:
(KHTMLPart::text):
* kwq/KWQAccObject.mm:
(-[KWQAccObject role]):
(-[KWQAccObject roleDescription]):
(-[KWQAccObject helpText]):
(-[KWQAccObject textUnderElement]):
(-[KWQAccObject value]):
(-[KWQAccObject title]):
(-[KWQAccObject accessibilityIsIgnored]):
(-[KWQAccObject accessibilityAttributeValue:]):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]):
2003-10-07 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for these bugs:
<rdar://problem/3443296>: REGRESSION: pop-up menu gets focus, but once it has
focus doesn't work right
<rdar://problem/3444873>: Select widgets that use list views do not take part in tab order
<rdar://problem/3446306>: Text area form widgets do not accept DOM focus correctly
<rdar://problem/3446323>: Using keyboard to work popup button select form
widget causes a crash
The intention of this patch is to add keyboard navigation support for
HTML form select widgets. This includes the two visual representations
for these widgets: popup buttons and lists. Many keyboard, focus, and
tabbing fixes are included in this work, as indicated below.
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::defaultEventHandler): Added. Submit form when
return or enter key is pressed when focused on a select widget.
* khtml/html/html_formimpl.h: Make HTMLSelectElementImpl a friend class
of HTMLInputElementImpl. This is done so that an HTMLSelectElementImpl
can call the private method which simulates a form submit.
Also add declaration of defaultEventHandler function.
* kwq/KWQButton.h: Clean up focusPolicy declaration.
* kwq/KWQComboBox.h: Add focusPolicy declaration.
* kwq/KWQComboBox.mm:
(QComboBox::focusPolicy): Added. Widget will focus if full keyboard
access is on.
(-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Now
calls sendFakeEventsAfterWidgetTracking instead of
doFakeMouseUpAfterWidgetTracking now that name has changed.
(-[KWQPopUpButton becomeFirstResponder]): Added. Needed for setting
focus correctly.
(-[KWQPopUpButton resignFirstResponder]): Ditto.
(-[KWQPopUpButton nextKeyView]): Added. Makes tabbing work correctly
for this widget.
(-[KWQPopUpButton previousKeyView]): Ditto.
(-[KWQPopUpButton nextValidKeyView]): Ditto.
(-[KWQPopUpButton previousValidKeyView]): Ditto.
* kwq/KWQKHTMLPart.h: Change name of doFakeMouseUpAfterWidgetTracking
to sendFakeEventsAfterWidgetTracking now that it handles key events
as well.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::sendFakeEventsAfterWidgetTracking): Name change as
noted above. Also handles sending simulated key up events.
* kwq/KWQLineEdit.h:
(QLineEdit::checksDescendantsForFocus): Added. This is a big
part of the fiz for <rdar://problem/3446306>.
* kwq/KWQListBox.h:
(QListBox::checksDescendantsForFocus): Ditto. Yes for this widget.
* kwq/KWQListBox.mm:
(QListBox::focusPolicy): Added. Widget will focus if full keyboard
access is on.
(-[KWQListBoxScrollView becomeFirstResponder]): Added. Needed for setting
focus correctly. This sets the focus to its document view.
(-[KWQTableView becomeFirstResponder]): Added. Needed for setting
focus correctly.
(-[KWQTableView resignFirstResponder]): Added. Needed for setting
focus correctly.
(-[KWQTableView nextKeyView]): Added. Makes tabbing work correctly
for this widget.
(-[KWQTableView previousKeyView]): Ditto.
(-[KWQTableView nextValidKeyView]): Ditto.
(-[KWQTableView previousValidKeyView]): Ditto.
(-[KWQTableView _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView becomeFirstResponder]): Other part of fix for
<rdar://problem/3446306>. The recursion guards were bad and wrong.
The checksDescendantsForFocus improvement prevents the erroneous
recursion from happening.
* kwq/KWQTextEdit.h:
(QTextEdit::checksDescendantsForFocus): Added. Yes for this widget.
* kwq/KWQWidget.h:
(QWidget::checksDescendantsForFocus): Added. No by default.
* kwq/KWQWidget.mm:
(QWidget::hasFocus): Now uses checksDescendantsForFocus to perform
proper checks for views that may have a subview which is first
responder.
2003-10-07 David Hyatt <hyatt@apple.com>
Fix for 3363421, event handlers could be triggered for content outside an overflow:hidden
area. The layer checks that test for intersection/point containment need to only include
layers with overhanging floats if the element is overflow:visible.
Fix for 3366801, assignment to scrollLeft/Top of an overflow:hidden layer makes the layer
disappear. overflow:hidden blocks actually were never computing their scroll dimensions,
and so had bogus answers for those values.
Fix for 3366686, no reliable scrollHeight/Width reporting for overflow:hidden or
overflow:visible elements. The former was caused by the same bug as 3366801. The
latter was just me using the wrong method (clientWidth/Height instead of
overflowWidth/Height).
This patch also tightens the assignment to scrollLeft/Top to not do anything if you don't
have an overflow value other than visible.
Reviewed by darin
* khtml/ecma/kjs_dom.cpp:
(DOMNode::putValue):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::layoutBlock):
* khtml/rendering/render_layer.cpp:
(RenderLayer::RenderLayer):
(RenderLayer::scrollToOffset):
(RenderLayer::scrollWidth):
(RenderLayer::scrollHeight):
(RenderLayer::computeScrollDimensions):
(RenderLayer::updateScrollInfoAfterLayout):
(RenderLayer::intersectsDamageRect):
(RenderLayer::containsPoint):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::scrollWidth):
(RenderObject::scrollHeight):
* khtml/rendering/render_object.h:
2003-10-07 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed some exceptions I was seeing with my recent text change
* khtml/khtml_part.cpp:
(KHTMLPart::text): Return an empty string for a null range rather than raising an exception.
(KHTMLPart::selection): Return a null range rather than raising an exception if there is
no selection.
2003-10-07 Darin Adler <darin@apple.com>
Reviewed by Dave.
- removed code that mutates \n into a space so we can pass more W3C DOM Level 1 Core tests
* khtml/rendering/bidi.cpp:
(khtml::addRun): Treat \n as a space.
(khtml::RenderBlock::computeHorizontalPositionsForLine): Treat \n as a space.
(khtml::RenderBlock::findNextLineBreak): Treat \n outside <pre> as a space.
Removed code that mutates the \n into a space.
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth): Treat \n outside <pre> as a space.
(RenderText::calcMinMaxWidth): Treat \n outside <pre> as a space.
Removed code that mutates the \n into a space.
(RenderText::position): Detect a <br> with isBR instead of assuming a 1-character
string with a \n in it is a <br>.
2003-10-06 David Hyatt <hyatt@apple.com>
Several fixes preparing for the incremental repainting patch to be enabled.
(1) Make layers update their positions after layout instead of during layout or
during painting.
(2) Fix a regression from the overflow:hidden body quirk landing. Make sure repaint()
understands that quirk exists and avoids clipping when it shouldn't.
(3) Fix a regression from the scrollbar improvements. The vertical scrollbar repainted
on every layout.
(4) Make sure outside list bullets are repainted when a list item needs to repaint.
(5) A whole bunch of INCREMENTAL_REPAINTING code that isn't turned on yet.
Reviewed by kocienda
* khtml/khtmlview.cpp:
(KHTMLViewPrivate::KHTMLViewPrivate):
(KHTMLViewPrivate::reset):
(KHTMLView::resetScrollBars):
(KHTMLView::needsFullRepaint):
* khtml/khtmlview.h:
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::layoutBlockChildren):
(khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
(khtml::RenderBlock::repaintFloatingDescendants):
(khtml::RenderBlock::repaintObjectsBeforeLayout):
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::computeAbsoluteRepaintRect):
(RenderBox::repaintDuringLayoutIfMoved):
* khtml/rendering/render_box.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::layout):
* khtml/rendering/render_canvas.h:
(khtml::RenderCanvas::hasOverhangingFloats):
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::layoutBlock):
(khtml::RenderFlexibleBox::layoutHorizontalBox):
(khtml::RenderFlexibleBox::layoutVerticalBox):
(khtml::RenderFlexibleBox::placeChild):
* khtml/rendering/render_flexbox.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::getAbsoluteRepaintRect):
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
(RenderImage::layout):
* khtml/rendering/render_layer.cpp:
(RenderLayer::RenderLayer):
(RenderLayer::computeRepaintRects):
(RenderLayer::updateLayerPositions):
(RenderLayer::updateLayerPosition):
(RenderLayer::checkScrollbarsAfterLayout):
(RenderLayer::paintLayer):
(RenderLayer::calculateClipRects):
(RenderLayer::calculateRects):
* khtml/rendering/render_layer.h:
(khtml::RenderLayer::relativePositionOffset):
* khtml/rendering/render_list.cpp:
(RenderListItem::getAbsoluteRepaintRect):
* khtml/rendering/render_list.h:
(khtml::RenderListMarker::listImage):
* khtml/rendering/render_object.cpp:
(RenderObject::repaint):
(RenderObject::repaintRectangle):
(RenderObject::repaintAfterLayoutIfNeeded):
(RenderObject::repaintDuringLayoutIfMoved):
(RenderObject::repaintFloatingDescendants):
(RenderObject::checkForRepaintDuringLayout):
(RenderObject::repaintObjectsBeforeLayout):
(RenderObject::getAbsoluteRepaintRectIncludingFloats):
(RenderObject::container):
* khtml/rendering/render_object.h:
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
2003-10-06 Darin Adler <darin@apple.com>
Reviewed by Ken.
- preparation for the upcoming whitespace patch; refactored some of the code that extracts text
* khtml/khtml_part.h: Added text() member function.
* khtml/khtml_part.cpp:
(KHTMLPart::text): Added. Refactored from selectedText; takes a DOM::Range as a parameter.
Also added code to change newlines to spaces when extracting text from the DOM.
(KHTMLPart::selectedText): Now calls text().
(KHTMLPart::selection): Removed stray declaration.
* kwq/KWQAccObject.mm: (-[KWQAccObject value]): Changed to call KHTMLPart::text.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Changed to call KHTMLPart::text
instead of doing it ourselves.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Added code to change change '\n'
newlines to spaces when extracting text from the DOM.
2003-10-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3444255 - REGRESSION: www.aa.com crashes (innerHTML)
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Keep the fragment
ref'd since the tokenizer will ref and deref it. Then turn
TreeShared's evil against itself to get the fragment back in the
floating 0-ref state.
* khtml/html/html_elementimpl.h: Remove stray whitespace.
* khtml/html/htmlparser.cpp:
(KHTMLParser::KHTMLParser): Initialize current to 0 in the other
constructor too.
2003-10-06 Darin Adler <darin@apple.com>
* khtml/ecma/kjs_css.lut.h:
* khtml/ecma/kjs_dom.lut.h:
* khtml/ecma/kjs_events.lut.h:
* khtml/ecma/kjs_html.lut.h:
* khtml/ecma/kjs_navigator.lut.h:
* khtml/ecma/kjs_range.lut.h:
* khtml/ecma/kjs_traversal.lut.h:
* khtml/ecma/kjs_views.lut.h:
* khtml/ecma/kjs_window.lut.h:
Regenerated, without stray semicolon.
2003-10-03 Darin Adler <darin@apple.com>
- updated layout tests for recent WebTextRenderer changes
* layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
* layout-tests/apple-only/base/www.sun.com/index-expected.txt:
* layout-tests/css1/font_properties/font_weight-expected.txt:
2003-10-03 Chris Blumenberg <cblu@apple.com>
Removed eastCursor.tiff because it was added by mistake.
* Resources/eastCursor.tiff: Removed.
* WebCore.pbproj/project.pbxproj:
2003-10-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3398420 - crash when creating a new document.body object in <body>
Also included David Faure's improvement to throw an exception.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::setBody): Don't remove the body when null is passed in,
as this means type error at the higher level, so throw an exception.
* khtml/html/htmlparser.cpp:
(KHTMLParser::KHTMLParser): Initialize current to 0.
(KHTMLParser::setCurrent): Ref new current and deref old; we need to
keep it ref'd because script execution could drop the current node on the
floor.
(KHTMLParser::reset): Use setCurrent.
(KHTMLParser::insertNode): Likewise.
(KHTMLParser::reopenResidualStyleTags): Likewise.
(KHTMLParser::popOneBlock): Likewise.
(KHTMLParser::finished): Likewise.
* khtml/html/htmlparser.h: Prototype setCurrent.
2003-10-03 Chris Blumenberg <cblu@apple.com>
Ran compress-tiffs on new cursor images.
* Resources/eastCursor.tiff:
* Resources/eastResizeCursor.tiff:
* Resources/helpCursor.tiff:
* Resources/moveCursor.tiff:
* Resources/northEastResizeCursor.tiff:
* Resources/northResizeCursor.tiff:
* Resources/northWestResizeCursor.tiff:
* Resources/southEastResizeCursor.tiff:
* Resources/southResizeCursor.tiff:
* Resources/southWestResizeCursor.tiff:
* Resources/waitCursor.tiff:
* Resources/westResizeCursor.tiff:
2003-10-03 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin, with much help from Maciej and Hyatt
Fix for these bugs:
<rdar://problem/3441321>: Form buttons do not respond to key events when focused
<rdar://problem/3441060>: Form buttons do not scroll to view when focused
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::simulateMouseClickForEvent): Added helper to simulate
mouse clicks in elements. Used to trigger button actions in response to
keyboard events.
(HTMLInputElementImpl::defaultEventHandler): Improved handler to process
key press events for radio, checkbox, image, reset, and submit buttons.
* khtml/html/html_formimpl.h: Added simulateMouseClickForEvent function.
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::isKeyboardEvent): Added type check virtual function.
(DOM::KeyEventImpl::isKeyboardEvent): Ditto.
* kwq/KWQButton.h:
* kwq/KWQButton.mm:
(-[KWQButton simulateClick]): New method. This makes AppKit do a
button click programatically for button types. For <input type=image>,
we just simulate a the click in the DOM since there is no real "clickable"
AppKit widget.
(-[KWQButton becomeFirstResponder]): Fixes the button scroll to visible when
focused issue.
(-[KWQButton resignFirstResponder]): Correctly give up focus when user clicks
into the page body when a button has the focus.
(QButton::simulateClick): QWidget bridge to the KWQButton simulateClick
method.
2003-10-03 David Hyatt <hyatt@apple.com>
Removing redundant layouts and adding a few !needsLayout and !normalChildNeedsLayout
checks to prevent extra layouts.
Also, fixing the recalcStyle changed() bottleneck to go through view's layout and to
not do a full repaint. The layout method will then do the right thing (full repaint
without INCREMENTAL_REPAINTING turned on, the precise repainting needed otherwise).
Reviewed by darin
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
2003-10-02 David Hyatt <hyatt@apple.com>
Remove the speed hit from using the UC break locators by not using them when
checking if the current character is and by also using a global text
break locator object.
Reviewed by rjw
* khtml/rendering/break_lines.cpp:
=== Safari-108 ===
2003-10-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3398622 - Crash when JavaScript changes display style
This was a problem with one of the many global variables in
bidi.cpp, last, having a stale value from the last layout that
pointed to a dead node. I fixed this by refactoring the code to
put most of the global variables in a struct allocated on the
stack, and pass around a reference to the struct. Seems much
cleaner (if somewhat wordier) this way. There are still more
global variables to kill here.
* khtml/rendering/bidi.cpp:
(khtml::BidiIterator::BidiIterator):
(khtml::BidiStatus::BidiStatus):
(khtml::BidiInfo::BidiInfo):
(khtml::Bidinext):
(khtml::first):
(khtml::BidiIterator::increment):
(khtml::checkMidpoints):
(khtml::appendRunsForObject):
(khtml::appendRun):
(khtml::embed):
(khtml::RenderBlock::computeHorizontalPositionsForLine):
(khtml::RenderBlock::bidiReorderLine):
(khtml::buildCompactRuns):
(khtml::RenderBlock::layoutInlineChildren):
(khtml::RenderBlock::findNextLineBreak):
* khtml/rendering/bidi.h:
* khtml/rendering/render_block.h:
2003-10-02 David Hyatt <hyatt@apple.com>
Work on exposing elements to the Acc API. This patch gets us to the point where text
under the mouse is voiced.
Reviewed by darin
* kwq/KWQAccObject.h:
* kwq/KWQAccObject.mm:
(-[KWQAccObject initWithRenderer:]):
(-[KWQAccObject parentObject]):
(-[KWQAccObject parentObjectUnignored]):
(-[KWQAccObject addChildrenToArray:]):
(-[KWQAccObject role]):
(-[KWQAccObject roleDescription]):
(-[KWQAccObject value]):
(-[KWQAccObject title]):
(-[KWQAccObject position]):
(-[KWQAccObject size]):
(-[KWQAccObject accessibilityIsIgnored]):
(-[KWQAccObject accessibilityAttributeNames]):
(-[KWQAccObject accessibilityActionNames]):
(-[KWQAccObject accessibilityIsAttributeSettable:]):
(-[KWQAccObject accessibilityAttributeValue:]):
(-[KWQAccObject accessibilityHitTest:]):
* kwq/KWQAccObjectCache.mm:
(KWQAccObjectCache::accObject):
(KWQAccObjectCache::setAccObject):
(KWQAccObjectCache::removeAccObject):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge accessibilityTree]):
2003-10-02 Darin Adler <darin@apple.com>
Reviewed by Ken.
* kwq/KWQRenderTreeDebug.cpp: (quoteAndEscapeNonPrintables): Since our text rendering renders
non-breaking spaces the same as spaces, dump them as spaces. Do the same with newlines since
I am about to change our text rendering to do the same with newlines.
* layout-tests: Updated test results.
2003-10-01 David Hyatt <hyatt@apple.com>
Avoid doing extra work when tearing down the document by checking to see if
we're in the destruction of the document.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChildNode):
2003-10-01 Richard Williamson <rjw@apple.com>
Fixed 3438441. Pass extra info up to WebKit about load type, specifically is a load is triggered by JS running in an onLoad handler.
Reviewed by Ken.
* khtml/ecma/kjs_binding.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL):
(KWQKHTMLPart::openURLRequest):
(KWQKHTMLPart::submitForm):
(KWQKHTMLPart::urlSelected):
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge saveDocumentToPageCache]):
Nothing changed. Tweaked spacing.
2003-10-01 Chris Blumenberg <cblu@apple.com>
<rdar://problem/2942589>: CSS cursors are not implemented
Reviewed by Dave.
* Resources/eastCursor.tiff: Added.
* Resources/eastResizeCursor.tiff: Added.
* Resources/helpCursor.tiff: Added.
* Resources/moveCursor.tiff: Added.
* Resources/northEastResizeCursor.tiff: Added.
* Resources/northResizeCursor.tiff: Added.
* Resources/northWestResizeCursor.tiff: Added.
* Resources/southEastResizeCursor.tiff: Added.
* Resources/southResizeCursor.tiff: Added.
* Resources/southWestResizeCursor.tiff: Added.
* Resources/waitCursor.tiff: Added.
* Resources/westResizeCursor.tiff: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/css/cssparser.cpp: special-case the hand cursor to mean pointer
(CSSParser::parseValue):
* khtml/css/cssvalues.c: generated changes
(hash_val):
(findValue):
* khtml/css/cssvalues.h: generated changes
* khtml/css/cssvalues.in: removed the progress cursor from the list because it was messing up the mapping
* khtml/khtmlview.cpp: call new cursor methods
* kwq/KWQKCursor.h:
* kwq/KWQKCursor.mm:
(+[NSCursor _WebCore_cursorWithName:hotSpot:]): new, loads and caches cursors
(KCursor::crossCursor): get the AppKit cross hair cursor
(KCursor::handCursor): call _WebCore_cursorWithName:hotSpot:
(KCursor::sizeAllCursor): ditto
(KCursor::waitCursor): ditto
(KCursor::whatsThisCursor): ditto
(KCursor::eastResizeCursor): new, call _WebCore_cursorWithName:hotSpot:
(KCursor::northResizeCursor): ditto
(KCursor::northEastResizeCursor): ditto
(KCursor::northWestResizeCursor): ditto
(KCursor::southResizeCursor): ditto
(KCursor::southEastResizeCursor): ditto
(KCursor::southWestResizeCursor): ditto
(KCursor::westResizeCursor): ditto
2003-10-01 David Hyatt <hyatt@apple.com>
Clean up our detach model so that you can always get to a document, even for
anonymous content. Also stubbing out and adding the accessibility objects.
Reviewed by darin, mjs, john
* ChangeLog:
* WebCore.pbproj/project.pbxproj:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::detach):
* khtml/rendering/render_box.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::RenderCanvas):
* khtml/rendering/render_container.cpp:
(RenderContainer::detach):
(RenderContainer::addChild):
(RenderContainer::updatePseudoChild):
(RenderContainer::insertChildNode):
(RenderContainer::removeLeftoverAnonymousBoxes):
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::createAnonymousFlow):
(RenderFlow::deleteLineBoxes):
(RenderFlow::detach):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_form.cpp:
(RenderTextArea::detach):
* khtml/rendering/render_form.h:
* khtml/rendering/render_image.cpp:
(RenderImage::RenderImage):
(RenderImage::detach):
* khtml/rendering/render_image.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::addChildToFlow):
(RenderInline::splitFlow):
(RenderInline::renderName):
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
(RenderListItem::detach):
(RenderListItem::updateMarkerLocation):
(RenderListMarker::RenderListMarker):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::RenderObject):
(RenderObject::information):
(RenderObject::dump):
(RenderObject::createAnonymousBlock):
(RenderObject::remove):
(RenderObject::detach):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::detach):
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_table.cpp:
(RenderTable::addChild):
(RenderTableSection::detach):
(RenderTableSection::addChild):
(RenderTableRow::detach):
(RenderTableRow::addChild):
(RenderTableCell::detach):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::detach):
(RenderText::deleteRuns):
* khtml/rendering/render_text.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::~DocumentImpl):
(DocumentImpl::detach):
(DocumentImpl::getOrCreateAccObjectCache):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::detach):
* kwq/KWQAccObject.h: Added.
* kwq/KWQAccObject.mm: Added.
(-[KWQAccObject x]):
(-[KWQAccObject y]):
(-[KWQAccObject width]):
(-[KWQAccObject height]):
(-[KWQAccObject detached]):
(-[KWQAccObject detach]):
(-[KWQAccObject data]):
(-[KWQAccObject setData:]):
(-[KWQAccObject firstChild]):
(-[KWQAccObject lastChild]):
(-[KWQAccObject previousSibling]):
(-[KWQAccObject nextSibling]):
(-[KWQAccObject parentObject]):
* kwq/KWQAccObjectCache.h: Added.
* kwq/KWQAccObjectCache.mm: Added.
(KWQAccObjectCache::KWQAccObjectCache):
(KWQAccObjectCache::~KWQAccObjectCache):
(KWQAccObjectCache::accObject):
(KWQAccObjectCache::setAccObject):
(KWQAccObjectCache::removeAccObject):
(KWQAccObjectCache::detach):
* layout-tests/css1/pseudo/firstletter-expected.txt:
* layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
* layout-tests/fast/css-generated-content/002-expected.txt:
* layout-tests/fast/css-generated-content/004-expected.txt:
* layout-tests/fast/css-generated-content/005-expected.txt:
* layout-tests/fast/css-generated-content/006-expected.txt:
* layout-tests/fast/selectors/039-expected.txt:
* layout-tests/fast/selectors/039b-expected.txt:
* layout-tests/fast/selectors/041-expected.txt:
* layout-tests/fast/selectors/042-expected.txt:
* layout-tests/fast/selectors/166a-expected.txt:
* layout-tests/fast/selectors/168-expected.txt:
* layout-tests/fast/selectors/168a-expected.txt:
* layout-tests/fast/selectors/169-expected.txt:
* layout-tests/fast/selectors/169a-expected.txt:
* layout-tests/fast/text/firstline/002-expected.txt:
* layout-tests/fast/text/firstline/003-expected.txt:
2003-10-01 David Hyatt <hyatt@apple.com>
Fix for 3163840, the images are mispositioned on the DHTML menus at the top of
www.aa.com (and in many other places). We needed to support returning the right
value from hasProperty and tryGet for 'cssFloat'.
This patch also adds support for getting/setting our custom CSS properties (-khtml-*)
and just factors the code a bit better for all the special values.
Reviewed by darin
* khtml/ecma/kjs_css.cpp:
(cssPropertyName):
(DOMCSSStyleDeclaration::hasProperty):
(DOMCSSStyleDeclaration::tryGet):
(DOMCSSStyleDeclaration::tryPut):
2003-10-01 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3437309 -- REGRESSION (100-107): Javascript menu doesn't work at www.aa.com
* khtml/xml/dom_elementimpl.cpp: (ElementImpl::removeAttribute): Restored the old behavior
for removeAttribute and removeAttributeNS; these don't give NOT_FOUND_ERR. But keep the
NOT_FOUND_ERR for removeAttributeNode and removedNamedItem.
2003-10-01 Ken Kocienda <kocienda@apple.com>
Reviewed by me
* kwq/KWQWidget.mm:
(QWidget::focusPolicy): Improved comment.
2003-10-01 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for these bugs:
<rdar://problem/3439736>: WebCore form button widgets do not accept focus
<rdar://problem/3440770>: WebCore form button widgets do not take part in tabbing order
* kwq/KWQButton.h: Add focusPolicy function declaration.
* kwq/KWQButton.mm:
(-[KWQButton nextKeyView]): Add tabbing support for buttons.
(-[KWQButton previousKeyView]): Ditto
(-[KWQButton nextValidKeyView]): Ditto
(-[KWQButton previousValidKeyView]): Ditto
(QButton::focusPolicy): Add focusPolicy implementation. This calls through
to the recently-added accessor for full keyboard access to help in the
determination for focus policy. For now, full keyboard access must be
turned on for buttons to receive focus.
* kwq/KWQTextEdit.h: Remove focusPolicy specialization from this class. The
implementation in QWidget now serves this class well.
* kwq/KWQTextEdit.mm: Ditto
* kwq/KWQWidget.h: Added isEnabled function. Small, unrelated cleanup to
move the no-implementation setFocusPolicy() and setFocusProxy() functions
fully into the header file.
* kwq/KWQWidget.mm:
(QWidget::isEnabled): Added. Calls through to the Cocoa view to retrieve
this information.
(QWidget::focusPolicy): Much improved focus policy function is now more
general in stipulating the conditions for focus policy, and will work for
more widgets.
2003-10-01 David Hyatt <hyatt@apple.com>
Fix for 3440804, broken scrollbars in downloads window. Make Auto be the default
value in the enum, so that all scrollviews will be automatically initialized to be
auto.
Reviewed by cblu
* kwq/KWQScrollView.h:
* kwq/WebCoreFrameView.h:
2003-09-30 Ken Kocienda <kocienda@apple.com>
Reviewed by me
* WebCore.pbproj/project.pbxproj: Made WebCoreKeyboardAccess.h a private header.
2003-09-30 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
<rdar://problem/3439688>: WebKit needs to retrieve full keyboard access preference
* WebCore.pbproj/project.pbxproj:
* kwq/KWQKHTMLPart.h: Declare keyboardUIMode accessor.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyboardUIMode): Implement keyboardUIMode accessor (calls through the bridge).
* kwq/WebCoreBridge.h: Declare the bridge accessor.
* kwq/WebCoreKeyboardAccess.h: Added. Header defines keyboard UI mode constants.
2003-09-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3375281 - Keyboard event handlers not fired if focus not in form field
- fixed 3242927 - KeyPressed Event in Javascript don't work
- fixed 3375353 - keyboard event.target not updated when blurring from form items
- fixed 3183754 - returning false from key press handlers does not prevent typing or form submission
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchKeyEvent): Force false when defaultHandled instead of
based on a weird rule appropriate for KDE but not for us.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyEvent): If there's no focus node, give the event
to the body element instead of giving up. Also, reverse
expectedsense of return value dispatchKeyEvent, since it returns
true if it *didn't* swallow the event. And finally, let the key press
event as well as the key down event for the initial NSKeyDown block
default handling.
* kwq/KWQListBox.mm:
(-[KWQTableView keyDown:]): Respect return value from interceptKeyEvent:
(-[KWQTableView keyUp:]): ditto
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView keyDown:]): ditto
(-[KWQTextAreaTextView keyUp:]): ditto
* kwq/KWQTextField.mm:
(-[KWQTextField textView:shouldHandleEvent:]): ditto
2003-09-30 David Hyatt <hyatt@apple.com>
Improvements to layout transitions and scrollbar appearance/disappearance.
Also implementing a fix for 3264346, overflow applied to body should apply to
the document's scrollers.
Reviewed by darin
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::parseAttribute):
* khtml/khtmlview.cpp:
(KHTMLView::KHTMLView):
(KHTMLView::~KHTMLView):
(KHTMLView::resetScrollBars):
(KHTMLView::clear):
(KHTMLView::initScrollBars):
(KHTMLView::applyBodyScrollQuirk):
(KHTMLView::inLayout):
* khtml/khtmlview.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::layout):
* khtml/rendering/render_form.cpp:
(TextAreaWidget::TextAreaWidget):
* khtml/rendering/render_frames.cpp:
(RenderFrame::slotViewCleared):
(RenderPartObject::slotViewCleared):
* khtml/rendering/render_list.cpp:
(RenderListMarker::calcMinMaxWidth):
* khtml/rendering/render_object.cpp:
(RenderObject::repaint):
(RenderObject::repaintRectangle):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setInPageCache):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart):
* kwq/KWQRenderTreeDebug.cpp:
(write):
(externalRepresentation):
* kwq/KWQScrollView.h:
* kwq/KWQScrollView.mm:
(QScrollView::setVScrollBarMode):
(QScrollView::setHScrollBarMode):
(QScrollView::setScrollBarsMode):
(QScrollView::vScrollBarMode):
(QScrollView::hScrollBarMode):
(QScrollView::hasVerticalScrollBar):
(QScrollView::hasHorizontalScrollBar):
(QScrollView::suppressScrollBars):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge installInFrame:]):
* kwq/WebCoreFrameView.h:
2003-09-30 David Hyatt <hyatt@apple.com>
Fix for 3437260, nil deref of the render style because it hasn't been set yet.
Fallout from my incremental repainting landing.
Reviewed by darin
* khtml/rendering/render_replaced.cpp:
(RenderWidget::setQWidget):
2003-09-29 David Hyatt <hyatt@apple.com>
Fix for 3438479, tables expand on every layout when a cell has percentage height
children.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableSection::calcRowHeight):
(RenderTableRow::layout):
2003-09-29 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3332460>: nil-deref in khtml::RenderWidget::eventFilter with onchange handler
Reviewed by darin.
* kwq/KWQTextField.mm:
(-[KWQTextField controlTextDidEndEditing:]): call setHasFocus:NO last so we have the widget that lets us get to the bridge and lets us call controlTextDidEndEditing
2003-09-29 David Hyatt <hyatt@apple.com>
Fix for 3425053, text past the bottom of a positioned table doesn't repaint.
3426847 is the same bug. Both are fixed by ensuring that calcHeight doesn't actually
do anything other than margin computation and position determination for positioned
elements. In reality, for weird edge cases like implying the height via explicit top and
bottom properties, we'll still be wrong.
Reviewed by darin
* ChangeLog:
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2003-09-29 David Hyatt <hyatt@apple.com>
Make sure that timeouts updateRendering after they execute the scheduled timer
action.
Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at
the end of a pre text run.
Reviewed by darin, mjs (setTimeout fix), darin (pre fix)
* khtml/ecma/kjs_window.cpp:
(ScheduledAction::execute):
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
2003-09-29 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3437292 -- Safari uses wrong characters for ∧ and ∨ entities
* khtml/html/kentities.gperf: Corrected values for ∧ and ∨ entities.
Checked all the rest against a list on the W3C site, and those are the only two that were wrong.
* khtml/html/kentities.c: Regnenerated.
2003-09-26 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3435532>: REGRESSION: tabbing to textareas causes infinite recursion
Add recursion guards to the becomeFirstResponder method, otherwise calling
eventFilter with a FocusIn event will cause the infinite recursion
described in the bug.
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView becomeFirstResponder]):
2003-09-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
* khtml/ecma/kjs_window.cpp:
(Window::installTimeout): Variant that takes a function and args.
(WindowFunc::tryCall): If the argument is a function, call the
function variant of installTimeout instead of pointlessly passing
the string. Also, correctly implement the code to pass extra args
along.
* khtml/ecma/kjs_window.h:
2003-09-25 Maciej Stachowiak <mjs@apple.com>
Roll out build system change since it did not actually work. :-(
* WebCore.pbproj/project.pbxproj:
2003-09-25 David Hyatt <hyatt@apple.com>
Landing the new repainting code. This code eliminates many redundant layouts, makes
layout scheduling work properly when called from WebKit, cleans up relpositioned inlines
that act as containing blocks for absolute positioned children, and eliminates the
repaint timer.
Reviewed by kocienda
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/khtmlview.cpp:
(KHTMLView::KHTMLView):
* khtml/khtmlview.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::setPixmap):
(RenderBox::getAbsoluteRepaintRect):
(RenderBox::computeAbsoluteRepaintRect):
(RenderBox::repaintIfMoved):
(RenderBox::calcAbsoluteHorizontal):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_box.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::layout):
(RenderCanvas::repaintViewRectangle):
(RenderCanvas::getAbsoluteRepaintRect):
(RenderCanvas::computeAbsoluteRepaintRect):
* khtml/rendering/render_canvas.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::addChild):
(RenderContainer::removeChildNode):
(RenderContainer::removeChild):
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_flexbox.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::getAbsoluteRepaintRect):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
(RenderImage::layout):
* khtml/rendering/render_inline.cpp:
(RenderInline::addChildToFlow):
* khtml/rendering/render_layer.cpp:
(RenderLayer::convertToLayerCoords):
* khtml/rendering/render_list.cpp:
(RenderListMarker::setPixmap):
* khtml/rendering/render_object.cpp:
(RenderObject::RenderObject):
(RenderObject::setNeedsLayout):
(RenderObject::setChildNeedsLayout):
(RenderObject::markContainingBlocksForLayout):
(RenderObject::containingBlock):
(RenderObject::repaint):
(RenderObject::repaintRectangle):
(RenderObject::repaintAfterLayoutIfNeeded):
(RenderObject::repaintIfMoved):
(RenderObject::repaintPositionedAndFloatingDescendants):
(RenderObject::getAbsoluteRepaintRect):
(RenderObject::getAbsoluteRepaintRectIncludingDescendants):
(RenderObject::computeAbsoluteRepaintRect):
(RenderObject::setStyle):
(RenderObject::container):
(RenderObject::detach):
(RenderObject::scheduleRelayout):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
(RenderTableRow::getAbsoluteRepaintRect):
(RenderTableCell::computeAbsoluteRepaintRect):
* khtml/rendering/render_table.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::insertBefore):
(NodeBaseImpl::replaceChild):
(NodeBaseImpl::appendChild):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clearTimers):
* kwq/KWQRenderTreeDebug.cpp:
(write):
(externalRepresentation):
* kwq/KWQRenderTreeDebug.h:
2003-09-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* WebCore.pbproj/project.pbxproj: Don't hack install name. Instead
of embedding into Safari, embed into WebKit as sub-umbrella.
=== Safari-107 ===
2003-09-25 Darin Adler <darin@apple.com>
- rolled out change to fix 3390850 because it caused a performance regression
* khtml/misc/decoder.cpp: (Decoder::decode): Rolled out change.
2003-09-25 Ken Kocienda <kocienda@apple.com>
Reviewed by Dave
Name change: TextRun is now InlineTextBox. Some related names
have been changed as well. There should be no change in
behavior as a result of this patch.
* khtml/khtml_part.cpp:
(KHTMLPart::selectedText):
(firstRunAt):
(lastRunAt):
(startAndEndLineNodesIncludingNode):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLineBoxDecorations):
* khtml/rendering/render_line.cpp:
(InlineFlowBox::placeBoxesHorizontally):
(InlineFlowBox::placeBoxesVertically):
* khtml/rendering/render_line.h:
* khtml/rendering/render_text.cpp:
(InlineTextBox::detach):
(throw):
(InlineTextBox::operator delete):
(InlineTextBox::paintSelection):
(InlineTextBox::paintDecoration):
(InlineTextBox::checkSelectionPoint):
(InlineTextBoxArray::InlineTextBoxArray):
(InlineTextBoxArray::compareItems):
(InlineTextBoxArray::findFirstMatching):
(RenderText::deleteRuns):
(RenderText::findNextInlineTextBox):
(RenderText::nodeAtPoint):
(RenderText::checkSelectionPointIgnoringContinuations):
(RenderText::cursorPos):
(RenderText::posOfChar):
(RenderText::paintObject):
(RenderText::createInlineBox):
(RenderText::position):
(RenderText::width):
* khtml/rendering/render_text.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
* kwq/KWQRenderTreeDebug.cpp:
(writeTextRun):
(write):
2003-09-25 Darin Adler <darin@apple.com>
Added a new layout test.
* layout-tests/fast/forms/form-element-geometry-expected.txt: Added.
* layout-tests/fast/forms/form-element-geometry.html: Added.
2003-09-24 Darin Adler <darin@apple.com>
* layout-tests/fast/table/003-expected.txt: Updated for textarea width change.
2003-09-24 David Hyatt <hyatt@apple.com>
Fix for 3429646, <img src="blah"<img src="foo"> should show up as two images.
Reviewed by darin
* khtml/html/htmlparser.cpp:
(KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
2003-09-24 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed a recent regression, and ...
- fixed 3386544 -- ARCH: <object>s don't support transclusion like <iframe>s do
* khtml/khtml_part.cpp: (KHTMLPart::childFrame): Added back a cast I should
not have removed to fix the function.
2003-09-24 David Hyatt <hyatt@apple.com>
Fix for 3430612, crash on about:blank in updateHoverActiveState. Just missing
a null-check. Also remove a hover optimization that was bogus.
Reviewed by darin
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateHoverActiveState):
2003-09-24 Richard Williamson <rjw@apple.com>
Fixed 3420736. Clear renderer caches when get an ATS font changed notification. This fix may be moot depending on progress toward fixing 2695906.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(+[WebCoreBridge updateAllViews]):
2003-09-24 Darin Adler <darin@apple.com>
- a new test for JavaScript date parsing
* layout-tests/fast/js/date-parse-test-expected.txt: Added.
* layout-tests/fast/js/date-parse-test.html: Added.
2003-09-24 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed ownerElement for documents in HTML objects (helpful for some work Dave is doing)
* khtml/khtml_part.h: Change name of frame function to childFrame for clarity.
* khtml/khtml_part.cpp:
(KHTMLPart::slotChildStarted): Call the frame function by its new name, childFrame.
(KHTMLPart::slotChildCompleted): Ditto.
(KHTMLPart::slotChildURLRequest): Ditto.
(KHTMLPart::childFrame): Change name from frame to childFrame for clarity, and make it work
for parts inside HTML objects, not just normal frames and iframes. The change in behavior is
the actual fix. Note that for the three callers above, it's an error to call this when the
result would be 0, so there's no harm in doing the extra search of HTML objects in those cases.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::ownerElement): Call the frame function by its new
name, childFrame. This is the caller that will benefit most from the change in behavior.
* kwq/KWQKHTMLPart.h: Remove childFrameForPart function, which is superseded by the
childFrame function now.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrameHierarchy): Use childFrame instead
of childFrameForPart.
2003-09-23 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3390850 -- Shift_JIS in meta tag ignored because <img> tag in JavaScript comes first (vintagecomp.com)
* khtml/misc/decoder.cpp: (Decoder::decode): Don't let tags inside a script make us think we're in the body.
Later we can enhance this even more.
2003-09-22 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3292723 -- onBlur() getting called twice on <input type=text>
* khtml/rendering/render_replaced.cpp: (RenderWidget::eventFilter):
Call setFocusNode(0) instead of explicitly sending a blur event, otherwise
setFocusNode will send a second blur event later.
2003-09-22 Darin Adler <darin@apple.com>
- fixed 3391837 -- we list ISO-8859-8-E as visual ordering for Hebrew; it's "explicit ordering", not supported
* kwq/mac-encodings.txt: Removed ISO-8859-8-E.
* kwq/KWQCharsetData.c: Regenerated.
2003-09-22 Darin Adler <darin@apple.com>
* kwq/KWQTextEdit.mm: (QTextEdit::sizeWithColumnsAndRows): Made it compile.
2003-09-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3306041 -- Airborne tracking number field too narrow, tracking doesn't work (textare col property)
* khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Call the QTextEdit
to ask it what size, rather than trying to compute it. This is the same thing we do with
other widgets, I just hadn't done textarea yet.
* kwq/KWQTextEdit.h: Added sizeWithColumnsAndRows function.
* kwq/KWQTextEdit.mm: (QTextEdit::sizeWithColumnsAndRows): Added. Calls through to the
KWQTextArea object.
* kwq/KWQTextArea.h: Added sizeWithColumns:rows: method.
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]): Make consistent with other callers of the size mapping methods
by using [self class] instead of NSScrollView, and getting hasHorizontalScroller and
hasVerticalScroller from the view.
(-[KWQTextArea setFrame:]): Make consistent with other callers of the size mapping methods
by using [self class] instead of NSScrollView.
(-[KWQTextArea sizeWithColumns:rows:]): Added. Starts by computing the width and height of the
columns specified, using a canonical width of a "0" character. Then converts that to a container
size by adding line fragment padding. Then converts that into the text view size by adding the
text container inset. Then converts that into the scroll view size by calling frameSizeForContentSize:.
2003-09-22 Darin Adler <darin@apple.com>
* WebCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.
2003-09-22 Darin Adler <darin@apple.com>
Reviewed by Ken.
- research determined we were using nothing defined in config.h, so I got rid of it
* Makefile.am: Removed rules to generate config.h.
* config.h: Removed.
* WebCore.pbproj/project.pbxproj: Removed define of HAVE_CONFIG_H.
* WebCorePrefix.h: Removed include of <config.h>.
* ForwardingHeaders/config.h: Emptied this file out. Can't remove this because there are
some includes of <config.h> without HAVE_CONFIG_H wrappers.
2003-09-21 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3106411 -- show title attribute for page elements in tooltip on mouseover (important for PeopleSoft)
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Set the value of a new element dictionary
key, WebCoreElementTitleKey. This gives the title for an element, walking up the DOM tree as necessary
to find it. It's used for tool tips at the WebKit level.
* kwq/WebCoreBridge.h: Added WebCoreElementTitleKey and WebCorePageCacheStateKey.
* WebCore.exp: Added all the constants from WebCoreBridge.h; these should be exported even though they
are not being used at the moment because the "WebCore and WebKit use the same constant keys" hack we
are doing at the WebKit level means we can just use the WebKit keys on the WebKit side.
* WebCore-combined.exp: Regenerated.
2003-09-20 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3328481 -- selection in select element list box does not scroll into view when set programatically
* kwq/KWQListBox.mm: (QListBox::setSelected): Scroll newly-selected item into view.
2003-09-20 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3429384 -- REGRESSION (89-90): nil-deref in KHTMLPart::write() (cheshiremotorcyclesalvage.com)
* khtml/khtml_part.cpp: (KHTMLPart::write): Add a nil check.
2003-09-20 Darin Adler <darin@apple.com>
Reviewed by Dave.
- more fixes for the W3C DOM tests
* khtml/dom/dom_doc.cpp: (Document::createAttributeNS): Check that the attribute name
is valid and throw INVALID_CHARACTER_ERR if not.
* khtml/dom/dom_element.cpp:
(Element::removeAttributeNode): Get the attribute name properly. The old code would always
get a 0, so this function would always fail.
(Element::setAttributeNS): Check that the attribute name is valid and throw
INVALID_CHARACTER_ERR if not.
(Element::setAttributeNodeNS): Remove redundant exception checks that are also done by
setNamedItem in the implementation. I had to change the implementation of one, so I decided
it was better not to have any duplication.
* khtml/xml/dom_docimpl.h: Added isValidName function.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement): Check that the attribute name is valid and throw
INVALID_CHARACTER_ERR if not.
(DocumentImpl::isValidName): Added. Used to check for valid names.
* khtml/xml/dom_elementimpl.cpp:
(NamedAttrMapImpl::setNamedItem): Don't do the document check until after checking for
the "replace self" case. Otherwise we raise a spurious "in use" exception.
(NamedAttrMapImpl::addAttribute): Point the new attribute at the element.
2003-09-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
Roll out old fix for 3410980 and do a new better fix.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.mm:
* kwq/WebCoreBridge.h:
2003-09-19 Darin Adler <darin@apple.com>
Reviewed by Dave.
- update layout tests for Dave's change
* layout-tests/apple-only/base/www.excite.com/index-expected.txt:
* layout-tests/fast/block/positioning/051-expected.txt:
* layout-tests/fast/overflow/003-expected.txt:
- fixed 3426272 -- sites that use text-shadow cause leaks (QPainter::setShadow)
* kwq/KWQPainter.mm: (QPainter::setShadow): Release the color space and color.
- fixed some errors that caused failures in the W3C DOM suite
* khtml/ecma/kjs_binding.cpp:
(DOMObject::get): Put "code" in the error object.
(DOMObject::put): Put "code" in the error object.
(DOMFunction::get): Put "code" in the error object.
* khtml/ecma/kjs_dom.cpp: (DOMCharacterDataProtoFunc::tryCall):
Add checks for negative count values. Not clear whether this change is
really great, but it helps us pass W3C DOM tests and clearly won't affect
normal pages in any bad way.
* khtml/xml/dom_elementimpl.cpp:
(AttrImpl::AttrImpl): Set m_specified to true. Since we never set up the
attributes from the DTD anyway, this is fine for now. If we ever go crazy
and implement that, then the bit field is sitting here waiting for us.
(NamedAttrMapImpl::removeNamedItem): The comment from KHTML says they
don't raise the not found exception because "the DOM 2 spec doesn't say
you should". But the DOM Level 1 specification clearly does, and the W3C
DOM Level 1 Core test requires it, so I'm putting it in.
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Typo; this was
returning the wrong error code in the "wrong document" case.
* khtml/xml/dom_stringimpl.cpp:
(DOMStringImpl::remove): Fix overflow case.
(DOMStringImpl::substring): Fix overflow case.
2003-09-19 David Hyatt <hyatt@apple.com>
Fix for 3401409, fix negative z-index. This code actually substantially
reworks layers to be more efficient in both painting and event handling.
It also fixes bugs with clipping as well as with negative z-indices.
Reviewed by kocienda
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::repaintRectangle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::nodeAtPoint):
* khtml/rendering/render_frames.h:
* khtml/rendering/render_image.cpp:
(RenderImage::nodeAtPoint):
* khtml/rendering/render_image.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::nodeAtPoint):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::RenderLayer):
(RenderLayer::~RenderLayer):
(RenderLayer::updateLayerPosition):
(RenderLayer::stackingContext):
(RenderLayer::enclosingPositionedAncestor):
(RenderLayer::transparentAncestor):
(RenderLayer::addChild):
(RenderLayer::removeChild):
(RenderLayer::convertToLayerCoords):
(RenderLayer::checkScrollbarsAfterLayout):
(RenderLayer::paintScrollbars):
(RenderLayer::paint):
(setClip):
(restoreClip):
(RenderLayer::paintLayer):
(RenderLayer::nodeAtPoint):
(RenderLayer::nodeAtPointForLayer):
(RenderLayer::calculateClipRects):
(RenderLayer::calculateRects):
(RenderLayer::intersectsDamageRect):
(RenderLayer::containsPoint):
(hoverAncestor):
(commonAncestor):
(RenderLayer::updateHoverActiveState):
(sortByZOrder):
(RenderLayer::dirtyZOrderLists):
(RenderLayer::updateZOrderLists):
(RenderLayer::collectLayers):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
(RenderObject::document):
(RenderObject::renderArena):
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(RenderText::nodeAtPoint):
* khtml/rendering/render_text.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::~DocumentImpl):
(DocumentImpl::recalcStyleSelector):
(DocumentImpl::setHoverNode):
* khtml/xml/dom_docimpl.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::paint):
(KWQKHTMLPart::paintSelectionOnly):
(KWQKHTMLPart::adjustPageHeight):
* kwq/KWQRect.h:
* kwq/KWQRenderTreeDebug.cpp:
(write):
(writeLayers):
(externalRepresentation):
2003-09-19 Darin Adler <darin@apple.com>
Reviewed by Dave.
* layout-tests: Updated for my mini-controls change.
2003-09-19 Darin Adler <darin@apple.com>
Reviewed by Dave.
- do the prep work for the mini controls feature; Dave will finish this
* khtml/rendering/render_form.cpp: (RenderFormElement::updateFromElement):
Tell the widget about the font size. Our widgets use the font size to
decide whether to use Aqua normal, small, or mini.
* kwq/KWQButton.h: Add setFont.
* kwq/KWQButton.mm:
(QButton::setFont): Set control size based on font.
(KWQNSControlSizeForFont): Determine control size given a font. Dave is going
to tweak this later.
* kwq/KWQCheckBox.h: Add dimensions function for metrics for each control size.
* kwq/KWQCheckBox.mm:
(QCheckBox::sizeHint): Use dimensions.
(QCheckBox::frameGeometry): Use dimensions.
(QCheckBox::setFrameGeometry): Use dimensions.
(QCheckBox::baselinePosition): Use dimensions.
(QCheckBox::dimensions): Added. Has newly tweaked values for all dimensions for
all three control sizes.
* kwq/KWQComboBox.h: Add setFont and dimensions.
* kwq/KWQComboBox.mm:
(QComboBox::sizeHint): Use dimensions.
(QComboBox::frameGeometry): Use dimensions.
(QComboBox::setFrameGeometry): Use dimensions.
(QComboBox::baselinePosition): Use dimensions.
(QComboBox::setFont): Use dimensions.
(QComboBox::dimensions): Added. Has newly tweaked values for all dimensions for
all three control sizes.
* kwq/KWQFileButton.mm: (KWQFileButton::baselinePosition): Change to adapt to
flipped version of file button NSControl.
* kwq/KWQPushButton.h: Add dimensions function for metrics for each control size.
* kwq/KWQPushButton.mm:
(QPushButton::sizeHint): Use dimensions.
(QPushButton::frameGeometry): Use dimensions.
(QPushButton::setFrameGeometry): Use dimensions.
(QPushButton::baselinePosition): Use dimensions.
(QPushButton::dimensions): Added. Has newly tweaked values for all dimensions for
all three control sizes.
* kwq/KWQRadioButton.h: Add dimensions function for metrics for each control size.
* kwq/KWQRadioButton.mm:
(QRadioButton::sizeHint): Use dimensions.
(QRadioButton::frameGeometry): Use dimensions.
(QRadioButton::setFrameGeometry): Use dimensions.
(QRadioButton::baselinePosition): Use dimensions.
(QRadioButton::dimensions): Added. Has newly tweaked values for all dimensions for
all three control sizes.
2003-09-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3410980 - FileMaker: going forward with an empty forward list makes a frame come out blank sometimes
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close): Remove redundant check removed.
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scheduleHistoryNavigation): Only call the base class
method to actually schedule when it's possible to go back or forward
that number of steps.
* kwq/WebCoreBridge.h:
2003-09-17 John Sullivan <sullivan@apple.com>
- WebCore part of fix for 3157018 -- Would like option to
not print backgrounds
Reviewed by Darin
* kwq/KWQKHTMLSettings.h:
add _shouldPrintBackgrounds field and accessors
* kwq/WebCoreSettings.h:
add shouldPrintBackgrounds field and accessors
* kwq/WebCoreSettings.mm:
(-[WebCoreSettings setShouldPrintBackgrounds:]):
new method, passes value to KHTMLSettings
(-[WebCoreSettings shouldPrintBackgrounds]):
new method
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge styleSheetForPrinting]):
new method, returns a style sheet that has backgrounds
turned off if preference is set that way.
(-[WebCoreBridge reapplyStylesForDeviceType:]):
if printing, set the printStyleSheet to the one we
created based on the preferences. (KHTML has always
had support for a special printStyleSheet, but it was
only being used in !APPLE_CHANGES code.)
* khtml/rendering/render_style.h:
add shouldCorrectTextColor boolean field and accessors
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
tell style to correct text colors if backgrounds aren't being printed
* khtml/rendering/render_text.cpp:
(TextRun::paintSelection):
added comment
(simpleDifferenceBetweenColors):
new function, computes a quick measure of difference
between colors
(correctedTextColor):
if text and background colors are too similar, returns
lightened or darkened text color
(RenderText::paintObject):
if style says to correct text colors, call correctedTextColor
2003-09-17 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3423404 -- REGRESSION: Japanese page appears blank due to unexpected kTECPartialCharErr
* kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): In the case where we're already
going from the small buffer back to the large one, treat kTECPartialCharErr the same as noErr.
Otherwise we'll get confused and drop the contents of the big buffer.
(KWQTextDecoder::convert): Improve the debugging code a bit (still turned off).
=== WebCore-105 ===
2003-09-15 Ken as Darin <darin@apple.com>
Reviewed by Darin and Don.
- fixed 3419957 -- REGRESSION: lines drawn across multiple columns at washingtonpost.com
* khtml/rendering/render_box.cpp: (RenderBox::calcWidth): Always use the width of the line
rather than the width of the containing block for "flow around floats" blocks (<hr>).
This undoes half of the change made to fix bug 3384609.
2003-09-15 Darin Adler <darin@apple.com>
Reviewed by Ken and Don.
- fixed 3417604 -- REGRESSION: dragging scroll thumb causes textarea contents to vanish
* kwq/KWQTextArea.mm: (-[KWQTextArea initWithFrame:]): Deallocated cached graphics state for
the text view as well as for the clip view.
2003-09-13 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3420547 -- REGRESSION: repro crash in khtml::RenderBlock::findNextLineBreak (wisdomtips.com)
* khtml/rendering/render_block.cpp: (RenderBlock::addChildToFlow): Exclude BR elements when looking for
an element to process first-letter style.
2003-09-13 Darin Adler <darin@apple.com>
* layout-tests/fast/frames/empty-frame-src-expected.txt: Updated test results that changed
due to the change in our handling of frame borders.
=== WebCore-104 ===
2003-09-12 Richard Williamson <rjw@apple.com>
Fixed 3420097. Pass flag up to WebKit indicating that redirects are being cancelled during a pending load.
Reviewed by Darin.
* khtml/khtml_part.cpp:
(KHTMLPart::cancelRedirection):
* khtml/khtml_part.h:
* khtml/khtmlpart_p.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::provisionalLoadStarted):
(KWQKHTMLPart::redirectionTimerStartedOrStopped):
* kwq/WebCoreBridge.h:
=== WebCore-103 ===
2003-09-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* khtml/css/html4.css: Use the same hardcoded default size for
OBJECT and EMBED tags as for IFRAME.
2003-09-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3403223 -- <input type=file> with initial value causes exception, bad results afterwards, when submitted
* kwq/KWQFile.mm: (QFile::QFile): Don't pass an empty string to fileSystemRepresentation,
because that will cause an exception.
=== WebCore-101 ===
2003-09-11 Richard Williamson <rjw@apple.com>
Fixed 3406671. Added a private method for Mail to get selection
rect.
Fixed 3417688. Don't allow https page into page cache.
Reviewed by Darin.
* kwq/KWQFrame.h:
* kwq/KWQFrame.mm:
(QFrame::setFrameStyle):
(QFrame::frameWidth):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::canCachePage):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectionRect]):
(-[WebCoreBridge visibleSelectionRect]):
(-[WebCoreBridge selectionImage]):
(-[WebCoreBridge adjustViewSize]):
=== Safari-100 ===
2003-09-09 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3373654 -- REGRESSION: Yahoo chat applet reloads over and over due to "baseURL" param name conflict
After some research by the Java team, we discovered that there was no need to
pass in baseURL at all This patch gets rid of that by only passingindividual specified
arguments, rather than passing all the arguments, as applet parameters.
* khtml/rendering/render_applet.cpp: (RenderApplet::processArguments): Remove the
call to KJavaApplet::processArguments, because we only want the individual arguments.
* kwq/KWQKJavaAppletWidget.h: Implement setAppletClass, setAppletName, setArchives, and
setCodeBase. Remove processArguments.
* kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setParameter): Lowercase all the
parameters as we put them in the dictionary, since this is the semantics required by Java.
=== Safari-99 ===
2003-09-07 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3411827 -- REGRESSION: text drawing after text-shadow does not respect smoothing style (asahi.com)
* kwq/KWQPainter.mm: (QPainter::clearShadow): Call CGContextSetShadowWithColor with a color of NULL,
which actually clears the shadow, rather than CGContextSetShadow, which sets a black shadow (even
if it is zero pixels in size).
=== Safari-98 ===
2003-09-05 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3226083>: REGRESSION (Panther): white box
overlaying select lists at nvidia.com drivers page
* kwq/KWQListBox.mm:
(QListBox::QListBox): Re-add releaseGState fix that Darin
added, but then removed. It turns out that we do need
this workaround in place to get proper drawing.
Fix for this bug:
<rdar://problem/3310943>: REGRESSION (Panther): textareas
in forms sometimes draw blank (bugreporter)
* kwq/KWQTextArea.mm:
(-[KWQTextArea initWithFrame:]): Same fix as above.
2003-09-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed - REGRESSION (85-92): Javascript on page isn't triggered by typed characters (onKeyUp)
(This actually also requires an AppKit fix to be a full fix.)
* kwq/KWQListBox.mm:
(-[KWQTableView keyDown:]): Added. Send event through DOM.
(-[KWQTableView keyUp:]): Likewise.
(-[KWQTableView becomeFirstResponder]): Added. Report focus change
to DOM.
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView keyUp:]): Added. Send event through DOM.
* kwq/KWQTextField.mm:
(-[KWQTextField textView:shouldHandleEvent:]): Pass NSKeyUp events too
(not going to work until we get an AppKit fix).
2003-09-04 John Sullivan <sullivan@apple.com>
- fixed 3399880 -- Repro crash when filling out a form to
download Macromedia software. I managed to check in this
ChangeLog comment a few days ago without actually checking
in the changed file, weird.
Reviewed by Chris
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementForView:]):
check for nil widget before dereferencing
2003-09-04 David Hyatt <hyatt@apple.com>
Fix for 3408630, leak of child frame parts caused by a missing deref when frames
get detached from their parent frame list.
Reviewed by mjs
* kwq/KWQKHTMLPart.mm:
(KHTMLPart::frameDetached):
2003-09-04 Darin Adler <darin@apple.com>
* layout-tests/apple-only/base/www.msn.com/index-expected.txt: Update for residual style fix.
* layout-tests/fast/invalid/003-expected.txt: Update for residual style fix.
2003-09-04 Darin Adler <darin@apple.com>
* kwq/KWQRenderTreeDebug.cpp: (write): Fix clip rectangle computation.
* layout-tests: Update test results.
=== Safari-97 ===
2003-09-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* khtml/khtml_part.cpp:
(KHTMLPart::clear): Un-ifdef cleanup of frames, and add similar
cleanup for objects. Replace delete with deref.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart): Add an extra ref to KHTMLParts since
both the bridge and the parent part want to deref.
2003-09-03 David Hyatt <hyatt@apple.com>
Fix for 3404398, leak in residual style code. The code that built up the
residualStyleStack was messed up and discarded tags.
Reviewed by mjs
* khtml/html/htmlparser.cpp:
(KHTMLParser::popBlock):
2003-09-02 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3399169>: 4 leaks of DOMString objects (Mail)
Remove circular reference between AttributeImpl and AttrImpl objects.
This was causing the leak.
* khtml/xml/dom_elementimpl.cpp:
(AttributeImpl::allocateImpl):
2003-09-02 David Hyatt <hyatt@apple.com>
Fix for 3359408, DirWS should not be used when collapsing/stripping spaces,
since only ASCII spaces are supposed to be collapsed/stripped.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
2003-09-02 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3403388 -- decoder mishandles pages which fill the decoding buffer (mainly ISO-2022-JP)
* kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Keep decoding, passing in no additional bytes,
until we get noErr, don't ever stop after a kTECOutputBufferFullStatus error.
2003-09-02 David Hyatt <hyatt@apple.com>
Fix for 3404452, paint errors on mezzoblue.com's links list. There was a simple
math error in the invalidation rect computation.
Reviewed by mjs
* khtml/rendering/render_flow.cpp:
(RenderFlow::repaint):
2003-09-01 John Sullivan <sullivan@apple.com>
- WebCore part of fix for 3402489 -- REGRESSION (7B48-7B55): Some
printed web pages are too small (width is half a page)
This was a regression caused by the fix for 3378810.
Reviewed by Maciej
* kwq/WebCoreBridge.h:
add adjustingViewSize flag to forceLayout and forceLayoutForPageWidth:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge forceLayoutAdjustingViewSize:]):
respect new flag while we are set up for printing.
(-[WebCoreBridge forceLayoutForPageWidth:adjustingViewSize:]):
ditto
(-[WebCoreBridge adjustFrames:]):
pass NO for new flag here
2003-09-01 John Sullivan <sullivan@apple.com>
* kwq/KWQPainter.mm:
(QPainter::drawLine):
Removed the ERROR that warns of the CG memory trashing bug, now
that we are enough builds away from it that it is (almost?) never
reported anymore.
=== Safari-96 ===
2003-08-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3397775 21 leaks from CSS parser running PLT
* khtml/css/css_ruleimpl.cpp:
(CSSMediaRuleImpl::~CSSMediaRuleImpl): Clear the parent for all contained
rules.
(CSSMediaRuleImpl::append): Call insertRule.
(CSSMediaRuleImpl::insertRule): set parent of the rule to this media rule.
(CSSRuleListImpl::append): Call insertRule to cover all the relevant
additional handling, instead of adding straight to the list.
* khtml/css/css_ruleimpl.h:
2003-08-29 John Sullivan <sullivan@apple.com>
- fixed 3399880 -- Repro crash when filling out a form to
download Macromedia software
Reviewed by Chris
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementForView:]):
check for nil widget before dereferencing
2003-08-28 David Hyatt <hyatt@apple.com>
Fix for 3381377, fix the calcBlockMinMaxWidth function to not use the
renderobject's computed margins except when it has to. This makes
table cells with align=right not mess up and fixes margin problems
in general with floated elements and table cells.
Since XUL boxes also use a similar function and since it had a similar
error, vertical XUL boxes have been patched as well.
Reviewed by gramps
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_flexbox.cpp:
2003-08-28 David Hyatt <hyatt@apple.com>
Fix for 3398463, a regression caused by an unintended line movement.
<br/> was no longer being treated just like <br> in HTML.
Reviewed by gramps
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
=== Safari-95 ===
2003-08-27 Richard Williamson <rjw@apple.com>
Fixed 3359408. DON'T treat unicode whitespace as whitespace when collapsing spaces.
Reviewed by David Hyatt.
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
(RenderText::containsOnlyWhitespace):
* khtml/xml/dom_stringimpl.cpp:
2003-08-27 David Hyatt <hyatt@apple.com>
Fix for 3396962, hang on quote.com. Fieldsets with display:inline should be treated
like inline-blocks. This matches WinIE's behavior.
Reviewed by mjs
* khtml/rendering/render_form.cpp:
(RenderFieldset::setStyle):
* khtml/rendering/render_form.h:
2003-08-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- follow-on to fix for 3310943 -- REGRESSION (Panther): textareas in forms sometimes draw blank (bugreporter)
* kwq/KWQListBox.mm: (QListBox::QListBox): Remove call to releaseGState. This was here to
work around a problem we thought was an AppKit bug, but it turns out it was caused by
NSView hackery in WebKit. We now do the WebKit part in a way that does not create the problem.
2003-08-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3031562 -- most forms don't work in certain configurations because of a bug in KWQVariant
* kwq/KWQVariant.mm: (QVariant::QVariant): Set the b element of the union, not the d element,
in the constructor for bool.
2003-08-26 David Hyatt <hyatt@apple.com>
Fix for 3395950, better support for self-collapsing blocks. Make them obey
clear properly and also change the definition of self-collapsing to match
the CSS2.1 specification.
Reviewed by gramps
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
2003-08-26 David Hyatt <hyatt@apple.com>
Fix for 3335175, www.calstone.com renders as blank. The fix is to deliberately
introduce an error into our HTML parsing code that causes us to honor self-closing
XML-style <script/> tags. This matches Mozilla and Opera behavior (both of them
have this bug), but it does not match WinIE.
Reviewed by mjs
* khtml/html/htmltokenizer.cpp:
2003-08-26 David Hyatt <hyatt@apple.com>
Fix for 3286229, popup menu misplaced. <form> needs to be allowed as a child of
<h1>-<h6> tags. All other browsers allow this.
Reviewed by darin
* khtml/html/dtd.cpp:
2003-08-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- re-fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Added missing # sign.
2003-08-26 David Hyatt <hyatt@apple.com>
Fix for 3394107, make sure the display mutation code doesn't mutate objects with
display: none set.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-08-22 David Hyatt <hyatt@apple.com>
Fix for 3388363, copying a word in a list item copied too much. The code that checked
for the bullet would add in too much text sometimes.
Reviewed by john
* kwq/KWQKHTMLPart.mm:
(isTextFirstInListItem):
(KWQKHTMLPart::attributedString):
2003-08-21 Darin Adler <darin@apple.com>
* Makefile.am: Work around DLCFN issue to prevent constant churn of config.h.
* config.h: Regenerated without DLCFN.
2003-08-21 Darin Adler <darin@apple.com>
* khtml/khtmlview.h: Formatting tweak.
2003-08-21 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3386673>: a particular fidelity.com "Log in" link does nothing because of cross-domain JavaScript rules
Reviewed by mjs.
* config.h:
* khtml/ecma/kjs_window.cpp:
(Window::get): allow other frames to get the location object
(Window::isSafeScript): added JS logging
(Location::get): don't allow other frames to access location attributes
(LocationFunc::tryCall): don't allow other frames to call functions on the location object
2003-08-21 Richard Williamson <rjw@apple.com>
Fixed 3378810. Avoid resizing frame from drawRect: when printing. This will corrupt the graphics context.
Reviewed by Hyatt.
* khtml/khtmlview.cpp:
(KHTMLView::adjustViewSize):
* khtml/khtmlview.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::layout):
* kwq/KWQScrollView.mm:
(QScrollView::resizeContents):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge adjustViewSize]):
=== Safari-94 ===
2003-08-21 David Hyatt <hyatt@apple.com>
Fix for 3387302, floats weren't being allowed to be relatively positioned. The
fix is trivial. Stop making floating/relpositiion setting an if/else and just make
it two ifs.
Reviewed by darin
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
2003-08-21 David Hyatt <hyatt@apple.com>
Fix for 3384635, breakable unicode characters that were preceded by multiple spaces
accidentally added in those spaces to their widths.
Reviewed by rjw and gramps
* khtml/rendering/bidi.cpp:
2003-08-20 David Hyatt <hyatt@apple.com>
Fix for 3384609. Objects that want to dodge floats should fill the line width instead
of the containing block width only if their widths are auto. If widths are specified
explicitly, then ccontaining block width should be honored.
Reviewed by john
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
* khtml/rendering/render_table.cpp:
(RenderTable::calcWidth):
2003-08-20 Richard Williamson <rjw@apple.com>
UCFindTextBreak will report false if we have a sequence of 0xa0 0x20 (nbsp, sp), so we explicity check for that case. Filed 3386852 to track this problem, meanwhile added a work-around. This problem was revealed after adding the fix for 3242508.
Reviewed by Dave.
* khtml/rendering/break_lines.cpp:
2003-08-20 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3248069 -- Safari does not support ISO Latin 10 (ISO-8859-16, romanian) coding.
* kwq/mac-encodings.txt: Added ISO-8859-16, which maps to ISO Latin-10.
* kwq/KWQCharsetData.c: Regenerated.
* kwq/KWQCharsets.mm: Add definition of kCFStringEncodingISOLatin10, since this encoding
is currently only in TextCommon.h, not in CFStringEncodingExt.h.
2003-08-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3384963 - REGRESSION: assertion in copyPathRemovingDots, crash parsing URL in snippet editor
* kwq/KWQKURL.mm:
(copyPathRemovingDots): It's OK if the path is entirely empty.
2003-08-20 David Hyatt <hyatt@apple.com>
Fix for 3385211, <td>s should ignore the float property in quirks mode. This
patch cleans up the adjustments of <td>s and <table>s and moves the code into
the style selector (instead of cluttering up the rendering code).
Fix for 3385476, generated content not built correctly. All generated content
should be placed inside a containing object that actually gets the pseudo-style.
Reviewed by rjw
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
2003-08-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3292036 - albertsons.com world leak of 2 WebDataSource and 2 WebHTMLRepresentation objects
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::canCachePage): Test for parentPart() even if there
is no document.
2003-08-20 Richard Williamson <rjw@apple.com>
Fixed 3242508. Japanese (and other non latin1 scripts) line breaking incorrect when mixed with latin1.
Reviewed by Dave.
* khtml/rendering/break_lines.cpp:
Checkin fix for earlier bug that was already approved!
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
2003-08-19 David Hyatt <hyatt@apple.com>
Fixes for 3380766 and 3381867. One is a table bug with amazon.com where colspans
were losing percentage width values. The other is a bug where floats aren't dirtying
objects into which they intrude when doing layout.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::calcEffectiveWidth):
2003-08-19 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3379336>: flash on front page of http://www.westportmotorsports.com is broken
Reviewed by darin.
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget): Ignore the PARAM tags and only use attributes inside the OBJECT tag when the EMBED tag is omitted.
2003-08-19 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3343681 -- clicking on a disabled submit button submits the form!
This turned out to be a problem with code in dispatchGenericEvent that sent
DOMActivate events even when the form element was disabled.
* khtml/xml/dom_nodeimpl.h: Add virtual disabled() member function.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchGenericEvent): Don't send DOM activate events for disabled elements.
(NodeImpl::handleLocalEvents): Don't send mouse events for disabled elements. But we do
want those events to pass through the bubble and capture phases, just avoid triggering
any listeners on this node itself.
(NodeImpl::disabled): Added default implementation that returns false.
* khtml/html/html_formimpl.h: Removed the disabled() function's inline implementation
since it's now virtual and it's not helpful to inline virtual functions.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::disabled): Moved this method into the .cpp file since it's
now virtual and it's not helpful to inline virtual functions.
2003-08-18 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3380411 -- Unicode supplementary characters cut in half in text control with maxlength set
* kwq/KWQTextField.mm:
(-[KWQTextField setMaximumLength:]): Enforce maximum length based on number of composed character
sequences rather than on number of UTF-16 values. This helps with both surrogate pairs (the supplementary
characters mentioned in the bug report) and composed character sequences.
(-[KWQTextField setStringValue:]): Ditto.
(-[KWQTextFieldFormatter isPartialStringValid:newEditingString:errorDescription:]): Ditto.
(-[NSString _KWQ_numComposedCharacterSequences]): Added. Computes the length of a string in terms of
number of composed character sequences.
(-[NSString _KWQ_truncateToNumComposedCharacterSequences:]): Added. Truncates a string in terms of
number of composed character sequences.
2003-08-18 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3299893 -- oncontextmenu support
* kwq/WebCoreBridge.h: Added sendContextMenuEvent: method.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge sendContextMenuEvent:]): Added.
Calls sendContextMenuEvent on the part.
* kwq/KWQKHTMLPart.h: Added sendContextMenuEvent member function.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): Added. Sets up
a suitable mouse event and calls dispatchMouseEvent for CONTEXTMENU_EVENT.
* khtml/ecma/kjs_dom.cpp: Added oncontextmenu to DOMNode's list of properties.
(DOMNode::getValueProperty): Added case for OnContextMenu.
(DOMNode::putValue): Added case for OnContextMenu.
* khtml/ecma/kjs_dom.h: Added constant for OnContextMenu.
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute):
Added case for ATTR_ONCONTEXTMENU.
* khtml/misc/htmlattrs.in: Added oncontextmenu.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Added case for CONTEXTMENU_EVENT.
(EventImpl::idToType): Added case for CONTEXTMENU_EVENT.
* khtml/xml/dom2_eventsimpl.h: Added CONTEXTMENU_EVENT.
* khtml/ecma/kjs_dom.lut.h: Regenerated.
* khtml/misc/htmlattrs.c: Regenerated.
* khtml/misc/htmlattrs.h: Regenerated.
2003-08-18 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3381295 -- regular expression matches for text with UTF-16 surrogates will give incorrect results
* kwq/KWQRegExp.mm: (QRegExp::match): Removed local copy of convertCharacterOffsetsToUTF8ByteOffsets
and its reverse. Instead use convertUTF16OffsetsToUTF8Offsets and its reverse, now available from
<JavaScriptCore/ustring.h>.
- added test for the URI encoding and decoding functions in JavaScriptCore
* layout-tests/fast/js/global/encode-URI-test-expected.txt: Added.
* layout-tests/fast/js/global/encode-URI-test.html: Added.
2003-08-15 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3380418>: Ignore specified string encoding when constructing file, mailto and help URLs
Reviewed by mjs, darin.
* kwq/KWQKURL.mm:
(KURL::KURL): store the URL string as UTF-8 when the URL is file, mailto and help.
2003-08-17 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData):
Do the &-encoding thing on the filename. This is what Gecko does.
2003-08-14 Maciej Stachowiak <mjs@apple.com>
Fixed by Darin, reviewed by me (and originally figured out by John).
- fixed 3375592 - New Yahoo Maps doesn't work right
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::convertUTF16): Don't pass through null characters.
(KWQTextDecoder::appendOmittingNullsAndBOMs): Ditto.
(KWQTextDecoder::convertUsingTEC): Ditto.
=== Safari-93 ===
2003-08-14 Vicki Murley <vicki@apple.com>
Reviewed by John.
* WebCore.pbproj/project.pbxproj: deleted WebCore.order from the project.
2003-08-14 Vicki Murley <vicki@apple.com>
Reviewed by John.
* WebCore.order: Removed. We now point to the WebCore order file in /AppleInternal/OrderFiles.
* WebCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/WebCore.order
2003-08-14 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3095893>: Image Capture: "Build web page" doesn't work with Japanese folder name.
* kwq/KWQKURL.mm:
(KURL::getNSURL): Try UTF-8 first and fallback to ISO Latin-1 when creating an NSURL.
This will handle the two-byte character in file name case mentioned in the bug.
2003-08-14 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3375270 -- writing to frame parent from a button press crashes in viewportMousePressEvent
The fix turned out to be to ref the view around handling events in the view, since processing
the event could cause the view and part to go away. Since the view refs the part, ref'ing just
the view seems to work perfectly.
* kwq/KWQKHTMLPart.mm: Fixed namespace access to use "using" instead of explicit namespaces.
(KWQKHTMLPart::setView): Not-entirely-related cleanup. Use the "ref before deref" idiom here.
(KWQKHTMLPart::sendResizeEvent): Ref the KHTMLView while sending the resize event.
(KWQKHTMLPart::mouseDown): Ref the KHTMLView while sending the viewport mouse down event.
(KWQKHTMLPart::mouseDragged): Ref the KHTMLView while sending the viewport mouse dragged event.
(KWQKHTMLPart::mouseUp): Ref the KHTMLView while sending the viewport mouse up or double click event.
(KWQKHTMLPart::mouseMoved): Ref the KHTMLView while sending the viewport mouse moved event.
2003-08-13 David Hyatt <hyatt@apple.com>
Fix for 3372896, spaces left at ends of lines. Patch the selection code
to be smarter about detecting ends of lines and adding in spaces.
Reviewed by gramps
* khtml/khtml_part.cpp:
(KHTMLPart::selectedText):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
2003-08-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken Kocienda.
- fixed 3365242 - non-repro abort in HTMLTokenizer at ajc.com
* khtml/khtml_part.cpp:
(KHTMLPart::write): ref the part around actually processing the
data, since a script could cause the part to go away.
2003-08-12 David Hyatt <hyatt@apple.com>
Fix for 3262190, <li> bullets in mail were overly massive. The bezier path the
painter stroked was not setting the line width from QPen's width, so it ended up
just using the current line width instead (which happened to be much larger in
Mail).
Reviewed by darin
* kwq/KWQPainter.mm:
(QPainter::drawEllipse):
(QPainter::drawArc):
(QPainter::_drawPoints):
2003-08-12 John Sullivan <sullivan@apple.com>
- fixed 3370614 -- REGRESSION (81-85): partial inline input from Japanese
input method can disappear
Reviewed by Hyatt
* khtml/rendering/render_form.cpp:
(RenderLineEdit::updateFromElement):
call w->text() before element()->value(), because w->text() has a side
effect of updating element()->value() in the inline input case
(RenderTextArea::updateFromElement):
same for text areas
2003-08-12 David Hyatt <hyatt@apple.com>
Fix for 3374566, list bullets don't display if list-style-type is none but a list-style-image
is specified. The spec says list-style-type: none does not apply to list-style-image,
and this fixes Microsoft's list bullet on their security pages.
Reviewed by john
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
2003-08-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3226083 -- REGRESSION (Panther): white box overlaying select lists at nvidia.com drivers page
* kwq/KWQListBox.mm: (QListBox::QListBox): Call releaseGState on the clip view
that we make for the list box. This prevents the incorrect graphics state caching
that causes the problem, although it's not entirely clear why this is necessary.
This may ultimately turn out to be an AppKit bug, and if so we can roll out this change
when the AppKit itself is fixed.
2003-08-12 David Hyatt <hyatt@apple.com>
Fix for 3373462, XML shows up as blank because the root is inline. The fix is
to just disallow inline roots.
Reviewed by kocienda
* khtml/css/cssstyleselector.cpp:
2003-08-11 David Hyatt <hyatt@apple.com>
Fix for 3349142, blocks inside inlines with generated content cause the generated
content to get all screwed up, especially if you try to print. This patch fixes
generated content to be continuation-aware (and vice versa), so that the content
behaves correctly when inlines get split.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChild):
* khtml/rendering/render_inline.cpp:
(RenderInline::isInlineContinuation):
(RenderInline::addChildToFlow):
(RenderInline::cloneInline):
(RenderInline::splitInlines):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::continuation):
(RenderObject::isInlineContinuation):
* khtml/rendering/render_object.h:
2003-08-11 Darin Adler <darin@apple.com>
* kwq/KWQKHTMLPart.h: Fixed some small typo-ish strangenesses.
2003-08-08 David Hyatt <hyatt@apple.com>
Fix for 3368672, don't allow frames and framesets to be positioned or relpositioned.
Reviewed by darin
* ChangeLog:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_object.cpp:
(RenderObject::requiresLayer):
* khtml/rendering/render_object.h:
2003-08-07 David Hyatt <hyatt@apple.com>
Fix for 3368463, assert/crash on libraries.uc.edu page. A stylesheet was making
a <p> a table-column, which is totally nonsensical. Since this isn't supported in
WinIE, it just got ignored. The fix I chose matches what Mozilla does, which is
to not allow table-column renderobjects to have children.
Fix for 3364412, FM pro file that happens to use a <col> element crashes. Make sure
to patch bidiiterator to have a null check for this bizarre case. Technically <col>
should never have been a table-column, since it's not in the HTML namespace, but
that fix will have to wait until we get @namespace support in CSS.
Reviewed by john
* ChangeLog:
* khtml/rendering/bidi.cpp
* khtml/rendering/render_table.cpp:
(RenderTableCol::canHaveChildren):
* khtml/rendering/render_table.h:
2003-08-05 Dave Hyatt <hyatt@apple.com>
Fix for 3370654. Make sure the max width computation for blocks with inline children actually
ignores non-pre text runs that consist entirely of whitespace.
Reviewed by mjs
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
* khtml/rendering/render_text.h:
2003-08-08 John Sullivan <sullivan@apple.com>
- fixed 3362481 -- REGRESSION (89-90): clicking in a field causes
page to move; esp. bad if the field moves out from under the mouse
Reviewed by Darin
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::currentEventIsMouseDownInWidget):
new method
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView becomeFirstResponder]):
only scroll to reveal if currentEventIsMouseDownInWidget is false
* kwq/KWQTextField.mm:
(-[KWQTextField setHasFocus:]):
ditto
=== WebCore-92.1 ===
2003-08-07 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fixed 3366234 -- repro crash in CSS parser: function that can't be parsed (www.bi-flugplatz-magdeburg.de)
* khtml/css/parser.y: Allocate a Function object for the "can't parse function" case, since
the other code involved cannot handle 0 for the function.
* khtml/css/parser.cpp: Regenerated.
=== Safari-92 ===
2003-08-07 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3367434>: newly-added KURL assertion failing reproducibly for JavaScript URL (www.thai.com)
The assertion is correct. The issue was in calling the function
with bad input. Non-hierarchical URLs should not have their "path"
elements submitted to a function that will replace dots.
The fix is to avoid calling this function with such non-hierarchical
URLs.
* kwq/KWQKURL.mm:
(KURL::parse)
2003-08-07 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
There was a bug in this code that caused a relative URL that was
being resolved against an empty base URL to process incorrectly.
The bug is that the resolution was being done twice. The first
time was correct handling of this case, but then the code did
not return at this point, and instead proceeded on through the
code path that is used to handle resolution of a relative URL
against a non-empty base. This double processing is clearly
wrong, and we found this bug as the result of the recent addition
of an assertion in some related code.
* kwq/KWQKURL.mm:
(KURL::KURL)
2003-08-06 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
* kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Remove check for old
versions of AppKit that let the WebKit posing handle key down events.
* kwq/KWQTextField.mm: Removed fieldEditorDidMouseDown: methods.
* WebCore.pbproj/project.pbxproj: Removed WebCoreFirstResponderChanges.h.
* kwq/WebCoreFirstResponderChanges.h: Removed.
2003-08-06 Richard Williamson <rjw@apple.com>
Fixed development build problem. WebCore.exp needed a newline at EOF.
* WebCore-combined.exp:
2003-08-06 Richard Williamson <rjw@apple.com>
Fixed 3348630. Pick up about 1% by moving implementation of _unicodeDirection to WebCore and inlining.
Reviewed by Ken.
* WebCore-combined.exp:
* WebCore.exp:
* WebCore.pbproj/project.pbxproj:
* kwq/KWQString.h:
* kwq/WebCoreUnicode.cpp:
* kwq/WebCoreUnicode.h:
2003-08-06 John Sullivan <sullivan@apple.com>
- fixed 3366587 -- Mail quits instantly (no crashlog) trying
to reply to a particular message
Reviewed by Richard
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
Return nil immediately if startNode is nil.
2003-08-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris Blumenberg.
- fixed 3366173 - crash in DOM::DomShared::ref loading www.berkheiser.net
* khtml/ecma/kjs_html.cpp:
(Image::putValue): Check for NULL before refing, because we set
onLoadListener with a function that returns NULL if passed a value
that's not a function.
2003-08-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin and Dave.
- fixed 3364433 - repro crash in khtml::RenderBlock::nodeAtPoint
* khtml/rendering/render_object.cpp:
(RenderObject::removeFromObjectLists): When finding the right
parent block to remove a float from, don't stop at floating or
positioned elements. They could well have floats in their
m_floatingObjects list due to overhang, and failing to remove them
leads to crashes.
2003-08-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
* kwq/KWQPainter.mm:
(QPainter::drawLine): Print a warning in debug builds when drawing
a dashed line. Also, revert accidental commenting of lines that
set the dash style.
2003-08-04 Dave Hyatt <hyatt@apple.com>
Fix for 3127909, copied text matched the document source instead of the
rendered HTML. This patch makes sure that the TextRuns are walked instead
of just blindly pulling the text out of the DOM node.
Reviewed by rjw
* khtml/khtml_part.cpp:
(KHTMLPart::selectedText):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
2003-08-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin and Dave.
- fixed 3363557 - REGRESSION (90-91): float:left element inside position:absolute element positioned wrong
* khtml/rendering/render_block.cpp:
(RenderBlock::calcInlineMinMaxWidth): Remove attempt to break line
after flaot that follows a non-float. Removing this code fixes the
regression and leaves pepboys and the meyerweb matrix theme
working properly. Also, I could not find any evidence in the CSS2
spec that what this code is trying to do is right.
2003-08-05 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3364251>: Modify KURL to call improved NSURL creation API
* kwq/KWQKURL.mm:
(KURL::getNSURL): Modify to use CFURLCreateAbsoluteURLWithBytes to create
the NSURL.
2003-08-05 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
In KWQKURL.mm, we copy the contents of a URL path from a source buffer
to a destination buffer. In the loop, we often access dst[-1]. It was
not entirely clear that this did not underrun the buffer. Upon further
inspection, it seems clear that it does not, but this small change
makes this more clear, and adds an assertion that all is well with
regard to indexing into the dst buffer.
* kwq/KWQKURL.mm:
(copyPathRemovingDots)
2003-08-01 Richard Williamson <rjw@apple.com>
Fixed 3095376. Implemented correct selection behavior for rtl scripts.
We still use our Arabic and Hebrew layout scheme.
Fixed 3360487. Implemented selection of ATSU rendered code.
Fixed 3360242. Return nil from _bodyBackgroundColor when no
background color specified. This was requested by Doug D.
Reviewed by Maciej.
* khtml/rendering/font.cpp:
(Font::drawHighlightForText):
* khtml/rendering/font.h:
* khtml/rendering/render_text.cpp:
(TextRun::paintSelection):
* kwq/KWQFontMetrics.mm:
(QFontMetrics::checkSelectionPoint):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::bodyBackgroundColor):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawHighlightForText):
* kwq/WebCoreTextRenderer.h:
2003-08-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3265419 - homepage preview doesn't show Images with names longer than 17 chars
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::recursive_toHTML):
2003-08-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3339255 - REGRESSION (73-85): javascript failure at gia.apple.com
I fixed this by making sure to cancel any pending redirects before
telling the bridge to load a URL. We don't want a race between
getting back a response and the redirect timer.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge provisionalLoadStarted]): New method - call equivalent part method.
We count on the other side of the bridge to call this once it knows a load will
really happen (not cancelled by policy, etc).
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::provisionalLoadStarted): cancel pending redirects.
=== Safari-91 ===
2003-07-31 Dave Hyatt <hyatt@apple.com>
Fix for 3347286, hang on pepboys.com. Text-indent had numerous bugs that
resulted in an infinite loop because some incorrect values were being compared.
This patch changes floats to ignore text-indent when positioning themselves
(as they should).
The maxwidth computation also didn't deal properly with text-indent, applying it
multiple times instead of once, and also only applying it for text and not for
inline replaced elements (images, form controls, etc.).
With these changes pepboys.com renders correctly. This patch also conveniently fixes
the last rendering error on meyerweb's Matrix stylesheet.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
2003-07-31 Richard Williamson <rjw@apple.com>
Fixed 3359152. SPI to get the background color for a frame.
Reviewed by hyatt.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::bodyBackgroundColor):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge bodyBackgroundColor]):
2003-07-31 Dave Hyatt <hyatt@apple.com>
Fix for "The Matrix" stylesheet on meyerweb.com and for 26(!) of the
layout tests. Basically when laying out a line, you have a beginning, and end,
and midpoints in between that tell you what whitespace to skip over. It was
possible to end up with the last midpoint being a start point that was past the
end of the line, and in that case, we would sometimes not strip off the trailing
space at the end of the line like we should.
This patch adds a simple function to check for this condition. It strips off the
out-of-bounds midpoint, and then shaves off the trailing space from the previous
midpoint if it's necessary to do so.
Also fix the way spaces are counted so that we don't add in spaces for text that
is not part of any bidi runs.
Reviewed by john
* khtml/rendering/bidi.cpp:
2003-07-30 Richard Williamson <rjw@apple.com>
Preparation for 3095376.
Reviewed by Maciej.
* WebCore-combined.exp:
* WebCore.exp:
* khtml/rendering/font.cpp:
(Font::checkSelectionPoint):
* khtml/rendering/font.h:
* khtml/rendering/render_text.cpp:
(TextRun::checkSelectionPoint):
* kwq/KWQFontMetrics.h:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::width):
(QFontMetrics::floatWidth):
(QFontMetrics::floatCharacterWidths):
(QFontMetrics::checkSelectionPoint):
* kwq/KWQPainter.mm:
(QPainter::drawText):
* kwq/WebCoreTextRenderer.h:
* kwq/WebCoreTextRendererFactory.m:
(WebCoreInitializeTextRun):
(WebCoreInitializeEmptyTextStyle):
2003-07-30 Dave Hyatt <hyatt@apple.com>
Fix for 3274144, floats in Help Viewer overlapped when they shouldn't have.
lineWidth was overflowing (and positionNewFloats was also sometimes not called
when it should have been).
Reviewed by darin
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
2003-07-30 Dave Hyatt <hyatt@apple.com>
Add support for setting the text-shadow's color. This uses a new CG API,
so updating to a fairly recent Panther is required.
Reviewed by rjw
* khtml/css/cssparser.cpp:
(CSSParser::parseShadow):
* kwq/KWQPainter.mm:
(QPainter::setShadow):
2003-07-30 John Sullivan <sullivan@apple.com>
- fixed 3346460 -- images > area (2048x2048) are compressed vertically
when displayed as src of img tag
Reviewed by Darin
* khtml/rendering/render_image.cpp:
(RenderImage::layout):
Just comment out the code that imposes a maximum image size (incorrectly);
maybe KDE folks want to make this work, but we don't need to try to
prevent large images.
2003-07-30 John Sullivan <sullivan@apple.com>
- WebCore part of fix for 3284525 -- AutoFill fills in
only e-mail address field of New Account form on Apple Store Japan
There were two problems: the regex library being used by
KWQRegExp.mm didn't handle unicode at all, and the way we
were using word boundaries in our regular expressions didn't
work with Japanese.
Reviewed by Darin
* kwq/KWQKHTMLPart.mm:
(regExpForLabels):
Redid the way word boundaries are used; the old way didn't
work with PCRE, and also didn't work with Japanese.
* kwq/KWQRegExp.h:
removed treatStartAsStartOfInput parameter to match() that Trey had added;
it was being used incorrectly and was not necessary.
* kwq/KWQRegExp.mm:
(compareStringOffsets), (createSortedOffsetsArray),
(convertCharacterOffsetsToUTF8ByteOffsets),
(convertUTF8ByteOffsetsToCharacterOffsets):
Code copied from JavaScriptCore/regexp.cpp to convert between
byte and character offsets. Darin preferred that I copy these
methods rather than make them public in JavaScriptCore/regexp.h.
(QRegExp::KWQRegExpPrivate::compile):
converted from regex.h style to pcre.h style
(QRegExp::KWQRegExpPrivate::~KWQRegExpPrivate):
ditto
(QRegExp::match):
ditto
(QRegExp::search):
removed parameter to match()
(QRegExp::searchRev):
ditto
* kwq/KWQString.mm:
(QString::replace):
removed parameter to match()
2003-07-30 Richard Williamson <rjw@apple.com>
Fixed 3349598. Deal gracefully with <li> items that
are not in a <ol> or <ul>, instead of crashing!
Reviewed by Ken.
* kwq/KWQKHTMLPart.mm:
(listParent):
(KWQKHTMLPart::attributedString):
2003-07-29 Richard Williamson <rjw@apple.com>
Use the new KURL getNSURL() method to create an NSURL.
Reviewed by darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
2003-07-29 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3311756 -- REGRESSION (76-77): radio buttons in different forms act as the same set
by rolling out old fix for 3158411 -- radio button groups are supposed to be per-form
The real bug at flyglobespan.com is what's fixed below.
* khtml/html/html_formimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::radioClicked):
(HTMLInputElementImpl::~HTMLInputElementImpl):
(HTMLInputElementImpl::setType):
(HTMLInputElementImpl::parseAttribute):
(HTMLInputElementImpl::attach):
(HTMLInputElementImpl::reset):
(HTMLInputElementImpl::setChecked):
(HTMLInputElementImpl::isEditable):
* khtml/xml/dom_docimpl.cpp:
* khtml/xml/dom_docimpl.h:
- fixed 3158411 -- re-opened form is one form in other browsers, multiple forms in Safari
(flyglobespan.com)
* khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Don't open a form if we encounter
a form element inside another form.
2003-07-29 John Sullivan <sullivan@apple.com>
- fixed 3346707 -- AutoFill does not fill in email address on
Apple Store new account page
Reviewed by Darin
* kwq/KWQRegExp.h:
* kwq/KWQRegExp.mm:
(QRegExp::searchRev):
This method (that Trey had added) used a placeholder 2nd parameter
that was always -1 and should have been ignored. But it was
being passed into QRegExp::match as the starting index, which
happened to work in many cases, but not if the byte of memory
before the string happened to be a null character. Fixed by
eliminating the placeholder parameter entirely.
2003-07-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3343050 - nil-deref in saveInterpreterBuiltins running Sherlock via MallocDebug in Panther7B20
- fixed 3343942 - Safari crashes when clicking on link w/ JavaScript turned off
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::saveInterpreterBuiltins): Don't attempt to save
when JavaScript is off.
(KWQKHTMLPart::restoreInterpreterBuiltins): Don't attempt to restore
when JavaScript is off.
(KWQKHTMLPart::saveWindowProperties): Remove ERROR, since that
case is normal when JS is off.
(KWQKHTMLPart::saveLocationProperties): Remove ERROR, since that
case is normal when JS is off.
(KWQKHTMLPart::restoreWindowProperties): Remove ERROR, since that
case is normal when JS is off.
(KWQKHTMLPart::restoreLocationProperties): Remove ERROR, since that
case is normal when JS is off.
2003-07-28 Dave Hyatt <hyatt@apple.com>
Fix build bustage on my buggy panther compiler.
Reviewed by darin
* kwq/KWQLineEdit.mm:
(QLineEdit::~QLineEdit):
2003-07-28 Dave Hyatt <hyatt@apple.com>
Fix for 3343250, XML didn't know how to make implicit tbodies when starting new elements,
nor did it know to skip implicit elements when popping its element stack.
Reviewed by darin
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::startElement):
(XMLHandler::endElement):
2003-07-25 Dave Hyatt <hyatt@apple.com>
Rename box and inline-box to -khtml-box and -khtml-inline-box.
Reviewed by john
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
2003-07-25 Dave Hyatt <hyatt@apple.com>
Fix for 3343529, inline blocks crashing Safari. There were lots of problems with
inlne-blocks. This code gets basic inline-blocks working properly (with no crashes).
Several functions have been patched to take an isRootLineBox parameter. This is used
to tell whether you're supposed to examine the root line box for a block or the block
itself. In the case of baselinePosition and lineHeight, it indicates whether the caller
wants to measure the outside or inside of the box.
The outside of an inline-block is like a replaced element (e.g., an image), but the
inside is like a block, e.g., you want measurements for
the line height and baseline position of a root line box for that block.
Similarly, createInlineBox has been patched in order to know whether you're making a
root inline box *inside* the inline-block or an inline box that *encompasses* the
inline-block element (like you'd do for an image).
A number of places had isInline() calls and needed to be patched to also check
isInlineBlockOrInlineTable(). How to treat the inline-block again basically depends
on whether the caller is looking at the outside of the block (in which case you're like
an inline replaced element) or the inside of the block (in which case you're just like
a block).
Reviewed by darin
* ChangeLog:
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
(RenderBox::calcHeight):
* khtml/rendering/render_flow.cpp:
(RenderFlow::createInlineBox):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_form.cpp:
(RenderFormElement::baselinePosition):
(RenderButton::baselinePosition):
(RenderSubmitButton::baselinePosition):
(RenderSelect::baselinePosition):
* khtml/rendering/render_form.h:
* khtml/rendering/render_line.cpp:
(InlineFlowBox::verticallyAlignBoxes):
(InlineFlowBox::computeLogicalBoxHeights):
* khtml/rendering/render_list.cpp:
(RenderListMarker::lineHeight):
(RenderListMarker::baselinePosition):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::sizesToMaxWidth):
(RenderObject::getVerticalPosition):
(RenderObject::lineHeight):
(RenderObject::baselinePosition):
(RenderObject::createInlineBox):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::lineHeight):
(RenderReplaced::baselinePosition):
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_table.cpp:
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::lineHeight):
(RenderText::baselinePosition):
(RenderText::createInlineBox):
* khtml/rendering/render_text.h:
2003-07-25 Dave Hyatt <hyatt@apple.com>
Fix for 3343527, crash when attempting to access rules in the CSS OM.
Our KWQListImpl doesn't null check accesses, so anything out
of bounds would cause a crash.
Reviewed by mjs
* kwq/KWQListImpl.mm:
(KWQListImpl::at):
2003-07-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3332460 - nil-deref in khtml::RenderWidget::eventFilter with onchange handler
* khtml/rendering/render_form.cpp:
(RenderTextArea::handleFocusOut): Check if we still have an
element. It could have gone away while handling an event that
replaced some or all of the document, and if we're gonna be
destroyed soon then there's no point doing this work anyway.
2003-07-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3332460 - nil-deref in khtml::RenderWidget::eventFilter with onchange handler
* khtml/rendering/render_replaced.cpp:
(RenderWidget::eventFilter): We want to ref element() across this call, but it could get
unset, so store it in a local variable.
* kwq/KWQLineEdit.h:
* kwq/KWQLineEdit.mm:
(QLineEdit::~QLineEdit): invalidate our KWQTextField.
* kwq/KWQTextField.h:
* kwq/KWQTextField.mm:
(-[KWQTextField invalidate]): Set widget to NULL.
(-[KWQTextField action:]): Do nothing if widget is NULL.
(-[KWQTextField controlTextDidBeginEditing:]): Likewise.
(-[KWQTextField controlTextDidEndEditing:]): Likewise.
(-[KWQTextField controlTextDidChange:]): Likewise.
(-[KWQTextField control:textShouldBeginEditing:]): Likewise.
(-[KWQTextField control:textShouldEndEditing:]): Likewise.
(-[KWQTextField control:didFailToFormatString:errorDescription:]): Likewise.
(-[KWQTextField control:didFailToValidatePartialString:errorDescription:]): Likewise.
(-[KWQTextField control:isValidObject:]): Likewise.
(-[KWQTextField control:textView:doCommandBySelector:]): Likewise.
(-[KWQTextField stringValue]): Likewise.
(-[KWQTextField setStringValue:]): Likewise.
(-[KWQTextField setFont:]): Likewise.
(-[KWQTextField nextKeyView]): Likewise.
(-[KWQTextField previousKeyView]): Likewise.
(-[KWQTextField nextValidKeyView]): Likewise.
(-[KWQTextField previousValidKeyView]): Likewise.
(-[KWQTextField fieldEditorDidMouseDown:]): Likewise.
(-[KWQTextField textView:shouldHandleEvent:]): Likewise.
(-[KWQTextField textView:didHandleEvent:]): Likewise.
(-[KWQTextField setHasFocus:]): Likewise.
2003-07-24 John Sullivan <sullivan@apple.com>
- fixed 3332622 -- Safari Abbreviates Attribute Names in EMBED tags
Reviewed by Richard
* khtml/html/htmltokenizer.h:
bumped fixed max length of attributes from 14 to 1024.
Theoretically they could be any arbitrary length, but it's
more risk than it's worth to rewrite the code that uses the
fixed-size buffer that is based on this value.
2003-07-24 Dave Hyatt <hyatt@apple.com>
Change all uses of "konq-" in CSS to "khtml-".
Also rename the CSS3 properties that have either buggy or
incomplete implementations to "-khtml-property" for forward
compatibility (so that people don't have to worry about a buggy
Safari if/when they use the official property names).
Reviewed by john
* khtml/css/cssparser.cpp:
(CSSParser::parseRule):
(CSSParser::parseValue):
(CSSParser::parseDeclaration):
(CSSParser::parseFontFamily):
(CSSParser::parseShadow):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/css/parser.cpp:
* khtml/css/parser.h:
* khtml/css/parser.y:
* khtml/css/quirks.css:
* khtml/css/tokenizer.cpp:
* khtml/css/tokenizer.flex:
* khtml/html/html_blockimpl.cpp:
(HTMLDivElementImpl::parseAttribute):
(HTMLParagraphElementImpl::parseAttribute):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::addHTMLAlignment):
* khtml/html/html_inlineimpl.cpp:
(HTMLFontElementImpl::parseAttribute):
* khtml/html/html_tableimpl.cpp:
(HTMLTablePartElementImpl::parseAttribute):
(HTMLTableCellElementImpl::parseAttribute):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::calcHorizontalMargins):
* khtml/rendering/render_flexbox.cpp:
* khtml/rendering/render_style.h:
* khtml/rendering/render_table.cpp:
(RenderTableCell::setStyle):
=== Safari-90 ===
2003-07-23 Dave Hyatt <hyatt@apple.com>
Fix opacity to respect clipping.
Reviewed by rjw
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
2003-07-23 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 2/3 of 3279864 -- remove class_poseAs calls from WebKit (will also remove init routine)
* kwq/KWQTextArea.h: Add drawing state variable so we can tell the difference
between calls to draw the insertion point inside and calls to draw outside the
redraw machinery.
* kwq/KWQTextArea.mm:
(-[KWQTextArea displayRectIgnoringOpacity:]): Added. Set drawing flag while in here.
This is the method used by KWQWidget to draw.
(-[KWQTextArea textView:shouldDrawInsertionPointInRect:color:turnedOn:]): Added.
Calls setNeedsDisplay (the NSView version, not the NSTextView override) instead
of immediately drawing when asked to draw outside the normal redraw machinery.
(-[KWQTextAreaTextView keyDown:]): Call interceptKeyEvent before handling each
key down event.
* kwq/KWQTextField.h: Add drawing state variable so we can tell the difference
between calls to draw the insertion point inside and calls to draw outside the
redraw machinery.
* kwq/KWQTextField.mm:
(-[KWQTextField displayRectIgnoringOpacity:]): Added. Set drawing flag while in here.
This is the method used by KWQWidget to draw.
(-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]): Added.
Calls setNeedsDisplay (the NSView version, not the NSTextView override) instead
of immediately drawing when asked to draw outside the normal redraw machinery.
(-[KWQTextField textView:shouldHandleEvent:]): Call interceptKeyEvent before
handling each key down event.
(-[KWQTextField textView:didHandleEvent:]): Call fieldEditorDidMouseDown: after
handling each mouse down event.
* kwq/KWQWidget.mm: (QWidget::paint): Add comment about dependency on
displayRectIgnoringOpacity: use in KWQTextArea and KWQTextField.
* kwq/WebCoreFirstResponderChanges.h: Added a comment about obsolescence.
- Xcode wanted to change this, because it now knows JavaScriptCore is a framework
* WebCore.pbproj/project.pbxproj: Munged by Xcode.
2003-07-23 Dave Hyatt <hyatt@apple.com>
Fix for 3340885, invalid colors were being mapped to transparentColor,
thus causing invisible text!
Reviewed by kocienda
* khtml/css/cssparser.cpp:
(CSSParser::parseColorFromValue):
2003-07-23 Richard Williamson <rjw@apple.com>
Fixed for 3259840. Use ATSU for scripts we don't handle internally,
i.e.: Syriac, Thaana, Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala, Thai, Lao, Tibetan, Myanmar, Hangul Jamo, Khmer, Mongolian
Also fixed issues with our rendering of Arabic.
Changed the internal API to take WebCoreTextRun and WebCoreTextStyle
parameters instead of scads on individual parameters. Much cleaner.
Reviewed by Maciej.
* WebCore-combined.exp:
* WebCore.exp:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::width):
(QFontMetrics::floatWidth):
(QFontMetrics::floatCharacterWidths):
* kwq/KWQPainter.mm:
(QPainter::drawText):
* kwq/WebCoreTextRenderer.h:
* kwq/WebCoreTextRendererFactory.m:
(WebCoreMakeTextRun):
(WebCoreMakeEmptyTextStyle):
2003-07-23 Dave Hyatt <hyatt@apple.com>
Clean up the mess left by a couple of previous checkins. I had
patched computeLength and computeLengthFloat to take a CSSStyleSelector,
but then I came up with a simpler solution that didn't require that
the selector be passed in as an argument. I forgot, however, to revert
the functions back to their original forms. This patch does that.
Reviewed by john
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::computeLength):
(CSSPrimitiveValueImpl::computeLengthFloat):
* khtml/css/css_valueimpl.h:
* khtml/css/cssstyleselector.cpp:
2003-07-23 Dave Hyatt <hyatt@apple.com>
Temporary hack to ensure that the layout tests will not all
be failures if/when the layout tests regression gets fixed.
Will remove once we can run the tests.
Reviewed by ken
* khtml/rendering/render_block.cpp:
2003-07-22 Dave Hyatt <hyatt@apple.com>
Allow HTML and BODY to be any display type. This patch primarily eliminates the
RenderBody class and makes the code that deals with background propagation smart
enough to locate the correct renderers for the HTML and BODY elements (by crossing
back into the DOM tree).
Reviewed by darin
* ForwardingHeaders/rendering/render_body.h: Removed.
* WebCore.pbproj/project.pbxproj:
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::insertedIntoDocument):
* khtml/html/html_baseimpl.h:
* khtml/rendering/render_body.cpp: Removed.
* khtml/rendering/render_body.h: Removed.
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::paintRootBoxDecorations):
(RenderBox::paintBoxDecorations):
(RenderBox::repaint):
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::isBody):
* khtml/rendering/render_object.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::createRenderer):
2003-07-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3108604 -- add Shift JIS X0213 and HK-SCS to the Text Encoding menu
* kwq/mac-encodings.txt: Added "Shift_JIS_X0213-2000". Changed all non-HKSCS
Big5 encodings to use the DOS variant of Big5 as requested by Peter Edberg,
but left Big5-HKSCS alone.
* kwq/KWQCharsets.mm: Added kCFStringEncodingBig5_DOSVariant constant.
* kwq/KWQCharsetData.c: Regenerated.
- fixed 3100151 -- subframes without explicit charset settings should inherit from parent, not use default
* khtml/khtml_part.cpp: (KHTMLPart::write): Get the default encoding from the parent
part, if there is one.
2003-07-22 Dave Hyatt <hyatt@apple.com>
Fix for 3293898, list bullets in ordered lists with an inside list
position were rendering as though they had a width of 0. This was
a bug in KWQFontMetrics, which needed to handle the case where a
length of -1 was passed in to the width method (in which case
you should use the length of the whole string).
Reviewed by john
* kwq/KWQFontMetrics.mm:
(QFontMetrics::width):
2003-07-22 Dave Hyatt <hyatt@apple.com>
Fix for mozilla.org front page. This patch re-architects
align="left" and align="right" (for rtl and ltr directionality
respectively). The attributes are mapped to custom text-align
values, konq-left and konq-right, just as was done with the
center/middle attributes for alignment.
A number of "hack" style rules have been dropped from html4.css
and replaced with this C++ code that now works in the general
case for any children of align="left/right" divs and tds.
In addition, absmiddle support has been added for <td>s.
For RTL blocks, there is also a regression fix (this was probably
the #1 culprit for mangled placement of blocks in Hebrew Web
pages). The old code was doing byzantine math that happened to
work out. When I tried to simplify it before 1.0, I missed a spot
and basically broke margin handling on RTL blocks completely.
Reviewed by mjs
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/html/html_blockimpl.cpp:
(HTMLDivElementImpl::parseAttribute):
(HTMLParagraphElementImpl::parseAttribute):
* khtml/html/html_tableimpl.cpp:
(HTMLTablePartElementImpl::parseAttribute):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::calcHorizontalMargins):
* khtml/rendering/render_style.h:
2003-07-21 Dave Hyatt <hyatt@apple.com>
Fix for 3333557, crash on www.dremedia.com. markDescendants in RenderBlock
was not passing in its argument in the recursive step, so the float wasn't
getting properly cleared out of everyone's lists.
Reviewed by darin
* khtml/rendering/render_block.cpp:
2003-07-21 Dave Hyatt <hyatt@apple.com>
Fix for 3182596, percentage height tables with cells that specify
tiny percentage heights used that height even if it was smaller
than the cell's minimum required height.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
2003-07-21 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3316867 -- tabbing to textarea below visible part of page doesn't scroll down
* kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): Added call to
_KWQ_scrollFrameToVisible to match the one in KWQTextField.
2003-07-21 Dave Hyatt <hyatt@apple.com>
Fix removeAttributeNode. This is David Faure's patch.
Reviewed by me
* khtml/xml/dom_elementimpl.cpp:
(NamedAttrMapImpl::removeAttribute):
2003-07-21 Dave Hyatt <hyatt@apple.com>
Checking in David Faure's patch that fixes getElementsByTagName(*).
Reviewed by me
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::getElementsByTagNameNS):
(TagNodeListImpl::nodeMatches):
2003-07-18 Dave Hyatt <hyatt@apple.com>
Enable domain() and setDomain() to work for all documents (XML
as well as HTML).
Implement onload for frames.
Reviewed by mjs
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript):
(WindowFunc::tryCall):
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::parseAttribute):
(HTMLIFrameElementImpl::parseAttribute):
* khtml/html/html_documentimpl.cpp:
* khtml/html/html_documentimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::checkEmitLoadEvent):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::domain):
(DocumentImpl::setDomain):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchWindowEvent):
2003-07-18 Dave Hyatt <hyatt@apple.com>
Fix for 3334082, XML documents can access HTML/XML docs in other
domains. The basic bug is that we made a change right before
1.0 to allow a parent document to access a child frame's document
if the child frame had no document. What we didn't notice was
that the ptr was obtained from the part by asking for an HTML
document. For XML documents that failed the cast, we got back
null as well, which means that for non-HTML XML documents we
always return true from isSafeScript.
This patch makes sure our addition uses the raw xmlDoc pointer,
so that there are no mistakes, and it restores the code that
denies access when you aren't an HTML document.
(It is a separate bug that we just disallow cross-frame
communication in XML documents right now that I'll file as
a follow-up to this one.)
Reviewed by darin, rjw, mjs
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript):
2003-07-15 Dave Hyatt <hyatt@apple.com>
Fix for 3300362, crash on myuhc.com. The residual style code
was messing up and inserting nodes in the wrong place (and also
updating the current member variable when it wasn't supposed to).
Fix for 3331793, nil deref because (astoundingly) someone was
using text-shadow and exposed a bug with the color handling
of the shadow.
Reviewed by darin
* khtml/html/htmlparser.cpp:
* khtml/html/htmlparser.h
(KHTMLParser::reopenResidualStyleTags):
(KHTMLParser::popBlock):
2003-07-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3283076 - crash when doing 2nd query on the eBay channel (Sherlock) -- JavaScript locking issue?
I added a bit of minimal extra locking to WebCore to make sure
multithreaded apps that use WebKit on the main thread but do
JavaScript on other threads as well continue to work nicely.
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::initScript): Lock interpreter around possible allocations or collections.
* khtml/ecma/kjs_window.cpp:
(Window::clear): Lock interpreter around possible allocations or collections.
2003-07-17 Ken Kocienda <kocienda@apple.com>
Reviewed by John
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart): Now uses NSURL instead of NSString
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto
(KWQKHTMLPart::userAgent): Ditto
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::setIconURL): Ditto
(KHTMLPartBrowserExtension::setTypedIconURL): Ditto
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet): Ditto
* kwq/KWQLoader.mm:
(KWQServeRequest): Ditto
(KWQCheckCacheObjectStatus): Ditto
* kwq/WebCoreBridge.h: Changed quite a number of methods to use NSURL
instead of NSString
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge didNotOpenURL:]): Now uses NSURL instead of NSString
(-[WebCoreBridge scrollToAnchorWithURL:]): Ditto
(-[WebCoreBridge URL]): Ditto
2003-07-17 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
* kwq/KWQKHTMLPart.h: _submittedFormURL is now a KURL, not a QString
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Now uses NSURL in API instead of NSString
(KWQKHTMLPart::openURLRequest): Ditto
(KWQKHTMLPart::didNotOpenURL): Ditto
(KWQKHTMLPart::submitForm): Ditto. Plus update _submittedFormURL usages.
(KWQKHTMLPart::urlSelected): Ditto
(KWQKHTMLPart::setView): Ditto
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Now uses NSURL in API instead of NSString
* kwq/KWQKURL.h: Added constructor that takes an NSURL
* kwq/KWQKURL.mm:
(KURL::KURL): Ditto.
* kwq/WebCoreBridge.h: Updated bridge APIs to use NSURL instead of NSString
in several places.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Ditto
2003-07-16 Darin Adler <darin@apple.com>
Reviewed by John.
- cure problem where we keep competing to check in config.h with/without HAVE_FOUNDATION_SOURCSE
* Makefile.am: Remove the HAVE_FOUNDATION_SOURCES line.
* config.h: Check in without that line.
2003-07-16 Vicki Murley <vicki@apple.com>
Reviewed by kocienda.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString): set linkStartLocation to zero to fix deployment build
2003-07-15 Ken Kocienda <kocienda@apple.com>
Reviewed by Richard
* kwq/KWQKURL.h:
* kwq/KWQKURL.mm:
(StringHasCaseInsensitivePrefix): Helper method for the new functions below
(StringByAddingPercentEscapes): Ditto
(URLStringByAddingPercentEscapes): Ditto
(KURL::getNSURL): Added convenience function to get an NSURL from a KURL
(KURL::getNSData): Added convenience function to get an NSData from a KURL
2003-07-15 Richard Williamson <rjw@apple.com>
Fixed 3315951: Add support for <OL>, <UL> in attributed string conversion.
Fixed 3315952: Add support for <IMG> in attributed string conversion.
Fixed 3315953: Added support for <A> in attributed string conversion.
Reviewed by John (and earlier by Darin).
* khtml/rendering/render_list.h:
* kwq/KWQKHTMLPart.mm:
(fileWrapperForElement):
(listParent):
(inList):
(KWQKHTMLPart::attributedString):
2003-07-14 Dave Hyatt <hyatt@apple.com>
Fix a problem where ems used for non-font values like width
and line-height would not zoom. (r=darin)
The rest is r=rjw.
An implementation of the CSS2 text-shadow property.
It uses a CoreGraphics API for drawing shadows
(via a custom API on QPainter) to paint the shadows.
At the moment there are two limitations in CG's API. The first
is that the shadow color cannot be set. This will be fixed for
Panther, and the code passes the color through in preparation
for this fix.
The second limitation is that CG only supports one shadow effect
and not multiple shadow effects. The parsing code on the CSS
side is set up to go ahead and parse all of the shadow effects,
but the code that makes use of shadows will simply look at the
first one for now. CG will not support multiple shadow effects
in the Panther time frame, so it will be a while before this
is revisited.
This patch also fixes a slew of bugs with colors in KHTML. When
we took the CSS parser and all of its associated code from Lars,
that code was using QRgb values that assumed RGBA (like the current
Qt toolkit uses). The code even made use of an "invalid color"
that wasn't really invalid (kind of like the z-index hack we refused
to take, i.e., unlikely but not invalid).
Our KWQColor implementation has been rewritten in this patch to
work the way the current Qt toolkit expects. That is, the top
eight bits actually do contain an alpha channel, and you can obtain
the alpha component using the qAlpha method and build a quadruple
using the qRgba method.
This patch adds support for rgba quadruples to CSS, so you can now
say, e.g.,color: rgba(255,0,0,0.5); in CSS.
* khtml/css/css_valueimpl.cpp:
(ShadowValueImpl::~ShadowValueImpl):
* khtml/css/css_valueimpl.h:
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
(parseColor):
(CSSParser::parseColor):
(CSSParser::parseColorFromValue):
(CSSParser::parseShadow):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/misc/helper.h:
* khtml/rendering/render_line.cpp:
(InlineFlowBox::paintDecorations):
* khtml/rendering/render_style.cpp:
(StyleVisualData::StyleVisualData):
(opacity):
(flexibleBox):
(StyleCSS3NonInheritedData::operator==):
(textShadow):
(StyleCSS3InheritedData):
(StyleCSS3InheritedData::operator==):
(StyleCSS3InheritedData::shadowDataEquivalent):
(RenderStyle::RenderStyle):
(RenderStyle::inheritFrom):
(RenderStyle::operator==):
(RenderStyle::inheritedNotEqual):
(RenderStyle::diff):
(ContentData::clearContent):
(RenderStyle::setTextShadow):
(ShadowData::operator==):
* khtml/rendering/render_style.h:
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::diff):
* kwq/KWQColor.h:
* kwq/KWQColor.mm:
(qRgb):
(qRgba):
(qAlpha):
(QColor::QColor):
(QColor::setNamedColor):
(QColor::getNSColor):
* kwq/KWQNamespace.h:
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawRect):
(QPainter::drawLine):
(QPainter::_fillRect):
(QPainter::fillRect):
(QPainter::setShadow):
(QPainter::clearShadow):
2003-07-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3244447 -- add KOI8-U charset support
- fixed 3327152 -- unicodeFFFE and unicodeFEFF are handled backwards by WebCore
- fixed 3327157 -- x-mac-ukrainian should be mapped to MacCyrillic
- fixed 3327160 -- shift-jis, shift_jis, x-sjis should be mapped to the DOS variant of Shift JIS
- fixed 3327162 -- most Simplified Chinese encoding choices should be mapped to the DOS variant of EUC-CN
- fixed 3327166 -- use DOS variant of EUC_KR
* kwq/KWQCharsets.mm: Added some defines so we could use encodings that don't
have any kCFStringEncoding constant in a header file.
* kwq/mac-encodings.txt: Change table entries in accordance with the above bug reports.
* kwq/KWQCharsetData.c: Regenerated.
- other changes, inspired by investigation of various bugs
* kwq/KWQButton.mm: (-[KWQButton sendConsumedMouseUpIfNeeded]): Make robust against cases where
sending the consumed mouse up event destroys the QButton.
* khtml/html/htmlparser.cpp:
(KHTMLParser::reopenResidualStyleTags): Rearrange code slightly for clarity, added comment.
(KHTMLParser::freeBlock): Removed unnecessary line of code.
2003-07-14 Dave Hyatt <hyatt@apple.com>
Fix for 3294626, no scrollbar on ESPN. Fix lowestPosition to
always crawl into all children.
Reviewed by darin
* khtml/rendering/render_flow.cpp:
(RenderFlow::lowestPosition):
(RenderFlow::rightmostPosition):
2003-07-11 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3132021 -- certain Japanese characters are misrendered because of incorrect partial-character handling
We didn't have code to handle kTECPartialCharErr.
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::createTECConverter): Added. Broken out from convertUsingTEC.
(KWQTextDecoder::appendOmittingBOMs): Added. Broken out from convertUsingTEC.
(KWQTextDecoder::convertOneChunkUsingTEC): Added. Broken out from convertUsingTEC.
This also has much of the partially-decoded character handling.
(KWQTextDecoder::convertUsingTEC): Simplified by breaking into functions, and added
handling to use the same buffer we use for the other decoders to hold partially-decoded
characters.
(KWQTextDecoder::convert): Add a partial-character handling test mode where the decoder
is passed only a single byte at a time; controlled by an #if.
2003-07-11 Dave Hyatt <hyatt@apple.com>
Fix for 3187101, before/after content not dynamic. This patch
compares the ContentData of the old style and the new style and
if they are different, it blows away and recreates the render
objects for the generated content. Otherwise it will dynamically
update the styles of the generated content render objects (which
should fix the printer/screen bug for rjw).
Note that createObject had an extra call to setStyle, which was
causing most objects to set the same style context on themselves
twice. This was exposed as I was fixing the above problem.
Reviewed by darin
* ChangeLog:
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
* khtml/rendering/render_style.cpp:
(RenderStyle::contentDataEquivalent):
* khtml/rendering/render_style.h:
2003-07-11 Dave Hyatt <hyatt@apple.com>
Fix pseudostyles to inherit from the element's style that they are
specified for. This is incorrect both for ::first-line and
::first-letter, but it is at least right for ::before and ::after.
Fix iframes and objects and embeds so that they will render borders
when borders are specified (as well as background images).
Patch iframes so that they correctly let the parent document's
background show through when the Web page inside the iframe has
no specified background. Also patched iframes to understand not
to blit in this case and to not blit when opacity has been specified
on the iframe.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
* khtml/khtmlview.h:
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations):
* khtml/rendering/render_canvas.cpp:
* khtml/rendering/render_form.cpp:
(RenderFormElement::setStyle):
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::calcMinMaxWidth):
(RenderWidget::setStyle):
(RenderWidget::paintObject):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::paint):
2003-07-11 Darin Adler <darin@apple.com>
Reviewed by Ken.
- roll in change from KHTML to remove user and password from referrer
* khtml/khtml_part.cpp: (KHTMLPart::begin): Call setUser(""), setPass(""),
and setRef(""), then also set the referrer to "" if the protocol does not
start with http.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge referrer]): Remove check to exclude
file URL referrers because KHTMLPart now excludes all non-http referrers.
* kwq/KWQKURL.h: Add setUser and setPass functions. Also sort by order within
the URL so it's clear no methods are omitted.
* kwq/KWQKURL.mm:
(KURL::setUser): Added. Adds or removes the username, adding or removing
delimiters as needed. For now only the remove part is compiled in.
(KURL::setPass): Added. Adds or removes a password, adding or removing
delimiters as needed. For now only the remove part is compiled in.
* kwq/KWQString.h: Add QSTRING_NULL macro to allow us to work around the fact
that there is no global QString::null object in KWQ without having to do a
relatively ineffecient conversion from a non-constant char * of 0 each time.
We can use this anywhere QString::null appears and perhaps get some small code
savings or performance boost.
- small cleanup
* kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Remove unneeded checks that
repeat optimizations I already put in QString.
2003-07-11 Darin Adler <darin@apple.com>
Reviewed by Dave.
- added a function Dave needs for various work he's doing that goes
from a document to the corresponding element in the parent document
* khtml/xml/dom_docimpl.h: Add ownerElement member function.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::ownerElement):
Added. Gets to the parent part and finds the right element.
2003-07-11 Dave Hyatt <hyatt@apple.com>
An initial implementation of the CSS opacity property. Seems
to work perfectly except for native widgetry (NSViews). Images,
text, borders, and underlines are all properly blended.
Reviewed by rjw
* config.h:
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::adjustZIndex):
* khtml/rendering/render_box.h:
* khtml/rendering/render_inline.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::transparentAncestor):
(RenderLayer::isTransparent):
(commonTransparentAncestor):
(RenderLayer::updateTransparentState):
(RenderLayer::beginTransparencyLayers):
(RenderLayer::endTransparencyLayers):
(RenderLayer::paint):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(StyleVisualData::StyleVisualData):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::beginTransparencyLayer):
(QPainter::endTransparencyLayer):
2003-07-11 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3305391 -- repro crash in QPixmap::QPixmap after click in SVG using Adobe SVG plugin
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Remove code that tried to determine
if something is an image by looking at the node type. Instead look at the object in the render
tree and ask it if it's an image. Also use logic that exactly matches what RenderImage uses.
* kwq/KWQDOMNode.h: Remove unused isImage function.
* kwq/KWQDOMNode.cpp: Ditto.
2003-07-11 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3300220 -- repro crash in closeURL when choosing from popup menus on www.drivewire.com
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchGenericEvent): Removed unused local variable. Since we update all documents,
there was no longer any need to keep that pointer around, but we still had this obsolete code.
This had nothing to do with the bug, just a related cleanup.
(NodeImpl::dispatchWindowEvent): Add check for nil. We ref the document pointer, but we don't
ref the document itself. So we do need to check for the case where the document went away.
2003-07-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3217731 -- after going back to a page, forms are submitted with the wrong encoding (back/forward cache)
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Put decoder from document into the part.
=== Safari-89 ===
2003-07-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
- fixed a bug with saving and restoring location object properties
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::saveLocationProperties): Save the location object's properties, not
the window's (!)
(KWQKHTMLPart::saveInterpreterBuiltins): New function to save builtin properties of
the interpeter.
(KWQKHTMLPart::restoreInterpreterBuiltins): Similarly to restore them.
(KWQKHTMLPart::openURLFromPageCache): Restore interpreter builtins too.
* kwq/KWQPageState.h:
* kwq/KWQPageState.mm:
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): Handle interpreter builtins.
(-[KWQPageState invalidate]): Likewise.
(-[KWQPageState dealloc]): Likewise.
(-[KWQPageState interpreterBuiltins]): New method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge saveDocumentToPageCache]): Handle interpeter builtins.
2003-07-10 Darin Adler <darin@apple.com>
Reviewed by Chris.
* config.h: Check in newly generated version which has changed due to changes
in configure.in.
2003-07-10 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3317693 -- REGRESSION: many web pages are rendering with wrong layout (columns in HelpViewer, etc.)
This is a workaround for the code generation bug in gcc that causes this problem with
gcc 3.3 in optimized builds. We can remove it once both we and B&I are using a newer
gcc with the fix. The bug number for the gcc problem is 3321716.
* khtml/rendering/render_box.cpp:
(workAroundBug3321716): Added. A function that does nothing and takes an integer parameter.
(RenderBox::setStyle): Add a couple of calls to workAroundBug3321716 in the right places.
2003-07-09 Richard Williamson <rjw@apple.com>
Fixed 3141257. Animate multiple copies of the same
image on the same page.
Reviewed by hyatt.
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
* kwq/KWQPixmap.mm:
(QPixmap::operator=):
* kwq/WebCoreImageRenderer.h:
2003-07-08 Darin Adler <darin@apple.com>
Reviewed by John.
- removed Jaguar-specific code
* kwq/KWQComboBox.mm: Remove fudge factor used to move text down and work
around problem where pop-up menu text draws too high, bug 3030474.
* kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Remove hack used
to work around the lack of TECSetBasicOptions in Jaguar, bug 3201405.
* config.h: The people with Foundation source trees slug it out with the people
without Foundation trees, as one line of this file changes back and forth.
2003-07-08 Dave Hyatt <hyatt@apple.com>
Make sure that the contents width and height of the view are
used as the root height and width when a view exists. This
ensures that the root element background properly tiles over
the entire height of the document. (This used to be ensured
by growing the height of the <html> element, but that violates
the CSS2 spec.)
This fixes bugs 3317809, 3299789, and 3318066.
Reviewed by john
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations):
2003-07-08 Chris Blumenberg <cblu@apple.com>
* WebCore.pbproj/project.pbxproj: Xcode-ified
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag): fulfilled promise to Darin that I would add a comment about using tolower() instead of | 0x20
2003-07-08 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3272398>: Safari strips/modifies underscores in EMBED tags
Reviewed by darin.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag): use tolower() to lowercase a char, don't use | 0x20 because that will cause chars like '_' to turn into junk
2003-07-08 Dave Hyatt <hyatt@apple.com>
Implementation of inline-block and a prototype of the XUL
box model.
Fix for min-font size issues that prevented us from having
a min font size. The primary fix is to store the original
specified CSS size as a separate value (distinct from the
computed rendering size). This allows that size to be computed
without the application of integer rounding or zoom factors
or minimum font size corrections.
Fix for table crasher, bug #3296552.
Reviewed by john (table crasher, inline-block, XUL box model) and
darin (font size fixes).
* WebCore.pbproj/project.pbxproj:
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::computeLength):
(CSSPrimitiveValueImpl::computeLengthFloat):
* khtml/css/css_valueimpl.h:
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/khtml_part.cpp:
(KHTMLPart::setZoomFactor):
* khtml/khtmlview.cpp:
(KHTMLView::print):
* khtml/rendering/bidi.cpp:
* khtml/rendering/font.cpp:
(Font::update):
* khtml/rendering/font.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::contentHeight):
(RenderBox::containingBlockWidth):
(RenderBox::calcWidth):
(RenderBox::calcHeight):
* khtml/rendering/render_container.cpp:
(RenderContainer::addChild):
* khtml/rendering/render_flexbox.cpp: Added.
* khtml/rendering/render_flexbox.h: Added.
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
(RenderObject::sizesToMaxWidth):
(RenderObject::handleDynamicFloatPositionChange):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
* khtml/rendering/render_style.cpp:
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(StyleFlexibleBoxData::operator==):
(RenderStyle::RenderStyle):
(RenderStyle::operator==):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::calcWidthArray):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
(DocumentImpl::attach):
2003-07-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public
* WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.
=== Safari-88 ===
2003-07-03 John Sullivan <sullivan@apple.com>
- fixed 3167770 -- visited and unvisited link colors are too
close in default stylesheet
- fixed 3315344 -- default active link color should be red as
in other browsers
Reviewed by Hyatt
* khtml/css/html4.css:
Changed a:link and a:visited colors to match Mozilla
(a slightly lighter blue for link, and a purpley shade instead
of navy for visited). Also changed a:link:active and
a:visited:active to be red instead of black.
2003-07-03 Darin Adler <darin@apple.com>
Reviewed by Ken.
* khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::parseAttribute):
Remove livepage.apple.com hack since the site has been changed.
2003-07-02 Darin Adler <darin@apple.com>
Rolled out accidentally-checked-in changes.
* kwq/KWQCharsetData.c:
* kwq/KWQCharsets.mm:
* kwq/KWQTextArea.mm:
* kwq/mac-encodings.txt:
* kwq/make-charset-table.pl:
2003-07-02 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3299715 -- unrepro nil-deref in KHTMLPart::xmlDocImpl handling timer
* khtml/khtmlview.cpp: (KHTMLView::timerEvent): Add check for nil.
- fixed clean builds
* Makefile.am: Delete the config-timestamp.
- added some other nil checks (perhaps inspired by some other bug reports, I can't remember)
* khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler):
Added a check for nil document or nil view.
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchEvent): ref/deref view for safety.
2003-07-02 Ken Kocienda <kocienda@apple.com>
Reviewed by David
Fix some more build problems with warnings being issued
when casting and calling methods.
* kwq/KWQScrollView.mm:
(QScrollView::addChild):
(QScrollView::resizeContents):
(QScrollView::repaintContents):
2003-07-01 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
A host of changes to work around a compiler bug which issues
warnings when making objective-c method calls on objects that have
been typecast for the purpose of the call.
* WebCore.pbproj/project.pbxproj:
* kwq/KWQFileButton.mm:
(KWQFileButton::setFilename):
(KWQFileButton::sizeForCharacterWidth):
(KWQFileButton::frameGeometry):
(KWQFileButton::setFrameGeometry):
(KWQFileButton::baselinePosition):
(KWQFileButton::filenameChanged):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
* kwq/KWQLineEdit.mm:
(QLineEdit::setAlignment):
* kwq/KWQListBox.mm:
(QListBox::~QListBox):
(QListBox::clear):
(QListBox::setSelectionMode):
(QListBox::insertItem):
(QListBox::endBatchInsert):
(QListBox::setSelected):
(QListBox::isSelected):
(QListBox::sizeForNumberOfLines):
* kwq/KWQTextEdit.mm:
(QTextEdit::setAlignment):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementForView:]):
(-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]):
(-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]):
* kwq/WebCoreDOMDocument.mm:
(+[WebCoreDOMDocumentType documentTypeWithImpl:DOM::]):
(+[WebCoreDOMImplementation implementionatWithImpl:DOM::]):
(+[WebCoreDOMDocument documentWithImpl:DOM::]):
(-[WebCoreDOMDocument importNode::]):
* kwq/WebCoreDOMNode.mm:
(+[WebCoreDOMNode nodeWithImpl:DOM::]):
(-[WebCoreDOMNode insert:before:]):
(-[WebCoreDOMNode replace:child:]):
(-[WebCoreDOMNode removeChild:]):
(+[WebCoreDOMNodeList nodeListWithImpl:DOM::]):
(+[WebCoreDOMNamedNodeMap namedNodeMapWithImpl:DOM::]):
(-[WebCoreDOMNamedNodeMap setNamedItem:]):
(+[WebCoreDOMAttr attrWithImpl:DOM::]):
(+[WebCoreDOMDocumentFragment documentFragmentWithImpl:DOM::]):
(+[WebCoreDOMElement elementWithImpl:DOM::]):
(+[WebCoreDOMEntityReference entityReferenceWithImpl:DOM::]):
(+[WebCoreDOMCharacterData commentWithImpl:DOM::]):
(+[WebCoreDOMComment commentWithImpl:DOM::]):
(+[WebCoreDOMText textWithImpl:DOM::]):
(+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
(+[WebCoreDOMProcessingInstruction processingInstructionWithImpl:DOM::]):
2003-06-30 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3310066>: All images use wrong map if page has image map of name ""
Reviewed by dave.
* config.h:
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::getMap): return 0 if getMap is called with a NULL string instead of treating it like an empty string
2003-06-30 John Sullivan <sullivan@apple.com>
- fixed gcc3.3 incompatibility
Reviewed by Darin
* kwq/KWQComboBox.mm:
(QComboBox::updateCurrentItem):
cast result of getView() in a local variable to work around
compiler bug where casting in a method call doesn't work (all other
callers of getView() in this file were already using a local
variable)
2003-06-26 Chris Blumenberg <cblu@apple.com>
More changes to make WebKit and WebCore compile with gcc 3.3.
Reviewed by darin.
* kwq/WebCoreBridge.h:
2003-06-26 Chris Blumenberg <cblu@apple.com>
Made WebCore compile with gcc 3.3.
Reviewed by darin.
* config.h:
* kwq/KWQLineEdit.mm:
(QLineEdit::selectAll):
(QLineEdit::setEdited):
* kwq/KWQString.h:
* kwq/KWQString.mm:
=== Safari-85.1 ===
2003-06-15 Vicki Murley <vicki@apple.com>
Reviewed by darin.
* WebCore.pbproj/project.pbxproj: remove SECTORDER_FLAGS variable, so that we don't use order file for our Panther submission
=== Safari-85 ===
2003-06-14 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3293367>: REGRESSION (83-84): nil-deref in addMetaData loading page in pop-up at live365.com
Reviewed by darin.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): only call addMetaData if didOpenURL
2003-06-13 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3293031 -- REGRESSION (83-84): extra entry in history when going to page that redirects (live365.com)
* khtml/khtmlpart_p.h: Initialize m_executingJavaScriptFormAction to false.
We had left it uninitialized when we fixed 3289047.
2003-06-13 David Hyatt <hyatt@apple.com>
Fix for 3292630, misrendered page because of bad doctype. Add
this bad doctype to our list of quirky doctypes to fix the
problem, since the screwed up strict mode rendering is actually
correct.
Reviewed by john
* khtml/html/doctypes.cpp:
(findDoctypeEntry):
* khtml/html/doctypes.gperf:
2003-06-13 Richard Williamson <rjw@apple.com>
Fixed 3282087. Don't use our <pre> optimizations
if text contains non-ascii, and consequently may
result in font substitution.
Reviewed by Darin.
* khtml/rendering/render_text.cpp:
(RenderText::RenderText):
(RenderText::allAscii):
(RenderText::shouldUseMonospaceCache):
* khtml/rendering/render_text.h:
2003-06-13 Richard Williamson <rjw@apple.com>
Fixed 3291537.
Reviewed by John.
* kwq/KWQObject.mm:
(QObject::killTimer):
Only remove the timer is it hasn't fired (and is therefore valid).
It is NOT permissible to reference a timer's userInfo if it is invalid.
=== Safari-84 ===
2003-06-12 David Hyatt <hyatt@apple.com>
Fix for 3289113, body.scrollTop doesn't return the right
value. Fix scrollLeft and scrollTop for body tags to just
use the view's offset. This matches WinIE behavior.
Reviewed by john
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty):
(KJS::HTMLElement::putValue):
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_html.lut.h:
2003-06-12 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3289405 -- repro crash in KWQPopUpButtonCell at umax.de
* kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
Use the bridge that we got earlier in the function to find the right part. This is
simpler, and more reliable. The old way would run into trouble if the widget or
any of the other objects in the chain got destroyed during the event handling.
2003-06-12 Darin Adler <darin@apple.com>
Fixed by Richard, reviewed by me.
- fixed 3289047 -- REGRESSION: can't go back after using form at attwireless.com
* khtml/khtmlpart_p.h: Add an "executing JavaScript form action" flag.
* kwq/WebCoreBridge.h: Add an "executing JavaScript form action" flag parameter to
the reportClientRedirectToURL method.
* khtml/khtml_part.cpp: (KHTMLPart::submitForm): In the JavaScript case, set a
flag to say we are executing a JavaScript form action.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::redirectionTimerStartedOrStopped): Pass the
isJavaScriptFormAction state over the bridge.
2003-06-11 David Hyatt <hyatt@apple.com>
Fix for 3288875, :after/:before content not getting destroyed
after printing on alistapart.com. Make the update method for
pseudos smart enough to destroy generated content when it is
no longer needed.
Reviewed by darin
* khtml/rendering/render_block.cpp:
(RenderBlock::setStyle);
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
* khtml/rendering/render_container.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::setStyle):
2003-06-11 David Hyatt <hyatt@apple.com>
Fix for 3288035, the wrong value was being filled in for
textfields. Fixed a bug in QString's assignment operator
that made empty strings become null strings upon assignment.
Also ensured that the form control never sets the value to
null but always uses empty instead.
Reviewed by john
* khtml/rendering/render_form.cpp:
(RenderLineEdit::slotTextChanged):
* kwq/KWQString.mm:
(QString::setLatin1):
2003-06-10 David Hyatt <hyatt@apple.com>
Fix for 3287870, the <embed hidden=true> feature didn't work.
hidden should turn the embed into a plugin with a width and
height of 0.
Reviewed by gramps
* khtml/html/html_objectimpl.cpp:
(HTMLEmbedElementImpl::HTMLEmbedElementImpl):
(HTMLEmbedElementImpl::attach):
2003-06-10 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3285820 -- REGRESSION: iframe set up with innerHTML shows up empty (discovered at www.kbs.co.kr)
* kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Remove the frame from the parent's
m_frames list so it's not accidentally reused, since our naming scheme gives frames in
the same place in the scheme of things the same name.
2003-06-10 David Hyatt <hyatt@apple.com>
Fix for 3270813, crash in the code for the CSS content property.
When copying a DOMString, I missed a required ref.
Reviewed by darin
* khtml/rendering/render_style.cpp:
(RenderStyle::setContent):
2003-06-10 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3285120 -- crash in CSSParser::parseColor (originally seen with Panther Mail while indexing)
* khtml/css/parser.y: Moved DIMEN rule out of unary_term, needed because a term production
assumes that the values that come out of unary_term are all fValue, not string.
* khtml/css/parser.cpp: Regenerated.
2003-06-10 Vicki Murley <vicki@apple.com>
Reviewed by john.
* WebCore.order: new order file for 1.0
2003-06-10 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3286343 -- REGRESSION: crashing on pages with text area elements
* khtml/rendering/render_form.cpp: (RenderTextArea::detach):
Do cleanup in detach rather than in destructor.
* khtml/rendering/render_form.h: Remove destructor, add detach.
2003-06-09 Richard Williamson <rjw@apple.com>
Fixed 3281761.
This was a real doozie. It boiled down to a frame
attempting to access a siblings window object when that
frame wasn't loaded and didn't have a document.
Reviewed by Dave.
* khtml/ecma/kjs_window.cpp:
(Window::get):
(Window::isSafeScript):
(FrameArray::get):
Made the isSafeScript more tolerant. Always allow JS to execute
if the active domain is nil (local). Also allow JS to execute
if the target part has no document yet.
* khtml/khtml_part.cpp:
(KHTMLPart::init):
(KHTMLPart::openURL):
(KHTMLPart::jScript):
(KHTMLPart::scheduleRedirection):
(KHTMLPart::findFrame):
Flag redirects during load so we can later avoid
cancelling the redirect when the document would otherwise
normally load.
* khtml/khtmlpart_p.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge addData:]):
Document may now be nil. Replace assert with conditional check.
2003-06-09 John Sullivan <sullivan@apple.com>
- finished fixing crash in 3275675 -- REGRESSION: crash when replacing <div> which contains iframe (at www.kbs.co.kr)
Reviewed by Darin
* khtml/rendering/render_replaced.cpp:
(RenderWidget::resizeWidget):
check for nil element() before ref/deref'ing
2003-06-09 Darin Adler <darin@apple.com>
Reviewed by John.
- first step in fixing 3275675 -- REGRESSION: crash when replacing <div> which contains iframe (at www.kbs.co.kr)
* khtml/rendering/render_object.h: Made m_node protected, so RenderWidget can zero it out.
* khtml/rendering/render_replaced.cpp: (RenderWidget::detach): Set m_node to 0 here.
RenderWidget does this strange thing of staying around after the DOM node is gone, but we need
to get rid of the dangling pointer to the DOM node.
* khtml/rendering/render_frames.cpp:
(RenderFrame::slotViewCleared): Do nothing if element() is 0, since we are on our way out anyway.
(RenderPartObject::slotViewCleared): Ditto.
2003-06-09 John Sullivan <sullivan@apple.com>
- fixed 3284312 -- repro nil-deref in
khtml::RenderTable::cellAbove at pi.nersc.gov
Reviewed by Darin
* khtml/rendering/render_table.cpp:
(RenderTable::cellAbove):
When the section had 0 rows, we were trying to index the -1st
row. Fixed by falling into the "didn't find anything" case when
the row we're going to look in is < 0.
2003-06-09 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3277733 -- REGRESSION: \ in JavaScript mishandled when encoding is Japanese (istweb.apple.com)
This is the third time I've fixed handling of backslash and yen sign. Each time I fixed part
of the problem but either didn't fix the whole thing or caused a regression. This time I did
more experiments with other browsers, and I came to the conclusion that all other browsers keep
the backslash character internally unchanged, and only change to the yen sign when displaying
rather than decoding to the Unicode "yen sign" character. This makes the backslash character
different from any other, and requires special code, but it's the only way to match the other
browsers' behavior. This seems to work great; I retested all the backslash/yen bugs from the
past to make sure I didn't cause new regressions. The only loose end is the DOM API. It's not
clear whether the DOM API should return the strings with backslashes or with yen signs, but
we can probably ship 1.0 without getting that 100% right.
* kwq/KWQTextCodec.h: Added backslashAsCurrencySymbol() member function.
* kwq/KWQTextCodec.mm:
(QTextCodec::fromUnicode): Removed the old workaround for tilde problems, which is not needed
now that we are back to using "force ASCII" mode, so tildes are always tildes. Updated the comment
about the backslash hack to better reflect the new situation and change it to use the new
backslashAsCurrencySymbol() member function.
(QTextCodec::backslashAsCurrencySymbol): Added. Returns the yen sign for the encodings where
it's appropriate. Later might do the same thing with the won sign for Korean, depending on what
we discover as we research bug 3221037 (Korean currency symbol should replace backslash).
(KWQTextDecoder::convertUsingTEC): Add back the call to TECSetBasicOptions since we once-again
want to use force-ASCII mode; we turn backslashes into yen signs at a higher level now; internally
they are kept as backslashes.
* khtml/xml/dom_docimpl.h: Made setDecoder no longer be inline, and added a decoder member
function so callers could get the decoder (they need it to figure out what to do with
backslashes).
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setDecoder): Made this no longer be an inline. Also made sure it derefs the
existing decoder. This probably does not happen in practice, but the old version would leak
if it was ever called twice on the same document.
* kwq/KWQString.mm: (QString::replace): Made sure that the case of replacing a character
with the same character has an early out, since that's now the common case with this
"map backslash to currency character if needed" feature.
* khtml/xml/dom_stringimpl.h: Made capitalize() const and added a new replace() member function.
* khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::replace): Implemented this new function
that replaces one character with another. Returns the existing string if there is no replacing
to do, otherwise makes a new one.
* khtml/rendering/render_object.h: Added backslashAsCurrencySymbol() member function.
* khtml/rendering/render_object.cpp: (RenderObject::backslashAsCurrencySymbol): Added.
Helper function so render objects have an easier time digging for the "do I need to turn
the backslashes into currency symbols" flag.
* kwq/KWQKHTMLPart.h: Added backslashAsCurrencySymbol() member function.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setTitle): Convert title to use yen sign.
(KWQKHTMLPart::setStatusBarText): Convert status bar text to use yen sign.
(KWQKHTMLPart::runJavaScriptAlert): Convert message text to use yen sign.
(KWQKHTMLPart::runJavaScriptConfirm): Convert message text to use yen sign.
(KWQKHTMLPart::runJavaScriptPrompt): Convert message text and default value to use yen sign,
convert result back from yen sign to backslash.
(KWQKHTMLPart::attributedString): Convert pieces of text to use yen sign when building up
the attributed text.
(KWQKHTMLPart::backslashAsCurrencySymbol): Added.
Helper function so render objects have an easier time digging for the "do I need to turn
the backslashes into currency symbols" flag.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectedString]): Convert text to use yen sign before returning to WebKit.
(-[WebCoreBridge elementAtPoint:]): Convert title and alt strings to use yen sign before
returning them to WebKit.
* khtml/rendering/render_form.cpp:
(RenderSubmitButton::rawText): Convert button label to use yen sign.
(RenderLineEdit::updateFromElement): Convert text for line edit to use yen sign.
(RenderLineEdit::slotTextChanged): Convert yen sign to backslash on the way in from line edit.
(RenderSelect::updateFromElement): Convert text for select items to use yen sign.
(RenderTextArea::updateFromElement): Convert text for text areas to use yen sign.
(RenderTextArea::text): Convert yen sign to backslash on the way in from text area.
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject): Convert alt text to use yen sign before drawing it.
* khtml/rendering/render_text.cpp:
(RenderText::RenderText): Convert text to use yen sign before drawing it.
(RenderText::setText): Ditto.
- fix a problem that was bugging the shit out of me where we kept rebuilding config.h
* Makefile.am: Use the config-timestamp file to decide when to remake config.h so
we don't end up making it over and over again. Also don't bother to grep out NO_LICENSE
any more since that's long gone.
* .cvsignore: Ignore the config-timestamp file.
=== Safari-83 ===
2003-06-09 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3280538 -- JavaScript infinite loop loading frame b/c scrollHeight is always zero (easons.ie)
* khtml/xml/dom_docimpl.h: Added updateLayout method.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateLayout): Added. Code moved here
from KJS::Window::updateLayout so it can be shared. Named this updateLayout() to match
the name from KJS::Window.
* khtml/ecma/kjs_window.cpp: (Window::updateLayout): Call updateLayout()
instead of updateRendering(); the extra logic here was moved into updateLayout().
* khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Ditto.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Call updateLayout()
on the document before computing the BodyScrollHeight or BodyScrollWidth, much as
we already do in kjs_dom.cpp for ScrollHeight and ScrollWidth and other properties.
2003-06-05 David Hyatt <hyatt@apple.com>
Fix for crash on an XHTML frameset page. It was assuming
that all docs were HTML. The bug # is 3277973.
Reviewed by john
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::updatePolicyBaseURL):
(KWQKHTMLPart::setPolicyBaseURL):
2003-06-05 David Hyatt <hyatt@apple.com>
Fix for 3281030, stylesheets can't be enabled properly via
script. Test case from Dirk. The fix is to make the setting
of the state happen independently of the attribute setting.
Reviewed by john
* khtml/dom/html_head.cpp:
(HTMLLinkElement::setDisabled):
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::setDisabledState):
(HTMLLinkElementImpl::parseAttribute):
* khtml/html/html_headimpl.h:
2003-06-05 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3268751>: REGRESSION: crash in KWQValueListImpl selecting connection speed at news.com
Reviewed by darin.
* kwq/KWQButton.mm:
(QButton::clicked): Don't call clicked if the button was destroyed inside of sendConsumedMouseUpIfNeeded.
2003-06-05 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3279206 -- REGRESSION: new page does not load after selecting item from list and hitting 'Go' button
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::encoding): Use value() in a couple of places
that were still directly using m_value.
2003-06-05 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3278079 -- REGRESSION: UTF-8 page claiming to be UTF-16 in XML header gives garbage characters
* khtml/misc/decoder.cpp: (Decoder::setEncoding): Add EncodingFromXMLHeader as one of the
types where we know the encoding is an 8-bit one. The reason this is a regression is that we
used to ignore the encoding in the XML header altogether.
2003-06-04 John Sullivan <sullivan@apple.com>
- fixed 3279957 -- REGRESSION: assertion failure at launch in
Decoder::~Decoder() importing bookmarks
Richard actually wrote this fix.
Reviewed by me, Darin
* kwq/WebCoreEncodings.mm:
(+[WebCoreEncodings decodeData:]):
don't use stack-based decoder; use new instead.
2003-06-04 David Hyatt <hyatt@apple.com>
Fix for 3273300, leaks in cssyyparse. Function forgot to delete
its args value list when destroyed.
Reviewed by gramps
* khtml/css/cssparser.h:
2003-06-03 David Hyatt <hyatt@apple.com>
Fix for 3259647, crash when printing a table page. This is fixed
on the KDE KHTML trunk. The loop shouldn't be broken out of
when you have column elements so that all sections can recalc
their cell grids as needed.
Reviewed by kocienda
* khtml/rendering/render_table.cpp:
(RenderTable::recalcSections):
=== Safari-82 ===
2003-06-03 Richard Williamson <rjw@apple.com>
Fixed 3275565. Ref count the decoder.
Reviewed by Ken.
* khtml/khtml_part.cpp:
(KHTMLPart::clear):
* khtml/misc/decoder.cpp:
(Decoder::Decoder):
(Decoder::~Decoder):
* khtml/misc/decoder.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::~DocumentImpl):
* khtml/xml/dom_docimpl.h:
2003-06-02 David Hyatt <hyatt@apple.com>
Fix for 3276099. value() was wrong for radio buttons. Needed
to get it from the attribute since I was no longer caching
anything in m_value.
Reviewed by kocienda
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::value):
2003-06-02 Ken Kocienda <kocienda@apple.com>
Code written by darin
Reviewed by me
Fix for this bug:
<rdar://problem/3272162>: repro crash in khtml::CachedImage::checkNotify() on particular page
* khtml/ecma/kjs_html.cpp:
(Image::putValue): ref onLoadListener when setting a value to onLoad
(Image::~Image): deref onLoadListener when destructing the image.
2003-06-02 David Hyatt <hyatt@apple.com>
Fix for 3263679, color: # doesn't parse. Fix is to add an
error-handling case for # by itself to parser.y.
Reviewed by gramps/ken
* khtml/css/parser.cpp:
* khtml/css/parser.y:
=== Safari-81 ===
2003-06-02 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3256787 -- HOMEPAGE:\000 characters being added by Safarin in Form submission,
causing an exception in property list parsing
* kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Encode \ as 5C instead of 815F
when encoding Shift-JIS. This should make the Apple Store work again. The only thing
we lose is the ability to send an actual Shift-JIS backslash (815F), but I think that
is almost never needed. In other browsers you can't even type a backslash in Shift-JIS.
2003-06-02 Ken Kocienda <kocienda@apple.com>
* config.h:
2003-06-02 David Hyatt <hyatt@apple.com>
Fix for 3275136. Make sure that when the checked attribute
is set dynamically (something we were ignoring before my previous
patch) that we also properly update the radio button array in
the document.
Reviewed by gramps
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::parseAttribute):
(HTMLInputElementImpl::attach):
(HTMLInputElementImpl::reset):
2003-05-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
- fixed 3169067 - PEOPLESOFT: left frame missing; frame RenderRoot height and width are both zero
* khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Update layout before scrolling.
2003-05-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3273544 - REGRESSION: Page disappears at http://www.urban-advantage.com/
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::getElementById): Return null when the ID is the
empty string. Otherwise we'll return the first element in the
document, usually the top-level HTML element, which is wrong and
does not match other browsers.
2003-05-30 Richard Williamson <rjw@apple.com>
As part of some cleanup when fixing 3272516 changed use of
@"" for cache keys to NSString declarations.
Reviewed by Ken.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
2003-05-30 David Hyatt <hyatt@apple.com>
Fix for 3269129 and 3269220. setAttribute('value') didn't work
for inputs. Basically defaultValue and defaultChecked have never
worked. This patch fixes the problem by making sure that for both
value and checked you have a two-tier system where you look first
for the value as altered by the control (or by setting the DOM
property) and if that isn't set then you look at the default value.
This allows setAttribute (which changes the *default*) to work in
the cases where the control has not overridden the default
with a different value.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::HTMLInputElementImpl):
(HTMLInputElementImpl::state):
(HTMLInputElementImpl::parseAttribute):
(HTMLInputElementImpl::attach):
(HTMLInputElementImpl::reset):
(HTMLInputElementImpl::setChecked):
(HTMLInputElementImpl::value):
(HTMLInputElementImpl::setValue):
(HTMLInputElementImpl::isCheckedRadioButtonForDocument):
* khtml/html/html_formimpl.h:
* khtml/rendering/render_form.cpp:
(RenderLineEdit::RenderLineEdit):
(RenderLineEdit::calcMinMaxWidth):
(RenderLineEdit::updateFromElement):
(RenderLineEdit::slotTextChanged):
* khtml/rendering/render_form.h:
2003-05-30 Darin Adler <darin@apple.com>
Reviewed by John.
- added "sjis" as a synonym for "Shift_JIS"; this might fix 3235161,
HOMEPAGE: Publishing page with Japanese characters w/ Safari generates an error,
but I am currently unable to test the fix.
* kwq/mac-encodings.txt: Added sjis to the Shift_JIS line.
* kwq/KWQCharsetData.c: Regenerated.
2003-05-29 David Hyatt <hyatt@apple.com>
Fix for 3263156, stack overflow at www.liceo.edu.mx. This
site nests about 500 bold tags, only closes some of them,
and then opens 500 more, etc.
The fix for this problem is to stop honoring tags in the parser
after you see 20 identical tags. We do this only for fontstyle HTML
tags.
Reviewed by john/darin
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
(KHTMLParser::allowNestedRedundantTag):
* khtml/html/htmlparser.h:
2003-05-30 John Sullivan <sullivan@apple.com>
Reviewed by Chris
* khtml/rendering/break_lines.cpp:
Removed #ifdef/#else for which the two sides were identical
that I noticed in passing.
2003-05-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3270373 - MALLORY: repro crash in +[KWQObjectTimerTarget stopDeferringTimers] while changing folder
* kwq/KWQObject.mm:
(QObject::killTimer): Remove the timer from the deferred list too - clients expect that a timer
will never be delivered after the object was killed.
(QObject::killTimers): Use killTimer on each timer for this object instead of trying
to be tricky.
(-[KWQObjectTimerTarget timerFired]): Don't add a timer to the deferred list more than once,
because there's no benefit in ganging up multiple firings while deferred, and it makes other
things simpler.
(+[KWQObjectTimerTarget stopDeferringTimers]): Make sure to remove the timer before firing it,
since it may also cancel itself, and we don't want to remove an extra timer in that case.
2003-05-29 Richard Williamson <rjw@apple.com>
Support for the 'estimatedProgress' method on
WebView. Added bridge access to the number of pending or still
loading requests (from KHTML's perspective). This is used to
more accurately guess at the total remaining bytes to load.
Reviewed by Chris.
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQServeRequest):
(KWQNumberOfPendingOrLoadingRequests):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge numPendingOrLoadingRequests]):
2003-05-29 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
<rdar://problem/3271697>: Search fails at travel site
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::parseAttribute): Allow form method to be set
to GET from javascript.
2003-05-29 John Sullivan <sullivan@apple.com>
- fixed MIME type leaks that were most of 3272566
(several leaks after visiting amazon.com and emptying cache)
Reviewed by Darin
* kwq/KWQPixmap.mm:
(QPixmap::QPixmap):
(QPixmap::operator=):
fixed two leaks of MIME string
2003-05-29 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3269564 -- dynamically-created forms look right, but don't post values when submitted
* khtml/html/html_formimpl.h: Remove useless virtual setParent function.
Since the inherited setParent is not virtual, it does no good to make the subclass
override it with a virtual function.
* khtml/html/html_formimpl.cpp: Remove useless virtual setParent.
(HTMLGenericFormElementImpl::attach): Add code here, cribbed from setParent, to add
a new form element to the form it's in.
(HTMLButtonElementImpl::attach): A copy of the code is also needed here.
* WebCore.pbproj/project.pbxproj: Let Project Builder be Project Builder.
2003-05-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3263157 - REGRESSION: tabbing into a secure password field shows contents
* kwq/KWQTextField.mm:
(-[KWQSecureTextField textDidEndEditing:]): Make sure to restore bullet mode if we
accidentally lose it.
2003-05-27 Maciej Stachowiak <mjs@apple.com>
Rolled in fix from Safari-80~1-branch
2003-05-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* WebKit.pbproj/project.pbxproj: Removed no longer needed and harmful flag.
2003-05-25 David Hyatt <hyatt@apple.com>
Fix for 3268589, static position miscomputed when the positioned object is the last item in its enclosing block and when its previous sibling is a text run that ends in a space. In this case we need to clear our trailingSpaceObject so that we don't mist
akenly ignore the positioned object when building up bidi runs.
Fix for 3260053, table-layout of inherit not supported. This
caused a crash. The fix is to just add in the support for the inherit
value to the style selector.
Reviewed by john
* khtml/rendering/bidi.cpp:
* khtml/css/cssstyleselector.cpp
2003-05-26 John Sullivan <sullivan@apple.com>
- fixed 3262849 -- jump to nil in KWQKHTMLPart::searchForLabelsAboveCell
at techbargains.com
Reviewed by Dave
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::searchForLabelsAboveCell):
check for nil result of cellAboveRenderer->element()
2003-05-23 David Hyatt <hyatt@apple.com>
Fix for 3229799, images missing on geocities page. Residual style
needs to understand when you reopen tags at a malformed table
content boundary and make sure the newly-reopened tags also know
they are malformed table content so that they get cleaned up
properly.
Reviewed by darin
* khtml/html/htmlparser.cpp:
(KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
(KHTMLParser::reopenResidualStyleTags):
(KHTMLParser::popBlock):
* khtml/html/htmlparser.h:
2003-05-22 David Hyatt <hyatt@apple.com>
Fix for 3248176, failed assertion on blizzard's world of warcraft
page. They dynamically changed the position of an element from
absolute to relative, and this element was inside an inline.
The setStyle() code has to be smart enough to split the inline
flow when the element is no longer absolute positioned.
This patch makes a splitFlow occur like it should and it also
cleans up anonymous block creation with a new helper function
on RenderObject, createAnonymousBlock.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_inline.cpp:
(RenderInline::splitFlow):
* khtml/rendering/render_object.cpp:
(RenderObject::createAnonymousBlock):
(RenderObject::handleDynamicFloatPositionChange):
(RenderObject::setStyle):
* khtml/rendering/render_object.h:
2003-05-22 David Hyatt <hyatt@apple.com>
Fix for 3259947. Can't add clippings on iht.com. The fix is
to make sure all DOM properties that relate to attributes return ""
and not "null" when the attribute isn't present or when the
DOMString is null.
Also patching the code for text-indent to make sure that floats
don't improperly consume text-indent. This fixes two of the issues
on diveintomark.
Reviewed by mjs
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
(KJS::HTMLElement::getValueProperty):
2003-05-22 David Hyatt <hyatt@apple.com>
Make sure the overflow clip rect clips out the scrollbars
so that child layers aren't able to draw on top of the
scrollbars.
Also fix scrollbars so that they are painted before the
overflow clip rect is applied (just as backgrounds and borders
are).
These two fixes make the divtest example from Yahoo (sent by Mark
Malone) work.
Reviewed by john
* khtml/rendering/render_box.cpp:
(RenderBox::getOverflowClipRect):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
2003-05-22 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3216039 -- calls to m_redirectionTimer.stop() do not always clear m_scheduledRedirection
* khtml/khtml_part.h: Added cancelRedirection().
* khtml/khtml_part.cpp:
(KHTMLPart::~KHTMLPart): Call cancelRedirection() instead of m_redirectionTimer.stop().
(KHTMLPart::restoreURL): Ditto.
(KHTMLPart::openURL): Ditto.
(KHTMLPart::closeURL): Ditto.
(KHTMLPart::cancelRedirection): Added. Sets m_scheduledRedirection to noRedirectionScheduled
and calls m_redirectionTimer.stop(), but is also safe to call after d is set to 0.
(KHTMLPart::restoreState): Call cancelRedirection() instead of m_redirectionTimer.stop().
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURLFromPageCache): Call cancelRedirection() instead of m_redirectionTimer.stop().
(KWQKHTMLPart::scrollToAnchor): Call cancelRedirection() instead of m_redirectionTimer.stop()
(and setting m_scheduledRedirection).
2003-05-21 David Hyatt <hyatt@apple.com>
This patch deals with the main cause of regressions from
the minimum font size removal. Because we stored font sizes
as integers, we ended up flooring font sizes, and when percentages
were nested, the magnitude of error increased dramatically.
This patch changes FontDef to store a float size instead of an
integer size. The style system thus always computes a precise
floating point value for a font, with no error introduced and
only once it has that final computed value does it round to the
nearest pixel for the QFont.
This fixes 3265628, www.anandtech.com.
Reviewed by rjw
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::computeLengthFloat):
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/font.cpp:
(Font::update):
* khtml/rendering/font.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
2003-05-21 David Hyatt <hyatt@apple.com>
Fix for 3257990, attributes in HTML should always be case-insensitive
when matching CSS attribute selectors. Instead of relying on
the strict mode check, I patched the code to use an isXMLDoc
bool instead.
Also fixing a problem where <pre>s are mistakenly justifying their
text when text-align: justify is set.
Reviewed by kocienda
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/rendering/bidi.cpp:
2003-05-21 Vicki Murley <vicki@apple.com>
Reviewed by john
- fixed 3234553: Safari and its frameworks should link using order files
* WebCore.order: Added.
* WebCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text WebCore.order
2003-05-20 David Hyatt <hyatt@apple.com>
An implementation of fieldset and legend. This is based off
some KHTML trunk code, but only loosely. I had to rewrite
most of it in order to make fieldsets work properly with
padding and in order to match the fieldset style of other
browsers more closely.
This code also fixes HTML4 buttons so that they don't fill the
width of containing blocks. This has been a long-standing
bug. Since legends behave the same way as buttons and floats,
I made a new helper function, sizesToMaxWidth(), to denote an
element that just uses its max intrinsic width when sizing
instead of filling a containing block.
This patch also fixes z-index so it properly only applies to the
root and to positioned/relpositioned elements.
Reviewed by darin
* ChangeLog:
* ForwardingHeaders/rendering/render_block.h: Added.
* khtml/css/html4.css:
* khtml/html/html_formimpl.cpp:
(HTMLFieldSetElementImpl::HTMLFieldSetElementImpl):
(HTMLFieldSetElementImpl::attach):
(HTMLFieldSetElementImpl::createRenderer):
(HTMLLegendElementImpl::HTMLLegendElementImpl):
(HTMLLegendElementImpl::id):
(HTMLLegendElementImpl::attach):
(HTMLLegendElementImpl::createRenderer):
* khtml/html/html_formimpl.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::calcWidthUsing):
* khtml/rendering/render_canvas.cpp:
* khtml/rendering/render_form.cpp:
(RenderFieldset::RenderFieldset):
(RenderFieldset::layoutLegend):
(RenderFieldset::findLegend):
(RenderFieldset::paintBoxDecorations):
(RenderFieldset::paintBorderMinusLegend):
(RenderLegend::RenderLegend):
* khtml/rendering/render_form.h:
* khtml/rendering/render_object.cpp:
(RenderObject::sizesToMaxWidth):
* khtml/rendering/render_object.h:
2003-05-19 David Hyatt <hyatt@apple.com>
Fix for 3262890, logical font sizes (e.g., large) cannot be applied
to monospace tags like <pre> and <tt>. The fix adds a notion of
the current logicalSize in effect for a given FontDef so that
shifts in family as you go down the style tree result in an
auto-correction of the size.
Note that with the addition of this cached logicalSize property,
it will be possible to eliminate the two separate logical size
tables and implement the monospace table as a "zoom factor" applied
to the normal table (an idea long ago suggested by darin).
Reviewed by darin
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/font.h:
=== Safari-80 ===
2003-05-19 Maciej Stachowiak <mjs@apple.com>
- fixed 3261096 - Make WebKit an umbrella framework
* WebCore.pbproj/project.pbxproj: In a B&I build, compile as a
sub-umbrella of WebKit.
2003-05-19 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fixed build problem with declaring MIMEType as a category
on NSObject. This method needs to be typed to return NSString.
* kwq/KWQLoader.mm
2003-05-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3260940 - REGRESSION: reproducible crash freeing page cache item
- fixed 3241041 - REGRESSION: repro world leak of 1 JavaScript interpreter
The fix for these problems and probably other page cache wackiness
was to use a refcounting scheme for KHTMLView instead of counting
on the previous tricky ownership rules.
* khtml/khtmlview.cpp:
(KHTMLView::KHTMLView): Initialize _refCount to 1.
(KHTMLView::~KHTMLView): Assert that _refCount is 0, to make sure no one is deleting
views explicitly.
* khtml/khtmlview.h:
* khtml/rendering/render_frames.cpp:
(RenderPart::~RenderPart): If our view is a KHTMLView, deref it.
(RenderPart::setWidget): If the view is a KHTMLView, tell the superclass not to
delete it and ref it.
* khtml/rendering/render_frames.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::RenderWidget): Initizlize m_deleteWidget to false.
(RenderWidget::~RenderWidget): Only delete widget if we're supposed to.
(RenderWidget::setQWidget): Add extra delegeWidget argument that says whether
to delete this widget when done - defaults to true.
* khtml/rendering/render_replaced.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Removed _ownsView boolean -- we'll always hang on
to a ref to it now.
(KWQKHTMLPart::~KWQKHTMLPart): Deref the view always instead of deleting it sometimes.
(KWQKHTMLPart::setView): deref the old view if not null. ref the new view if not null.
Drop tricky ownership rules.
(KWQKHTMLPart::openURLFromPageCache): Remove no longer applicable comment about the
importance of when setView is called.
* kwq/KWQPageState.mm:
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): ref the
document's view.
(-[KWQPageState invalidate]): deref the document's view.
(-[KWQPageState dealloc]): deref the document's view instead of deleting it.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]): No more need
to pass weOwnIt argument to setView. Also, deref the view after passing it to the
KWQKHTMLView -- we own the initial ref since we allocated it.
(-[WebCoreBridge removeFromFrame]): No more need to pass weOwnIt argument to setView.
(-[WebCoreBridge installInFrame:]): Ditto.
2003-05-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3256997 - reproducible world leak (of 1 JavaScript interpreter) using google images
This turned out to be a page cache bug, and nothing to do with
JavaScript. The part and view were also leaked.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURLFromPageCache): Make sure to reset the view
before resetting the document, so that when we check if the
document is in the page cache to determine if we can delete the
old view, we'll be checking the old document instead of the new
one.
2003-05-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3168588 - Can't click on links at Nike site (Image onload handler problem)
The fix was to implement the onload property for Image objects
(which are entirely different from <img> HTML elements).
* khtml/ecma/kjs_html.cpp:
(Image::getValueProperty): Implement access to onload attribte.
(Image::tryPut): Use putValue cause we're gonna use the hashtable now.
(Image::putValue): Moved guts of tryPut here. Implement setting of
onload attribute.
(Image::notifyFinished): Fire onload event if there is a listener.
(Image::Image): initialize onload listener to null.
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_html.lut.h: Regenerated.
=== Safari-79 ===
2003-05-14 David Hyatt <hyatt@apple.com>
Fix for 3248193. Floats with layers paint twice. The fix
is to make sure floats are not painted during the float phase
if they also have a layer.
Reviewed by john
* khtml/rendering/render_block.cpp:
2003-05-14 David Hyatt <hyatt@apple.com>
Fix for 3258389, min-width should take precedence over max-width.
I just had an "else" that shouldn't have been there, so that
min-width would get checked even if max-width was also checked.
Reviewed by kocienda
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
2003-05-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- fixed 3257307 - REGRESSION: crash using onFocus="this.blur()"
* kwq/KWQTextField.mm:
(-[KWQTextField setHasFocus:]): Don't call
KWQKHTMLPart::setDocumentFocus(widget) to start with, it might
invoke a handler which could call blur(), and we don't want to do
the selection handling after that; futhermore, it will get called
anyway when we deliver the FocusIn event to the event
filter. Also, sometimes unfocusing in the middle of a focus can
leave us and AppKit in an inconsistent state; correct this. A
comment explains the details.
2003-05-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3240129 - REGRESSION: www.ezprints.com navigation buttons don't show up (window.addEventListener)
The problem here was that event handlers set using
window.addEventListener were set as regular event handlers on the
document object instead of as window event handlers - and the load
event does not fire properly that way.
The fix was to add support for both HTML and non-HTML window event
handlers. The old window event methods supported only "HTML"
handlers, but were not named as such.
* khtml/ecma/kjs_window.cpp:
(Window::setListener): Use setHTMLWindowEventListener.
(Window::getListener): Use getHTMLWindowEventListener.
(WindowFunc::tryCall): use addWindowEventListener and removeWindowEventListener
on the DocumentImpl instead of addEventListener and removeEventListener on the
Document.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute): Use setHTMLWindowEventListener
instead of the old setWindowEventListener.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::defaultEventHandler): Don't stop after the first
window event handler - keep going, since there might now be more
than one for the same event.
(DocumentImpl::setHTMLWindowEventListener): Renamed from setWindowEventListener.
(DocumentImpl::getHTMLWindowEventListener): Renamed from getWindowEventListener.
(DocumentImpl::removeHTMLWindowEventListener): Renamed from removeWindowEventListener.
(DocumentImpl::addWindowEventListener): Implemented - support adding non-HTML window
event listeners, which, unlike html listeners, are nto exclusive - there may be more
than one.
(DocumentImpl::removeWindowEventListener): Implemented.
(DocumentImpl::hasWindowEventListener): Check if a window has any handler at all
for a prticular event.
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::addEventListener): Add ref/deref pair to protect against last ref of listener
going away on remove. Correct comment about the removal.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::canCachePage): Check for an UNLOAD event handler
using hasWindowEventListener instead of getHTMLWindowEventListener, to
check for even addListener-style unload handlers.
2003-05-13 David Hyatt <hyatt@apple.com>
Fix for 3222607. divs that specify a fixed width should have
their minwidths increased to that width. This is an issue
on diveintomark's list as well as a blocker for Benoit.
Reviewed by gramps
* khtml/rendering/render_block.cpp:
2003-05-13 David Hyatt <hyatt@apple.com>
Fix for 3256376, absolute positioned content that had to be
scrolled into view would not respond to events. This is a
regression caused by fixing the size of the HTML element.
I stopped all of the updating of layer widths/heights in
setLayouted and in setWidth/Height of RenderBox and special-cased
the sizing of the RenderCanvas layer so that it always encloses
all content.
This patch also contains a fix for 3211915, left/top positions
not computed properly when auto or static. The patch adds
staticX/Y member variables to RenderBox that holds the cached
values that can then be used by positioned elements to determine
their correct positions in the flow. RenderStyles also now
remember both the original display of an element as well as
the mutated display (e.g., when an inline becomes a block
because of absolute positioning).
Reviewed by darin (canvas fix) and kocienda (left/top fix)
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::RenderBox):
(RenderBox::position):
(RenderBox::setStaticX):
(RenderBox::setStaticY):
(RenderBox::calcAbsoluteHorizontal):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_box.h:
* khtml/rendering/render_canvas.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::createInlineBox):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
* khtml/rendering/render_line.cpp:
(InlineFlowBox::placeBoxesHorizontally):
(InlineFlowBox::adjustMaxAscentAndDescent):
(InlineFlowBox::computeLogicalBoxHeights):
(InlineFlowBox::placeBoxesVertically):
(InlineFlowBox::shrinkBoxesWithNoTextChildren):
* khtml/rendering/render_object.cpp:
(RenderObject::hasStaticX):
(RenderObject::hasStaticY):
(RenderObject::setNeedsLayout):
(RenderObject::createInlineBox):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/rendering/render_text.cpp:
(RenderText::createInlineBox):
* khtml/rendering/render_text.h:
2003-05-13 Richard Williamson <rjw@apple.com>
Fixed 3014661. We now display (a lame Lemay) image
when an image fails to load. We also display the
alt text if it fits within the image container
above the missing image icon. Alt text is also
now shown if image loading is disabled.
Reviewed by John.
* khtml/misc/loader.cpp:
(CachedImage::data):
(Cache::init):
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject):
(RenderImage::reload):
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(KWQLoadPixmap):
(QPixmap::QPixmap):
(QPixmap::isNull):
* kwq/WebCoreImageRenderer.h:
* kwq/WebCoreImageRendererFactory.h:
2003-05-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate): Pass the filename.
* kwq/WebCoreJavaScript.h:
* kwq/WebCoreJavaScript.mm:
(+[WebCoreJavaScript shouldPrintExceptions]): Call through to JavaScriptCore.
(+[WebCoreJavaScript setShouldPrintExceptions:]): Call through to JavaScriptCore.
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent): Print exception if there is one.
* khtml/ecma/kjs_window.cpp:
(ScheduledAction::execute): Print exception in the function case.
2003-05-13 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3140822 -- relative URLs starting with query strings clobber path as the RFC says, but web says no
* kwq/KWQKURL.mm: (KURL::KURL): Add a case for queries (as with anchors) to match
the behavior of the web (albeit not the RFC).
2003-05-13 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3120355 -- importing IE favorites garbles non-ASCII characters (esp. bad for non-Roman languages)
* kwq/WebCoreEncodings.h: Added decodeData:, removed all other (unused) methods.
* kwq/WebCoreEncodings.mm: (+[WebCoreEncodings decodeData:]): Added. Calls the same
decoder used to decode web pages.
2003-05-13 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3228186 -- REGRESSION: crash walking parent tree at housingscc.org in DOM::StyleBaseImpl::stylesheet()
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::~ElementImpl): Unref the stylesheet with the style declaration in it
when destroying the element.
(ElementImpl::createDecl): Ref the stylesheet with the style declaration in it when
making a style element for this. If we don't we could end up with a style declaration
without a stylesheet, which can't be manipulated by the CSS parser.
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::removeCSSProperty): Since this
function has a side effect of changing the stylesheet for the style declaration, ref
the new stylesheet and unref the old one.
2003-05-12 Richard Williamson <rjw@apple.com>
Fixed 3194614 and 3194751. We avoid creating and render objects
and loading any images if the document is in 'renderless' mode.
Also, we now unique instances of the ObjC DOM wrappers.
Reviewed by hyatt/darin.
* khtml/misc/loader.cpp:
* khtml/xml/dom_docimpl.cpp:
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
* kwq/WebCoreDOMNode.mm:
* kwq/WebDOMNode.h:
Pass the reported MIME type of an image up to WebKit when
creating an WebImageRenderer. This is useful to help speed up
the selection of an appropriate decoder.
Reviewed by darin.
* kwq/WebCoreImageRendererFactory.h:
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
2003-05-12 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3240925 -- can't select or copy text from readonly INPUT elements
An AppKit peculiarity. Calling setEditable:NO will have a side effect of
doing setSelectable:NO unless you explicitly did setSelectable:YES.
* kwq/KWQLineEdit.mm:
(QLineEdit::QLineEdit): Call setSelectable:YES.
* kwq/KWQTextField.mm:
(-[KWQTextField setPasswordMode:]): When creating the password field, keep
the setSelectable state synchronized.
(-[KWQTextField setSelectable:]): If we already have a password field, be
sure to keep its selectable state the same as the main field.
2003-05-12 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3255281 -- REGRESSION: objc_error in key loop code, closing tab containing aintitcool.com page
* kwq/KWQTextField.mm:
(-[KWQSecureTextField nextKeyView]): Change back to using our own nextKeyView
implementation. By returning the nextKeyView from KWQTextField, we ended up making
AppKit very upset about the key view loop. This undoes a change I made last
Thursday, so the regression is very new and was never in a release.
(-[KWQSecureTextField previousKeyView]): More of the same.
(-[KWQSecureTextField nextValidKeyView]): Ditto.
(-[KWQSecureTextField previousValidKeyView]): Ditto.
2003-05-11 David Hyatt <hyatt@apple.com>
The root element (HTML) tries to set itself to the lowest position
of the canvas, before the canvas has necessarily even determined
the correct lowest position. This creates a timing problem.
This code is legacy code anyyway, left over from before KHTML
understood about overflow. The HTML should not be resizing itself
to enclose positioned content or floats. They should just spill
out of the HTML object, so the fix is easy: kill the legacy code.
There's a second fix required as well, which is to make the canvas
avoid scanning its positioned objects list when computing its
lowest and rightmost position. Fixed positioned objects can't
be scrolled, so it's incorrect to show scrollbars because of
fixed positioned objects (since they are locked to the viewport).
Reviewed by darin/gramps
* khtml/rendering/render_block.cpp:
2003-05-11 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3242493 -- loop in khtml::RenderLayer::RenderZTreeNode at google cached copy of epower2go.biz page
* khtml/rendering/render_layer.cpp: (RenderLayer::RenderZTreeNode::detach):
Use an iterative algorithm rather than a recursive one to destroy the child
nodes at each level of the tree, so our recursion is O(depth of tree) rather
than O(size of tree).
2003-05-10 David Hyatt <hyatt@apple.com>
Fix the misrendering at the top of cnn.com (the extra tearing
by the Google logo on the front page of cnn).
I am reducing the intrinsic margins of text fields down to 2px
to match buttons and selects.
This is easily sufficient distance to avoid focus ring overlap and
still looks nice, e.g., on www.google.com and amazon.com.
Reviewed by mjs
* khtml/rendering/render_form.h:
2003-05-10 David Hyatt <hyatt@apple.com>
A refinement of our intrinsic margin rules for form controls.
Rather than always applying the intrinsic margin to form controls,
this patch makes the application conditional.
If the Web page explicitly specifies a width on a form control,
the form control will honor that precise pixel-width and will not
apply left/right intrinsic margins. If a Web page specifies margins
that the control should use, then the control will honor those
margins. The same rules apply for height and top/bottom margins.
Reviewed by mjs
* khtml/css/html4.css:
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
(RenderBox::calcReplacedHeight):
* khtml/rendering/render_form.cpp:
(RenderFormElement::addIntrinsicMarginsIfNeeded):
(RenderFormElement::setStyle):
* khtml/rendering/render_form.h:
2003-05-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3206695 -- Safari puts all of the mailto form content in email subject line, should put content in body
The bug was caused by our KURL class not parsing the query out of the mailto URL properly.
* kwq/KWQKURL.h: Removed parameter from prettyURL, unused in KHTML.
* kwq/KWQKURL.mm:
(KURL::prettyURL): Removed parameter, unused in KHTML.
(KURL::parse): Parse queries even from non-hierarchical URLs. This fixes the bug.
* WebCore-tests.exp: Updated for parameter removed from prettyURL.
* WebCore-combined.exp: Regenerated.
2003-05-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3131026 -- half-width yen character (x5C) shows up as a backslash
To fix this, I had to reverse our previous decoding approach for the characters
that are different in Shift-JIS and ASCII. Before, we would decode them as
ASCII, and so they would be wrong in web pages, but right in URLs. Now, I decode
them as Shift-JIS, so they are right for web pages. This does not break URLs,
though, because back in February we added code to re-encode characters for URLs
to fix bug 3124596. But there is a TEC bug we have to work around to make this
work right for the tilde character.
* kwq/KWQTextCodec.mm:
(QTextCodec::fromUnicode): Work around the TEC bug that prevents the tilde
character from surviving the round trip through the decoding process by explicitly
changing decoded tildes back to ASCII tildes.
(KWQTextDecoder::convertUsingTEC): Do not set kUnicodeForceASCIIRangeMask.
* kwq/KWQCString.h: Added replace call for use by new code. Some other
small improvements.
* kwq/KWQCString.mm:
(QCString::contains): Make this faster by not doing the case-insensitive
and case-sensitive cases both in the same loop.
(QCString::append): Changed the += calls to this name, and made the
+= operator override call these.
(QCString::replace): Added.
* WebCore-tests.exp: Changed to export append calls.
* WebCore-combined.exp: Regenerated.
2003-05-09 David Hyatt <hyatt@apple.com>
Finally get tables cutting the right properties off and letting
the right ones through in quirks mode. Font-family *is* inherited
through into tables in all other browsers. We have been doing this
wrong the whole time. Also ensure that font-style and font-variant
are reset.
Reviewed by darin
* khtml/css/quirks.css:
2003-05-09 David Hyatt <hyatt@apple.com>
Always allow KONQ_TEXT as a valid value, and don't restrict its
use to lax CSS parsing. (We want our UA sheets to be parsed
strictly.)
Fixes bug 3224791, color inheritance not being properly cut off
in tables in quirks mode.
Reviewed by mjs and darin
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
2003-05-09 David Hyatt <hyatt@apple.com>
Fix for 3253695, XML pages with <style>@import...</style> don't
render. The XML tokenizer is getting text in small chunks, and
so it tries to load the sheet multiple times. This fix patches
the stylesheet code to properly decrement the loading sheet
count when you abort a still-loading @import.
Reviewed by darin
* khtml/html/html_headimpl.cpp:
(HTMLStyleElementImpl::childrenChanged):
2003-05-09 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3191943 -- XML parsing error occurs when loading shift-JIS Japanese XML file
* khtml/misc/decoder.h: Add a new type of encoding, EncodingFromXMLHeader.
* khtml/misc/decoder.cpp:
(findXMLEncoding): Added.
(Decoder::decode): Call findXMLEncoding to extract the encoding from the XML header.
2003-05-08 Darin Adler <darin@apple.com>
Reviewed by John and Ken.
- fixed 3253461 -- stylesheet-reading code does not support BOM
- fixed 3253359 -- XML parser does not allow UTF-8 BOM
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::KWQTextDecoder): Initialize the new _littleEndian, _atStart,
and _numBufferedBytes fields, not the old _flags, _state, and _haveBufferedByte fields.
(KWQTextDecoder::convertUTF16): Moved the BOM-based endianness detection out of here;
now done in toUnicode. Switched to use the new multibyte buffer, even though we only
need one byte of it. Remove any BOM characters encountered within the text.
(KWQTextDecoder::convertUsingTEC): Remove any BOM characters encountered within the text.
(KWQTextDecoder::toUnicode): Do all the BOM detection at this level, including the
UTF-8 BOM as well as the UTF-16 BOM.
* khtml/misc/decoder.cpp: (Decoder::decode): Don't bother stripping the UTF-8 BOM.
The QTextCodec object handles that now.
* kwq/KWQXmlSimpleReader.mm: (QXmlSimpleReader::parse): Pass in the data in 16-bit character
form, and specify the encoding when creating the parser. Both expat and KHTML
want to do the decoding, so this is really just a way to get expat to back off.
2003-05-08 David Hyatt <hyatt@apple.com>
Fix the definition of isRoot() so that it doesn't depend on
the object being in the render tree yet (and to avoid any
virtual function calls as well).
Make sure that requiresLayer() returns true if the object is
the root. This way the layer isn't destroyed when you e.g.,
hit Cmd+ to increase font size.
This fixes bug 3252496.
Reviewed by rjw
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_object.cpp:
(RenderObject::isRoot):
* khtml/rendering/render_object.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::createRenderer):
2003-05-08 David Hyatt <hyatt@apple.com>
Background-position-x and y should be length|percentage. Number
is not a valid option. Need to remove this so that the quirk will
kick in that translates numbers to pixels. Fixes an issue on
diveintomark's list.
Reviewed by darin
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
2003-05-08 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed part of the cause of 3251979 -- switching tabs hoses page layout
* kwq/WebCoreSettings.mm: (-[WebCoreSettings _updateAllViews]): Only update views that are
using this settings object. The old way would result in re-laying out all views every time
you created a new one.
2003-05-08 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed regression caused by my last check-in; need to use the KHTMLView layout function
* kwq/KWQWidget.mm: (QWidget::setFocus): Use KHTMLView's layout instead of RenderCanvas's.
- fixed 3251913 -- when form field has focus, dragging across text elsewhere does not select it
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setSelection): Remove setFocusNode(0) call. Apparently not needed these days.
I tested and everything works fine without it, and its side effect was the bug above.
(DocumentImpl::setFocusNode): Remove clearSelection() call for similar reasons.
2003-05-08 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3251985 -- REGRESSION: tabbing doesn't scroll text fields into view any more
* kwq/KWQTextField.h: Add a _hasFocus field, which prevents us from focusing
multiple times.
* kwq/KWQTextField.mm:
(+[KWQTextField initialize]): Set KWQTextFieldCell as the cell class. We need a cell
subclass to detect when editing begins.
(-[KWQTextField setPasswordMode:]): Don't pass a QLineEdit to the secure text field
when creating it. It's no longer needed.
(-[KWQTextField controlTextDidEndEditing:]): Call setHasFocus:NO, and do the actual
work in there.
(-[KWQTextField control:textShouldBeginEditing:]): Remove the work that was done in
here. This is only called when you actually start typing, so it's too late.
(-[KWQTextField becomeFirstResponder]): Keep the code to forward first responder to
the password field, but get rid of the rest, because this code path does not cover
all the ways to start editing.
(-[KWQTextField currentEditorForEitherField]): Moved this method inside the
KWQInternal category.
(-[KWQTextField selectedRange]): Ditto.
(-[KWQTextField setSelectedRange:]): Ditto.
(-[KWQTextField setHasFocus:]): Added. This method does all the work we want to do
when we get focus and when we relinquish focus, including scrolling to make the field
visible.
(-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]):
Call setHasFocus:YES on the KWQTextField.
(-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): Ditto.
(+[KWQSecureTextField cellClass]): Use KWQSecureTextFieldCell as the cell class.
We need a cell subclass to detect when editing begins and we can't use the normal
technique because NSSecureTextField will raise an exception.
(-[KWQSecureTextField nextKeyView]): Simplified to just call through to KWQTextField.
(-[KWQSecureTextField previousKeyView]): Ditto.
(-[KWQSecureTextField nextValidKeyView]): Ditto.
(-[KWQSecureTextField previousValidKeyView]): Ditto.
(-[KWQSecureTextField widget]): Ditto.
(-[KWQSecureTextField fieldEditorDidMouseDown:]): Ditto.
(-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]):
Call setHasFocus:YES on the KWQTextField.
(-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): Ditto.
* kwq/KWQWidget.mm: (QWidget::setFocus): Do a layout before positioning the widget.
The code dealt with calls after a layout and before a draw, before, but not calls
before a layout.
2003-05-08 David Hyatt <hyatt@apple.com>
Fix for a problem where positioned/floating children with
percentage width tables inside them don't expand to fill
the width of their containing block.
The way to solve this is to detect this
case and treat the block as though it has an infinite maxwidth.
Note that this is a quirk only, since doing this for real would
be crazy. We're basically just matching broken WinIE behavior.
Reviewed by kocienda
* khtml/rendering/render_block.cpp:
=== Safari-78 ===
2003-05-08 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3174769 -- Safari doesn't ignore byte order mark at start of UTF-8 HTML document
* khtml/misc/decoder.cpp: (Decoder::decode): Added handling of the UTF-8 BOM
to the code that already handled the UTF-16 BOM.
2003-05-06 David Hyatt <hyatt@apple.com>
The purpose of this patch is to unify XML and HTML documents' root
element handling. Instead of having a special RenderHTML object
for dealing with <html>, root element handling is now done in
base classes so that it works with XML documents as well.
The changes include:
* Rename RenderRoot to RenderCanvas to more accurately
reflect what this RenderObject represents in CSS2.
* Rename root() to canvas()
* Rename isHtml() to isRoot()
* Rename isRoot() to isCanvas().
* Eliminate RenderHTML and fold its functionality into base
classes (RenderBlock and RenderBox).
* isRoot() now means "are you the RenderObject for the root
element". All isHtml() callers now say isRoot() instead.
Reviewed by gramps
* ForwardingHeaders/rendering/render_canvas.h: Added.
* ForwardingHeaders/rendering/render_html.h: Removed.
* ForwardingHeaders/rendering/render_root.h: Removed.
* WebCore.pbproj/project.pbxproj:
* khtml/ecma/kjs_dom.cpp:
* khtml/ecma/kjs_window.cpp:
* khtml/html/html_baseimpl.cpp:
(HTMLHtmlElementImpl::id):
* khtml/html/html_baseimpl.h:
* khtml/khtmlview.cpp:
(KHTMLView::layout):
(KHTMLView::print):
(KHTMLView::slotPaletteChanged):
(KHTMLView::paint):
(KHTMLView::timerEvent):
* khtml/khtmlview.h:
* khtml/rendering/render_applet.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_body.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::paintRootBoxDecorations):
(RenderBox::paintBoxDecorations):
(RenderBox::paintBackgroundExtended):
(RenderBox::containingBlockWidth):
(RenderBox::repaint):
(RenderBox::calcHeight):
(RenderBox::availableHeight):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_box.h:
* khtml/rendering/render_canvas.cpp: Added.
(RenderCanvas::RenderCanvas):
(RenderCanvas::~RenderCanvas):
(RenderCanvas::calcHeight):
(RenderCanvas::calcWidth):
(RenderCanvas::calcMinMaxWidth):
* khtml/rendering/render_canvas.h: Added.
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChildNode):
* khtml/rendering/render_flow.cpp:
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::layout):
(RenderFrameSet::userResize):
* khtml/rendering/render_html.cpp: Removed.
* khtml/rendering/render_html.h: Removed.
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject):
* khtml/rendering/render_layer.cpp:
(RenderLayer::enclosingPositionedAncestor):
(RenderLayer::convertToLayerCoords):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_line.cpp:
* khtml/rendering/render_list.cpp:
(RenderListMarker::paintObject):
* khtml/rendering/render_object.cpp:
(RenderObject::containingBlock):
(RenderObject::canvas):
(RenderObject::container):
(RenderObject::removeFromObjectLists):
(RenderObject::detach):
(RenderObject::nodeAtPoint):
(RenderObject::scheduleRelayout):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
* khtml/rendering/render_root.cpp: Removed.
* khtml/rendering/render_root.h: Removed.
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
* khtml/rendering/table_layout.cpp:
(shouldScaleColumns):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::attach):
(DocumentImpl::setSelection):
(DocumentImpl::clearSelection):
(DocumentImpl::prepareMouseEvent):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::createRenderer):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::rendererIsNeeded):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::adjustPageHeight):
(KWQKHTMLPart::forceLayoutForPageWidth):
(KWQKHTMLPart::selectionRect):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge _setupRootForPrinting:]):
2003-05-07 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3127927 -- web view should not use primary selection color when it's not first responder
* kwq/WebCoreBridge.h: Added usesInactiveTextBackgroundColor getter and setter.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:]): Set the QPainter's usesInactiveTextBackgroundColor to match the
value from the part.
(-[WebCoreBridge selectionRect]): Fix nil-deref that happened in the no-KHTMLView case.
(-[WebCoreBridge setUsesInactiveTextBackgroundColor:]): Added.
(-[WebCoreBridge usesInactiveTextBackgroundColor]): Added.
* kwq/KWQKHTMLPart.h: Added usesInactiveTextBackgroundColor, including getter and setter.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Initialize usesInactiveTextBackgroundColor.
* kwq/KWQPainter.h: Added setUsesInactiveTextBackgroundColor and made selectedTextBackgroundColor
a const member function, not a static one.
* kwq/KWQPainter.mm:
(QPainter::QPainter): Initialize _usesInactiveTextBackgroundColor to false.
(QPainter::selectedTextBackgroundColor): Return secondarySelectedControlColor instead of
selectedTextBackgroundColor if _usesInactiveTextBackgroundColor is true.
* khtml/rendering/render_text.cpp: (TextRun::paintSelection): Call selectedTextBackgroundColor
on the painter object; it's no longer a static member function.
* khtml/rendering/render_root.cpp: (RenderRoot::selectionRect): Fix nil-deref that happened
in the no-selection case.
2003-05-07 Vicki Murley <vicki@apple.com>
Reviewed by darin.
- modify the Mixed build style to build optimized with symbols
* WebCore.pbproj/project.pbxproj: removed OPTIMIZATION_CFLAGS, use WebCore.exp
2003-05-07 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3109258 -- Unicode above U+FFFF not handled correctly when expressed as numeric entities
* khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseEntity): Keep track of the entity in
an unsigned integer that can hold 32 bits rather than a QChar. Convert to a pair of Unicode
surrogate code points if necessary.
* khtml/misc/stringit.h: Add a second pushed character, used for the case where we have a pair of
surrogate characters for a single numeric entity.
* khtml/html/htmltokenizer.h: Add missing DOM:: that was compiling only due to "using namespace DOM"
in stringit.h. Replace EntityChar with EntityUnicodeValue.
2003-05-06 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3211756 -- form field contents on the left instead of right on page in RtL language
* khtml/rendering/render_form.cpp:
(RenderLineEdit::updateFromElement): Call setAlignment based on the style's direction.
(RenderTextArea::updateFromElement): Ditto.
* kwq/KWQLineEdit.h: Added setAlignment.
* kwq/KWQLineEdit.mm: (QLineEdit::setAlignment): Added. Calls setAlignment on KWQTextField.
* kwq/KWQTextArea.h: Added setAlignment.
* kwq/KWQTextArea.mm: (-[KWQTextArea setAlignment:]): Added. Calls setAlignment on NSTextView.
* kwq/KWQTextEdit.h: Added setAlignment.
* kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Added. Calls setAlignment on KWQTextField.
* kwq/KWQTextField.mm: (-[KWQTextField setAlignment:]): Added. Call setAlignment on secure
text field too.
- fixed 3250538 -- on pages labeled "US-ASCII", non-ASCII chars are not decoded as Latin-1
as in other browsers
* kwq/KWQTextCodec.mm:
(effectiveEncoding): Added. Maps ISO Latin-1 and US-ASCII to Windows Latin-1.
(QTextCodec::fromUnicode): Use effectiveEncoding.
(KWQTextDecoder::convertUsingTEC): Use effectiveEncoding.
- other changes
* kwq/KWQCharsets.mm: (buildDictionaries): Make the first encoding in the file win for
purposes of deciding which name is used. I thought this was happening before, but actually
the last one was winning. Do this by using CFDictionaryAddValue, which does nothing if
there's already a dictionary entry, instead of CFDictionarySetValue, which replaces.
2003-05-06 David Hyatt <hyatt@apple.com>
Make negative z-index content paint above the background of
the stacking context element that encloses it. This fixes
gettyimages.com and hotwired.com.
Reviewed by kocienda
* khtml/css/html4.css:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
(RenderLayer::nodeAtPoint):
(RenderLayer::RenderZTreeNode::constructLayerList):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.h:
* khtml/rendering/render_root.cpp:
* khtml/rendering/render_table.cpp:
(RenderTable::paint):
* kwq/KWQRenderTreeDebug.cpp:
(write):
2003-05-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3245048 - "Block Pop-Up Windows" can easily be bypassed using javascript: URLs
Closed the loophole by tracking what client redirects were
triggered by user actions, and making sure the script interpreter
knows.
* khtml/ecma/kjs_window.cpp:
(Window::put):
(WindowFunc::tryCall):
(Location::put):
(LocationFunc::tryCall):
* khtml/khtml_part.cpp:
(KHTMLPart::executeScript):
(KHTMLPart::clear):
(KHTMLPart::scheduleRedirection):
(KHTMLPart::slotRedirect):
(KHTMLPart::urlSelected):
* khtml/khtml_part.h:
* khtml/khtmlpart_p.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]):
2003-05-06 Darin Adler <darin@apple.com>
Reviewed by Ken.
- used ObjectAlloc to find large numbers of allocations on startup and get rid of some
* kwq/KWQColor.mm: (QColor::getNSColor): Keep a cache of 32 colors instead of returning a new
one each time. Also use special cases for black and white.
2003-05-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3241065 - popcap.com doesn't work in Safari, window.scrollBy fails to work in onLoad
Make sure to do a layout before accessing any window properties or
calling any window functions that require a layout to work
properly.
* khtml/ecma/kjs_window.cpp:
(Window::get):
(WindowFunc::tryCall):
(Window::updateLayout):
* khtml/ecma/kjs_window.h:
2003-05-05 David Hyatt <hyatt@apple.com>
Fix for 3247722. Make sure the grammar accepts properties with
no values as declarations (albeit bad ones).
Reviewed by darin
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-05-05 David Hyatt <hyatt@apple.com>
Fix for 3248587. Refine the crash fix for generated image
content so that we still set the image's intrinsic width
and height properly.
Reviewed by john
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
2003-05-04 David Hyatt <hyatt@apple.com>
When using the content property in CSS, you can string together
an intermixed list of strings and image URLs. The old code
only supported a single image URL, and if you tried to mix
text in with images, you ended up crashing.
The crash bug is 3248172. The fix is to maintain a list of
ContentData objects instead of just a single object and to
ensure that a whole list of generated content gets made (and
not just a single RenderObject).
Reviewed by john
* khtml/css/cssstyleselector.cpp:
(applyRule)
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
* khtml/rendering/render_image.cpp:
(RenderImage::setStyle):
(RenderImage::setContentObject):
(RenderImage::updateFromElement):
* khtml/rendering/render_image.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::setContent):
(ContentData::clearContent):
* khtml/rendering/render_style.h:
2003-05-05 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed replaceOccurrencesOfString crash reported in bug 3247249 (not what the bug is about)
* kwq/KWQTextArea.mm: (-[KWQTextArea text]): Use the length of the replaced text.
2003-05-04 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3131534 -- "javascript:window.open()" leads to page not found error
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): For open() calls, if the
first parameter is not present, use "" instead of "undefined" as the URL.
- fixed 3244766 -- window.open() doesn't position window correctly along the y axis
* kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow):
Fixed the code that flips the y coordinate to take the window height into account.
2003-05-03 David Hyatt <hyatt@apple.com>
Add smallCaps boolean to the string drawing and measuring
routines. WebCore should be done after this patch, with
the rest of the work being done entirely in WebKit.
Reviewed by darin
* khtml/rendering/font.cpp:
(Font::drawText):
(Font::floatWidth):
(Font::floatCharacterWidths):
(Font::width):
* kwq/KWQFontMetrics.h:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::width):
(QFontMetrics::floatWidth):
(QFontMetrics::floatCharacterWidths):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawText):
* kwq/WebCoreTextRenderer.h:
2003-05-03 David Hyatt <hyatt@apple.com>
Rename layouted to needsLayout. Add a layoutIfNeeded method
and start using it in places that do if (needsLayout()) layout();
Reviewed by kocienda
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty):
* khtml/html/html_baseimpl.cpp:
(HTMLFrameSetElementImpl::recalcStyle):
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::width):
(HTMLImageElementImpl::height):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
* khtml/khtmlview.cpp:
(KHTMLView::layout):
(KHTMLView::print):
(KHTMLView::timerEvent):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_applet.cpp:
(RenderApplet::layout):
(RenderEmptyApplet::layout):
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_box.cpp:
(RenderBox::close):
* khtml/rendering/render_container.cpp:
(RenderContainer::addChild):
(RenderContainer::removeChildNode):
(RenderContainer::removeChild):
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
(RenderContainer::layout):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_form.cpp:
(RenderFormElement::layout):
(RenderSubmitButton::updateFromElement):
(RenderSelect::updateFromElement):
(RenderSelect::calcMinMaxWidth):
(RenderSelect::layout):
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::layout):
(RenderFrameSet::positionFrames):
(RenderFrameSet::userResize):
(RenderFrameSet::canResize):
(RenderPart::setWidget):
(RenderPartObject::updateWidget):
(RenderPartObject::layout):
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
(RenderImage::layout):
* khtml/rendering/render_inline.cpp:
(RenderInline::addChildToFlow):
(RenderInline::splitInlines):
(RenderInline::splitFlow):
* khtml/rendering/render_layer.cpp:
(RenderLayer::checkScrollbarsAfterLayout):
* khtml/rendering/render_list.cpp:
(RenderListItem::layout):
(RenderListMarker::setStyle):
(RenderListMarker::layout):
(RenderListMarker::setPixmap):
* khtml/rendering/render_object.cpp:
(RenderObject::RenderObject):
(RenderObject::setNeedsLayout):
(RenderObject::information):
(RenderObject::dump):
(RenderObject::setStyle):
(RenderObject::invalidateLayout):
(RenderObject::detach):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
(RenderWidget::setQWidget):
(RenderWidget::layout):
* khtml/rendering/render_root.cpp:
* khtml/rendering/render_table.cpp:
(RenderTable::addChild):
(RenderTable::layout):
(RenderTable::paint):
(RenderTable::close):
(RenderTable::splitColumn):
(RenderTable::appendColumn):
(RenderTable::recalcSections):
(RenderTableSection::addChild):
(RenderTableSection::setCellWidths):
(RenderTableSection::layoutRows):
(RenderTableSection::recalcCells):
(RenderTableRow::addChild):
(RenderTableRow::layout):
(RenderTableCell::paint):
* khtml/rendering/render_text.cpp:
(RenderText::setText):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
(DocumentImpl::updateStyleSelector):
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::insertBefore):
(NodeBaseImpl::replaceChild):
(NodeBaseImpl::appendChild):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayoutForPageWidth):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge needsLayout]):
2003-05-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- reformatted method prototypes to match AppKit style
* kwq/WebCoreBridge.h:
* kwq/WebCoreDOMPrivate.h:
* kwq/WebCoreHistory.h:
* kwq/WebCoreResourceLoader.h:
* kwq/WebCoreTextRenderer.h:
* kwq/WebDOMDocument.h:
* kwq/WebDOMElement.h:
* kwq/WebDOMNode.h:
2003-05-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 2936175 - MALLORY: please implement onResize
* khtml/khtmlview.cpp:
(KHTMLView::resizeEvent): Put most of this in #if !APPLE_CHANGES,
since we already do the relayout and such on resize elswhere.
* kwq/KWQEvent.h: Add a minimal QResizeEvent.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::sendResizeEvent): Send it to the view.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge sendResizeEvent]): Send it to the part.
2003-05-02 David Hyatt <hyatt@apple.com>
Fix for 3184113, bottom margins didn't collapse with their children
like they were supposed to. The problem is fixed by separately
caching whether or not the top and bottom margins can collapse
with their kids instead of having one global canCollapse variable.
Reviewed by kocienda
* khtml/rendering/render_block.cpp:
2003-05-02 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3236383 -- http://www.xy.com/ exception, crash loading main page
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scheduleClose): Change to use closeWindowSoon, so that
the delay is on the WebKit side so it can be tied to the WebView as a whole, not a particular bridge.
* kwq/WebCoreBridge.h: Replaced closeWindow with closeWindowSoon.
- rolled in a couple of harmless and eventually-possibly-useful changes inspired by changes
OmniGroup made in their copy of WebCore
* kwq/KWQListBox.mm: Make KWQTableView a KWQWidgetHolder.
(-[KWQTableView widget]): Return the widget.
* kwq/KWQScrollView.mm: (QScrollView::ensureVisible): First cut at implementing these.
2003-05-02 David Hyatt <hyatt@apple.com>
Make sure that recalcSections always clears out the needSectionRecalc
boolean, even in the case where it finds column elements.
Fixes the assert outlined in bug 3237651.
Reviewed by john
* khtml/rendering/render_table.cpp:
(RenderTable::recalcSections):
2003-05-01 David Hyatt <hyatt@apple.com>
Fix for 3226030, percentage height tables inside table cells
don't grow to fill the space inside the cell. There was
a missing edge case here for the case where the table was
nested inside a table cell.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2003-05-01 David Hyatt <hyatt@apple.com>
Add a cycle check when importing stylesheets to prevent
infinite loops.
Reviewed by john
* khtml/css/css_ruleimpl.cpp:
(CSSImportRuleImpl::init):
2003-05-01 David Hyatt <hyatt@apple.com>
Table rows don't know their precise dimensions, so repainting
them fails. For now, just make an invalidation of a table
row due to CSS changes invalidate the whole table.
This is what the old Safari table code used to do prior to the
new table code landing.
Fixes bug #3205092.
Reviewed by darin/john
* khtml/rendering/render_table.cpp:
(RenderTableRow::repaint):
* khtml/rendering/render_table.h:
2003-05-01 David Hyatt <hyatt@apple.com>
Fix for 3232637, don't let generated parentless image content
try to do width/height/layout calculations. It will do this
all anyway, when it finally gets inserted into the rendering
tree.
Reviewed by john
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
2003-05-01 David Hyatt <hyatt@apple.com>
Fix for 3239404, a crash caused because a block-level :after
element was being inserted as generated content inside an
inline element.
The fix is to mutate the display of the generated content to
be inline when the parent of the generated content is also
inline.
Section 12.1 of the CSS2 spec (at the very end of the spec)
covers this special case. Once we do the mutation it becomes
impossible for generated content to cause a splitFlow, and so
the crash is plugged.
Reviewed by john
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
2003-05-01 David Hyatt <hyatt@apple.com>
Replace effectiveWidth and effectiveHeight with a
parameterized overflowWidth/Height, since this is much better
terminology.
Also fix event handling so that it no longer assumes (incorrectly)
that being inside the overflow rect of an object means you are
inside the object. Now there are two separate checks, with the
overflow check being used only to figure out if you should check
inside your kids.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::repaint):
* khtml/rendering/render_flow.cpp:
(RenderFlow::repaint):
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_table.h:
=== Safari-77 ===
2003-04-30 David Hyatt <hyatt@apple.com>
Fix for 3244157, giantrobot.com misrenders with a lot of
vertical space. Overflow heights were being miscomputed for
overflow:auto blocks.
Reviewed by gramps
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
2003-04-30 David Hyatt <hyatt@apple.com>
Fix for 3210725, invalid n/a selector treated as valid. This
fix also makes the CSS1 test on the test suite for forward-compatible
parsing completely pass (yay!), which was an issue on
diveintomark's list.
Reviewed by gramps
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-04-30 David Hyatt <hyatt@apple.com>
Fixes for 3227983 and 3224521, both bugs involving bad letter-spacing
property values. This fixes all Movable Type blogs that had this
error in their stylesheets.
Reviewed by gramps
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-04-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3233819 -- MALLORY: onChange handler being called on SELECT even if selected item does not change
* kwq/KWQComboBox.h: Added _currentItem variable, updateCurrentItem function, and replaced
activated function with itemSelected function.
* kwq/KWQComboBox.mm:
(QComboBox::QComboBox): Call updateCurrentItem so _currentItem is up to date.
(QComboBox::insertItem): Ditto.
(QComboBox::clear): Ditto.
(QComboBox::setCurrentItem): Ditto.
(QComboBox::updateCurrentItem): Added. Returns true if current item has changed since the last time
the function was called.
(QComboBox::itemSelected): Only send the activate method if updateCurrentItem returns true.
(-[KWQComboBoxAdapter action:]): Call itemSelected instead of calling activated directly.
2003-04-29 David Hyatt <hyatt@apple.com>
Fix for the Adam Rice float/padding test on diveintomark's list
of bugs. We weren't adding in the parent's border/padding in
one case in the clearFloats function, which resulted in the
float being incorrectly positioned.
Reviewed by darin
* khtml/rendering/render_block.cpp:
2003-04-29 David Hyatt <hyatt@apple.com>
This patch fixes the following bugs:
(1) 3186174 - padding-left improperly applied to list items.
The fix is in render_list.cpp and involves adding in the
list item's border and padding so that outside markers end up
outside the border box instead of just inside the padding box.
(2) 3239571 - a stray !important after a ; causes the CSS parser
to choke. This patch adds a rule to parser.y to deal with
!importants found in between property values and to just ignore
them.
(3) 3170647 - positioned boxes with auto widths ended up adding
in their border/padding twice! Make sure that when
calcAbsoluteHorizontal in render_box.cpp examines m_maxWidth that
it subtracts out the border and padding and looks at content width.
(4) 3186165 - Negative padding values were being incorrectly
honored by Safari. A patch to css_styleselector.cpp checks to
see if the value specified by the rule is negative, and if so
the rule is not applied.
(5) 3132172 - The clip property could not be accessed via script
because the cssText routine for CSS_RECT primitive values had
not been implemented. In css_valueimpl.cpp this code has now been
filled in.
Reviewed by mjs
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::cssText):
* khtml/css/cssstyleselector.cpp:
* khtml/css/parser.cpp:
* khtml/css/parser.y:
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteHorizontal):
* khtml/rendering/render_list.cpp:
(RenderListMarker::paintObject):
2003-04-29 David Hyatt <hyatt@apple.com>
Fix for 3226138, crash on canada.gc.ca. Make sure a failed
@media parse doesn't crash by adding a null check.
Reviewed by mjs
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-04-29 David Hyatt <hyatt@apple.com>
The remainder of the overflow:auto patch.
A minor table cell optimization has also been included.
Also fixing one of rjw's inline table bugs. Inline tables
didn't clear their minmaxwidth bool when contents inside them
changed size.
r=mjs/gramps on overflow:auto stuff
r=rjw on the table stuff
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::checkScrollbarsAfterLayout):
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
* khtml/rendering/render_table.cpp:
(RenderTableCell::layout):
* khtml/rendering/render_table.h:
2003-04-29 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3234633 -- page with moderately deep tag nesting causes crash when closed (www.4strokenationals.com)
* khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::~NodeBaseImpl): Avoid recursion by using a global
list of child nodes to destroy and only doing the actual destruction at the top level.
2003-04-29 Darin Adler <darin@apple.com>
Mostly reviewed by Ken, some bits reviewed by John.
- fixed 3188781 -- eliminate globally initialized objects from WebCore
* kwq/KWQString.h: Change QChar::null to be a char constant, and QString::null to be a const char *.
In the cases where the code still compiles after these changes, everything works fine. A few cases
that didn't compile are fixed below.
* kwq/KWQString.mm: Remove QString::null.
(QString::mid): Return QString() instead of null.
* kwq/KWQChar.mm: Remove the definition of QChar::null.
* khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): Use DOMString explicitly in one place
where the code said QString::null. The trick where QString::null is really a const char * does not
work in this case.
* khtml/khtml_part.cpp: (KHTMLPart::reparseConfiguration): Use QString() instead of QString::null
in one place. The trick where QString::null is really a const char * does not work in this case.
* kwq/KWQKHTMLSettings.h: Use QString() for settingsToCSS, the trick where QString::null is really
a const char * does not work in this case.
* khtml/rendering/render_list.cpp: (RenderListMarker::paintObject): Use an isEmpty check here instead
of comparing with QString::null. Not sure this change was strictly required, but it is simpler and
may also make the code slightly faster.
* kwq/KWQKFileDialog.h: Removed. This used QString::null in a way that is incompatible with the new
"0" hack, but was not used any more.
* kwq/KWQKFileDialog.mm: Removed.
* ForwardingHeaders/kfiledialog.h: Empty this out, since there is no KWQKFileDialog.h any more.
* WebCore.pbproj/project.pbxproj: Removed KWQKFileDialog.h and .mm.
* khtml/html/htmltokenizer.cpp: Change the commentStart global array to be an array of char instead
of QChar to avoid the static constructor; the code works fine with char anyway.
* khtml/html/html_formimpl.cpp: Change the global constants in this file to be char instead of QChar.
It works this way (and faster for KWQ), and avoids the static constructor.
* khtml/rendering/bidi.h: Change BidiIterator from a class with constructors into a plain struct.
The copy construct and assignment operator weren't needed anyway since they simply duplicated default
assignment, and if we have a constructor then we can't use it as a global object, since we want to
avoid static constructors. Do the same with BidiStatus, and also stop using bit fields. It's silly to
use bit fields for something when we have only one global instance of it; just makes extra code size
and saves a few bytes.
* khtml/rendering/bidi.cpp:
(BidiIterator::current): Move the non-breaking space global inside this function.
(appendRunsForObject): Initialize BidiIterator object using brace notation.
(buildCompactRuns): Initialize BidiIterator objects using brace notation and assignment.
(RenderBlock::layoutInlineChildren): Initialize BidiStatus fields separately. Initialize BidiIterator
objects using brace notation and assignment.
(RenderBlock::findNextLineBreak): Initialize BidiIterator objects using brace notation and assignment.
* khtml/rendering/render_frames.cpp: Removed an include of <iostream.h>. This pulled the entire
C++ I/O library in, with lots of static constructors. Elsewhere, we are careful not to use the C++
I/O library in WebCore except in Development versions. And this file didn't actually use the library,
just included the header.
* kwq/KWQNamespace.h: Remove all the color globals except for the ones used in KHTML: black, white,
darkGray, gray, and lightGray. And for those, make the globals RGB constants instead of QColor objects.
This gets rid of the global objects with constructors and works without any KHTML code changes.
* kwq/KWQColor.mm: Remove the definition of the QColor constants from the Qt class.
* kwq/KWQPainter.h: Add overloads for setPen and setBrush so they work with the "color" constants
from Qt that are now RGB constants rather than QColor objects.
* kwq/KWQPainter.mm:
(QPainter::setPen): Set style to solid line and width to 0 when the parameter is an RGB constant.
This is just like what you'd get if you constructed a QPen.
(QPainter::setBrush): Set style to solid pattern when the parameter is an RGB constant.
This is just like what you'd get if you constructed a QBrush.
* khtml/misc/loader.h: Change m_LRULists to be a global pointer instead of a global array, so
we don't have to statically construct LRUList objects.
* khtml/misc/loader.cpp: (Cache::getLRUListFor): Allocate the global array the first time we
pass through here.
2003-04-29 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3242460 -- crash in NSPopUpButtonCell at acheter-moins-cher.com
* kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
Defer QObject timers too as well as loading while tracking a pop-up.
* kwq/KWQObject.h: Add defersTimers and setDefersTimers functions.
* kwq/KWQObject.mm:
(QObject::setDefersTimers): Added. When called with true starts deferring timers. When called
with false schedules a "delay 0" task to deliver all the timers and stop deferring them.
(-[KWQObjectTimerTarget sendTimerEvent]): Added. Contains guts of the old timerFired method.
(-[KWQObjectTimerTarget timerFired]): Puts timer on the deferred timers list or calls sendTimerEvent.
(+[KWQObjectTimerTarget stopDeferringTimers]): Remove timers items from the deferred timers list,
and makes them fire, then stops deferring timers.
* WebCore.pbproj/project.pbxproj: Reorder things a bit.
2003-04-29 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3230885 -- crash loading hixie test page in -[WebSubresourceClient connection:didReceiveData:]
* khtml/rendering/render_style.cpp: (RenderStyle::setContent):
Change code around so we don't deref the text object without checking
the contentType. Also fix the leak of a DOMStringImpl in the case
where we are asked to add a string, but the string pointer is 0.
2003-04-28 Richard Williamson <rjw@apple.com>
API changes from final review meeting.
goBackOrForwardToItem: -> goToBackForwardItem:
drop "Window" from WebUIDelegate method names.
WebElementIsSelectedTextKey -> WebElementIsSelectedKey
Cross-frame searchFor on WebView now public.
Reviewed by Chris.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
2003-04-28 Darin Adler <darin@apple.com>
Reviewed by John.
- re-fixed 3159076 -- turbotax.intuit.com forms have text fields instead of radio buttons
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::attach): Only set the type
if JavaScript hasn't set it explicitly already.
2003-04-25 David Hyatt <hyatt@apple.com>
Part two of the overflow patch. This adds the scrollbars and
patches the layers code, but it doesn't yet turn on the
overflow:auto capability.
Reviewed by mjs/gramps
* ForwardingHeaders/qscrollbar.h: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty):
(DOMNode::putValue):
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_dom.lut.h:
* khtml/rendering/render_box.cpp:
(RenderBox::contentWidth):
(RenderBox::repaintRectangle):
(RenderBox::calcAbsoluteHorizontal):
(RenderBox::calcAbsoluteVertical):
(RenderBox::lowestPosition):
* khtml/rendering/render_layer.cpp:
(RenderScrollMediator::slotValueChanged):
(RenderLayer::RenderLayer):
(RenderLayer::~RenderLayer):
(RenderLayer::updateLayerPosition):
(RenderLayer::scrollOffset):
(RenderLayer::subtractScrollOffset):
(RenderLayer::scrollToOffset):
(RenderLayer::updateScrollPositionFromScrollbars):
(RenderLayer::setHasHorizontalScrollbar):
(RenderLayer::setHasVerticalScrollbar):
(RenderLayer::verticalScrollbarWidth):
(RenderLayer::horizontalScrollbarHeight):
(RenderLayer::moveScrollbarsAside):
(RenderLayer::positionScrollbars):
(RenderLayer::checkScrollbarsAfterLayout):
(RenderLayer::paintScrollbars):
(RenderLayer::paint):
(RenderLayer::nodeAtPoint):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::clientWidth):
(RenderObject::clientHeight):
(RenderObject::scrollWidth):
(RenderObject::scrollHeight):
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
* kwq/KWQNamespace.h:
* kwq/KWQScrollBar.h: Added.
* kwq/KWQScrollBar.mm: Added.
(-[KWQScrollBar initWithQScrollBar:]):
(-[KWQScrollBar scroll:]):
(:m_valueChanged):
(QScrollBar::~QScrollBar):
(QScrollBar::setValue):
(QScrollBar::setSteps):
(QScrollBar::setKnobProportion):
(QScrollBar::scrollbarHit):
(QScrollBar::valueChanged):
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
2003-04-24 David Hyatt <hyatt@apple.com>
Rename inQuirksMode to inCompatMode. Drop uses of it in
the render tree code in favor of style()->htmlHacks().
Remove dead code in the parser dealing with discarded attributes.
Optimize bidi run justification by adding a guard.
Fix :target to not match :root when no fragment ID is specified.
Reviewed by mjs/gramps
* khtml/css/cssstyleselector.cpp:
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::setStyleSheet):
(HTMLStyleElementImpl::childrenChanged):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::createSharedCellDecls):
* khtml/html/htmlparser.cpp:
(KHTMLParser::~KHTMLParser):
(KHTMLParser::reset):
(KHTMLParser::parseToken):
(KHTMLParser::insertNode):
* khtml/html/htmlparser.h:
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
* khtml/khtml_part.cpp:
(KHTMLPart::gotoAnchor):
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLineBoxDecorations):
(RenderFlow::repaint):
* khtml/rendering/render_inline.cpp:
* khtml/rendering/render_inline.h:
* khtml/rendering/render_list.cpp:
(getParentOfFirstLineBox):
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::recalcStyle):
(DocumentImpl::recalcStyleSelector):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::createDecl):
2003-04-24 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3210096 -- server identifies page as UTF-8, page identifies itself as windows-1252, server must win
- fixed 3105796 -- www.thai.com does not display with correct encoding (<body> tag in comment before <meta>)
* khtml/khtml_part.cpp:
(KHTMLPart::write): Pass in an EncodingType rather than just a boolean. This lets us tell
the difference between EncodingFromHTTPHeader (which wins out over an encoding in a meta tag)
and DefaultEncoding (which loses).
(KHTMLPart::setEncoding): Put ifdef around the whole function. We use our own version in
KWQKHTMLPart instead.
* khtml/misc/decoder.h: Defined an EncodingType and changed the parameter to setEncoding to take
it instead of force and 8-bit-only parameters. Store it in m_type and get rid of haveEncoding.
* khtml/misc/decoder.cpp:
(Decoder::Decoder): Set m_type to DefaultEncoding.
(Decoder::setEncoding): Take a type parameter, instead of force and 8-bit-only parameters.
Use "eight-bit-only" mode for EncodingFromMetaTag only. Fix code so we don't clobber an existing
codec if we can't find a new one in a simpler way. Store the type in m_type, rather than using
the confusing "haveEncoding" flag.
(skipComment): Added. Used to skip comments found in the <head> section.
(Decoder::decode): Moved the check for the UTF-16 BOM out and do that check even when we have
an encoding (although not if we have one the user chose). Update check so that we look for a meta
tag when we have nothing except a default encoding. This fixes the bug where we have an encoding
from an HTTP header; in that case we do not want to look at the meta tag. Improve performance a bit
by not constructing a string just so we can append the data. Merged the APPLE_CHANGES case a bit
with the original case better. Added code to skip comments; this fixes the thai.com issue. Improved
the code to handle data after the first buffer full. We now avoid putting data into a QString once
we are past the header. Extended an APPLE_CHANGES ifdef to exclude more code we don't need.
* kwq/KWQKHTMLPart.h: Added setEncoding and addData to replace slotData.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setEncoding): Added. Needs to be called only once and does the first-time work as
well as setting up the encoding for the page. In practice it is called before each time addData is.
(KWQKHTMLPart::addData): Added. Needs to be called for each run of data. Now just calls write(),
but does some assertions, which is why I have not removed it and changed the bridge to call write().
* kwq/WebCoreBridge.h: Replaced the old addData:withEncoding: and addData:withOverrideEncoding: with
setEncoding:userChosen: and addData:.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setEncoding:userChosen:]): Call setEncoding on the part.
(-[WebCoreBridge addData:]): Call addData on the part.
2003-04-24 Darin Adler <darin@apple.com>
Reviewed by John.
- improved the text encoding database
* kwq/mac-encodings.txt: Changed to a new format. Now the first encoding name in every list
is the "canonical" one and is in canonical case and punctuation (no longer requiring lowercase).
Since the first is the one that will be used outgoing to send to servers, it's good to have
that one in canonical form. All subsequent aliases in the list are now required to be all
lowercase and not use any punctuation. Since the comparison is done ignoring non-alphanumeric
characters, and ignoring case, this will have no effect on which encodings are recognized.
* kwq/make-charset-table.pl: Updated to enforce the new format rules.
* kwq/KWQCharsetData.c: Regenerated.
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData): Simplify the "change commas
to spaces" code in a way that lets us get rid of APPLE_CHANGES. Use the official "ISO-8859-1"
here instead of something almost, but not quite, like it.
* kwq/KWQKCharsets.mm: (KCharsets::codecForName): Use the official "ISO-8859-1" here instead
of the unofficial "latin1". Unimportant, but cleaner this way.
- preparation for some text encoding changes to fix some bugs
* kwq/KWQKHTMLSettings.h: Added an encoding value rather than always returning a hardcoded
value. Other minor cleanup.
* kwq/KWQKHTMLSettings.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed KWQKHTMLSettings.mm.
- other changes
* kwq/KWQKHTMLPart.h: Removed "using" statement. Headers must not pollute the namespace
by doing "using".
* khtml/khtml_part.cpp: Added a "using" here.
* kwq/KWQPageState.mm: Added a "using" here.
* kwq/KWQString.h: Added an append that takes a const char * and length for use by the decoder.
* kwq/KWQString.mm: (QString::append): Implemented it.
* kwq/WebCoreSettings.h: Added default text encoding field and methods.
* kwq/WebCoreSettings.mm:
(-[WebCoreSettings dealloc]): Release defaultTextEncoding.
(-[WebCoreSettings setDefaultTextEncoding:]): Added.
(-[WebCoreSettings defaultTextEncoding]): Added.
=== Safari-75 ===
2003-04-24 John Sullivan <sullivan@apple.com>
- fixed 3151501 -- Toggling "Check Spelling As You Type" in a
textarea should affect future textareas
Reviewed by Darin
* kwq/KWQTextArea.mm:
(+[KWQTextAreaTextView _setContinuousSpellCheckingEnabledForNewTextAreas:]):
new method, sets a static variable and an NSUserDefault
(+[KWQTextAreaTextView _isContinuousSpellCheckingEnabledForNewTextAreas]):
new method, checks a static variable, reading it from an NSUserDefault the
first time
(-[KWQTextAreaTextView initWithFrame:textContainer:]):
override designated initializer to set continuous spell checking if appropriate
(-[KWQTextAreaTextView setContinuousSpellCheckingEnabled:]):
call _setContinuousSpellCheckingEnabledForNewTextAreas in addition to
setting the value for this object
2003-04-23 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3237301 -- REGRESSION: text fields with size greater than maxlength are sized according to maxlength
* kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Override the maximum length
for this operation.
- fixed 3236961 -- setting innerHTML with input elements doesn't set up value properly
To fix this, I rolled in the changes from the trunk of KHTML development that get rid of
the init() function and do the work in either attach() or insertedIntoDocument() instead.
* khtml/html/html_baseimpl.h: Removed init overrides, added insertedIntoDocument override.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::insertedIntoDocument): Moved HTMLBodyElementImpl::init code here.
(HTMLFrameElementImpl::attach): Moved HTMLFrameElementImpl::init code here.
(HTMLFrameSetElementImpl::attach): Moved HTMLFrameSetElementImpl::init code here.
* khtml/html/html_formimpl.h: Added m_inited flag, removed init overrides, removed unused
m_encCharset field.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formData): Removed code that set m_encCharset.
(HTMLFormElementImpl::setEnctype): Removed code that set m_encCharset.
(HTMLInputElementImpl::HTMLInputElementImpl): Initialize m_inited to false.
(HTMLInputElementImpl::attach): Moved HTMLInputElementImpl::init code here, guarded by
m_inited.
(HTMLSelectElementImpl::attach): Moved HTMLSelectElementImpl::init code here.
(HTMLTextAreaElementImpl::attach): Moved HTMLTextAreaElementImpl::init code here.
* khtml/xml/dom_nodeimpl.h: Removed init.
* khtml/xml/dom_nodeimpl.cpp: Removed init.
* khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Removed calls to init.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::startElement): Removed call to init.
(XMLHandler::startCDATA): Removed call to init.
(XMLHandler::exitText): Removed call to init.
2003-04-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3158411 -- radio button groups are per-form in WebCore, per-page in other browsers (flyglobespan.com)
* khtml/html/html_formimpl.h: Removed radioClicked. Made setName virtual and make
HTMLInputElementImpl override it. Added isCheckedRadioButtonForDocument,
addCheckedRadioButtonToDocument, and removeCheckedRadioButtonFromDocument.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::~HTMLInputElementImpl): Call removeCheckedRadioButtonFromDocument.
(HTMLInputElementImpl::setType): Call removeCheckedRadioButtonFromDocument before changing
the type and addCheckedRadioButtonToDocument after.
(HTMLInputElementImpl::parseAttribute): Call removeCheckedRadioButtonFromDocument before changing
ATTR_NAME and addCheckedRadioButtonToDocument after.
(HTMLInputElementImpl::setChecked): Call removeCheckedRadioButtonFromDocument before changing
the checked state and addCheckedRadioButtonToDocument after.
(HTMLInputElementImpl::setName): Call removeCheckedRadioButtonFromDocument before changing
the name and addCheckedRadioButtonToDocument after.
(HTMLInputElementImpl::isCheckedRadioButtonForDocument): Added. Checks if this element should
be the one known to the document.
(HTMLInputElementImpl::addCheckedRadioButtonToDocument): Call addCheckedRadioButton on the
document if isCheckedRadioButtonForDocument returns true.
(HTMLInputElementImpl::removeCheckedRadioButtonFromDocument): Call
removeCheckedRadioButtonFromDocument on the document if isCheckedRadioButtonForDocument
returns true.
* khtml/xml/dom_docimpl.h: Add addCheckedRadioButton, removeCheckedRadioButton, and
m_checkedRadioButtons.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::addCheckedRadioButton): Uncheck the old radio button with this name, if any.
Store the new radio button in the "checked radio buttons" map.
(DocumentImpl::removeCheckedRadioButton): Remove the radio button from the map.
2003-04-22 Darin Adler <darin@apple.com>
* khtml/html/html_formimpl.h: Remove radioClicked.
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::setChecked): When unchecking other
input elements with the same name, traverse the entire document, not just the form.
2003-04-22 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3144966 -- problems typing in form at http://www.mobile.att.net/messagecenter
The bug was that doing a focus would always select the entire contents of the field.
While this behavior does match Mozilla's behavior for text fields, it doesn't match
WinIE; we're going to imitate WinIE and not do it. Also fix the same issue for text areas.
* kwq/KWQTextField.h: Add lastSelectedRange field.
* kwq/KWQTextField.mm:
(-[KWQTextField initWithFrame:]): Initialize lastSelectedRange (to nothing).
(-[KWQTextField initWithQLineEdit:]): Use [self init] instead of [super init]. The same
thing, but you should never call [super xxx] where xxx is a non-designated initializer
of the superclass.
(-[KWQTextField currentEditorForEitherField]): Added. Returns the current editor of either
the text field or the secure text field.
(-[KWQTextField selectedRange]): Added.
(-[KWQTextField setSelectedRange:]): Added.
(-[KWQTextField controlTextDidEndEditing:]): Store the selected text range in the
lastSelectedRange variable, so it can be used later. Also move the code that sends the
FocusOut event here.
(-[KWQTextField control:textShouldBeginEditing:]): Do the "scroll frame into view" here
isntead of in becomeFirstResponder so it can be shared.
(-[KWQTextField control:textShouldEndEditing:]): Moved FocusOut to controlTextDidEndEditing:.
(-[KWQTextField didBecomeFirstResponder]): Added. Sets the selected range back to what it
was in textShouldEndEditing, but only if we are not tabbing into the field. If we don't set
the selected range, then we inherit the behavior from NSTextField, all text selected.
We can't do the selected range work in textDidEndEditing because that's called too early.
(-[KWQTextField becomeFirstResponder]): Call didBecomeFirstResponder.
(-[KWQSecureTextField currentEditorForSecureField]): Added. Factored out of selectText:.
(-[KWQSecureTextField selectText:]): Use currentEditorForSecureField for clarity.
(-[KWQSecureTextField becomeFirstResponder]): Call didBecomeFirstResponder.
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]): Rearrange a bit.
(-[KWQTextArea setWordWrap:]): Ditto.
(-[KWQTextAreaTextView becomeFirstResponder]): Only do the selectAll: operation here
if we are tabbing into the field. Otherwise keep the selection from last time.
* khtml/rendering/render_form.cpp: (RenderTextArea::updateFromElement): Don't do the
whole "save cursor position, set text, restore cursor position" dance for the case
where the field already has the correct contents. Without this change, selections can be
collapsed to an insertion point at the start of the selection at seemingly random times.
* khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): Don't deselect the currently
focused node on mouse down. This created a symptom where a text field would lose
focus when you clicked on a button.
* kwq/KWQLineEdit.h: Remove unused frame() method.
* kwq/KWQLineEdit.mm: Remove unused, unimplemented frame() method.
2003-04-21 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed bug 3159076 -- turbotax.intuit.com forms have text fields instead of radio buttons
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::setType): Implement; loosen rule about what type changes are allowed.
(HTMLInputElementImpl::parseAttribute): Call setType for ATTR_TYPE.
- unrelated tweak
* kwq/KWQSlot.mm: (KWQSlot::KWQSlot): Use a macro here to make it a little easier to add items.
2003-04-21 Chris Blumenberg <cblu@apple.com>
Use renamed plug-in view methods.
Reviewed by john.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart):
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet):
* kwq/WebCoreBridge.h:
2003-04-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3191892 - Popup blocking prevents window.open with '_self' as target (superbitdvd.com)
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Don't apply popup blocking if the call
would open something in an existing frame (inlcuding the special
_self, _top and _parent frames.
2003-04-18 David Hyatt <hyatt@apple.com>
Make sure display:table is not accidentally mutated to
display:block.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-04-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3081926 - bookmarklet to count and display mailto links fails
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElementFunction::tryCall): Implement custom toString JavaScript method
which calls the existing toString C++ custom method.
* khtml/ecma/kjs_html.h: Added AnchorToString.
* khtml/ecma/kjs_html.lut.h: Regenerated.
2003-04-18 Chris Blumenberg <cblu@apple.com>
Fixed: 3172389 - Safari doesn't parse attributes within the OBJECT tag
Reviewed by dave.
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget): add attributes from within the OBJECT tag to params, the list of attributes we pass to plug-ins. Don't override attributes that are already in params.
2003-04-18 David Hyatt <hyatt@apple.com>
Make sure display:none is ignored and not accidentally mutated
to display:block.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-04-17 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed a bug caught by libgmalloc on Vicki's test machine
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::detach): Make sure we don't have a dangling paint device after
detaching from the KTHMLView.
(DocumentImpl::setPaintDevice): Allow a 0 parameter.
* kwq/WebCoreBridge.mm:
(nowPrinting): Handle the case of a 0 paint device.
2003-04-15 David Hyatt <hyatt@apple.com>
Missed a piece of the renaming on lowestPosition/rightmostPosition.
This was already reviewed by darin. Just missed landing one file.
Reviewed by darin
* khtml/rendering/render_box.cpp:
(RenderBox::lowestPosition):
(RenderBox::rightmostPosition):
2003-04-15 Trey Matteson <trey@apple.com>
3210061 - Forms auto-fill ignores maxlength attribute
Reviewed by Maciej.
* kwq/KWQTextField.mm:
(-[KWQTextField setStringValue:]): We now trim down incoming values
to fit the maxlength criteria. Matches the way we enforce this constraint
when maxlength is set.
2003-04-15 David Hyatt <hyatt@apple.com>
Fix 3227983 and 3229592, both the same bug involving a movable type
template:
letter-spacing: .none;
Fix is to make error-handling of exprs more generic.
Reviewed by darin
* khtml/css/parser.y:
2003-04-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3056913 -- please add Japanese auto-detect
* khtml/misc/decoder.cpp: (Decoder::decode): Turn on the auto-detect code if the
default encoding is one of the Japanese encodings. Also change things around so
the auto-detection process doesn't clobber the old chosen encoding if it does
not yield a result.
* kwq/KWQCharsets.h: Add a new IsJapanese encoding flag.
* kwq/KWQTextCodec.h: Add a new isJapanese() member function, used by the above.
* kwq/mac-encodings.txt: Add the IsJapanese flag to all Japanese encodings, and
add "jis7" as a synonym for ISO-2022-JP.
* kwq/make-charset-table.pl: Changed to allow flags even for unused encodings.
* kwq/KWQCharsetData.c: Regenerated.
2003-04-15 David Hyatt <hyatt@apple.com>
Fix for 3220809, overflow values other than visible should not
affect the document's height (or document scrollbars). This
fixes squidfingers.com and briefcase.yahoo.com
Also laying a bunch of groundwork for overflow:auto and scroll
by adding them as supported values now.
Fixed overflow so that overflow objects now dodge floats and
don't let them intrude into their space.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::containingBlockWidth):
(RenderBox::repaint):
(RenderBox::repaintRectangle):
(RenderBox::calcWidth):
(RenderBox::calcAbsoluteVertical):
(RenderBox::lowestPosition):
(RenderBox::rightmostPosition):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::repaint):
(RenderFlow::lowestPosition):
(RenderFlow::rightmostPosition):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
(RenderLayer::convertToLayerCoords):
(RenderLayer::scrollOffset):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::detach):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.h:
2003-04-15 Trey Matteson <trey@apple.com>
3229318 - no back entry created when searching at lonelyplanet.com
Reviewed by Darin.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::wasRunByUserGesture): Treat blur/focus events as being
user gestures, since they probably were caused by something the user did.
This cues us to not lock history for navigations that are spawned by these events.
2003-04-15 David Hyatt <hyatt@apple.com>
A collection of fixes.
(1) Don't lay out positioned elements so early in
layoutInlineChildren. They need to get a layout only after
all the normal flow kids have gotten a layout (and this happens
already in layoutPositionedObjects).
(2) Fix a mistake with overflow:hidden. I was applying the
overflow-clip for positioned elements only if you had defined
clip using the clip property. This makes iht.com look better
(although it still misrenders pretty badly due to some JS error
we hit in the source).
(3) Patch RenderText's height method to give more accurate
information. This affects all the layout tests. :)
Reviewed by darin
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_layer.cpp:
(RenderLayer::constructZTree):
* khtml/rendering/render_text.cpp:
(RenderText::height):
2003-04-14 Trey Matteson <trey@apple.com>
3009051 - Find on Page stops (once) at end of page, should wrap automatically WebKit
3051546 - Find on Page doesn't work for frameset pages
3058437 - can have a selection in two frames at the same time (problem for finding in frames)
3097498 - Find Previous continues to "Find Next" until end of paragraph
3097507 - Find Next searches from previous find hit instead of current selection
And a commented out fix for:
3121828 - scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll
Various missing pieces are implemented to support better finding. The fix for
3121828 is left out until 3228511 is dealt with.
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj:
* khtml/khtml_part.cpp:
(KHTMLPart::findTextBegin): Added args to allow starting a find at an arbitrary
places, such as the current selection.
(KHTMLPart::findTextNext): Implement reverse search - only the param was there.
Don't do lame scrolling selection to visible here, do better ourselves later.
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::jumpToSelection): Make whole selection rect visible, and only scroll
anything if needed. ***Commented out in lieu of 3228511.
(KWQKHTMLPart::findString): Implement find starting at the right place relative to
the selection, forwards and backwards, and wraparound. This is just setup around
calling findTextNext. Also scroll the result to be visible.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge deselectAll]): Call part instead of doc so its state isn't out of sync.
(-[WebCoreBridge searchFor:direction:caseSensitive:wrap:]): Pass extra wrap arg.
* kwq/WebCoreDOMNode.mm:
(+[WebCoreDOMNode nodeWithImpl:DOM::]):
Return a nil for a null element instead of croaking.
(-[WebCoreDOMNode initWithImpl:DOM::]): Ditto.
2003-04-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3214900 - iBench JavaScript test times get progressively slower with each test run
The fix is to make sure to always cast NodeImpl * to DocumentImpl
*. Multiple inheritance means the pointer values need not be the
same.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::getDOMObjectForDocument):
(ScriptInterpreter::putDOMObjectForDocument):
(ScriptInterpreter::deleteDOMObjectsForDocument):
(ScriptInterpreter::forgetDOMObjectsForDocument):
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_dom.cpp:
(KJS::getDOMNode):
2003-04-11 David Hyatt <hyatt@apple.com>
Reviewed by darin
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseComment):
2003-04-11 David Hyatt <hyatt@apple.com>
Refine the code that sets the display of floating and positioned
elements to block.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-04-14 Chris Blumenberg <cblu@apple.com>
Fixed build failure.
Reviewed by darin.
* khtml/rendering/render_table.cpp:
(RenderTable::cellAbove):
2003-04-12 Chris Blumenberg <cblu@apple.com>
Fixed: 3162338 - Embedding SVG with <object type="image/svg+xml"> doesn't work
Whenever we encounter an OBJECT tag with a type that starts with "image/" we create a render image object instead of a render part object. The behavior is nice because this allows the render object to resize to the size of the image if no WIDTH and HEIGHT are supplied. For example, the image at the bottom of this page:
http://tantek.com/CSS/Examples/boxmodelhack.html
The problem is that we do this for image types that we can't handle and when there are plug-ins that *can* handle the types.
Reviewed by dave.
* khtml/html/html_objectimpl.cpp:
(HTMLObjectElementImpl::rendererIsNeeded): call canRenderImageType instead of serviceType.startsWith
(HTMLObjectElementImpl::createRenderer): call canRenderImageType instead of serviceType.startsWith
(HTMLObjectElementImpl::attach): call canRenderImageType instead of serviceType.startsWith
* kwq/KWQPixmap.h:
* kwq/KWQPixmap.mm:
(canRenderImageType): new, checks if the MIME type is supported by the image factory
* kwq/WebCoreImageRendererFactory.h: added supportedMIMETypes to the WebCoreImageRendererFactory protocol
2003-04-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3165326 - javascript getSelection not implemented
* khtml/ecma/kjs_window.cpp:
(Window::get):
(WindowFunc::tryCall):
* khtml/ecma/kjs_window.h:
* khtml/ecma/kjs_window.lut.h:
2003-04-13 Trey Matteson <trey@apple.com>
3219720 - autofill mapping confused by tables, worse than MacIE (at store.apple.com)
If in scanning backwards we get to the end of a table row, we take a diversion
and scan the cell that is above the cell we started at.
Big improvement for store.apple.com.
Reviewed by Maciej
* khtml/rendering/render_table.cpp:
(RenderTable::cellAbove): New support routine to find the cell above another
* khtml/rendering/render_table.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::searchForLabelsAboveCell):
Get the cell above, scan its tree for matching text.
(KWQKHTMLPart::searchForLabelsBeforeElement):
Call above routine if we are working within a table
2003-04-12 Chris Blumenberg <cblu@apple.com>
Fixed: 3188070 - 6I32 EMBED tag with no SRC attribute doesn't load the plugin
Reviewed by dave.
* khtml/khtml_part.cpp:
(KHTMLPart::requestObject): allow URL-less parts
2003-04-11 Trey Matteson <trey@apple.com>
3148002 - printing shouldn't depend on the size of the window
The basic strategy is copied from khtmlview's print method: We reset the width
of the document to the paper width minus margins, and relayout before paginating
and printing.
Reviewed by Richard.
* khtml/rendering/render_root.cpp:
(RenderRoot::layout): Always resize our view, even when doing a layout when in
printing mode. It's necessary to change the view size because we rely on the AppKit
built-in pagination, which operates using the view geometry.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayoutForPageWidth): New method to do a layout given a
specific width.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge _setPrintingMode:]): Helper routine to take the RenderRoot in
and out of printing mode.
(-[WebCoreBridge forceLayout]): Turn printing mode on/off.
(-[WebCoreBridge forceLayoutForPageWidth:]): Turn printing mode on/off.
New glue routine to call part.
(-[WebCoreBridge drawRect:withPainter:]): Turn printing mode on/off.
(-[WebCoreBridge drawRect:]): Test paintDevice type instead of graphics context
to determine printing mode. The latter is still on when we are wrapping up the
job and want to be setting things back to normal.
(-[WebCoreBridge adjustFrames:]): Ditto.
(-[WebCoreBridge adjustPageHeightNew:top:bottom:limit:]): Turn printing mode on/off.
2003-04-11 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3225472 -- www.sina.com.cn uses A3A0 for full-width space; used to work in Simplified Chinese (Mac OS)
* kwq/KWQTextCodec.mm: (KWQTextDecoder::convertUsingTEC): Work around the problem
in the Text Encoding Converter by changing all U+E5E5 to U+3000.
* kwq/KWQString.h: Added replace(QChar, QChar), since Qt has it and I need it.
* kwq/KWQString.mm:
(QString::find): Fixed a bug where we'd yield a FATAL and return -1 on deployment
if you searched for a non-ASCII character in a string that had ASCII valid and
not Unicode valid.
(QString::replace): Added replace(QChar, QChar).
=== Safari-73 ===
2003-04-10 Trey Matteson <trey@apple.com>
3224973 - Safari sometimes stores data for AUTOCOMPLETE=OFF fields and password fields
New WC support function.
Reviewed by Darin.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementWithName:inForm:]): Run through the form's elements
looking for a matching name.
=== Safari-72 ===
2003-04-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin and Ken.
- fixed 3223127 - REGRESSION: windows for PopCap games show scroll bars now, did not in Safari-60
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Re-add scrollbars property, but change it
to default to on even when other properties are specified (unlike
other window properties). This seems to match what Mac IE, Win IE
and Windows Mozilla do.
2003-04-10 Darin Adler <darin@apple.com>
Reviewed by Trey.
- speed up startup by not loading the hand cursor until it's used
* khtml/khtml_part.cpp: (KHTMLPart::urlCursor): Use the hand cursor.
* khtml/khtmlpart_p.h: Don't store the hand cursor in a per-part global.
2003-04-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3224077 -- REGRESSION: tables on MacNN forums messed up because we reject %% due to style parser
* khtml/css/tokenizer.flex: Add a + sign after the % in the percentage rule so we allow
any number of extra percent signs. This is a temporary hack.
* khtml/css/Makefile.am: Add make rules to build tokenizer.cpp so we don't have to do it by hand.
* khtml/css/maketokenizer: Added. Script used by the make rules.
* khtml/css/tokenizer.cpp: Regenerated. The only substantive change is in the state tables.
2003-04-09 David Hyatt <hyatt@apple.com>
This first fix is a refinement of the patch I produced to fix <nobr>
on cnn.com recently. It wasn't quite good enough to plug the
regression on other sites. This fix just checks the object
we're currently breaking on (which is what I meant to do) and
not the last object examined (which will always just be the
previous object you looked at).
The code currently in the tree would work if you had two objects
like this:
[Normal Whitespace] [Nowrap Whitespace]
but not if you had three:
[Normal][Nowrap][Nowrap]
Since when you looked at the third object, |last| would be the
previous nowrap object and not the normal object. The line break
properly stays at the normal object as long as nowrap objects are
encountered, so this patch basically does what the original was
intended to do.
This fixes the line break problems on 1800flowers.com, a line break
problem on the bugzilla.mozilla.org layout test, a problem
on the zdnet layout test, and 3207196 a regression on livejournal.
The second fix in this patch is a simple reversal of
containsOnlyWhitespace. The method on RenderText was
backwards! No logical changes have been made... I just inverted
all the callers, and then I patched the method.
The third fix is to make images check for == normal instead of != nowrap
in a few places, thus preventing incorrect line break points from being
set up.
Reviewed by gramps
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
(RenderText::containsOnlyWhitespace):
2003-04-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3223414 -- update text encoding menu and encoding names table
Made changes as suggested by Deborah Goldsmith and Peter Edberg from the International group.
* kwq/mac-encodings.txt:
Moved all Korean character sets that are not explicitly Macintosh from MacKorean to EUC_KR.
Moved Shift JIS character sets that are not explicitly Microsoft from DOSJapanese to ShiftJIS_X0213_00.
Moved cp949 from DOSKorean to EUC_KR (DOSKorean is not implemented in Jaguar).
Moved big5 character sets that are not explicitly Microsoft from DOSChineseTrad to Big5_HKSCS_1999.
Moved all gb2312-80 character sets from GB_2312_80 to GB_18030_2000.
Moved all gbk character sets from GBK_95 to GB_18030_2000.
Moved all euc-cn character sets from EUC_CN to GB_18030_2000.
* kwq/KWQCharsetData.c: Regenerated.
2003-04-09 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3223126 -- REGRESSION: exception BrowserWindow isDescendantOf:]: selector not recognized
* kwq/KWQWidget.mm: (QWidget::hasFocus): Add missing check of the class of the first
responder before calling an NSView method on it.
2003-04-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3222708 -- REGRESSION: repro crash trying to read news at nttdocomo
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Make window.open do its location
change with scheduleRedirection like all the other JavaScript calls that change location.
2003-04-08 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3221400 -- REGRESSION: password field with onfocus handler that does select causes focus/typing trouble
* kwq/KWQTextField.mm:
(-[KWQTextField selectText:]): Rearrange slightly.
(-[KWQTextField becomeFirstResponder]): Add code to make the secure field first responder
when in password mode. The old code did this indirectly through the call to setDocumentFocus,
which caused minor trouble.
(-[KWQSecureTextField selectText:]): Correct the current editor check to use a technique
that works even for the secure text field's editor (which does not get returned by currentEditor).
* kwq/KWQWidget.mm: (QWidget::hasFocus): Update the logic here so it works for the secure text
field and the secure text field's editor.
2003-04-08 David Hyatt <hyatt@apple.com>
Fix for 3166374. Making the nudie blog work. My loop for
removing floating objects when they got deleted wasn't catching
all the cases.
Reviewed by darin
* khtml/rendering/render_object.cpp:
(RenderObject::removeFromObjectLists):
2003-04-08 David Hyatt <hyatt@apple.com>
Fix for 3220979. Regression caused by changes to the CSS
parser's error handling. Fix is to narrow my original patch
to handle a specific subtype of error for properties.
Reviewed by darin
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-04-08 Richard Williamson <rjw@apple.com>
Fixed 3221353. Added check for nil part.
Reviewed by Darin.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::detach):
2003-04-07 Richard Williamson <rjw@apple.com>
Fix for 3220988. Cancel frame load if it's detached before
finished loading.
Reviewed by Maciej.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::detach):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.mm:
(KHTMLPart::frameDetached):
* kwq/WebCoreBridge.h:
2003-04-07 David Hyatt <hyatt@apple.com>
Fix for 3220395. nearestFloatBottom() mistakenly returned 0
when it ran out of floats to return.
Reviewed by gramps
* khtml/rendering/render_block.cpp:
2003-04-07 David Hyatt <hyatt@apple.com>
Fix for the scrollbar problem in 3220395. Does not yet fix
the overlap problem. lowest/rightmostPosition got broken by
the RenderFlow split. This patch makes sure that we still crawl
into inlines with overhangingContents.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_flow.cpp:
(RenderFlow::lowestPosition):
(RenderFlow::rightmostPosition):
* khtml/rendering/render_flow.h:
2003-04-07 David Hyatt <hyatt@apple.com>
* khtml/html/htmlparser.cpp:
(KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
This is a patch to the parser to prevent residual
style from creating illegal constructs according to the DTD.
For now, it will just bail on performing the fixup if an
illegal construct would be created.
This fixes the regression #3219944.
Reviewed by darin
2003-04-07 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3220490 -- REGRESSION: MALLORY horiz scrollbar incorrectly appears with abs positioned content
* khtml/rendering/render_block.cpp: (RenderBlock::rightmostPosition):
Fix a place where I had xPos instead of yPos.
=== Safari-71 ===
2003-04-04 Darin Adler <darin@apple.com>
Reviewed by John and Richard.
- fixed 3218725 -- REGRESSION: reproducible crash in recalcStyle on reload
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): Initialize m_paintDevice to 0.
2003-04-04 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3125850 -- VIP: "search by goo" instead of "search by google" at livepage.apple.com
We decided not to fix the general problem right now, but just hack the site.
* khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::parseAttribute):
Just ignore the style set by livepage.apple.com, so we get a too-big
"Search by Google" rather than a cut off "Search by Goo".
2003-04-04 David Hyatt <hyatt@apple.com>
Fix for the Search button cutoff on livepage.apple.com We
weren't honoring hspace/vspace on input elements.
Reviewed by darin
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::parseAttribute):
2003-04-04 David Hyatt <hyatt@apple.com>
Fix for 3218085. Remove the bogus 2cm print rule for body in the
html4.css sheet.
Reviewed by darin/trey
* khtml/css/html4.css:
2003-04-04 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3217687 -- REGRESSION: printing uses widths from screen fonts, messing up layout
To get the style machinery working for me instead of against me, I had to introduce both
FontDef and QFont to the screen/printer font dichotomy. Just following that through took
care of the bugs we were seeing.
* khtml/rendering/font.h: Add a usePrinterFont field to FontDef (in APPLE_CHANGES).
* khtml/rendering/font.cpp: (Font::update): Set the new "printer font" field on the QFont
(in APPLE_CHANGES).
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): Set usePrinterFont field on the
document's fontDef (in APPLE_CHANGES).
* kwq/KWQFont.h: Add isPrinterFont, setter, getter.
* kwq/KWQFont.mm:
(QFont::QFont): Default isPrinterFont to false, copy when copying.
(QFont::operator=): Copy isPrinterFont.
(QFont::setPrinterFont): Added.
(QFont::operator==): Compare isPrinterFont.
* kwq/KWQFontMetrics.mm: Remove the _rendererUsesPrinterFont field and associated code.
This was only needed when the same QFont could be both printer and screen font, but now
the QFont itself is different.
* kwq/KWQPainter.mm: (QPainter::_updateRenderer): Remove textRendererUsesPrinterFont field
and associated code, for same reason as above.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge reapplyStylesForDeviceType:]): Set the document's
paint device.
* kwq/WebCoreTextRendererFactory.h: Remove global setUsingPrinterFonts: and
usingPrinterFonts methods. We now handle this at the document level. Add a usingPrinterFont:
parameter to rendererWithFont:, which is now how KHTML tells the text rendering code which
kind to use.
* kwq/WebCoreTextRendererFactory.m: Removed KWQTextRendererFactoryUsingPrinterFonts.
(-[WebCoreTextRendererFactory rendererWithFont:usingPrinterFont:]): Added parameter.
- other changes
* kwq/KWQPaintDevice.h: Store the device type instead of using a virtual function.
* kwq/KWQPrinter.h: Set device type in constructor instead of overriding devType function.
* kwq/KWQPixmap.h: Changed destructor back to non-virtual (and entire class back to
non-polymorphic), now that QPaintDevice doesn't use virtual functions any more.
* kwq/KWQPaintDeviceMetrics.h: Remove unused width() and height().
* kwq/KWQPaintDeviceMetrics.mm: Ditto.
* WebCore.pbproj/project.pbxproj: Removed KWQTextRendererFactory.h.
* kwq/KWQTextRendererFactory.h: Removed.
2003-04-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3031544 - can't login on secure paytrust page due to lack of onchange handler
* kwq/KWQTextField.mm:
(-[KWQTextField control:textShouldBeginEditing:]): Send FocusIn event
to event filter here.
(-[KWQTextField control:textShouldEndEditing:]): Send FocusOut event to
event filter here.
(-[KWQTextField fieldEditorDidBecomeFirstResponder]): Removed.
(-[KWQTextField fieldEditorDidResignFirstResponder]): Removed.
* kwq/WebCoreFirstResponderChanges.h: Removed first responder methods.
2003-04-03 Trey Matteson <trey@apple.com>
3067928 - printing should not break lines in half
3217607 - when printing we should not draw the selection
We leverage the existing knowledge that a couple render object classes had
for adjusting pagination. Wrote 3217705 saying we should add similar
smarts to a few more places.
Reviewed by Darin.
* ForwardingHeaders/qprinter.h: Added.
* khtml/rendering/render_list.cpp:
(RenderListMarker::paintObject): Call our special setBestTruncatedAt instead
of khtml's setTruncatedAt.
* khtml/rendering/render_root.cpp:
(RenderRoot::setBestTruncatedAt): Accumulate the best pagination boundary.
* khtml/rendering/render_root.h:
* khtml/rendering/render_text.cpp:
(RenderText::paintObject): Call our special setBestTruncatedAt instead
of khtml's setTruncatedAt.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::paint): Don't draw the debugging red background when printing.
(KWQKHTMLPart::adjustPageHeight): The meat of the change. Make another
painting pass (with actual painting disabled) to get the pagination boundary
set as a side effect. Return result up to AppKit.
* kwq/KWQPaintDevice.h: devType() made virtual
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::QPainter): New constructor for making a printing painter.
(QPainter::device): Return either the Screen or Printer device.
* kwq/KWQPixmap.h: Destructor needed to become virtual.
* kwq/KWQPrinter.h: Implement devType().
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:]): Setup printer device in our painter if we're
not drawing to the screen.
(-[WebCoreBridge adjustFrames:]): Ditto.
(-[WebCoreBridge adjustPageHeightNew:top:bottom:limit:]): Forward to part.
2003-04-03 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3194468 -- ARCH: text zoom should scale line-height as well as font-size
* khtml/css/css_valueimpl.h:
* khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::computeLength): Add a new version that does
a multiply before rounding. Also simplify the rounding code.
* khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): For line height, multiply by the
text zoom factor in cases where the height isn't already relative to the font size.
- other changes
* khtml/rendering/render_replaced.cpp: (RenderWidget::paintObject): Disable code to work around
X11 widget size limit. It can only do harm for us.
2003-04-03 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed bug 3216832 -- REGRESSION: scroll bar doesn't appear soon enough when shrinking excite.com horizontally
* khtml/rendering/table_layout.cpp: (AutoTableLayout::calcEffectiveWidth):
Fixed mistake where using the wrong variable led to the colspan distribution
loop terminating early, and not giving any additional width to the second column.
- fixed some navigator properties as discussed in the meeting yesterday (with Don, Dave, Mike Malone)
* khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
Use the date 20030107 instead of 20021225 because people think it's less arbitrary.
Use "Apple Computer, Inc." as the vendor string.
2003-04-02 David Hyatt <hyatt@apple.com>
Fix for 3216650. Needed an additional check when the disabled
attribute is changed on <link> elements for stylesheets to keep
the pending sheet count in sync.
Reviewed by gramps
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::parseAttribute):
2003-04-02 David Hyatt <hyatt@apple.com>
Fix for 3212011. Avoid applying a fixup to the minwidth
of overflow:hidden table cells, since we don't really have
an accurate width to compare against.
I filed followup bug 3216709 to deal with the fact that this
fixup has been disabled.
Reviewed by john
* khtml/rendering/render_block.cpp:
2003-04-02 David Hyatt <hyatt@apple.com>
Do not assume all columns have a minwidth/maxwidth of 1px.
Instead give them a min/maxwidth of 0px, and only inflate to
1px if a cell originates in the column.
This fixes the error on travelocity.com, where a large colspan
leads to the implicit creation of a new column that contains no
originating cells. That new column should be 0px wide, not
1px.
The bug # is 3170592.
Reviewed by kocienda
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::recalcColumn):
* khtml/rendering/table_layout.h:
2003-04-01 David Hyatt <hyatt@apple.com>
Fix for excite.com. There are many bugs being fixed that all
contributed to the wideness of the table.
The bug # is 3200534
Reviewed by darin
* khtml/rendering/table_layout.cpp:
(shouldScaleColumns):
2003-04-02 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3213854 -- REGRESSION: can't click on a text field to select it
- fixed 3201477 -- friends links don't work on hyatt's blog
* khtml/rendering/render_object.cpp: (RenderObject::nodeAtPoint): Skip floating objects when
hit testing children.
* khtml/rendering/render_inline.cpp: (RenderInline::nodeAtPoint): Ditto.
2003-04-01 Trey Matteson <trey@apple.com>
3119711 - redirects to anchors leave window half-loaded (was SCClib.org is half loaded, half rendered)
The problem happened when an anchor nav was the last half of a client redirect.
We would never stop the redirect timer, and thus never post a clientRedirectCanceled
message up through the stack. This left the app thinking that it was in redirect
mode even when the whole navigation had finished, which makes it not clear the
progress bar.
Reviewed by Darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scrollToAnchor): Stop the redirect timer.
2003-04-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3182103 - REGRESSION: one developer.apple.com page is so slow, it almost seems like a hang
* khtml/rendering/bidi.cpp:
(RenderBlock::findNextLineBreak): Avoid returning bad iterators
that point past the end of an object instead of to the start ot
the next one.
2003-04-01 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3123709 -- redirect isn't followed at Apple's Dental Benefits provider
* khtml/dom/dom2_events.h: Added boolean "isWindowEvent" parameter.
* khtml/dom/dom2_events.cpp: (EventListener::handleEvent): Ignore boolean "isWindowEvent" parameter.
* khtml/ecma/kjs_events.h: Added boolean "isWindowEvent" parameter.
* khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Look at new "isWindowEvent" parameter,
and send the event to the window if it's true, rather than the current node, document, and form.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): Pass true for "isWindowEvent".
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::handleLocalEvents): Pass false for "isWindowEvent".
2003-04-01 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3144287 -- CSS with media=print not used when printing
* kwq/KWQKHTMLPart.h: Added a setMediaType function, so the bridge can access
the KHTMLView::setMediaType function, which is private (KWQKHTMLPart is a friend).
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setMediaType): Call setMediaType on the
KHTMLView.
* kwq/WebCoreBridge.h: Added a device type parameter to reapplyStyles.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge reapplyStylesForDeviceType:]):
Call setMediaType with the appropriate media type for the passed in device type.
2003-04-01 David Hyatt <hyatt@apple.com>
Table code fixes. Working to try to fix excite.com.
Reviewed by darin
* khtml/rendering/table_layout.cpp:
(shouldScaleColumns):
(AutoTableLayout::calcMinMaxWidth):
2003-04-01 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3213900 -- REGRESSION: crash in CSS parser at http://radioalice.com/
* khtml/css/cssparser.cpp: (CSSParser::parseColor): Add a missing check for nil.
2003-04-01 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3202542 -- REGRESSION: preinitialized password inputs do not show dots (affects mac.com)
* kwq/KWQTextField.mm: (-[KWQTextField setPasswordMode:]): Remove code that sets the string
value to "". This is not needed, and because a text changed signal is sent out it makes the
caller think the text was deleted intentionally. Added code to move the string from the current
field in use to the other field, so changing the password mode does not make the string go away.
The old code was fragile and depended on the order of operations.
2003-03-31 Darin Adler <darin@apple.com>
* English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
* WebCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".
2003-03-31 David Hyatt <hyatt@apple.com>
Fixes for 3211862 and 3212750, add error-handling cases for
property values to the CSS parser so the whole sheet doesn't
get rejected.
Reviewed by darin
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-03-31 Darin Adler <darin@apple.com>
Reviewed by Chris.
- fixed 3213093 -- REGRESSION: crash accessing menu items right after launch with about:blank as homepage
* khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent):
Another place needed a check for null.
2003-03-31 David Hyatt <hyatt@apple.com>
Fix for 3211849. I accidentally removed a BORDER_COLOR case
from the switch when I removed the transparency check for
the shorthand. The case originally fell through to the case
below it, so a straight removal was wrong. I needed to add
it to the following set of case labels.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-03-31 David Hyatt <hyatt@apple.com>
First-letter can be floated. Make sure we mutate the display
to BLOCK so that we don't make an inline when we're floating.
Fixes bug 3186004.
Reviewed by darin
* khtml/rendering/render_block.cpp:
2003-03-31 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3213093 -- accessing menu items immediately after launch causes crash when about:blank is homepage
* khtml/khtmlview.cpp: (isSubmitImage): Add check for node of 0.
- fixed 3211461 -- crash in KWQListIteratorImpl tabbing through w3c test page
* kwq/KWQKHTMLPart.h: Added childFrameForPart function, better than KHTMLPart::frame because it works
for HTML frames inside objects as well as plain old HTML frames.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::childFrameForPart): Like KHTMLPart::frame, but looks through m_objects too.
(KWQKHTMLPart::nextKeyViewInFrameHierarchy): Use childFrameForPart instead of frame function.
2003-03-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3206524 - incyte.com "load properties" function does not work
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close): Make sure to clear the tokenizer before firing
the onLoad handler, otherwise document.write from inside an onLoad handler
will fail.
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::close): Call closeInternal.
(DocumentImpl::closeInternal): New version of close that allows
bypassing the tokenizer null check, in case we already deleted the
tokenizer/
2003-03-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3169064 - can't search at lonelyplanet.com; onSubmit handler fails due to problem addressing radio button
* khtml/ecma/kjs_dom.cpp:
(DOMNamedNodesCollection::tryGet): Allow lookup by id as well as
by integer index.
2003-03-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3138427 - new window opened by javascript is too small for popcap.com game
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Be a bit more tolerant of misformatted attribute strings.
2003-03-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3180786 - Can't log in to the LL Bean Web site
The problem on this site was misnested tags, leading to two FORM
elements that were nested. Both their onSubmit handlers fired, and
the outer one returned false. The fix was to avoid bubbling submit
events, since this can never be useful in a valid document and
because that is what other browsers seem to do, and what Win IE
documents.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::prepareSubmit): Don't allow the submit event to bubble.
2003-03-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- improved on Darin's fix for 3211289 - REGRESSION: nil-deref in bridgeForWidget
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::bridgeForWidget): Special-case KHTMLView - this is
the only kind of widget in the program that's not a form control
(so nodeForWidget would return nil for it).
2003-03-28 David Hyatt <hyatt@apple.com>
Fix a regression caused by my addition of nearestFloatBottom
to the code. I needed to make that a loop rather than just call
it once, since the nearestFloatBottom could be a bad position
for the next line.
This fixes the overlapping text problem at CNN: 3186593.
Reviewed by john
* khtml/rendering/bidi.cpp:
2003-03-28 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3191163 -- hang in QPtrListIterator at www.phiffer.com
- fixed 3183520 -- XML page has no vertical scrollbar
The hang was due to an exponential algorithm in lowest/rightmostPosition.
Fixed by making some simplifications to these functions, used only to determine the size
of the entire web page. While doing that I cleared some things up that made the XML
scroll bar problem go away too.
Note that www.phiffer.com still does not render right.
* khtml/rendering/render_block.cpp:
(RenderBlock::lowestPosition): Since this is always called on the whole tree, don't worry
about which parent deals with which child. Just make sure that every object is visited
exactly once.
(RenderBlock::rightmostPosition): Ditto.
* khtml/rendering/render_html.cpp: (RenderHtml::layout): Use the result from calling
lowestPosition on the root, since some floating/positioned objects hang off there, rather
than here. This seems consistent with the long term approach of doing more work in the root
and less in RenderHtml, since XML documents don't have a RenderHtml.
* khtml/rendering/render_root.cpp:
(RenderRoot::docHeight): Call lowestPosition() on self rather than on children. Now that
I understand the method, it's clear this is the correct way to do things.
(RenderRoot::docWidth): Ditto, but rightmostPosition().
- fixed 3211289 -- REGRESSION: nil-deref in bridgeForWidget
Maciej may have some ideas about how to fix this even better, but this
is better than just rolling his change out.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewForWidget): Added an assertion.
(KWQKHTMLPart::bridgeForWidget): Handle case where node is 0 by returning 0.
(KWQKHTMLPart::partForNode): Added an assertion.
(KWQKHTMLPart::nodeForWidget): Handle case where eventFilterObject is 0 by returning 0.
(KWQKHTMLPart::setDocumentFocus): Quietly do nothing if the node is 0.
(KWQKHTMLPart::clearDocumentFocus): Quietly do nothing if the node is 0.
2003-03-27 David Hyatt <hyatt@apple.com>
A collection of fixes for tables.
(1) Fixed table layout should only be used if an explicit width
is specified on a table.
(2) width="0" and height="0" should be ignored on table cells!
(3) Fixed table layout wasn't spreading extra space over
columns.
Reviewed by mjs
* khtml/html/html_tableimpl.cpp:
(HTMLTableCellElementImpl::parseAttribute):
* khtml/rendering/render_table.cpp:
(RenderTable::setStyle):
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::layout):
2003-03-27 David Hyatt <hyatt@apple.com>
Fix for the top of directory.apple.com. Only use the fixed
width on the cell (with nowrap set) if it is *larger* than
our current minwidth.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableCell::calcMinMaxWidth):
2003-03-27 David Hyatt <hyatt@apple.com>
Fix for 3166374. When a float is removed, crawl up and down the
tree looking for blocks that contain the float and dirty them all.
Reviewed by darin
* ChangeLog:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_object.cpp:
(RenderObject::markAllDescendantsWithFloatsForLayout):
(RenderObject::removeFromObjectLists):
* khtml/rendering/render_object.h:
2003-03-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3192344 - nil-deref in KWin::info scrolling amazon while other shopping tabs load
- fixed 3098365 - Default window size changes as a result of popup windows
- fixed 3189291 - javascript window.close() closes window, not just originating tab
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scheduleClose): Close via the bridge, not the window directly.
(KWQKHTMLPart::bridgeForWidget): Take const QWidget * instead of QWidget *.
(KWQKHTMLPart::nodeForWidget): Likewise.
(KWQKHTMLPart::khtmlMousePressEvent): Deal with responder issues via bridge,
not window directly.
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Likewise.
(KWQKHTMLPart::mouseDown): Likewise.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Set resizability via bridge,
not window directly.
* kwq/KWQTextArea.mm:
(-[KWQTextArea becomeFirstResponder]): Deal with bridge for first responder
issues, not window directly.
(-[KWQTextArea drawRect:]): Likewise.
(-[KWQTextAreaTextView insertTab:]): Likewise.
(-[KWQTextAreaTextView insertBacktab:]): Likewise.
(-[KWQTextAreaTextView shouldDrawInsertionPoint]): Likewise.
(-[KWQTextAreaTextView selectedTextAttributes]): Likewise.
* kwq/KWQWidget.mm:
(QWidget::setActiveWindow): Focus window via bridge.
(QWidget::hasFocus): Handle first responder issues via bridge.
(QWidget::setFocus): Likewise.
(QWidget::isVisible): Get window from bridge.
(QWidget::mapFromGlobal): Get window from bridge.
(QWidget::disableFlushDrawing): Add comment noting why it's OK
to get the window from the view instead of from the bridge here.
(QWidget::enableFlushDrawing): Likewise.
* kwq/KWQWindowWidget.mm:
(KWQWindowWidget::frameGeometry): Work through bridge, not window
directly.
(KWQWindowWidget::mapToGlobal): Likewise.
(KWQWindowWidget::setFrameGeometry): Likewise.
* kwq/WebCoreBridge.h:
2003-03-27 David Hyatt <hyatt@apple.com>
This is just a long-standing screwup where I didn't port an old
table fix I made to Lars' new table code properly. The original
fix had this check in it.
The bug is 3171963 (cvs.com).
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
2003-03-27 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3156509 -- Safari fills src="" frame with current contents of frameset instead of leaving it empty
The trick here is to always use "about:blank" when the frame URL is empty string.
If we pass the empty string elsewhere, it's going to get passed to completeURL and
turned into a reference to the current document, and we have to avoid doing that
ourselves explicitly too.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::HTMLFrameElementImpl): Let the URL default to null rather
than "about:blank". We do want to treat the frame as "about:blank", but that's not
something people should see when inspecting the frame via the DOM.
(HTMLFrameElementImpl::isURLAllowed): Allow empty URLs explicitly, so we don't
call completeURL on them.
(HTMLFrameElementImpl::updateForNewURL): Map empty URLs to "about:blank" at this level.
(HTMLFrameElementImpl::attach): Do the same thing here. At some point we can share more
code between these two.
(HTMLFrameElementImpl::setLocation): Change this to call updateForNewURL. Not only does
this make us handle the empty URL case properly, it also gets the benefit of other things
we do in updateForNewURL, like handling the "isURLAllowed" rule, and properly handling
the case where we already have a suitable frame.
- other changes
* kwq/KWQKHTMLView.mm: Improved a comment.
=== Safari-69 ===
2003-03-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
- fix unitialized access.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart):
2003-03-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
Made progress towards better handling of window operations.
* khtml/ecma/kjs_window.cpp:
(Window::get): Replace a few part->widget() calls with part->view() -- just
as good for the real khtml, but easier to adapt to with KWQ.
(WindowFunc::tryCall): Likewise.
* khtml/khtmlview.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::~KWQKHTMLPart): Delete the window widget.
(KWQKHTMLPart::topLevelWidget): Return the window widget.
(KWQKHTMLPart::setBridge): Make a new window widget passing it the bridge.
* kwq/KWQKHTMLView.mm:
(KHTMLView::topLevelWidget): Moved here from KHTMLView; get the top level
widget from the part.
(KHTMLView::mapToGlobal): Moved here from KHTMLView; add a needed cast.
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm: Remove all top level widget considerations.
* kwq/KWQWindowWidget.h:
* kwq/KWQWindowWidget.mm:
(KWQWindowWidget::KWQWindowWidget): Changed to work based on bridge, not window.
(KWQWindowWidget::~KWQWindowWidget): Ditto.
(KWQWindowWidget::frameGeometry): Ditto.
(KWQWindowWidget::mapToGlobal): Ditto.
(KWQWindowWidget::mapFromGlobal): Ditto.
(KWQWindowWidget::setFrameGeometry): Ditto.
Also:
* kwq/KWQKHTMLPart.cpp: Removed stuff that did not belong here.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::selectionStartOffset): Moved here from KWQKHTMLPart.cpp
(KWQKHTMLPart::selectionEndOffset): Likewise.
(KWQKHTMLPart::selectionStart): Likewise.
(KWQKHTMLPart::selectionEnd): Likewise.
(KWQKHTMLPart::selectionRect): Likesie.
2003-03-26 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed a storage leak when running cvs-base
* khtml/rendering/render_list.h: Added _markerInstalledInParent.
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle): Set _markerInstalledInParent to false when
creating a new marker.
(RenderListItem::detach): Detach the marker if it's not not installed in the
parent yet.
(RenderListItem::updateMarkerLocation): Set _markerInstalledInParent to true
when installing the marker in a parent.
2003-03-26 David Hyatt <hyatt@apple.com>
Make <label> use tag list 1. Fixes 3206063. Residual style
changes called this out.
Reviewed by darin
* khtml/html/dtd.cpp:
(DOM::checkChild):
2003-03-26 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3208468 -- REGRESSION: checkbox immediately unchecks the first time you check it
The stateChanged signal must be delivered before the mouse up event is handled.
* kwq/KWQButton.mm:
(-[KWQButton initWithQButton:]): Use [self init] instead of [super init]; no real difference,
just makes more logical sense.
(-[KWQButton action:]): Don't send the mouse up event here.
(-[KWQButton sendConsumedMouseUpIfNeeded]): Added. New method that sends the consumed mouse
up event.
(-[KWQButton mouseDown:]): Use a simplified scheme that uses only a single boolean to control
sending the consumed mouse up event. Call sendConsumedMouseUpIfNeeded to do the deed.
(QButton::clicked): Added comment to explain why it's important to send the consumed mouse
up event here. Added a call to the new sendConsumedMouseUpIfNeeded method, replacing the
code that was formerly in -[KWQButton action:].
2003-03-25 David Hyatt <hyatt@apple.com>
Fix font-family parsing to match the spec (and other browsers).
This fixes bugs 3197584 and 3207760.
Also fix pseudos to be lower-cased. Fixes 3208303.
Reviewed by darin
* khtml/css/css_valueimpl.h:
* khtml/css/cssparser.cpp:
(CSSParser::parseFontFamily):
2003-03-24 Trey Matteson <trey@apple.com>
Pass -seg_addr_table_filename <FILENAME> to ld. This makes our frameworks in
SYMROOT actually work for symbol resolution because they will have the correct
prebinding address. It also fixes obscure B&I problems with prebinding
reported by Matt Reda.
Note the reason all this is tricky for our projects is that we have a different
install location for Jaguar and Panther. The purpose of this arg is to declare
at link time our eventual location, which allows the prebinding address to be
found in /AppleInternal/Developer/seg_addr_table. We use a funky back-tick
expression within OTHER_LDFLAGS to get a conditional value depending on the
build train we are in.
This can all go away once we only build on Panther and don't embed the
frameworks inside the Safari.app wrapper.
In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
additive instead of overriding, so we have the args we used for B&I in force
when building outside of B&I.
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj:
2003-03-24 David Hyatt <hyatt@apple.com>
Clean up isInlineFlow. Add a couple of new methods that I'll
be converting code over to use (carefully) piece by piece in
future patches.
Reviewed by gramps
* khtml/rendering/render_block.h:
* khtml/rendering/render_flow.h:
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
* khtml/rendering/render_object.h:
2003-03-24 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3083339 - significant top and side margin appended to new windows
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Account for distinction between
frame and content rect.
* kwq/KWQStyle.h: Return 0 for the appropriate style to avoid
adding extra padding when making a new window from JavaScript.
* kwq/WebCoreBridge.h: Prototype new methods.
2003-03-24 David Hyatt <hyatt@apple.com>
Fix for crash on www.lnt.com. 3199929 is the bug number.
Blocks must have all their kids as inlines or all theirs kids
as blocks. Floats and positioned elements are special and
disregarded when this check occurs.
If a float or positioned element suddenly becomes a normal flow
element again, then the parent block might have to make its kids
all be non-inline or it might have to wrap a normal flow inline
with an anonymous block.
This patch fixed RenderObject's setStyle method to check for
this situation and to make the parent block fix itself up
appropriately.
Reviewed by darin
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
2003-03-24 David Hyatt <hyatt@apple.com>
ignore the float property on first-letter styles.
The bug # is 3186044.
Reviewed by darin
* khtml/css/parser.cpp:
* khtml/rendering/render_block.cpp:
2003-03-24 David Hyatt <hyatt@apple.com>
Add error-handling case to deal with a common CSS malformation:
clip: rect( )
The bug is 3206171.
Reviewed by darin
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-03-22 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3203869 -- Monaco 9 looks different in Safari than in TextEdit (uses outline instead of bitmap)
* kwq/KWQFontMetrics.mm: (QFontMetricsPrivate::getRenderer): Get a new renderer
if the one we have is wrong printer-vs-screen-wise. For speed, use a global
variable rather than methods.
* kwq/KWQPainter.mm: (QPainter::_updateRenderer): Get a new renderer if the
one we have is wrong printer-vs-screen-wise. For speed, use a global variable
rather than methods.
* kwq/KWQTextRendererFactory.h: Added. Exposes a global variable that tells whether we are
in global "using printer font" mode.
* kwq/WebCoreTextRendererFactory.h: Added setUsingPrinterFonts: and usingPrinterFonts methods.
* kwq/WebCoreTextRendererFactory.m:
(-[WebCoreTextRendererFactory setUsingPrinterFonts:]): Added. Sets global.
(-[WebCoreTextRendererFactory usingPrinterFonts]): Added. Returns value of global.
* WebCore.pbproj/project.pbxproj: Added KWQTextRendererFactory.h.
2003-03-22 David Hyatt <hyatt@apple.com>
Fix the top of the gamespot.com page on the PLT. The
clear status for <br> should be ignored if/when we decide
to ignore the <br> because the previous line didn't break
cleanly.
Reviewed by gramps
* khtml/rendering/bidi.cpp:
2003-03-22 David Hyatt <hyatt@apple.com>
Loosen up the DTD for <dl>, <dt>, and <dd> so that they can
occur anywhere in a document and be independent of one
another.
Reviewed by darin/gramps
* khtml/html/dtd.cpp:
(DOM::checkChild):
2003-03-22 David Hyatt <hyatt@apple.com>
Bottom border/padding was incorrectly being used in float
computations. The fix is trivial... positioning of floats
occurs before you add in the bottom border/padding rather
than after.
Also implementing support for transparent borders and adding
code that understands how to draw more complex polys when
individual sides are transparent. This code existed for left
and right borders, but not for top and bottom borders.
These two fixes make the tantek demo found at:
http://www.tantek.com/map.html
work properly for the first time in Safari.
Reviewed by darin
* ChangeLog:
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_object.cpp:
(RenderObject::paintBorder):
* khtml/rendering/render_style.h:
2003-03-21 David Hyatt <hyatt@apple.com>
Fixes for all 4 macromedia rendering problems. They were all
related to buggy float handling.
The bugs are 3194998, 3195014, 3915155, 3204114.
This patch splits floats and positioned elements into two lists
instead of 1, and it also adds better logic for clearing out
floats when blocks move vertically.
Reviewed by darin
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::detach):
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChildWithContinuation):
* khtml/rendering/render_inline.cpp:
(RenderInline::addChildToFlow):
(RenderInline::nodeAtPoint):
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
(RenderObject::removeFromObjectLists):
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::layout):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2003-03-21 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3203212 -- nil-deref in khtml::CachedImage::isErrorImage at turbotax.com
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::removeImage): Remove all occurrences
of the image from the list. We don't try to prevent multiple occurrences from getting
in there. Also use removeRef instead of remove, for speed.
2003-03-21 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3204660 -- EUC decoding not used for japanese yahoo page
* khtml/misc/decoder.cpp: (Decoder::decode):
Do the search for charset= in a case-insensitive way. It's possible that other
browsers are case-insensitive, but also possible that it's just Japanese
auto-detect that papers over this problem there.
- other changes
* kwq/KWQString.mm: (QString::hash): Get rid of unnecessary code to avoid hashes of 0.
This is useful in the place in JavaScriptCore where we copied this from, but
it is not helpful here (slightly ugly and does slow things down a smidgen).
* kwq/WebCoreTextRendererFactory.m: Remove unused method.
2003-03-20 David Hyatt <hyatt@apple.com>
Fix the color handling of link= attributes on <body> elements
to pass in the quirks mode so that lax parsing can take place.
Reviewed by rjw and john
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
2003-03-20 Richard Williamson <rjw@apple.com>
Use "Item" consistently in the WebHistory and WebBackForwardList.
Change createSharedHistoryWithFile: to setSharedHistory:
Make the various page cache methods per WebBackForwardList instead of global.
Reviewed by gramps.
* kwq/KWQKHistoryProvider.mm:
* kwq/WebCoreHistory.h:
2003-03-20 David Hyatt <hyatt@apple.com>
Always do residual style fixups in all three Safari rendering
modes.
Reviewed by darin
* khtml/html/htmlparser.cpp:
(KHTMLParser::popBlock):
=== Safari-68 ===
2003-03-19 David Hyatt <hyatt@apple.com>
Adding a few more tags to the list of ones to check for
residual style.
Reviewed by gramps
* khtml/html/htmlparser.cpp:
(KHTMLParser::isResidualStyleTag):
(KHTMLParser::isAffectedByResidualStyle):
2003-03-19 David Hyatt <hyatt@apple.com>
Fix continuations so that they are smarter about reusing
anonymous blocks. Avoids deep nesting when it isn't
necessary.
A complete implementation of the residual style fixes. It
seems to fix all current outstanding bugs.
One of the bugs in the residual style list was caused by
font-weight not being reset to tables and is actually its
own problem. I fixed that by moving the quirks resets for
table elements into the quirks stylesheet (which should be
a speed boost).
<b><p>Foo</b> Goo</p>
Also fixed the huge XML failure issue that made us fail hundreds
of test cases. Attachment of text nodes was being done way too
early, before the text of the node had been determined. By moving
the attachment from enterText to exitText, the problem is solved.
Reviewed by darin (res. style fix 1) and gramps (rest of res. style fix and XML fix)
* khtml/css/quirks.css:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::attach):
* khtml/html/htmlparser.cpp:
(KHTMLParser::isResidualStyleTag):
(KHTMLParser::isAffectedByResidualStyle):
(KHTMLParser::handleResidualStyleCloseTagAcrossBlocks):
(KHTMLParser::reopenResidualStyleTags):
(KHTMLParser::popBlock):
(KHTMLParser::popOneBlock):
* khtml/html/htmlparser.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::splitFlow):
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::enterText):
(XMLHandler::exitText):
2003-03-18 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3197684 -- <textarea wrap="hard"> behaves incorrectly (bugzilla)
By doing the line breaking inside the KWQ class for textarea we can both remove
the broken lineOfCharAtIndex: method and avoid the n-squared algorithm KHTML uses to
insert hard line breaks.
* khtml/rendering/render_form.cpp: (RenderTextArea::text):
Call textWithHardLineBreaks on widget instead of trying to break lines here.
* kwq/KWQTextEdit.h: Added textWithHardLineBreaks member function. Made text member function
const. Got rid of text(int), paragraphs, paragraphLength, and lineOfChar member functions.
* kwq/KWQTextEdit.mm:
(QTextEdit::text): Made this const, and move code that transforms CRLF and CR into LF
inside KWQTextArea.
(QTextEdit::textWithHardLineBreaks): Added. Calls new textWithHardLineBreaks method.
* kwq/KWQTextArea.h: Added textWithHardLineBreaks method. Removed numLines, textForLine:,
paragrahs, paragraphLength:, textForParagraph:, and lineOfCharAtIndex: methods.
* kwq/KWQTextArea.mm:
(-[KWQTextArea initWithQTextEdit:]): Call [self init] for clarity instead of [super init].
In both cases, we end up calling [self initWithFrame:].
(-[KWQTextArea text]): Added logic for transforming CRLF and CR into LF here instead of at
the KWQTextEdit level.
(-[KWQTextArea textWithHardLineBreaks]): Added. This method uses the layout manager to extract
the characters for one line at a time, and put line breaks in between.
2003-03-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3146407 - bring the window with the targeted frame to the front
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): If we use an existing frame,
focus it.
* kwq/WebCoreBridge.h: Prototype focusWindow method.
2003-03-17 Trey Matteson <trey@apple.com>
Support for password saving in forms. Added elementIsPassword:,
nuked deadwood formIsLoginForm:.
Reviewed by Maciej.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submit): Pass forms data for login forms and
password fields to bridge. This case was skipped for security in
khtml's autocomplete, but we need this data to save passwords, and
we enforce policy at a higher level.
* khtml/html/html_formimpl.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
Nuked formIsLoginForm:.
(-[WebCoreBridge elementIsPassword:]): New utility.
2003-03-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3119663 - document.lastModified returns the wrong date format
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
Instead of using NSDate's default date format, use the format that
IE and Gecko use.
2003-03-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Fix build, use size instead of length.
2003-03-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3080337 - default values seem to be "no" when third param of window.open is an empty string
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Treat empty string the same as missing for
third argument - leave all chrome on. Also remove support for
scrollbars= property
2003-03-18 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3164522 -- text encoding conversion is done a chunk at a time with no state; won't work in some cases
- fixed 3164557 -- pages served with encoding UTF-16LE but no BOM character won't be decoded correctly
- fixed 3164569 -- pages without BOM that have a server-specified encoding of utf-16 will fail to decode
- fixed 3165002 -- can't open link with tilde (~) in page with Japanese encoding
- fixed 3181297 -- can't open link with backslash (\) in page with Japanese encoding (download at netscape.com)
- fixed 3182977 -- "unicode" encoding handled as UTF-16 rather than UTF-8 at www.delcom-eng.com
* khtml/misc/decoder.h: Add an optional "8-bit-only" parameter to the
setEncoding method.
* khtml/misc/decoder.cpp:
(Decoder::setEncoding): Add an "8-bit-only" parameter. Use the new
codeForNameEightBitOnly method when that parameter is true. Use the new
usesVisualOrdering constant rather than all the hardcoded logic here to
tell logical from visual Hebrew encodings.
(Decoder::decode): Pass true for "8-bit-only" when the encoding came out
of an HTML header, since we are already parsing the file by this point so
it makes no sense to use a non-8-bit encoding.
(Decoder::flush): Pass true for the "flush" parameter when calling the decoder.
* kwq/KWQCharsets.h: Add a new KWQEncodingFlags enum, and return a parameter of
that type (optionally) from KWQCFStringEncodingFromIANACharsetName.
* kwq/KWQCharsets.mm:
(buildDictionaries): Make the dictionaries lead to table entries so we can get
both the flags and the encoding.
(KWQCFStringEncodingFromIANACharsetName): Get the flags as well as the encoding.
(KWQCFStringEncodingToIANACharsetName): Use the new dictionary format.
(encodingNameHash): Removed special case for hash for 0. This was useful in
JavaScriptCore where this hash function came from, but it's not relevant for
a CF hash function.
* kwq/KWQTextCodec.h: Added codecForNameEightBitOnly function to QTextCodec. Added optional
KWQEncodingFlags parameter to QTextCodec constructor. Replaced isISOLatin1Hebrew with
usesVisualOrdering. Added == and hash functions to QTextCodec. Added virtual destructor to
QTextDecoder. Added optional "flush" boolean parameter to QTextDecoder's toUnicode function.
* kwq/KWQTextCodec.mm:
(codecForCFStringEncoding): Use both the encoding and the flags as a key for the dictionary
that holds QTextCodec objects.
(QTextCodec::codecForName): Pass flags through.
(QTextCodec::codecForNameEightBitOnly): Added. Maps kCFStringEncodingUnicode to
kCFStringEncodingUTF8.
(QTextCodec::codecForLocale): Pass noEncodingFlags.
(QTextCodec::makeDecoder): Pass flags to KWQTextDecoder constructor.
(QTextCodec::toUnicode): Pass true for the "flush" boolean parameter to KWQTextDecoder.
(operator==): Added. Compares both encoding and flags.
(QTextCodec::hash): Added. Computes a hash of encoding and flags.
(QTextCodecsEqual): Added. Calls operator==.
(QTextCodecHash): Added. Calls hash member function.
(QTextDecoder::~QTextDecoder): Added. Empty.
(KWQTextDecoder::KWQTextDecoder): Made this no longer inline.
(KWQTextDecoder::~KWQTextDecoder): Added. Cache the TEC object for use next time.
(KWQTextDecoder::convertUTF16): Use the flags to decide on big vs. little endian when the
page does not have a BOM marker that makes it unambiguous.
(KWQTextDecoder::convertUsingTEC): Added flush parameter. Changed code to reuse the same
converter for successive convert calls, and only flush when the flush parameter is passed.
Added code to set the kUnicodeForceASCIIRangeMask. Do it directly since we can't use
TECSetBasicOptions due to bug 3201405.
(KWQTextDecoder::toUnicode): Pass flush parameter through.
* kwq/mac-encodings.txt: Added new sections for "Unicode, bigEndian", "Unicode, littleEndian",
and "ISOLatinHebrew, visualOrdering". Also moved UTF-16 to "Unicode" from "UTF8" since we now
handle this with the "8-bit-only" mechanism.
* kwq/make-charset-table.pl: Updated script to support flags (after a comma), and made it a bit
more strict about what to do with ill-formed lines.
* kwq/KWQCharsetData.c: Regenerated.
- other changes
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::searchForLabelsBeforeElement): Take advantage of "using" and remove
unneeded namespace prefixes.
(KWQKHTMLPart::matchLabelsAgainstElement): Ditto.
(KWQKHTMLPart::pauseActions): Ditto.
(KWQKHTMLPart::resumeActions): Add check for nil to match pauseActions. Also take
advantage of "using" and remove unneeded namespace prefixes.
(KWQKHTMLPart::saveWindowProperties): Use ERROR instead of ASSERT for the nil case.
(KWQKHTMLPart::saveLocationProperties): Use ERROR instead of ASSERT for the nil case.
(KWQKHTMLPart::restoreWindowProperties): Use ERROR instead of ASSERT for the nil case.
(KWQKHTMLPart::restoreLocationProperties): Use ERROR instead of printf for the nil case.
(KWQKHTMLPart::openURLFromPageCache): Take advantage of "using" and remove
unneeded namespace prefixes.
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Ditto.
(KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
2003-03-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3196050 - Hang in www.janegoodall.org dynamic menus
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::handleLocalEvents): Copy handlers before processing
them, so we don't go into an infinite loop if a handler adds or
removes handlers.
2003-03-16 Trey Matteson <trey@apple.com>
3198135 - need to fix our projects so SYMROOT is not stripped
Tweaked stripping options: B&I build does not COPY_PHASE_STRIP.
Deployment build still does.
We strip manually as part of the install that we do ourselves.
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj:
2003-03-14 Richard Williamson <rjw@apple.com>
Fixed 3197162. The regression was introduced with the change
to preferences. The old settings API was used to 'reset' the jscript
other properties of the part. This effectively always disabled
javascript and prevented properties from being restored to the js
property maps.
Reviewed by trey.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::saveWindowProperties):
(KWQKHTMLPart::saveLocationProperties):
(KWQKHTMLPart::restoreWindowProperties):
(KWQKHTMLPart::restoreLocationProperties):
(KWQKHTMLPart::openURLFromPageCache):
2003-03-14 David Hyatt <hyatt@apple.com>
Make :target match the root element if no #fragment is specified in
the URL.
Reviewed by john
* khtml/css/cssstyleselector.cpp:
2003-03-14 Maciej Stachowiak <mjs@apple.com>
- fixed 3190846 - REGRESSION: can't use Fidelity NetBenefits account
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Treat javascript: URLs as
about:blank for now.
(HTMLFrameElementImpl::attach): Likewise.
* khtml/khtml_part.cpp:
(KHTMLPart::processObjectRequest): Make sure to send completed() signal
after signals are connectd in synchronous load case.
2003-03-13 David Hyatt <hyatt@apple.com>
Fix for ew.com, hrweb and arstechnica forums. A <br> should
not create a nonempty line in the case where the previous line
didn't break cleanly. The fix is to have a new boolean that
tracks how the previous line broke and to have <br> check that
to figure out if it should set the line to be non-empty.
Reviewed by gramps
* khtml/rendering/bidi.cpp:
2003-03-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3188209 - REGRESSION: onmouseup handlers not running for most form elements
* khtml/rendering/render_form.cpp:
(RenderLineEdit::RenderLineEdit): Connect to clicked signal.
(RenderFileButton::RenderFileButton): Likewise.
(RenderFileButton::slotClicked): Send clicked through DOM.
(RenderTextArea::RenderTextArea): Connect to clicked signal.
* khtml/rendering/render_replaced.cpp:
(RenderWidget::sendConsumedMouseUp): New method to send a
mouseUp event for this DOM element. Meant for up events consumed
by AppKit mouseDown: methods that use modal event loops.
* khtml/rendering/render_replaced.h:
* kwq/KWQButton.h:
* kwq/KWQButton.mm:
(-[KWQButton initWithQButton:]): Moved here from former adaptor class.
(-[KWQButton action:]): Make sure to send up before click.
(-[KWQButton mouseDown:]): Record that we are processing a mouse
event. If no click happened, send the missing up event.
(QButton::QButton): Use NSButton subclass instead of separate adaptor.
(QButton::~QButton): Likewise.
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton): Initialize clicked signal.
(KWQFileButton::clicked): Emit clicked signal.
(-[KWQFileButtonAdapter initWithKWQFileButton:]): Observe Clicked notification too.
(-[KWQFileButtonAdapter clicked]): Send mouse up and click through DOM.
* kwq/KWQLineEdit.h:
* kwq/KWQLineEdit.mm:
(QLineEdit::QLineEdit): Initialize clicked signal.
(QLineEdit::clicked): Emit clicked signal.
* kwq/KWQListBox.mm:
(QListBox::QListBox): No longer use separate object as delegate and data source.
(QListBox::~QListBox): No more need to retrieve and release delegate.
(-[KWQTableView initWithListBox:items:]):
(-[KWQTableView mouseDown:]): Record that we are processing a mouse
event; if no click happens while processing, send the mouse up event
through the DOM.
(-[KWQTableView tableViewSelectionDidChange:]): If sending clicked
and processing a mouse event, send up first.
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView mouseDown:]): Send up and click through DOM
after calling super.
* kwq/KWQTextEdit.h:
* kwq/KWQTextEdit.mm:
(QTextEdit::QTextEdit): Initialize clicked signal.
(QTextEdit::clicked): Emit clicked signal.
* kwq/KWQTextField.mm:
(-[KWQTextField setPasswordMode:]): initWithQLineEdit: instead of initWithQWidget:
(-[KWQTextField fieldEditorDidMouseDown:]): Send up and click through DOM.
(-[KWQSecureTextField initWithQLineEdit:]): Store QLineEdit*, not just QWidget*.
(-[KWQSecureTextField fieldEditorDidMouseDown:]): Send up and click through DOM.
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm:
(QWidget::sendConsumedMouseUp): Common method for widgets to send
a mouseUp that has been consumed by mouseDown processing through
the DOM.
* kwq/WebCoreBridge.h:
* kwq/WebCoreFirstResponderChanges.h:
* kwq/WebCoreViewFactory.m:
* WebCore.exp: Export new string constant.
* WebCore-combined.exp: Regenerated.
2003-03-13 Richard Williamson <rjw@apple.com>
First stage of the WebController -> WebView, WebView -> WebFrameView.
This change does the WebView -> WebFrameView part of the change. Also
changes WebController's inheritance. It now inherits from NSView.
Reviewed by Maciej.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyView):
* kwq/KWQScrollView.mm:
* kwq/KWQWidget.mm:
(QWidget::getOuterView):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge nextKeyViewInsideWebFrameViews]):
(-[WebCoreBridge previousKeyViewInsideWebFrameViews]):
2003-03-13 Darin Adler <darin@apple.com>
- remove mistaken inlining to fix build with newer versions of gcc
* khtml/rendering/render_object.cpp: (RenderObject::container):
Don't mark this inline.
2003-03-13 David Hyatt <hyatt@apple.com>
This is a fix to stop creating textruns for the whitespace at the
end of a block. This is a major line layout bug that leads to the
height of the last line in a paragraph being wrong, especially when
<font> tags are used.
Example of the problem:
<div><nobr>foo</nobr> </div>
The whitespace between the </nobr> and the end of the </div> was
being counted when it should have been stripped. The problem was
an off-by-one error with the endpoint I set up. I used a position
of 0, which is inclusive, so I needed a new value that meant
"Stop on this object and don't include any of it." I'm using
UINT_MAX as this special value for the position.
Reviewed by john
* khtml/rendering/bidi.cpp:
* khtml/rendering/bidi.h:
2003-03-13 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3197728 -- REGRESSION: crash at http://transitive.com/company.htm
* khtml/rendering/bidi.cpp: (appendRun): Added an if statement to handle
the case where obj is 0; the while loop already handled that case.
- did the "no inlining workaround" needed for newer versions of gcc
* khtml/css/parser.y: Added #define __inline as we have elsewhere.
* khtml/css/parser.cpp: Regenerated.
2003-03-13 David Hyatt <hyatt@apple.com>
Add color dumping and bgcolor dumping to the render dump tool.
Reviewed by darin
* kwq/KWQRenderTreeDebug.cpp:
(operator<<):
2003-03-13 David Hyatt <hyatt@apple.com>
Fix for 3193407, crash in CSS parser on www.hixie.ch. Improved the grammar to
understand the CSS3 :not selector so that it wouldn't think of that case as an
error. Also patched the error handling case that crashed on :not anyway. Then
I went ahead and implemented :not (since it was trivial to add once the parser
was reading it in).
Also fixed the regression that the * selector didn't work. The new KHTML trunk moved
away from a tag value of -1 in order to do @namespace support. Since we aren't really ready
to take that code yet, I patched our parser.y to treat * like -1 instead of 0xffff.
Implemented support for a couple of new CSS3 selectors, :root and ::selection. Also :last-child and :only-child.
Fixed a trivial bug (demonstrated in the CSS3 test suite) with the matching of the ~= selector.
Reviewed by darin
* khtml/css/Makefile.am:
* khtml/css/css_base.cpp:
(CSSSelector::extractPseudoType):
* khtml/css/css_base.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/parser.cpp:
* khtml/css/parser.y:
* khtml/rendering/render_style.h:
* khtml/rendering/render_text.cpp:
(TextRun::paintSelection):
(RenderText::paintObject):
=== Safari-67 ===
2003-03-13 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3194451 -- Textarea COLS='40.0' displays with width of 0
* khtml/xml/dom_stringimpl.h: Changed toInt to not be inline any more.
It was already really too big for inline to be a good optimization.
* khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::toInt): Rewrote this to
find the valid characters at the start of the string, rather than strip
invalid characters from the end. The old code would strip non-digits from
the end, which doesn't help with a string like "40.0" or even "40 garbage3".
- fixed a bit of int/long sloppiness
* kwq/KWQString.mm:
(QString::toLong): Use LONG_MAX, not INT_MAX.
(QString::toULong): Use ULONG_MAX, not UINT_MAX.
2003-03-12 Richard Williamson <rjw@apple.com>
Fixed leak of RenderRoot.
Reviewed by darin.
* kwq/KWQPageState.mm:
(-[KWQPageState invalidate]): Added comment.
(-[KWQPageState dealloc]): Ensure that the renderer is "re"set on
the document so it will be correctly cleaned up in detach.
2003-03-12 David Hyatt <hyatt@apple.com>
Two fixes. The first is more help with macromedia. Floats could
get lost and not painted by the correct layer still. The new
code is more robust about checking if a layer crossing occurred
in the case where you want to addOverhangingFloats to a parent.
The second fix changes the priority of space allocation when
growing cells from their minwidths to their preferred widths.
The old code did fixed and then percent. The new code does
percent and then fixed.
Also when tables are overconstrained after growing cells to their
effective widths, instead of shrinking cells without regard for
their type, I implemented a shrink system that follows the same
priority (reversed) that was used when growing the cells originally.
Reviewed by darin
* khtml/rendering/render_block.cpp:
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::layout):
2003-03-12 Trey Matteson <trey@apple.com>
3190784 REGRESSION: crash in KWQListIteratorImpl in form completion code at sonyericsson.com page
Don't crash on an input element with no enclosing form.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge formForElement:]): Gracefully bail on !form.
2003-03-11 David Hyatt <hyatt@apple.com>
Fix for tantek's slides, this is an issue on diveintomark's
list as well. <style> was not honoring any media attributes
set on it, so print stylesheets were being applied to the screen,
etc.!
Reviewed by rjw
* khtml/html/html_headimpl.cpp:
(HTMLStyleElementImpl::childrenChanged):
* khtml/html/html_headimpl.h:
=== Safari-66 ===
2003-03-11 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3166759 -- two fields both look like they have focus at webmail.iquest.net due to onblur
* kwq/KWQTextField.mm:
(-[KWQTextField selectText:]): Don't call -[NSTextField selectText:] in the case where we already
have an editor, because the NSTextField version will cause the field to relinquish first responder
and then take it back, which will send both onblur and onfocus.
(-[KWQSecureTextField selectText:]): Same fix for the secure text field.
2003-03-11 David Hyatt <hyatt@apple.com>
Fix the 16000 pixel tall scrollbar on macromedia.com/software.
vertical-align position hints were being set to bad values.
Reviewed by mjs
* khtml/rendering/render_object.cpp:
(RenderObject::getVerticalPosition):
2003-03-10 David Hyatt <hyatt@apple.com>
Fix for <pre> regression, bug #3193590, directory listings
busted.
Reviewed by gramps
* khtml/rendering/bidi.cpp:
2003-03-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3010915 -- mouse wheel won't scroll the main document when you are over [i]frame
* kwq/WebCoreScrollView.h: Added.
* kwq/WebCoreScrollView.m: Added. Overrides scrollWheel to "do the right thing".
* WebCore.pbproj/project.pbxproj: Added WebCoreScrollView, and made it SPI so WebKit can use it.
* WebCore.exp: Exported WebCoreScrollView so WebKit can use it.
* WebCore-combined.exp: Regenerated.
* kwq/KWQListBox.mm: Made KWQListBoxScrollView a subclass of WebCoreScrollView instead of NSScrollView.
* kwq/KWQTextArea.h: Made KWQTextArea a subclass of WebCoreScrollView instead of NSScrollView.
- other changes
* kwq/KWQComboBox.mm: Make the workaround for the position of text in the pop-up
compile only when we build on Jaguar. That way a Jaguar-built Safari looks perfect on
Jaguar and a Panther built one looks perfect on Panther.
* kwq/KWQKHTMLPart.mm: Reformatted some method calls.
2003-03-09 David Hyatt <hyatt@apple.com>
Fix compacts and run-ins to work a lot better than they did
before. I had some huge misunderstandings with how compact
worked that have now been clarified.
Reviewed by kocienda
* khtml/rendering/bidi.cpp:
* khtml/rendering/bidi.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::repaint):
* khtml/rendering/render_line.cpp:
(InlineFlowBox::placeBoxesHorizontally):
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
2003-03-08 David Hyatt <hyatt@apple.com>
Check in the patch I actually meant to land. Somehow what I landed
had removed a line that was supposed to be there.
* khtml/css/cssstyleselector.cpp:
2003-03-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::submitForm): Fix form submission (was completely broken).
2003-03-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- fixed 3127705 - don't open new window on opt-click even if the link requests it
- fixed 3143971 - cmd-click should override the target="_blank" and target="_new" (important for tabs)
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Don't use findOrCreateFrameNamed, instead pass target along.
(KWQKHTMLPart::openURLRequest): Likewise.
(KWQKHTMLPart::submitForm): Likewise.
(KWQKHTMLPart::urlSelected): Likewise.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Likewise.
* kwq/WebCoreBridge.h:
2003-03-07 David Hyatt <hyatt@apple.com>
better fix for text-decoration issue on time.com.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_style.h:
2003-03-07 David Hyatt <hyatt@apple.com>
Fix for time.com regression. Don't allow text-decoration to
apply to anchor elements with no href.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-03-07 David Hyatt <hyatt@apple.com>
Whoops. Fix regression causedb y previous checkin.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-03-07 David Hyatt <hyatt@apple.com>
Make the :hover:active behavior much more sophisticated
(and make it match WinIE, since that buggy browser is what
necessitates this hack).
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-03-06 David Hyatt <hyatt@apple.com>
Fix for 3156125, regression on hiptop.com. Caused by better
nowrap handling perversely enough. Need another quirk from
Moz/WinIE to make this site behave.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableCell::calcMinMaxWidth):
(RenderTableCell::setStyle):
2003-03-06 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3191027 -- REGRESSION: KWQColor assert at aol.com front page
* kwq/KWQColor.mm: (qRgb): Clamp to [0,0xFF] instead of asserting.
2003-03-06 Trey Matteson <trey@apple.com>
Refinement of routine that scans the DOM for field labels.
We skip nodes that have no renderer, or are invisible.
Reviewed by hyatt.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::searchForLabelsBeforeElement): Added check.
2003-03-06 David Hyatt <hyatt@apple.com>
Fix for 3190580, tables should reset line-height and white-space
in quirks mode.
Reviewed by trey and john
* khtml/css/quirks.css:
=== Safari-65 ===
2003-03-06 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3177862 -- REGRESSION: can't upload widget at www.konfabulator.com
* khtml/html/html_formimpl.cpp:
(fixUpfromUnicode): Add a call to fixLineBreaks here (and move this down below that function).
(HTMLFormElementImpl::formData): Remove the call to fixLineBreaks here, which was being used
on non-text form data, like files being uploaded.
2003-03-05 Trey Matteson <trey@apple.com>
Autofill tweak. In field names, replace all digits with spaces before matching
labels against them. This turns the digits to word boundaries, so field names like
"address2" are matched by "address".
As part of this, I abandoned an earlier attempt to map Qt regexp syntax to Darwin's.
Now clients just have to use Darwin's.
Reviewed by Maciej.
* kwq/KWQKHTMLPart.mm:
(regExpForLabels):
(KWQKHTMLPart::matchLabelsAgainstElement): Replace digits with space.
* kwq/KWQRegExp.mm:
(QRegExp::KWQRegExpPrivate::compile): Don't try to support Qt syntax.
2003-03-05 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3189442 -- REGRESSION: utf-16-little-endian.html crashes making decoder
* kwq/KWQCharsets.mm: (encodingNameHash): Re-add tolower call to hash function to
match the equality function.
2003-03-04 Trey Matteson <trey@apple.com>
New support for autofill. We provide a routine that scans backwards in the text
before a given element, looking for a match with a set of labels. In addition,
we provide for a similar match against the element's name.
To implement a few more methods in QRegExp API were implemented.
Reviewed by Maciej.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(scanForForm): Remove redundant call to a helper function.
(regExpForLabels): Return a regexp used to search for the set of labels.
(KWQKHTMLPart::searchForLabelsBeforeElement): Walk the DOM to scan backwards
in the text before the element, apply regexp to the text we find.
(KWQKHTMLPart::matchLabelsAgainstElement): Get the element name, use regexp
to check it for any of the labels.
* kwq/KWQRegExp.h:
* kwq/KWQRegExp.mm:
(QRegExp::KWQRegExpPrivate::KWQRegExpPrivate): Init two new ivars.
(RegExpFromPattern): Massage a non-glob expression before handing to Darwin.
(QRegExp::KWQRegExpPrivate::compile): Call RegExpFromPattern.
(QRegExp::match): Set new ivars based on match result.
(QRegExp::search): New API, just call match.
(QRegExp::searchRev): New API, call match repeatedly to (weakly) simulate a
reverse search.
(QRegExp::pos): Return info from last result.
(QRegExp::matchedLength): Return info from last result.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge searchForLabels:beforeElement:]): Call straight through to part.
(-[WebCoreBridge matchLabels:againstElement:]): Call straight through to part.
2003-03-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- got rid of some framework initialization (working on bug 3188781)
* khtml/khtml_part.cpp:
(KHTMLPart::setZoomFactor): Put some waitCursor use inside #if !APPLE_CHANGES.
(KHTMLPart::reparseConfiguration): Put some waitCursor use inside #if !APPLE_CHANGES.
* khtml/rendering/render_frames.cpp: (RenderFrameSet::userResize): Use KCursor cursors
instead of Qt cursors.
* kwq/KWQNamespace.h: Remove Qt cursors.
* kwq/KWQCursor.mm: Remove Qt cursors.
* kwq/KWQKCursor.h: Remove waitCursor.
* kwq/KWQKCursor.mm: Remove waitCursor.
2003-03-04 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed build rules for parser.cpp so we don't rebuild it every time
* khtml/css/Makefile.am: Changed target to parser.cpp, not parser.
- some QColor cleanup
* kwq/KWQColor.h: Removed the qRgba function, the unused KWQColor constructor
that takes a QString parameter, and made the KWQColor constructor that takes a
const char * parameter explicit.
* kwq/KWQColor.mm:
(QColor::QColor): Use findColor directly so we don't create and then destroy a QString.
(QColor::setNamedColor): Eliminated the unnecessary special case for empty string.
Get rid of the call to lower(), which is now handled by the caller. Got rid of the
"can't decipher this color" ERROR, which makes little sense now that non-named colors
(like hex ones) are handled at the KHTML level. Don't use setRgb to set the color,
since the RGB value in the gperf table is already in the correct format to just be
stored in QColor::color.
* khtml/misc/helper.h: Removed now-unused setNamedColor function. I'm sure this
same change exists on the KHTML trunk (since the CSS parser rewrite).
* khtml/misc/helper.cpp: More of the same.
* khtml/misc/loader.cpp: #if !APPLE_CHANGES the places that use qRgba to set
bgColor, which we don't use anyway.
2003-03-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
- upgrade to new hash function in one spot that I missed:
* kwq/KWQString.mm:
(QString::hash): Use spiffy new hash algorithm.
2003-03-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3163855 - Need control over certain potential dialogs/sheets
* khtml/rendering/render_form.cpp:
(RenderFileButton::RenderFileButton): Pass the part to KWQFileButton.
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton): Go through the bridge for the view,
not the view factory.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::runJavaScriptAlert): Go through the bridge for the panel,
not the view factory.
(KWQKHTMLPart::runJavaScriptConfirm): Likewise.
(KWQKHTMLPart::runJavaScriptPrompt): Likewise.
* kwq/WebCoreViewFactory.h: Move methods from here...
* kwq/WebCoreBridge.h: ...to here.
2003-03-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
Updated string hash function to match the new, improved one in
JavaScriptCore.
* kwq/KWQCharsets.mm:
(encodingNameHash):
2003-03-03 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3187518 -- REGRESSION: w3c css sample page crashes in cssyyparse
* khtml/css/parser.y: (selector): Added code to handle the case where simple_selector is 0.
* khtml/css/parser.cpp: Regenerated.
- fixed regression I introduced earlier today where ID anchors wouldn't work
* khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor):
Check by ID first explicitly before using DOC_ANCHORS.
* WebCore.pbproj/project.pbxproj: Add parser.y to the project to make it easier to open it.
2003-03-03 David Hyatt <hyatt@apple.com>
Fix for 3185852, crash when dynamically inserting rules because
of an unitialized parser variable.
Reviewed by darin
* khtml/css/css_ruleimpl.cpp:
(CSSMediaRuleImpl::insertRule):
* khtml/css/css_stylesheetimpl.cpp:
(CSSStyleSheetImpl::insertRule):
* khtml/css/cssparser.cpp:
(CSSParser::parseRule):
* khtml/css/cssparser.h:
2003-03-03 David Hyatt <hyatt@apple.com>
Clean up dynamic ID/CLASS setting/removal. Make ID actually
work when set dynamically. Fixes bug 3173050.
Reviewed by john
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseAttribute):
2003-03-03 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3154394 -- non-repro nil-dereference in DOM::HTMLFormElementImpl::submit
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit):
Add checks for nil like the other methods in this file have.
- fixed some types to remove a bit of unnecessary overhead
* khtml/ecma/kjs_window.h: Change types.
* khtml/ecma/kjs_window.cpp:
(Window::installTimeout): Change parameter to UString, not Identifier.
(WindowFunc::tryCall): Pass the UString, not Identifier.
(ScheduledAction::ScheduledAction): Change parameter to use const QString & to avoid
a bit of overhead.
(WindowQObject::installTimeout): Change parameter to UString, not Identifier.
2003-03-03 David Hyatt <hyatt@apple.com>
I messed up when i merged Lars' quirks color patch for CSS with
my original patch. I'm now exactly matching Lars' patch, and this
now fixes bug 3181185.
Reviewed by darin
* khtml/css/cssparser.cpp:
(CSSParser::parseColor):
2003-03-03 David Hyatt <hyatt@apple.com>
Fix for 3179084. Fix is to just dump our code so that the new
addHTMLColor code kicks in. This code is very close to WinIE
on more-colortests.html.
Reviewed by darin
* ChangeLog:
* kwq/KWQColor.mm:
(QColor::setNamedColor):
2003-03-03 David Hyatt <hyatt@apple.com>
Fix for 3178361, <th> don't draw borders. Boneheaded mistake
on my part. Just forgot to include it along with <td> in the
CSS hack for sharing cell rules.
Reviewed by rjw
* khtml/css/cssstyleselector.cpp:
2003-03-03 Richard Williamson <rjw@apple.com>
Fix build oops from last checkin to khtml/html/html_formimpl.cpp.
Reviewed by trey
* khtml/html/html_formimpl.cpp:
(encodeCString):
2003-03-03 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3183445 -- hang in QCString::length reloading page with lots of text in textarea
* khtml/html/html_formimpl.cpp: (encodeCString): Compute string length only once outside the loop
to avoid being O(n^2) in the size of the string.
2003-03-03 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3180364 -- infinite loop in JavaScript at www.vw.dk (due to document.anchors problem) leads to hang
The underlying problem was that our document.anchors had all the anchors in it.
But here's what the Gecko DOM reference documentation says about document.anchors:
"For reasons of backwards compatibility, the returned set of anchors only contains
those anchors created with the name attribute, not those created with the id attribute."
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::calcLength): Include only A elements with NAME attributes in the DOC_ANCHORS case.
(HTMLCollectionImpl::getItem): Ditto.
(HTMLCollectionImpl::getNamedItem): Ditto.
2003-03-02 Trey Matteson <trey@apple.com>
Use a KWQPopUpButton in place of NSPopUpButton. The only addition is that
it implements the KWQWidgetHolder protocol. This is needed in order to
auto set PopUps during autofill.
Reviewed by Maciej.
* kwq/KWQComboBox.mm:
(QComboBox::QComboBox): Make a KWQPopUpButton instead of NSPopUpButton.
(QComboBox::~QComboBox): trivial s/KWQPopUpButton/NSPopUpButton/
(QComboBox::insertItem): ditto
(QComboBox::sizeHint): ditto
(QComboBox::baselinePosition): ditto
(QComboBox::clear): ditto
(QComboBox::setCurrentItem): ditto
(QComboBox::currentItem): ditto
(-[KWQPopUpButtonCell widget]): Also implement KWQWidgetHolder
(-[KWQPopUpButton widget]): Implement KWQWidgetHolder by calling our cell.
2003-02-28 Darin Adler <darin@apple.com>
* khtml/css/parser.y: Fixed bad check-in that broke the build in a subtle way.
* khtml/css/parser.cpp: Regenerated.
2003-02-28 Trey Matteson <trey@apple.com>
More support for autofill, autocomplete.
Pass the form element along with the values to WK when submitting.
isLoginForm looks for a single plain text field along with password fields, so as not to match registration forms.
Added means to find the "current" form on a page.
Added means to return the whole set of controls on a form.
Reviewed by Darin.
* khtml/html/html_elementimpl.h:
Added isGenericFormElement().
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::isLoginForm): See above.
(HTMLFormElementImpl::submit): Also register form when registering values,
so it will be sent over bridge.
* kwq/KWQKHTMLPart.h: New ivar to save form along with form values to be submitted.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Init _formAboutToBeSubmitted ivar.
(KWQKHTMLPart::~KWQKHTMLPart): Free _formAboutToBeSubmitted ivar.
(KWQKHTMLPart::openURL): Pass form to bridge along with values.
(KWQKHTMLPart::openURLRequest): Pass form to bridge along with values.
(scanForForm): Helper function to scan forward in the DOM for a form.
(KWQKHTMLPart::currentForm): Returns current form.
(KWQKHTMLPart::clearRecordedFormValues): Clear _formAboutToBeSubmitted.
(KWQKHTMLPart::recordFormValue): Record _formAboutToBeSubmitted too.
(KWQKHTMLPart::submitForm): Pass form to bridge along with values.
(KWQKHTMLPart::urlSelected): Pass form to bridge along with values.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Pass form to bridge along with values.
* kwq/KWQTextField.mm:
(-[KWQTextField setStringValue:]):
Call textChanged so the changes actually make it to khtml.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(viewForElement): New helper.
(formElementFromDOMElement): New helper.
(-[WebCoreBridge formIsLoginForm:]):
Changed API to operate on a form instead of a field.
(-[WebCoreBridge currentForm]): New method, described above.
(-[WebCoreBridge controlsInForm:]): New method, described above.
* kwq/WebCoreDOMNode.mm:
(-[WebCoreDOMNode isEqual:]):
Implement this to == compare the element we contain.
(-[WebCoreDOMNode hash]): Implement to hash element ptr we contain.
2003-02-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3180170 - filepile.com does not work correctly
I fixed this by making referrer work correctly for targetted
cross-frame and cross-window links. It is still not working right
for JavaScript window.open though.
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Add some FIXMEs about not handling referrer right.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Pass referrer.
(KWQKHTMLPart::openURLRequest): Pass referrer.
(KWQKHTMLPart::submitForm): Pass referrer.
(KWQKHTMLPart::urlSelected): Pass referrer.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Pass referrer.
* kwq/WebCoreBridge.h: Ad referrer argument to loadURL:
2003-02-28 David Hyatt <hyatt@apple.com>
Exclude <BR>s from the text-dec check. Really fixes 3185121.
Reviewed by john
* khtml/rendering/render_line.cpp:
(shouldDrawDecoration):
2003-02-28 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed some storage leaks; this code is still leaking when we run cvs-base
* khtml/css/parser.y:
(import): Use the new maybe_media_list (ported from KDE), and delete the
media list if the current item we are parsing is not a style sheet.
(maybe_media_list): Added. (ported from KDE).
(media_list): Added error case so we don't leak in that case (ported from KDE).
(media): Use media_list instead of media_list2 (ported from KDE).
(selector_list): Added error case so we don't leak in that case (ported from KDE).
(selector): Added error case so we don't leak in that case (ported from KDE).
(simple_selector): Added nil-checking (ported from KDE).
(element_name): Use 0xFFFF instead of -1 (ported from KDE).
(specifier_list): Added error case so we don't leak in that case (ported from KDE).
(declaration): Delete the expr if we don't use it because property is 0.
(expr): Added error case so we don't leak in that case (ported from KDE).
* khtml/css/cssparser.cpp:
(CSSParser::parseSheet): Delete the rule in case one was created.
(CSSParser::parseRule): Zero out the rule after extracting it to return.
(CSSParser::parseValue): Delete the rule in case one was created.
(CSSParser::parseDeclaration): Delete the rule in case one was created.
* khtml/css/parser.cpp: Regenerated.
2003-02-28 David Hyatt <hyatt@apple.com>
Fix for text-dec regression, 3185121.
Reviewed by john
* khtml/rendering/render_line.cpp:
(shouldDrawDecoration):
=== Safari-64 ===
=== Safari-63 ===
2003-02-26 David Hyatt <hyatt@apple.com>
Additional cleanup. Don't need the arg to be a reference param
any more.
Reviewed by mjs
* khtml/rendering/render_object.cpp:
(RenderObject::getTextDecorationColors):
* khtml/rendering/render_object.h:
2003-02-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed reproducible hang at http://asp.eltonsoft.dk/cast/get.asp?cat=Quicktime
This was a set of mutually recursive frameset pages. This allows
the number of frames to grow huge, which kills both WebCore and
WebKit, so I added a hard limit of 200 total frames per page.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::isURLAllowed):
(HTMLFrameElementImpl::attach):
(HTMLFrameElementImpl::detach):
(HTMLIFrameElementImpl::attach):
* khtml/html/html_baseimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::init):
(KHTMLPart::incrementFrameCount):
(KHTMLPart::decrementFrameCount):
(KHTMLPart::topLevelFrameCount):
* khtml/khtml_part.h:
2003-02-26 David Hyatt <hyatt@apple.com>
Fix numerous regressions with text-decoration in quirks mode and
also fixed a bug where text-decoration:none is not being honored
on links.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_object.cpp:
(RenderObject::getTextDecorationColors):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(TextRun::paintDecoration):
2003-02-26 David Hyatt <hyatt@apple.com>
Fix for 3179109. containingBlock() had a big old bug in it.
For ABSOLUTE positioned elements, it would return inline relative
positioned parents (when it should only be returning blocks).
Reviewed by john
* khtml/rendering/render_object.cpp:
(RenderObject::containingBlock):
2003-02-25 David Hyatt <hyatt@apple.com>
Fix for findNextLayer problems. There was nothing wrong with
findNextLayer per se... it was just getting called *way* more
often than it needed to be.
Fixes two bugs, 3159866 and 3168815.
Reviewed by darin
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_object.cpp:
(addLayers):
(RenderObject::addLayers):
* khtml/rendering/render_object.h:
2003-02-25 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3177139 -- REGRESSION: tiny buttons with no text on dbaron test page
This is actually a shortcoming in XML support. The reason it seemed like a regression
is that this page was parsed as HTML before we had the XML support.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::startElement): As the HTML tokenizer/parser does, call init() on all DOM
tree elements before calling attach(). The KHTML guys want to get rid of init(), but until
they do, we need the same thing here as in the HTML version.
(XMLHandler::startCDATA): Ditto.
(XMLHandler::enterText): Ditto.
* khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Fix an obvious editing error that
would lead to a second attach.
2003-02-25 David Hyatt <hyatt@apple.com>
Revert one of my optimizations. It was bogus. You can't use
the parsed value of "inherit."
Fixes versiontracker. Bug #3178204
Reviewed by mjs
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::createSharedCellDecls):
2003-02-25 David Hyatt <hyatt@apple.com>
reverseRuns was buggy and crashing. 3182658.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
2003-02-25 David Hyatt <hyatt@apple.com>
Regression caused by my inclusion of inline flows in the bidi
iteration. These flows are always empty and should be skipped
if found at the start of a line.
The bug # is 3175670.
* khtml/rendering/bidi.cpp:
2003-02-25 David Hyatt <hyatt@apple.com>
Fix for bug 3166276. <tt> uses wrong font size inside a table.
Make sure logical font values like "medium" don't set the "size
specified" bit on the font, so that the generic family change
code will get activated.
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
2003-02-25 Darin Adler <darin@apple.com>
Reviewed by me, changes by Dave.
- fixed 3181790 -- REGRESSION: TextRun objects of length 0 or with just the character '\n' leak
* khtml/rendering/render_text.cpp: (RenderText::position): Destroy the passed-in
TextRun if it's the kind that's not needed, rather than just returning.
- fixed 3181794 -- REGRESSION: objects created by RenderObject::createInlineBox leak
* khtml/rendering/render_box.cpp: (RenderBox::position): Only do work for replaced
elements, and for those elements, destroy the passed-in InlineBox. Dave says this
is not the real solution, but it does plug the leak.
* khtml/rendering/render_flow.cpp: (RenderFlow::createInlineBox): Call through
to the inherited createInlineBox for all replaced elements. This code was making
the wrong kind of InlineBox for replaced elements.
- removed Id cvs magic string which causes big headaches in generated files
* khtml/css/parser.cpp: Removed Id cvs magic string.
* khtml/css/parser.y: Removed Id cvs magic string.
2003-02-24 David Hyatt <hyatt@apple.com>
The new CSS1 parser, implementation of attr(), improvement of
the content property, impl of the :target selector, and new
dotted/dashed line drawing code for borders.
Reviewed by darin/gramps
* ForwardingHeaders/css/css_base.h: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/css/Makefile.am:
* khtml/css/css_base.cpp: Added.
(StyleBaseImpl::checkLoaded):
(StyleBaseImpl::stylesheet):
(StyleBaseImpl::baseURL):
(StyleBaseImpl::setParsedValue):
(StyleListImpl::~StyleListImpl):
(CSSSelector::print):
(CSSSelector::specificity):
(CSSSelector::extractPseudoType):
(CSSSelector::operator == ):
(CSSSelector::selectorText):
* khtml/css/css_base.h: Added.
* khtml/css/css_ruleimpl.cpp:
(CSSRuleImpl::parentRule):
(CSSImportRuleImpl::CSSImportRuleImpl):
(CSSImportRuleImpl::~CSSImportRuleImpl):
(CSSImportRuleImpl::setStyleSheet):
(CSSImportRuleImpl::init):
(CSSMediaRuleImpl::CSSMediaRuleImpl):
(CSSMediaRuleImpl::append):
(CSSMediaRuleImpl::insertRule):
(CSSStyleRuleImpl::setDeclaration):
(CSSStyleRuleImpl::setNonCSSHints):
* khtml/css/css_ruleimpl.h:
* khtml/css/css_stylesheetimpl.cpp:
(CSSStyleSheetImpl::CSSStyleSheetImpl):
(CSSStyleSheetImpl::insertRule):
(CSSStyleSheetImpl::cssRules):
(CSSStyleSheetImpl::parseString):
(MediaListImpl::deleteMedium):
* khtml/css/css_stylesheetimpl.h:
* khtml/css/css_valueimpl.cpp:
(CSSStyleDeclarationImpl::getPropertyValue):
(CSSStyleDeclarationImpl::get4Values):
(CSSStyleDeclarationImpl::getShortHandValue):
(CSSStyleDeclarationImpl::getPropertyCSSValue):
(CSSStyleDeclarationImpl::removeProperty):
(CSSStyleDeclarationImpl::getPropertyPriority):
(CSSStyleDeclarationImpl::setProperty):
(CSSStyleDeclarationImpl::setLengthProperty):
(CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
(CSSPrimitiveValueImpl::cleanup):
(CSSPrimitiveValueImpl::computeLength):
(CSSPrimitiveValueImpl::computeLengthFloat):
(CSSPrimitiveValueImpl::setFloatValue):
(CSSPrimitiveValueImpl::cssText):
(FontFamilyValueImpl::FontFamilyValueImpl):
(FontValueImpl::FontValueImpl):
(FontValueImpl::~FontValueImpl):
* khtml/css/css_valueimpl.h:
* khtml/css/cssparser.cpp:
(qFatal):
(ValueList::ValueList):
(ValueList::~ValueList):
(ValueList::addValue):
(CSSParser::CSSParser):
(CSSParser::~CSSParser):
(CSSParser::parseSheet):
(CSSParser::parseRule):
(CSSParser::parseValue):
(CSSParser::parseDeclaration):
(CSSParser::addProperty):
(CSSParser::createStyleDeclaration):
(CSSParser::clearProperties):
(CSSParser::document):
(validUnit):
(CSSParser::parseShortHand):
(CSSParser::parse4Values):
(CSSParser::parseContent):
(CSSParser::parseShape):
(CSSParser::parseFont):
(CSSParser::parseFontFamily):
(parseColor):
(CSSParser::parseColor):
(yyerror):
(DOM::CSSParser::lex):
(toHex):
(DOM::CSSParser::text):
* khtml/css/cssparser.h:
* khtml/css/cssproperties.c:
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/css/parser.cpp: Added.
(DOM::getPropertyID):
(getValueID):
(cssyyerror):
(cssyylex):
(__yy_memcpy):
* khtml/css/parser.h: Added.
* khtml/css/parser.y: Added.
* khtml/css/quirks.css: Added.
* khtml/css/tokenizer.cpp: Added.
* khtml/css/tokenizer.flex: Added.
* khtml/dom/css_value.h:
* khtml/dom/html_element.cpp:
* khtml/ecma/kjs_css.cpp:
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/html/html_blockimpl.cpp:
(HTMLDivElementImpl::parseAttribute):
(HTMLHRElementImpl::attach):
(HTMLParagraphElementImpl::parseAttribute):
* khtml/html/html_elementimpl.cpp:
(isHexDigit):
(toHex):
(HTMLElementImpl::addHTMLColor):
* khtml/html/html_elementimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLFontElementImpl::parseAttribute):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
(HTMLTableElementImpl::attach):
(HTMLTablePartElementImpl::parseAttribute):
(HTMLTableCellElementImpl::parseAttribute):
* khtml/khtml_part.cpp:
(KHTMLPart::gotoAnchor):
* khtml/misc/helper.h:
* khtml/rendering/render_body.cpp:
(RenderBody::setStyle):
* khtml/rendering/render_list.cpp:
(RenderListMarker::lineHeight):
(RenderListMarker::baselinePosition):
* khtml/rendering/render_style.cpp:
(RenderStyle::setContent):
* khtml/rendering/render_style.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::setFocusNode):
(DocumentImpl::setCSSTarget):
(DocumentImpl::getCSSTarget):
* khtml/xml/dom_docimpl.h:
* kwq/KWQChar.mm:
(QChar::upper):
* kwq/KWQColor.h:
* kwq/KWQKStandardDirs.mm:
(locate):
* kwq/KWQPainter.mm:
(QPainter::drawLine):
* kwq/KWQString.h:
2003-02-24 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3167642 - crash in renderArena.
* khtml/html/html_documentimpl.h:
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::HTMLDocumentImpl): Added new processingLoadEvent bool.
(HTMLDocumentImpl::close): Guard against re-entering the load event handler.
2003-02-24 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3179059 -- CSS1: capitalized letters should remain capitalized when
text-transform: capitalize is applied
* khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::capitalize): Capitalize the first
letters of words, but don't make any letters lowercase.
2003-02-23 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3179181 -- KURL won't accept URLs with a query part and no / separating host name from path
* kwq/KWQKURL.mm: (KURL::parse): Allow any path segment end character to end the host part of a
URL, rather than allowing only a "/".
2003-02-21 Maciej Stachowiak <mjs@apple.com>
Back out last change, mondo layout regressions.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
2003-02-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3167642 - crash in renderArena.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close): Clear the tokenizer early to avoid
re-entering the onload handler - this was causing a massive
overload of frames which finally caused a crash.
2003-02-21 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed a problem that was causing layout tests to give inconsistent results
* kwq/KWQPixmap.mm:
(QPixmap::size): Handle case of nil image so we don't use the uninitialized
result of dispatching a method to a structure-returning function.
(QPixmap::rect): Ditto.
(QPixmap::width): Ditto.
(QPixmap::height): Ditto.
2003-02-21 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- Made it possible to run the layout tests in a Deployment version
* kwq/KWQRenderTreeDebug.cpp: (externalRepresentation): Remove #ifndef NDEBUG.
* kwq/KWQRenderTreeDebug.h: Remove #ifndef NDEBUG.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge renderTreeAsExternalRepresentation]):
Remove #ifndef NDEBUG.
2003-02-21 Darin Adler <darin@apple.com>
* kwq/KWQRenderTreeDebug.cpp: (write): Add missing spaces in render
tree dump format.
2003-02-20 Maciej Stachowiak <mjs@apple.com>
Revert Dave's patch to these files, since it turned out to cause
layout regressions.
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::container):
2003-02-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin Adler.
- fixed 3173276 - hang in kjs string at iteslj.org page
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::addPending): Leave whitespace unmolested inside
<script>, so that literal tabs in strings come through as tabs,
not spaces.
2003-02-20 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3177310 -- REGRESSION: "serif" mapped to "fixed"
Fixed a typo where the serif method was returning the fixed font name.
Also made this class use inlining for almost everything -- yields a miniscule
improvement in code size and speed, and increases brevity.
* kwq/KWQKHTMLSettings.h: Moved almost everything here.
* kwq/KWQKHTMLSettings.mm: Moved almost everything out of here.
2003-02-19 David Hyatt <hyatt@apple.com>
Update layers to not fix their positions during setLayouted.
Inline container() within render_object.cpp so setLayouted can
use it inline.
Reviewed by mjs
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::container):
2003-02-19 David Hyatt <hyatt@apple.com>
Just chain BidiRuns using an internal next ptr and dump the
use of QPtrList (which has to malloc internal nodes to wrap
each run).
Reviewed by darin (reverseRuns reviewed by mjs)
* khtml/rendering/bidi.cpp:
* khtml/rendering/bidi.h:
* khtml/rendering/render_block.h:
2003-02-19 David Hyatt <hyatt@apple.com>
Make the BidiIterator midpoints use an array instead of a list.
Reviewed by kocienda
* khtml/rendering/bidi.h
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.h:
2003-02-18 Maciej Stachowiak <mjs@apple.com
Reviewed by Chris.
Merged changes from Safari-58-1-branch.
2003-02-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
* WebCore.pbproj/project.pbxproj: Include /System/Library/PrivateFrameworks.
2003-02-18 Trey Matteson <trey@apple.com>
3171982 - REGRESSION: onClick handlers run twice when button pressed (DSLReports.com forums)
My earlier changes added the codepath by which we let khtmlview fully process
a mouse up after a widget has done it's tracking, which leads to the second
onClick call. Presumably that path does not exist in the native KDE case.
The change below reduces the impact of my hack, whereby instead of fully posting
a fake mouseup, we just note that the mouse has done up at the end of mousedown
handling, and clear the mousePressed state (state I also added).
Reviewed by Darin.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMousePressEvent): Look for a current mouseUp at the end of
dispatching the mouse down.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
Don't post a phony mouse up from here.
(KWQKHTMLPart::lastEventIsMouseUp):
Utility routine to test for mouseUp.
=== Safari-62 ===
2003-02-18 David Hyatt <hyatt@apple.com>
Fix for 3176102, bad table cell regression. I was adding in
random properties for cells. Eep.
Also patched table element to add in the inherit property using
CSS_VAL_INHERIT instead of the string "inherit" (faster).
Reviewed by gramps
* khtml/css/cssstyleselector.cpp:
* khtml/html/html_tableimpl.cpp
2003-02-18 David Hyatt <hyatt@apple.com>
Fix for 3171795, dotted borders drawn incorrectly. Picked this
gem up from the KHTML trunk.
Reviewed by darin
* khtml/rendering/render_object.cpp:
(RenderObject::drawBorder):
2003-02-17 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3174332 -- REGRESSION: bad initial layout due to empty QFontMetrics
* khtml/rendering/render_html.cpp: (RenderHtml::setStyle):
Don't set the style's to display:BLOCK if it's display:NONE. This prevents
us from modifying the special FOUC style among other things.
- unrelated code cleanup
* khtml/html/html_baseimpl.cpp: Moved code around that was grouped badly.
2003-02-17 David Hyatt <hyatt@apple.com>
Missed another "Almost Strict" spot.
Reviewed by kocienda
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
2003-02-17 David Hyatt <hyatt@apple.com>
Fix for 3% improvement on cached cvs-base. Make cells share the
declarations set up by the table (add these decls to the table
once instead of to every cell).
Reviewed by darin
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::HTMLTableElementImpl):
(HTMLTableElementImpl::~HTMLTableElementImpl):
(HTMLTableElementImpl::createSharedCellDecls):
(HTMLTableCellElementImpl::getAdditionalStyleDecls):
(HTMLTableCellElementImpl::attach):
* khtml/html/html_tableimpl.h:
* khtml/xml/dom_elementimpl.h:
2003-02-17 Trey Matteson <trey@apple.com>
2938062 Mouse cursor does not change to link cursor over non-button form submission controls
Reviewed by Darin
* khtml/khtmlview.cpp:
(isSubmitImage): Helper function to ID submit buttons with images.
(KHTMLView::viewportMouseMoveEvent): Set cursor for submit buttons with images.
* kwq/WebCoreBridge.mm:
(inputElementFromDOMElement): Simplify previously written casting goop.
2003-02-16 David Hyatt <hyatt@apple.com>
Fix "Almost Strict" mode to not match @konq-quirks.
Reviewed by kocienda
* ChangeLog:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::recalcStyleSelector):
2003-02-16 David Hyatt <hyatt@apple.com>
Fix to make table cells within the same table use a shared style
decl object (owned by the table). This stops every cell in a table
from having the exact same values copied on the cell itself.
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::HTMLTableElementImpl):
(HTMLTableElementImpl::~HTMLTableElementImpl):
(HTMLTableElementImpl::createSharedCellDecls):
(HTMLTableCellElementImpl::getAdditionalStyleDecls):
(HTMLTableCellElementImpl::attach):
* khtml/html/html_tableimpl.h:
* khtml/xml/dom_elementimpl.h:
2003-02-14 David Hyatt <hyatt@apple.com>
Make the inline box model live. Borders/backgrounds and text
decorations have been rewritten.
Also fixed a bug with clip rects. They didn't include borders.
Reviewed by kocienda
* khtml/css/cssstyleselector.cpp:
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
* khtml/rendering/bidi.cpp:
* khtml/rendering/font.cpp:
* khtml/rendering/font.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackground):
(RenderBox::paintBackgroundExtended):
(RenderBox::getClipRect):
(RenderBox::position):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::createInlineBox):
(RenderFlow::paintLineBoxBackgroundBorder):
(RenderFlow::paintLineBoxDecorations):
(RenderFlow::repaint):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject):
(RenderInline::width):
(RenderInline::height):
(RenderInline::offsetLeft):
(RenderInline::offsetTop):
(RenderInline::nodeAtPoint):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_line.cpp:
(InlineFlowBox::verticallyAlignBoxes):
(InlineFlowBox::computeLogicalBoxHeights):
(InlineFlowBox::placeBoxesVertically):
(InlineFlowBox::shrinkBoxesWithNoTextChildren):
(InlineFlowBox::paintBackgroundAndBorder):
(shouldDrawDecoration):
(InlineFlowBox::paintDecorations):
* khtml/rendering/render_line.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
(RenderObject::lineHeight):
(RenderObject::getTextDecorationColors):
* khtml/rendering/render_object.h:
* khtml/rendering/render_root.cpp:
(enclosingPositionedRect):
* khtml/rendering/render_style.cpp:
(StyleVisualData::StyleVisualData):
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::operator==):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/rendering/render_table.cpp:
(RenderTableCell::repaintRectangle):
* khtml/rendering/render_text.cpp:
(TextRun::paintDecoration):
(TextRun::checkSelectionPoint):
(RenderText::nodeAtPoint):
(RenderText::cursorPos):
(RenderText::absolutePosition):
(RenderText::paintObject):
(RenderText::paint):
(RenderText::position):
* khtml/rendering/render_text.h:
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawLineForText):
* kwq/WebCoreTextRenderer.h:
2003-02-13 Trey Matteson <trey@apple.com>
First checkin for working forms autocomplete.
This level has some new support routines.
Reviewed by Chris
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::isLoginForm): New, returns if a form is for login.
* khtml/html/html_formimpl.h:
* kwq/KWQDOMNode.cpp:
(idFromNode): New, helper routine to allow us to use the id() function from ObjC.
* kwq/KWQDOMNode.h:
* kwq/KWQTextArea.h: Adopt KWQWidgetHolder protocol.
* kwq/KWQTextArea.mm:
(-[KWQTextArea widget]): Adopt KWQWidgetHolder protocol.
(-[KWQTextAreaTextView widget]): Adopt KWQWidgetHolder protocol.
* kwq/KWQTextField.h: Adopt KWQWidgetHolder protocol.
* kwq/KWQTextField.mm:
(-[KWQTextField widget]): Adopt KWQWidgetHolder protocol.
(-[KWQSecureTextField widget]): Adopt KWQWidgetHolder protocol.
* kwq/KWQView.h: Define KWQWidgetHolder protocol
* kwq/KWQView.mm:
(-[KWQView widget]): Adopt KWQWidgetHolder protocol.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementForView:]): New method.
(inputElementFromDOMElement): Common code for next two methods.
(-[WebCoreBridge elementIsInLoginForm:]): New method.
(-[WebCoreBridge elementDoesAutoComplete:]): New method.
2003-02-13 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3162806 -- REGRESSION: handle == h assertion when clicking headphone link at cnn.com
* khtml/ecma/kjs_window.cpp: (HistoryFunc::tryCall): Instead of trying to actually do the
history navigation here, call the new KHTMLPart::scheduleHistoryNavigation.
* khtml/khtml_part.cpp:
(KHTMLPart::init): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.
(KHTMLPart::openURL): Ditto.
(KHTMLPart::createJavaContext): Ditto.
(KHTMLPart::clear): Also initialize m_scheduledRedirection to noRedirectionScheduled.
(KHTMLPart::checkCompleted): Use m_scheduledRedirection rather than m_redirectURL to check
whether a redirection is already in progress.
(KHTMLPart::scheduleRedirection): Use m_scheduledRedirection rather than m_redirectURL to check
whether a redirection is already in progress, and set m_scheduledRedirection to redirectionScheduled.
(KHTMLPart::scheduleHistoryNavigation): Added. Does the same thing as scheduleRedirection,
but always uses a delay of 0, sets m_scheduledRedirection to historyNavigationScheduled, and
sets m_scheduledHistoryNavigationSteps.
(KHTMLPart::slotRedirect): Add an if statement that does the history navigation. The code is
moved here from HistoryFunc::tryCall. Also set m_scheduledRedirection to noRedirectionScheduled.
(KHTMLPart::urlSelected): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.
(KHTMLPart::requestObject): Ditto.
(KHTMLPart::submitForm): Ditto.
(KHTMLPart::slotParentCompleted): Use m_scheduledRedirection rather than m_redirectURL to check
whether a redirection is already in progress.
(KHTMLPart::setZoomFactor): Add a few more #if !APPLE_CHANGES so we can leave out more unused fields.
* khtml/khtml_part.h: Added scheduleHistoryNavigation.
* khtml/khtmlpart_p.h: Added RedirectionScheduled enum. Added more #if !APPLE_CHANGES to leave out
a bunch more fields we don't use. Added m_scheduledRedirection and m_scheduledHistoryNavigationSteps.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::redirectionTimerStartedOrStopped): Check and don't do anything
if the timer was being used for history redirection.
* khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
Check m_scheduledRedirection instead of m_redirectURL to figure out if there is a redirection
in progress. Not strictly necessary since we really don't care about the history case here,
but consistent with the rest.
2003-02-13 Chris Blumenberg <cblu@apple.com>
Fixed WebKit typos found by Peter Wilson.
Reviewed by darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::bridgeForFrameName): call findOrCreateFrameNamed
* kwq/WebCoreBridge.h: fixed method name for findOrCreateFrameNamed
2003-02-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3158484 -- after submission failure, submitting a second time doesn't work
* kwq/KWQKHTMLPart.h: Added didNotOpenURL method. Changed _formSubmittedFlag bool
into _submittedFormURL string.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): No need to initialize string.
(KWQKHTMLPart::didNotOpenURL): If the form we submitted failed, then forget about it.
(KWQKHTMLPart::submitForm): Only do the protection against multiple submissions if
the URL is the same.
(KWQKHTMLPart::setView): Nuke the submitted URL here where we used to nuke the flag.
* kwq/WebCoreBridge.h: Added didNotOpenURL: method to be called by WebKit.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge didNotOpenURL:]): Forward the call to the part.
2003-02-12 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3162786 -- hang with large amounts of text in textarea
* kwq/KWQTextArea.mm: (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]):
Rewrite to not use RangeOfParagraph to avoid n^2 algorithm. Also made small
changes to similar functions so they look similar, and got rid of an int/unsigned
mismatch in a case where the value is guaranteed to be positive.
2003-02-11 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3170403 -- nil-dereference in addEventListener
* khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Check getJSEventListener result for nil.
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check getJSEventListener result for nil.
2003-02-11 Trey Matteson <trey@apple.com>
Set -seg1addr in our build styles, but not for the B&I build.
This makes our SYMROOTS from B&I usable to determine symbols from crash
logs from the field.
Also nuked DeploymentFat build style.
Reviewed by Ken.
* WebCore.pbproj/project.pbxproj:
2003-02-10 David Hyatt <hyatt@apple.com>
Inline box model landing, stage 1. Doesn't really change
much of anything visually yet. Just builds a bunch of boxes
and positions them, but those boxes aren't used yet.
Also fixing repaint() to understand not to dirty outside
overflow:hidden clipped ancestors.
Fixed two table bugs in table painting as well.
Reviewed by kocienda
* WebCore.pbproj/project.pbxproj:
* khtml/rendering/bidi.cpp:
* khtml/rendering/bidi.h:
* khtml/rendering/render_block.cpp:
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::position):
(RenderBox::repaintRectangle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChild):
(RenderFlow::deleteLineBoxes):
(RenderFlow::detach):
(RenderFlow::createInlineBox):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject):
* khtml/rendering/render_inline.cpp:
* khtml/rendering/render_inline.h:
* khtml/rendering/render_line.cpp: Added.
(InlineBox::detach):
(throw):
(InlineBox::operator delete):
(InlineFlowBox::marginLeft):
(InlineFlowBox::marginRight):
(InlineFlowBox::marginBorderPaddingLeft):
(InlineFlowBox::marginBorderPaddingRight):
(InlineFlowBox::getFlowSpacingWidth):
(InlineFlowBox::nextOnLineExists):
(InlineFlowBox::prevOnLineExists):
(InlineFlowBox::onEndChain):
(InlineFlowBox::determineSpacingForFlowBoxes):
(InlineFlowBox::placeBoxesHorizontally):
(InlineFlowBox::verticallyAlignBoxes):
(InlineFlowBox::adjustMaxAscentAndDescent):
(InlineFlowBox::computeLogicalBoxHeights):
(InlineFlowBox::placeBoxesVertically):
* khtml/rendering/render_line.h: Added.
* khtml/rendering/render_object.cpp:
(RenderObject::createInlineBox):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_table.cpp:
(RenderTableSection::paint):
(RenderTableCell::repaintRectangle):
(RenderTableCell::paint):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::nodeAtPoint):
(RenderText::paintObject):
(RenderText::height):
(RenderText::createInlineBox):
(RenderText::position):
(RenderText::width):
(RenderText::metrics):
* khtml/rendering/render_text.h:
* khtml/xml/dom_docimpl.h:
2003-02-10 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3124596 -- failures handling URLs with non-ASCII characters in them
* khtml/xml/dom_docimpl.h: Add an m_decoder field.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): Initialize m_decoder to 0.
(DocumentImpl::completeURL): Pass the QTextCodec from m_decoder to KURL if present.
* khtml/khtml_part.cpp:
(KHTMLPart::begin): Set the decoder on the document when we make the document if we have a decoder.
(KHTMLPart::write): Set the decoder on the document when we make the decoder if we have a document.
(KHTMLPart::completeURL): Remove APPLE_CHANGES; we handle the encoding in the document.
* kwq/KWQKURL.h: Removed "encoding hint" parameters. Add a QTextCodec parameter to the
relative URL constructor, which is the one used when we deal with links on a page.
* kwq/KWQKURL.mm: (KURL::KURL): Decode the relative string based on the QTextCodec parameter.
* kwq/KWQString.h: Added isAllASCII, good for detecting when it's safe to use latin1()
or ascii() without worrying about character sets.
* kwq/KWQString.mm: (QString::isAllASCII): Added.
* WebCore-tests.exp: Updated for changes in KURL API.
* WebCore-combined.exp: Regenerated.
- other changes
* khtml/rendering/render_table.cpp: (RenderTableCell::setWidth): Add an assertion that will help
us notice future overflow issues.
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Rolled out the APPLE_CHANGES here that
were intended to cope with the lack of window.history, which we now have. While KHTML's rule may
not be the correct rule, this will now work as well in Safari as in Konqueror.
2003-02-07 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3145899 -- tf1.fr page marked UTF-8 is being decoded as Latin-1 (due to <noscript> before <meta>)
* khtml/misc/decoder.cpp: (Decoder::decode): Add NOSCRIPT to the list of tags
that are allowed before META tags that specify character sets.
- fixed 3144214 -- treat Big5 as Windows CP 950 the same way TEC does
* kwq/mac-encodings.txt: Move Big5 names to kCFStringEncodingDOSChineseTrad
instead of kCFStringEncodingBig5.
* kwq/KWQCharsetData.c: Regenerated.
2003-02-07 Richard Williamson <rjw@apple.com>
Changes to support per WebController preferences.
KHTMLPart now always accesses preferences from it's m_setting.
Changes made to WebPreferences pass to WebCoreSetting to KTMLSettings.
Added JavaScriptCanOpenWindowsAutomatically to KHTMLSettings.
Reviewed by Maciej and Ken.
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
* khtml/khtml_part.cpp:
(KHTMLPart::init):
(KHTMLPart::restoreURL):
(KHTMLPart::openURL):
(KHTMLPart::begin):
(KHTMLPart::reparseConfiguration):
* khtml/khtmlpart_p.h:
* kwq/KWQKConfigBase.h:
* kwq/KWQKConfigBase.mm:
(KConfig::readUnsignedNumEntry):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setSettings):
* kwq/KWQKHTMLSettings.h:
* kwq/KWQKHTMLSettings.mm:
(KHTMLSettings::stdFontName):
(KHTMLSettings::fixedFontName):
(KHTMLSettings::serifFontName):
(KHTMLSettings::sansSerifFontName):
(KHTMLSettings::cursiveFontName):
(KHTMLSettings::fantasyFontName):
(KHTMLSettings::minFontSize):
(KHTMLSettings::mediumFontSize):
(KHTMLSettings::mediumFixedFontSize):
(KHTMLSettings::isJavaEnabled):
(KHTMLSettings::autoLoadImages):
(KHTMLSettings::isPluginsEnabled):
(KHTMLSettings::isJavaScriptEnabled):
(KHTMLSettings::JavaScriptCanOpenWindowsAutomatically):
(KHTMLSettings::userStyleSheet):
(KHTMLSettings::setStdFontName):
(KHTMLSettings::setFixedFontName):
(KHTMLSettings::setSerifFontName):
(KHTMLSettings::setSansSerifFontName):
(KHTMLSettings::setCursiveFontName):
(KHTMLSettings::setFantasyFontName):
(KHTMLSettings::setMinFontSize):
(KHTMLSettings::setMediumFontSize):
(KHTMLSettings::setMediumFixedFontSize):
(KHTMLSettings::setAutoLoadImages):
(KHTMLSettings::setIsJavaScriptEnabled):
(KHTMLSettings::setIsJavaEnabled):
(KHTMLSettings::setArePluginsEnabled):
(KHTMLSettings::setJavaScriptCanOpenWindowsAutomatically):
(KHTMLSettings::setUserStyleSheet):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge init]):
(-[WebCoreBridge initializeSettings:]):
* kwq/WebCoreSettings.h:
* kwq/WebCoreSettings.mm:
(-[WebCoreSettings dealloc]):
(-[WebCoreSettings init]):
(-[WebCoreSettings setStandardFontFamily:]):
(-[WebCoreSettings setFixedFontFamily:]):
(-[WebCoreSettings setSerifFontFamily:]):
(-[WebCoreSettings setSansSerifFontFamily:]):
(-[WebCoreSettings setCursiveFontFamily:]):
(-[WebCoreSettings setFantasyFontFamily:]):
(-[WebCoreSettings setMinimumFontSize:]):
(-[WebCoreSettings setDefaultFontSize:]):
(-[WebCoreSettings setDefaultFixedFontSize:]):
(-[WebCoreSettings setJavaEnabled:]):
(-[WebCoreSettings setPluginsEnabled:]):
(-[WebCoreSettings setJavaScriptEnabled:]):
(-[WebCoreSettings setJavaScriptCanOpenWindowsAutomatically:]):
(-[WebCoreSettings setWillLoadImagesAutomatically:]):
(-[WebCoreSettings setUserStyleSheetLocation:]):
(-[WebCoreSettings userStyleSheetLocation]):
(-[WebCoreSettings settings]):
2003-02-07 Darin Adler <darin@apple.com>
* khtml/rendering/render_table.h: Added copyright date.
* khtml/rendering/render_table.cpp: Added copyright date.
2003-02-07 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3165171 -- REGRESSION: images overlap text
* khtml/rendering/table_layout.cpp: (AutoTableLayout::calcEffectiveWidth):
Change to distribute space to the fixed columns first so the code to distribute to non-fixed columns does not
assume it can distribute more to the fixed columns than it really can.
2003-02-07 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3167025 -- REGRESSION: http://www.buypcdirect.com doesn't wrap correctly b/c of huge cell width value
* khtml/rendering/table_layout.h: Make the fields in the Layout structure used in table
width computations use int instead of short.
* khtml/rendering/table_layout.cpp:
(FixedTableLayout::calcMinMaxWidth): Make sure we don't overflow m_minWidth or m_maxWidth in case the
specified fixed width value is huge.
(FixedTableLayout::layout): Use ints for the calcWidth array instead of shorts.
(AutoTableLayout::calcMinMaxWidth): Clamp both maxWidth and minWidth to 0x7fff to match the other code in
this file, rather than using 10000.
2003-02-06 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3140738 -- textarea contents are LF delimited instead of CRLF
* khtml/html/html_formimpl.cpp:
(encodeCString): Turn CR followed by something other than LF into CRLF.
(fixLineBreaks): Added. Turns stray CRs and LFs into CRLF.
(HTMLFormElementImpl::formData): Call fixLineBreaks on form data.
- fixed 3167235 -- REGRESSION: assert after clicking on a link on radioslack.com
* kwq/KWQTextCodec.mm: (KWQTextDecoder::toUnicode): Return the null string
if the passed in string pointer is NULL, rather than asserting.
2003-02-06 David Hyatt <hyatt@apple.com>
Fix rollingstone regression.
Reviewed by mjs
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
2003-02-06 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3166693 -- REGRESSION: infinite recursion in makeFirstResponder while tabbing as page loaded
Because we now deliver blur events, we are triggering a handler on this page that changes focus.
It triggered an infinite loop because setFocus kept setting the focus back to a text field, which
then changed the focus to its editor. The fix was to make QWidget::setFocus smarter about editors.
* kwq/KWQTextField.mm: (-[KWQTextField becomeFirstResponder]): Don't do any changes in responder until
after calling KWQKHTMLPart::setDocumentFocus, since that can change focus away. If it does, return NO.
* kwq/KWQWidget.h: Add hasFocus, remove virtual from setFocus and clearFocus.
* kwq/KWQWidget.mm:
(QWidget::hasFocus): Added. Moved code to check if a particular view is first responder here.
Here's the bug fix too, check if the first responder is this widget's view's editor, and if so return true.
(QWidget::setFocus): Do nothing if this widget already has focus.
(QWidget::clearFocus): Do nothing if this widget does not have focus.
2003-02-06 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3161953 -- crash in KWQListImpl, DOM::CSSStyleSheetImpl::isLoading on XML page
The problem is that this page has some non-HTML elements, but the code was checking
only the element ID, not whether it is HTML or not. Also fixed the page's layout.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector):
Check that the node is an HTML element before checking the ID in two places.
Without this, we cast the pointer to the wrong type and trash memory.
* khtml/rendering/render_root.cpp:
(RenderRoot::layout): Set all the children false here, not just firstChild.
(RenderRoot::docHeight): Take all the children's heights into account, not just firstChild.
(RenderRoot::docWidth): Take all the children's widths into account, not just firstChild.
2003-02-06 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3165295 -- Hang while triple clicking on page
Flaws in the continuation logic we added to checkSelectionPoint made it take
exponential time on pages with a lot of continuations.
* khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
added virtual checkSelectionPointIgnoringContinuations.
* khtml/rendering/render_object.cpp:
(RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
the render object walking process, which we only want to do at the top level,
since otherwise we will see the same nodes multiple times. Also optimizes by only
looking at the inline continuations of inlines, not any continuations of a block.
(RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
function that is overriden by RenderText. It is identical to the old version of
checkSelectionPoint, minus the continuation logic.
* khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
checkSelectionPointIgnoringContinuations.
* khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
Changed the name, and nothing else.
- fixed my build which was crashing on load
* WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
2003-02-05 Trey Matteson <trey@apple.com>
3137647 - ad frames get their own history entries at channels.netscape.com
3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
The logic for deciding whether new entries are added to history is moved here
from WebKit. The advantage is that we can take specific action in each of the
relevant cases instead of the half-informed guessing WK was doing.
Here is what we now use for the lockHistory param to scheduleRedirect():
document.location = XXX - !userGesture
window.location = XXX - !userGesture
window.open - false
window.replace - true
window.reload - true
meta equiv http-refresh - delay <= 1
http-refresh - delay <= 1
Reviewed by Maciej, Darin.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::wasRunByUserGesture): Rename of previous isWindowOpenAllowed(),
since we know use it for multiple purposes.
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::putValue): Assignment to document.location locks history
if not a result of a user gesture.
* khtml/ecma/kjs_window.cpp:
(Window::put): Assignment to window.location locks history
if not a result of a user gesture.
(WindowFunc::tryCall): Adopt rename to wasRunByUserGesture().
(Location::put): Assignment to window.location locks history
if not a result of a user gesture.
* khtml/khtml_part.cpp:
(KHTMLPart::receivedFirstData): http-refreshes lock history if the timeout<1
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::processHttpEquiv): http-refreshes lock history if the timeout<1
2003-02-04 Trey Matteson <trey@apple.com>
Pass formValues up through the bridge at submit time.
Reviewed by Maciej
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submit): Tell KWQPart about the form values, instead of
talking to the khtmlview.
* kwq/KWQKHTMLPart.h: New ivar to store formValues.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Init ivar
(KWQKHTMLPart::~KWQKHTMLPart): Free ivar
(KWQKHTMLPart::openURL): Pass nil formValues
(KWQKHTMLPart::openURLRequest): Pass nil formValues
(KWQKHTMLPart::clearRecordedFormValues): Clear saved formValues
(KWQKHTMLPart::recordFormValue): Record a name/value
(KWQKHTMLPart::submitForm): Pass along recorded formValues
(KWQKHTMLPart::urlSelected): Pass nil formValues
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Pass nil formValues
* kwq/WebCoreBridge.h: New params for formValues
2003-02-05 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3165682 -- REGRESSION: assertion failure in appendChildNode loading cnn.com
* khtml/rendering/render_table.cpp: (RenderTable::addChild):
Get rid of double-addChild introduced when I carelessly rolled in a change
from the KHTML guys.
2003-02-05 David Hyatt <hyatt@apple.com>
Fix for 3164949. My fix to make form controls actually obey
display settings in CSS exposed a bug in the html4.css
stylesheet. SELECT had been set to be display: block, which
is of course just plain wrong.
Reviewed by darin
* khtml/css/html4.css:
2003-02-05 Richard Williamson <rjw@apple.com>
Cleanup public WebHistory API, stage 1.
Reviewed by trey.
* kwq/KWQKHistoryProvider.mm:
* kwq/WebCoreHistory.h:
* kwq/WebCoreHistory.m:
(+[WebCoreHistory setHistoryProvider:]):
(+[WebCoreHistory historyProvider]):
2003-02-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3164850 -- REGRESSION: query URLs are broken
Mea culpa. The KURL test in the Tests directory failed last time, but for
some reason I didn't notice that when I ran it, perhaps due to the other
failing tests.
* kwq/KWQKURL.mm: (appendEscapingBadChars): Don't escape '?' even though
it is in the "bad character" set, since this is a more-lenient definition
of bad character. Also fixed a buffer overrun bug in the '%'-sequence-preserving
code, which is a second way this function is lenient. We still get the speed
because most characters this routine processes are not bad characters.
(KURL::encode_string): Instead of calling appendEscapingBadChars, put in
a strict version of the escaping loop that does not tolerate pre-existing
'%' sequences or '?' characters.
2003-02-04 Darin Adler <darin@apple.com>
Reviewed by Dave.
- rolled in table code fix from Dirk on the khtml-dev list
* khtml/rendering/render_table.cpp: (RenderTable::addChild):
Change return back to break.
2003-02-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- we say goodbye to "MIB numbers"
* khtml/misc/decoder.cpp:
(Decoder::Decoder): Get the Latin-1 codec using a name.
(Decoder::setEncoding): Detect the Hebrew encoding using isISOLatin1Hebrew()
instead of MIB number.
(Decoder::decode): Get the UCS-2 codec using a name. Redo APPLE_CHANGES so
we don't get the MIB-number-based workaround for a bug in QTextCodec that
KWQ doesn't have. Get the Latin-1 codec using a name.
* khtml/misc/loader.cpp:
(CachedCSSStyleSheet::CachedCSSStyleSheet): Get the Latin-1 codec using a name.
(CachedScript::CachedScript): Get the Latin-1 codec using a name.
* kwq/KWQCharsets.h: Remove the two MIB-related functions.
* kwq/KWQCharsets.mm: Remove the MIB number from the character set table struct.
Remove the MIB-related dictionary globals and functions.
(buildDictionaries): Remove code to set up the MIB-related dictionaries.
* kwq/KWQTextCodec.h: Remove codecForMib, mibEnum, and encoding member functions.
Add isISOLatin1Hebrew member function.
* kwq/KWQTextCodec.mm:
(QTextCodec::makeDecoder): Pass in the encoding when making KWQTextDecoder rather
than passing in the QTextCodec object.
(QTextCodec::toUnicode): Ditto.
(QTextCodec::isISOLatin1Hebrew): Return true for kCFStringEncodingISOLatinHebrew only.
(KWQTextDecoder::convertUsingTEC): Get encoding directly instead of from a QTextCodec.
(KWQTextDecoder::toUnicode): Ditto.
* kwq/make-charset-table.pl: Don't write out MIB numbers.
* kwq/KWQCharsetData.c: Regenerated.
* khtml/khtml_part.cpp: (KHTMLPart::completeURL):
Don't bother passing the MIB number to KURL. Soon, we'll have to
do something smart here, but we won't use MIB numbers.
* kwq/mac-encodings.txt: Added more 16-bit Unicode character set names.
Updated some comments.
2003-02-04 David Hyatt <hyatt@apple.com>
Patch calcInlineMaxWidth to add in left/right margins/borders/padding
separately (since the inline could break across multiple lines).
Reviewed by darin
* khtml/rendering/render_block.cpp:
(RenderBlock::calcInlineMinMaxWidth):
2003-02-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* WebCore.pbproj/project.pbxproj: Updated to build the framework
standalone instead of embedded when doing a B&I build for Panther.
2003-02-04 David Hyatt <hyatt@apple.com>
Patch #1: Compacts are supposed to use their maximum intrinsic width
when determining if they will fit. I was wrongly using the
minwidth (i.e., being too aggressive about trying to squeeze
the compact in there).
Also yanking the setMaxWidth/MinWidth setters, since I'm not
using them any more.
Reviewed by kocienda
Patch #2: Implement an iterator for min/max width calculations
of blocks with inline children. This iterator will include
inline flows twice (with a bool flag indicating whether you're at the
start or end of the flow).
Reviewed by darin
* khtml/rendering/render_block.cpp:
(RenderBlock::layoutBlockChildren):
* khtml/rendering/render_box.h:
* khtml/rendering/render_object.h:
2003-02-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3142813 -- Safari displays a blank page when trying to open html file encoded in little-endian UTF-16
* kwq/KWQString.h: Remove fromStringWithEncoding and convertToQCString,
add append that takes a QChar * and length.
* kwq/KWQString.mm:
(QString::fromUtf8): Use QTextCodec instead of fromStringWithEncoding.
(QString::append): Implement by calling insert.
* kwq/KWQTextCodec.h: Added an encoding() member function to QTextCodec
and made QTextDecoder an abstract base class to pave the way for putting
more state in it to handle multibyte encodings.
* kwq/KWQTextCodec.mm: Add KWQTextDecoder, a concrete subclass of QTextDecoder.
(codecForCFStringEncoding): Moved the static inside this function for clarity.
(QTextCodec::makeDecoder): Make a KWQTextDecoder.
(QTextCodec::toUnicode): Make a KWQTextDecoder and use it do the decoding instead
of calling fromStringWithEncoding.
(KWQTextDecoder::convertUTF16): Added. Decodes Unicode, using the BOM to decide
whether it's little-endian or big-endian.
(KWQTextDecoder::convertUsingTEC): Added. Here's where the code from
QString::fromStringWithEncoding was moved. This needs to be changed to handle
state between multiple buffers passed in eventually, but not to fix this bug.
(KWQTextDecoder::toUnicode): Added. Calls convertUTF16 or convertUsingTEC.
* kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
Use QTextCodec instead of fromStringWithEncoding.
* khtml/misc/decoder.cpp: (Decoder::decode): Rearranged the #if to make
things easier to read.
2003-02-04 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3150252 -- files with question marks in their names fail to upload as attachments
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formData): Don't include a Content-Type header at all if we don't
have a MIME type to send. Matches other web browsers' behavior.
(HTMLInputElementImpl::encoding): Construct the URL using setPath rather than just passing
a filename to the KURL constructor.
(HTMLSelectElementImpl::state): Tweak #if formatting a bit.
(HTMLSelectElementImpl::restoreState): Improve comment a bit.
* kwq/KWQKURL.mm: Make ? be a "bad character". I checked carefully to be sure this does
not adversely affect any calls, including running our KURL tests.
(KURL::setPath): Encode the passed-in path. I determined this was correct both by looking
at all the call sites in KHTML code to see that they would want this behavior, and by noticing
that the path() getter decodes the path.
2003-02-04 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Radar 3142922 (file URLs should never be sent as referrers)
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge referrer]): Check that the referrer does not start with
the prefix "file:". If it does, return nil.
2003-02-03 David Hyatt <hyatt@apple.com>
Fix for 3163603, livepage.apple.com repaints entire page.
Reviewed by darin.
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
2003-02-03 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3133902 -- leaked render objects from makeChildrenNonInline (4 after running cvs-base)
* khtml/rendering/render_block.cpp: (RenderBlock::removeChild):
Deatch the anonymous block after emptying it out.
2003-02-03 David Hyatt <hyatt@apple.com>
Fix for livepage.apple.com crash. The bug # is
3163508.
Reviewed by darin
* khtml/rendering/render_box.cpp:
(RenderBox::setPos):
2003-02-03 David Hyatt <hyatt@apple.com>
Rename TextSlave to TextRun.
Reviewed by darin
* khtml/khtml_part.cpp:
(firstRunAt):
(lastRunAt):
(startAndEndLineNodesIncludingNode):
* khtml/rendering/bidi.cpp:
(RenderBlock::layoutInlineChildren):
* khtml/rendering/render_text.cpp:
(TextRun::detach):
(throw):
(TextRun::operator delete):
(TextRun::paintSelection):
(TextRun::paintDecoration):
(TextRun::paintBoxDecorations):
(TextRun::checkSelectionPoint):
(TextRunArray::TextRunArray):
(TextRunArray::compareItems):
(TextRunArray::findFirstMatching):
(RenderText::detach):
(RenderText::deleteRuns):
(RenderText::findTextRun):
(RenderText::nodeAtPoint):
(RenderText::checkSelectionPoint):
(RenderText::cursorPos):
(RenderText::posOfChar):
(RenderText::paintObject):
(RenderText::position):
(RenderText::width):
* khtml/rendering/render_text.h:
* kwq/KWQRenderTreeDebug.cpp:
(writeTextRun):
(write):
2003-02-03 David Hyatt <hyatt@apple.com>
Fix for assertion on nasdaq.com. Patch containingBlock
to return 0 when it can't find a containingBlock at all (e.g.,
when the object is orphaned).
Patch setOverhangingContents to deal with a null containingBlock
caused by it being called from RenderImage::setStyle().
The bug # is 3162989.
Reviewed by Darin.
* khtml/rendering/render_object.cpp:
(RenderObject::containingBlock):
(RenderObject::setOverhangingContents):
2003-02-02 David Hyatt <hyatt@apple.com>
Enable support for the "run-in" and "compact" display types.
Also implementing support for :before and :after (they were not even
remotely working before these fixes).
Made sure :first-letter drills into inline children to find the
first letter in a block, e.g., so :before content can be used in
conjunction with :first-letter.
Fixed a regression in addOverhangingFloats that broke meyerweb.com's
front page.
Patched findNextLineBreak to correctly handle words that cross
inline boundaries and white-space mixtures. We now pass Hixie's
insanely evil mixed white-space test (we are the only browser
to do so).
Reviewed by kocienda
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/bidi.cpp:
(RenderBlock::findNextLineBreak):
* khtml/rendering/render_block.cpp:
(RenderBlock::setStyle):
(RenderBlock::addChildToFlow):
(getInlineRun):
(RenderBlock::layoutBlockChildren):
(RenderBlock::paintObject):
(RenderBlock::clearFloats):
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidthUsing):
* khtml/rendering/render_box.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChild):
* khtml/rendering/render_image.cpp:
(RenderImage::setStyle):
* khtml/rendering/render_inline.cpp:
(RenderInline::setStyle):
(RenderInline::addChildToFlow):
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::addPseudoStyle):
2003-02-03 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3146862 -- meta http-equiv refresh with a space before the delay does not work
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
Fix code that was trying to use positions within the whitespace-stripped string,
but extracting substrings from the non-stripped original.
- tweaks to render tree dumping format
* khtml/rendering/render_block.h: Make renderName not be inline, since
an inline virtual function doesn't really do any good.
* khtml/rendering/render_block.cpp: (RenderBlock::renderName): Use the
string RenderBlock instead of the string Block for consistency with all the
other renderName results.
* khtml/rendering/render_inline.h: Make renderName not be inline, since
an inline virtual function doesn't really do any good.
* khtml/rendering/render_inline.cpp: (RenderInline::renderName): Use the
string RenderInline instead of the string Inline for consistency with all the
other renderName results.
* khtml/rendering/render_text.h: Make textSlaves() a const member function.
* kwq/KWQRenderTreeDebug.cpp:
(operator<<): Format rectangles as "x at (1,2) size 3x4" rather than "(1,2,3,4)".
(quoteAndEscapeNonPrintables): Added. Makes it easy to turn an arbitrary Unicode
string into something that's all ASCII.
(writeTextSlave): Change this so it also writes out the text.
(write): Call the new writeTextSlave, and also use "layer" instead of "RenderLayer".
2003-02-01 Darin Adler <darin@apple.com>
- fix mistake that broke build
* khtml/rendering/render_block.h: Add include of <qsortedlist.h>.
2003-01-31 Darin Adler <darin@apple.com>
Reviewed by Dave.
- reduced the amount of RenderFlow in the world by about 1/2
* khtml/rendering/bidi.h: Take RenderBlock * instead of RenderFlow *.
* khtml/rendering/bidi.cpp:
(BidiIterator::BidiIterator): Take RenderBlock * instead of RenderFlow *.
(RenderBlock::layoutInlineChildren): Fix debug message to say RenderBlock instead of RenderFlow.
(RenderBlock::findNextLineBreak): Fix debug message to say RenderBlock instead of RenderFlow.
* khtml/rendering/render_block.cpp:
(RenderBlock::addChildToFlow): Make RenderBlock * instead of RenderFlow *.
(RenderBlock::layout): Fix debug message to say RenderBlock instead of RenderFlow.
(RenderBlock::layoutBlockChildren): Fix debug message to say RenderBlock instead of RenderFlow.
(RenderBlock::clearFloats): Fix debug message to say RenderBlock instead of RenderFlow.
* khtml/rendering/render_flow.h: Return a RenderFlow * instead of a RenderObject * from createFlow.
* khtml/rendering/render_flow.cpp:
(RenderFlow::createFlow): Use an if statement instead of ? : to get rid of typecasting.
* khtml/rendering/render_html.cpp: (RenderHtml::containingBlockWidth):
Fix parent call to call RenderBlock. Calling RenderFlow was a mistake, but one that didn't matter
since the actual method isn't implemented until up in RenderBox anyway.
* khtml/rendering/render_inline.h: Change some parameters to RenderBlock *.
* khtml/rendering/render_inline.cpp:
(cloneInline): Make this return a RenderInline * instead of a RenderFlow *.
(RenderInline::splitInlines): Change some parameters to RenderBlock * and locals to RenderInline *.
(RenderInline::splitFlow): Change some parameters and locals to RenderBlock *.
* khtml/rendering/render_layer.h: Remove forward declaration of class RenderFlow.
* khtml/rendering/render_object.h: Remove forward declaration and friend declaration of class RenderFlow.
2003-01-31 Trey Matteson <trey@apple.com>
New plumbing for autofill/autocomplete. WebBrowser receives controlText delegate
messages from our form widgets. Should result in no behavior change.
New SPI is exposed over the bridge and KWQTextField passes the text delegate msgs to it.
Reviewed by Richard
* kwq/KWQTextField.mm: Pass text delegate msgs through new SPI.
(-[KWQTextField controlTextDidBeginEditing:]):
(-[KWQTextField controlTextDidEndEditing:]):
(-[KWQTextField controlTextDidChange:]):
(-[KWQTextField control:textShouldBeginEditing:]):
(-[KWQTextField control:textShouldEndEditing:]):
(-[KWQTextField control:didFailToFormatString:errorDescription:]):
(-[KWQTextField control:didFailToValidatePartialString:errorDescription:]):
(-[KWQTextField control:isValidObject:]):
(-[KWQTextField control:textView:doCommandBySelector:]):
* kwq/WebCoreBridge.h: New SPI for passing text delegate msgs.
2003-01-31 David Hyatt <hyatt@apple.com>
Fix regression that broke John's site. RenderInline needs
to implement childrenInline() so that it can return true.
I pulled this method out of RenderFlow and into RenderBlock,
which caused RenderInline to use RenderObject's method (and
that one returns false).
Reviewed by rjw
* khtml/rendering/render_inline.h:
2003-01-31 David Hyatt <hyatt@apple.com>
Fix for crash on espn.com. Revert my change to make
containingBlock() return 0 for the root. Put it back to the
old behavior, where the root returns itself when you ask for
the root's containing block.
Reviewed by rjw
* khtml/rendering/render_object.cpp:
(RenderObject::containingBlock):
(RenderObject::setOverhangingContents):
2003-01-31 David Hyatt <hyatt@apple.com>
Two whitespace handling fixes that improve <pre> handling,
especially of inline pres.
Reviewed by rjw.
* khtml/rendering/bidi.cpp:
(RenderBlock::findNextLineBreak):
2003-01-31 Darin Adler <darin@apple.com>
Reviewed by Richard.
* khtml/misc/decoder.cpp: (Decoder::decode): Turn off Japanese auto-detect.
It was causing us to use Japanese encoding on pages that were UTF-8.
2003-01-31 Darin Adler <darin@apple.com>
* Resources/Info.plist: Removed unused file.
2003-01-31 David Hyatt <hyatt@apple.com>
Split RenderFlow into subclasses: RenderInline and RenderBlock.
This change should make inlines a lot smaller (since nearly all
of the member variables in RenderFlow moved into RenderBlock).
It also simplifies methods like containingBlock(), which can
now return a RenderBlock.
Reviewed by darin
* WebCore.pbproj/project.pbxproj:
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/bidi.cpp:
(RenderBlock::bidiReorderLine):
(RenderBlock::layoutInlineChildren):
(RenderBlock::findNextLineBreak):
* khtml/rendering/render_block.cpp: Added.
(:RenderFlow):
(RenderBlock::~RenderBlock):
(RenderBlock::setStyle):
(RenderBlock::addChildToFlow):
(getInlineRun):
(RenderBlock::makeChildrenNonInline):
(RenderBlock::removeChild):
(RenderBlock::layout):
(RenderBlock::layoutBlockChildren):
(RenderBlock::layoutSpecialObjects):
(RenderBlock::paint):
(RenderBlock::paintObject):
(RenderBlock::paintFloats):
(RenderBlock::insertSpecialObject):
(RenderBlock::removeSpecialObject):
(RenderBlock::positionNewFloats):
(RenderBlock::newLine):
(RenderBlock::leftOffset):
(RenderBlock::leftRelOffset):
(RenderBlock::rightOffset):
(RenderBlock::rightRelOffset):
(RenderBlock::lineWidth):
(RenderBlock::nearestFloatBottom):
(RenderBlock::floatBottom):
(RenderBlock::lowestPosition):
(RenderBlock::rightmostPosition):
(RenderBlock::leftBottom):
(RenderBlock::rightBottom):
(RenderBlock::clearFloats):
(RenderBlock::addOverHangingFloats):
(RenderBlock::checkClear):
(RenderBlock::nodeAtPoint):
(RenderBlock::calcMinMaxWidth):
(next):
(RenderBlock::calcInlineMinMaxWidth):
(RenderBlock::calcBlockMinMaxWidth):
(RenderBlock::close):
(RenderBlock::printTree):
(RenderBlock::dump):
* khtml/rendering/render_block.h: Added.
* khtml/rendering/render_body.cpp:
(RenderBody::RenderBody):
(RenderBody::setStyle):
(RenderBody::layout):
(RenderBody::availableHeight):
* khtml/rendering/render_body.h:
* khtml/rendering/render_box.cpp:
(RenderBox::containingBlockWidth):
(RenderBox::calcWidth):
(RenderBox::calcHeight):
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
(RenderContainer::removeLeftoverAnonymousBoxes):
* khtml/rendering/render_flow.cpp:
(RenderFlow::createFlow):
(RenderFlow::addChildWithContinuation):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_form.h:
* khtml/rendering/render_html.cpp:
(RenderHtml::RenderHtml):
(RenderHtml::setStyle):
(RenderHtml::layout):
* khtml/rendering/render_html.h:
* khtml/rendering/render_image.h:
* khtml/rendering/render_inline.cpp: Added.
(:RenderFlow):
(RenderInline::~RenderInline):
(RenderInline::setStyle):
(RenderInline::addChildToFlow):
(cloneInline):
(RenderInline::splitInlines):
(RenderInline::splitFlow):
(RenderInline::paint):
(RenderInline::paintObject):
(RenderInline::calcMinMaxWidth):
(RenderInline::offsetWidth):
(RenderInline::offsetHeight):
(RenderInline::offsetLeft):
(RenderInline::offsetTop):
* khtml/rendering/render_inline.h: Added.
* khtml/rendering/render_list.cpp:
(RenderListItem::RenderListItem):
(RenderListItem::setStyle):
(getParentOfFirstLineBox):
(RenderListItem::calcMinMaxWidth):
(RenderListItem::layout):
(RenderListItem::paint):
(RenderListItem::paintObject):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
(RenderObject::containingBlock):
(RenderObject::setOverhangingContents):
(RenderObject::removeFromSpecialObjects):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::RenderRoot):
(RenderRoot::calcMinMaxWidth):
(RenderRoot::layout):
(RenderRoot::paintObject):
* khtml/rendering/render_root.h:
* khtml/rendering/render_table.cpp:
(RenderTable::RenderTable):
(RenderTable::setStyle):
(RenderTable::lineHeight):
(RenderTable::baselinePosition):
(RenderTable::addChild):
(RenderTable::calcWidth):
(RenderTable::recalcSections):
(RenderTable::dump):
(RenderTableCell::RenderTableCell):
(RenderTableCell::detach):
(RenderTableCell::calcMinMaxWidth):
(RenderTableCell::close):
(RenderTableCell::repaintRectangle):
(RenderTableCell::absolutePosition):
(RenderTableCell::setStyle):
(RenderTableCell::dump):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.h:
* khtml/xml/dom_textimpl.cpp:
(TextImpl::rendererIsNeeded):
2003-01-31 Darin Adler <darin@apple.com>
Reviewed by me, Dave wrote the code.
- fixed 3162013 -- Safari collapses margins through bottom borders (affects top of zeldman.com)
* khtml/rendering/render_flow.cpp: (RenderFlow::layoutBlockChildren):
Don't collapse if we have any bottom border or padding.
2003-01-31 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3160442 -- no top image map at ebay, caused by referrer returning null instead of empty string
* khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet):
Return an empty string, not null, when there is no referrer.
2003-01-31 Chris Blumenberg <cblu@apple.com>
* kwq/WebCoreBridge.mm: fixed key value
2003-01-31 Chris Blumenberg <cblu@apple.com>
Fixed : 3155148 - image shown when dragging gets size from image file, not size as used on page
Reviewed by darin.
* kwq/WebCoreBridge.h: added WebCoreElementImageRectKey
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): get the rect of the image
2003-01-30 Trey Matteson <trey@apple.com>
3161088 - disabled select elements are not disabled when scrolling list used
We use a tableview delegate method to prevent the user from changing the
selection when disabled. Too bad tableviews don't know how to disable themselves.
We also condition the cell used for drawing to match our enabled state.
Reviewed by Maciej.
* kwq/KWQListBox.h: Keep track of whether we are enabled.
* kwq/KWQListBox.mm:
(QListBox::QListBox): Init new flag.
(QListBox::setEnabled): Set new flag.
(QListBox::isEnabled): Getter for new flag.
(-[KWQListBoxTableViewDelegate selectionShouldChangeInTableView:]):
Disallow selection changes if disabled.
(-[KWQListBoxTableViewDelegate tableView:willDisplayCell:forTableColumn:row:]):
Enable cell based on our enabled state to get visual feedback of being disabled.
2003-01-30 Trey Matteson <trey@apple.com>
3161486 - REGRESSION: double click on a widget causes crash
Slight enhancement to the earlier fix of this bug. When handling a doubleclick we
don't want to try to pass the current event down the Cocoa widgets, because Cocoa
has no double-click event, and we just end up resending one we already sent.
The upshot is that we do not pass an extra mouseup event to the widgets at the
end of a double click sequence.
Reviewed by Darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget):
Do not pass event down to the widget for doubleclick events.
=== Safari-55 ===
2003-01-30 Darin Adler <darin@apple.com>
Reviewed by Ken, Maciej, and Trey.
- fixed 3161486 -- REGRESSION: double click on a widget causes crash
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
Only pass the mouseUp event if it's not the same as the current event.
Through a strange set of circumstances, sometimes the "mouse down" event is a mouse up
event (due to KHTML vs. AppKit differences for double-click handling).
- fixed build with newer compiler
* khtml/html/Makefile.am: Use ANSI-C style, not C++ style, gperf.
* khtml/html/doctypes.cpp: Regenerated.
* khtml/html/html_documentimpl.cpp: Do __inline workaround to make newer compiler happy.
(HTMLDocumentImpl::determineParseMode): Change to use ANSI-C style.
2003-01-30 Richard Williamson <rjw@apple.com>
Fix for 3156831 (and dupe 3160816). Don't access userInfo on an invalid NSTimer.
Reviewed by trey.
* kwq/KWQObject.mm:
(QObject::pauseTimer):
(QObject::resumeTimers):
2003-01-30 Trey Matteson <trey@apple.com>
3160565 - REGRESSION: Can't log in to etrade
Fix regression caused by fixed to 3058229. We auto-select an item of a select element
if it is size=1 or size is unset (m_size==0 in the code).
This gives us conformance with WinIE. The test at dbaron.org fails us for the
case of a disabled list with no size and no initial selection.
Reviewed by Darin.
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::recalcListItems): Auto-select an item if size==1 or is unset.
2003-01-30 David Hyatt <hyatt@apple.com>
Make quirk bits part of the bitfield to shrink RenderFlows.
Reviewed by trey
* khtml/rendering/render_flow.h:
2003-01-30 David Hyatt <hyatt@apple.com>
Fix for 3155954. Make sure no layers get made for :before,
:after or :first-letter. The only debatable case is whether
overflow can apply to generated content. Included a FIXME
to think about that case.
Reviewed by darin
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChildToFlow):
* khtml/rendering/render_text.cpp:
(RenderText::nodeAtPoint):
2003-01-30 Darin Adler <darin@apple.com>
* khtml/html/html_documentimpl.cpp: Updated license.
2003-01-29 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3158958 -- nil-dereference in KJS::DOMNode::getValueProperty at www.babyage.com
* khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty):
Move the code that gets the render object down after the point where the render tree
is updated, so we don't end up using a stale pointer.
2003-01-29 Darin Adler <darin@apple.com>
- add new assertion that Dave can use to debug bug 3155954 tomorrow
* khtml/rendering/render_arena.cpp: (RenderArena::allocate): Assert that the arena is not 0.
(RenderArena::free): Change signature so we will detect double-frees even more simply.
2003-01-29 David Hyatt <hyatt@apple.com>
Margins were being lost on documents inside iframes
and objects. This turned out to be 3 different bugs, one
of which involved the bad cast of an object element to an
iframe element.
Reviewed by darin
* khtml/html/html_baseimpl.cpp:
(HTMLIFrameElementImpl::HTMLIFrameElementImpl):
* khtml/rendering/render_frames.cpp:
(RenderPartObject::slotViewCleared):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart):
2003-01-29 David Hyatt <hyatt@apple.com>
Fix for auto width tables. Prevent overflow when assigning from
the computed integer max width back into a short value.
Fixes cnn.com and spies.com. Bug # is 3158469.
Reviewed by darin
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::calcMinMaxWidth):
2003-01-29 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3150439 -- navigating to a .xml, then away, then back causes display problems
* khtml/rendering/render_root.h: Add paintBoxDecorations
* khtml/rendering/render_root.cpp: (RenderRoot::paintObject):
Call paintBoxDecorations all the time. Don't consult shouldPaintBackgroundOrBorder(),
and don't waste cycles on !isInline().
(RenderRoot::paintBoxDecorations): If we don't have a RenderHtml as our first child,
then fill with the background color.
* khtml/html/htmlparser.cpp: (KHTMLParser::finished): Remove code that makes an HTML
element for an empty document. We don't need it any more.
2003-01-29 David Hyatt <hyatt@apple.com>
Fix for tables. They weren't initializing their max top/bottom
values for margin collapsing, so their margins were being
ignored!
Reviewed by darin
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2003-01-29 David Hyatt <hyatt@apple.com>
Back out my removal of the layer optimization. The rest of
the code is not prepared to deal with child elements overriding
visibility, or with invisible layers sitting on top of
visible ones.
* khtml/rendering/render_layer.cpp:
(RenderLayer::constructZTree):
2003-01-28 David Hyatt <hyatt@apple.com>
Fix yet another bug with makeChildrenNonInline that caused the
assertion on 3158194. Rather than trying to work with the
function as it was written by the KHTML guys, I've just thrown
everything out and re-written it using a helper function to make
it more clear what's going on (and less error-prone).
Reviewed by darin
* khtml/rendering/render_flow.cpp:
(getInlineRun):
(RenderFlow::makeChildrenNonInline):
2003-01-29 Darin Adler <darin@apple.com>
* khtml/rendering/break_lines.cpp: (isBreakable): Fix error that prevented this
from compiling. I had failed to build, and then tested the version without my change!
I retested with the change.
2003-01-29 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3158477 -- text break locator leak leads to giant (2.04 GB) VSIZE idling at livepage
* khtml/rendering/break_lines.cpp: (isBreakable): Dispose the text locator.
2003-01-28 David Hyatt <hyatt@apple.com>
Fix quirks/strict regression caused by improper use of findRev (should
be find), and latin1() (can't be invoked on temporaries).
Reviewed by darin
* khtml/html/html_documentimpl.cpp:
(parseDocTypePart):
(HTMLDocumentImpl::determineParseMode):
2003-01-28 David Hyatt <hyatt@apple.com>
Fix for 3155209, dashed-line schmutz left behind when dragging
links.
Also porting a fix from the old table code to the new table code
that I missed.
Reviewed by darin
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2003-01-27 David Hyatt <hyatt@apple.com>
New implementation of determineParseMode that is much better
about getting the quirks vs. strict decision right (as compared
to Mozilla and WinIE).
Also made a new inQuirksMode function and converted callers of
parseMode to use it, so that AlmostStrict and Strict modes will
both be treated as non-quirks mode by those who check for this
sort of thing.
Reviewed by darin, mjs
* khtml/html/html_documentimpl.cpp:
(parsePS):
(containsString):
(parseDocTypeDeclaration):
(HTMLDocumentImpl::determineParseMode):
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::setStyleSheet):
(HTMLStyleElementImpl::childrenChanged):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::attach):
* khtml/html/htmlparser.cpp:
(KHTMLParser::parseToken):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
* khtml/khtml_part.cpp:
(KHTMLPart::gotoAnchor):
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
* khtml/rendering/render_list.cpp:
(getParentOfFirstLineBox):
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::determineParseMode):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::createDecl):
* kwq/KWQString.mm:
(QString::compare):
2003-01-28 Darin Adler <darin@apple.com>
Reviewed by Ken and Maciej.
- fixed remaining bit of 3142646 -- JavaScript Error reported at www.hotmail.com after first time
The problem was that forms that were attached, but had no render object yet, were
not in the form names dictionary. This causes trouble for JavaScript that runs before
style sheets load, since the FOUC code makes us not create render objects at that stage.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::attach): Don't check m_render before adding to dictionary.
(HTMLFormElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
to track the name of the form in the dictionary.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::parseAttribute): Use attached(), not m_render, to tell whether
to track the name of the image in the dictionary.
(HTMLImageElementImpl::attach): Don't check m_render before adding to dictionary.
2003-01-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3157014 - Crash on disabling JavaScript and reloading livepage.apple.com
* khtml/khtml_part.cpp:
(KHTMLPart::openURL): Move check of JavaScript setting and possible disabling from here...
(KHTMLPart::begin): ... to here, to make sure it happens after clearing the interpreter.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::resumeActions): Don't bother to restore timers if JavaScript is off.
2003-01-28 Trey Matteson <trey@apple.com>
3158465 - REGRESSION: cursor turns into I-beam after clicking on most KWQ widgets
When we return from handing a mousedown to an AK widget, we check to see if currentEvent
is now a MouseUp, in which case we hand it to khtml. This allows khtml to keep in
synch as to the state of the mouse. This covers the case of AK widgets that
run their own event loop and consume events until a mouseup (but not ones that use
Carbon, such as PopUpList, since Carbon does not update currentEvent).
Reviewed by Darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass mouseup to khtml.
2003-01-28 Trey Matteson <trey@apple.com>
2940179 - Arrow cursor should change to link cursor after click of link in non-frontmost window
3158238 - cursor shape does not track after double-click to activate a window
Reviewed by Darin.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMouseDoubleClickEvent): We get this when the mouse
goes up the second time, so clear d->mousePressed.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::mouseMoved): Pitch any mousemoved that comes through while
we think the mouse is down. Those screw up our tracking, like 3137661. This is
part of the 2940179 fix.
2003-01-27 Trey Matteson <trey@apple.com>
3157146 REGRESSION: using a pop-up menu turns the cursor into an I-beam
A hack for the benefit of AK's PopUpButton, which uses the Carbon menu
manager, which thus eats all subsequent events after it is starts its
modal tracking loop. After the interaction is done, we call a new routine
to fix things up in the khtml event world. We post a fake mouse up to balance
the mouse down we started with. In addition, we post a fake mouseMoved to get
the cursor in sync with whatever we happen to be over after the tracking is done.
Reviewed by Darin.
* kwq/KWQComboBox.mm:
(-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
Call part after NSPopUp's modal tracking consumes events.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::doFakeMouseUpAfterWidgetTracking): New routine to allow widgets
to get out event state fixed up after a modal tracking loop.
2003-01-27 Chris Blumenberg <cblu@apple.com>
Fixed: 3152053 - Safari: Java 141: Only visible applets are instantiated on web page
Reviewed by dave.
* khtml/rendering/render_applet.cpp:
(RenderApplet::layout): move the widget before calling showApplet
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet): add the java view to the main view immediately instead of waiting for first paint
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectionImage]): tweak
2003-01-26 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3156461 - SECURITY: contentDocument of iframe from other domain can be accessed
- fixed 3156462 - SECURITY: can invoke setTimeout on other window
- fixed 3156469 - SECURITY: can add an event listener on another protected window
- fixed 3156527 - SECURITY: Can access HTML document from different domain in another frame
- fixed 3156535 - SECURITY: Can access XML document from different domain in another frame
These fixes are merged from or inspired by security fixes in upstream khtml.
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_dom.cpp:
(KJS::checkNodeSecurity): Prototype new method used to check whether a document
is allowed to access the contents of a node.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty): Apply security check to
getting the contentDocument of an iframe or object.
* khtml/ecma/kjs_window.cpp:
(Window::get): Make sure addEventListener/removeEventListener, and
all timer related functions are protocted from cross-domain calls.
(WindowFunc::tryCall): Make sure this is true even if they are
detached from one window and called on another.
* khtml/khtml_part.cpp:
(KHTMLPart::checkEmitLoadEvent): When setting frames to the domain
of the parent document, don't force it, so the usual suffix check
rule will apply.
2003-01-27 Richard Williamson <rjw@apple.com>
Reviewed by trey.
Added ASSERT trap to help track down non-repro crash reported
by 3144546.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURLFromPageCache):
Remove assert that caused 3155781. We believe this was happening
because of a delayed release of the page cache after emptying cache
from "Empty Cache" menu item.
* kwq/KWQPageState.mm:
(-[KWQPageState dealloc]):
2003-01-27 David Hyatt <hyatt@apple.com>
Fix text dragging so that text inside floats paints when you
drag the selection.
Reviewed by cblu
* ChangeLog:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintObject):
(RenderFlow::paintFloats):
* khtml/rendering/render_flow.h:
2003-01-26 David Hyatt <hyatt@apple.com>
Fix the default font size settings for monospace fonts to
really work. It was overaggressive and kicking in when it
shouldn't have, resulting in failures on the CSS1 test suite.
Reviewed by darin, john
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/rendering/font.h:
2003-01-26 Chris Blumenberg <cblu@apple.com>
Fixed: 3156725 - Partially selected links show extra underlining when dragged
Fixed: 3156962 - Text drag image sometimes doesn't include last selected text node
Reviewed by darin.
* khtml/rendering/render_root.cpp:
(RenderRoot::selectionRect): include all nodes that are selected
* khtml/rendering/render_text.cpp:
(TextSlave::paintDecoration): removed stray ";"
(RenderText::paintObject): call paintDecoration with default parameters for "from" and "to" when not painting the selection only
* khtml/rendering/render_text.h:
2003-01-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3126431 -- failed assertion `!attached()' at silkair.net
* khtml/rendering/render_image.h: Fix isImage which for some strange reason was
returning false. Not important because no one calls it. Added dispatchLoadEvent
and detach member functions.
* khtml/rendering/render_image.cpp:
(RenderImage::notifyFinished): Instead of dispatching the load or error event
immediately, call dispatchImageLoadEventSoon on the document.
(RenderImage::dispatchLoadEvent): Added. Moved the code to do the actual
event dispatch in here.
(RenderImage::detach): Remove the image from the document in case it has a
pending event that was not delivered yet before calling the base class detach.
* khtml/xml/dom_docimpl.h: Add dispatchImageLoadEventSoon, dispatchImageLoadEventsNow,
removeImage, and an override of timerEvent. Moved APPLE_CHANGES code to a better place.
* khtml/xml/dom_docimpl.cpp: Moved APPLE_CHANGES code to a better place and made these changes:
(DocumentImpl::DocumentImpl): Initialize m_imageLoadEventTimer to 0.
(DocumentImpl::detach): Redo the APPLE_CHANGES to make them easier to read.
Empty out the m_imageLoadEventDispatchSoonList and the m_imageLoadEventDispatchingList
to avoid an O(n^2) operation as we detach each image and remove it from the list.
(DocumentImpl::dispatchImageLoadEventSoon): Added. Adds image to list and sets up timer.
(DocumentImpl::removeImage): Added. Removes image from lists, and cancels timer if needed.
(DocumentImpl::dispatchImageLoadEventsNow): Added. Copies list, and call images to dispatch load events.
(DocumentImpl::timerEvent): Added. Calls dispatchImageLoadEventsNow.
* khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
Dispatch all pending image load events before dispatching the document load.
* force-clean-timestamp: Force rebuild because Project Builder doesn't do
header dependencies well enough to deal with changes to the document class.
2003-01-26 David Hyatt <hyatt@apple.com>
Fix :active to behave just like :hover. It was being
restricted and only allowed to match <a> tags, when :active
should be applicable to any element (e.g., like images).
Fixes the :active feedback on numerous blog sites (e.g.,
the photo image buttons on joehewitt.com).
Reviewed by gramps
* khtml/css/cssstyleselector.cpp:
2003-01-25 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3126211 -- "go back" buttons that use "history.go(-1)" doesn't work (verizonwireless.com is an example)
- fixed 2950618 -- JavaScript window.history object name prints blank
* khtml/ecma/kjs_window.cpp:
(FrameArray::toString): Added. Returns "[object FrameArray]".
(History::getValueProperty): Removed #if APPLE_CHANGES to turn more code on.
(History::toString): Added. Returns "[object History]".
* kwq/KWQKPartsBrowserExtension.h: Make browserInterface a pure virtual function
instead of always returning 0.
* kwq/KWQKHTMLPartBrowserExtension.h: Added browserInterface() function.
Also replaced m_part with a _part that is a KWQKHTMLPart to simplify code.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::KHTMLPartBrowserExtension): Create the browser
interface object when the browser extension object is created.
(KHTMLPartBrowserExtension::openURLRequest): Use _part instead of KWQ(m_part).
(KHTMLPartBrowserExtension::createNewWindow): Use _part instead of KWQ(m_part).
(KHTMLPartBrowserExtension::setIconURL): Use _part instead of KWQ(m_part).
(KHTMLPartBrowserExtension::setTypedIconURL): Use _part instead of KWQ(m_part).
* kwq/KWQKPartsBrowserInterface.h: Add a constructor, property() function, and
_part data member.
* kwq/KWQKPartsBrowserInterface.mm:
(BrowserInterface::property): Added. Handles historyLength property by calling
the historyLength method on the bridge.
(BrowserInterface::callMethod): Handles goHistory(int) by calling the
goBackOrForward: method on the bridge.
* kwq/WebCoreBridge.h: Added historyLength and goBackOrForward: methods.
* kwq/KWQVariant.h: Added Int to the variant enum, added int and uint contructors,
and added toInt() member function.
* kwq/KWQVariant.mm:
(QVariant::QVariant): Implemented int and uint constructors.
(QVariant::toBool): Added Int case, sorted alphabetically.
(QVariant::toInt): Added.
(QVariant::toUInt): Added Int case, sorted alphabetically.
(QVariant::asString): Added Int case, sorted alphabetically.
2003-01-25 Chris Blumenberg <cblu@apple.com>
Fixed: 3153605 - Drag image when dragging text should be the actual text
Reviewed by darin.
* khtml/rendering/font.cpp:
(Font::drawLineForText): take a "from" and "to" so only selected portions of text draw lines
* khtml/rendering/font.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint): handle the selection-only case
* khtml/rendering/render_layer.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::selectionRect): new, computes bounding box of the selection
* khtml/rendering/render_root.h:
* khtml/rendering/render_text.cpp:
(TextSlave::paintDecoration): take a "from" and "to" so only selected portions of text draw lines
(RenderText::paintObject): when only drawing the selection, only draw selected text and no selection background
(RenderText::paint): handle the selection-only case
* khtml/rendering/render_text.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::paint): handle the selection-only case
(KWQKHTMLPart::selectionRect): new, returns the bounding box of the selection
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawLineForText): take a "from" and "to" so only selected portions of text draw lines
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:withPainter:]): handle the selection-only case
(-[WebCoreBridge selectionRect]): new, returns the bounding box of the selection clipped to visible
(-[WebCoreBridge selectionImage]): new, returns the image of the selection
2003-01-24 David Hyatt <hyatt@apple.com>
Fix for 3153260, tables used as height spacers don't get the
specified height.
Reviewed by rjw
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
2003-01-24 Trey Matteson <trey@apple.com>
Chris pointed out a FIXME that led to a more contained way to make sure the cursor
is correct during and after image/text/URL dragging.
Reviewed by Chris.
* kwq/KWQKHTMLPart.h: Back out just-added resetCursor method.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMouseMoveEvent): Reset cursor to arrow when image drag starts.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm: Back out just-added resetCursor method, which is no
longer needed by WebKit.
2003-01-24 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3058229 -- two failures in DOM test page for HTMLSelectElement
- fixed 3138938 -- choose another member name on .Mac signup not working as expected
- fixed 3155763 -- Safari autoselects first item in a WOBrowser/<select>
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::value): Return "" rather than null when nothing is selected.
(HTMLSelectElementImpl::recalcListItems): Don't automatically select a first item
in the single selection case.
2003-01-24 David Hyatt <hyatt@apple.com>
Fix for 3146066, messed up lists on dictionary.com. Make
sure that a marker in an anonymous box with no other line box
parent available just stays where it is, rather than removing
itself from the anonymous box (causing that box to be deleted
and recreated ad infinitum).
Reviewed by darin
* khtml/rendering/render_list.cpp:
(RenderListItem::updateMarkerLocation):
2003-01-24 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3142852 -- frame content repeatedly requested
The bug was that JavaScript document.referrer was totally wrong.
* khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::referrer):
Use the new incomingReferrer() rather than referrer(), because referrer()
is the referrer to use for new loads in the part, not the one that was
used to load the document.
* kwq/KWQKHTMLPart.h: Added incomingReferrer(). Also removed referrer()
which has been totally redundant since we made KWQKHTMLPart a subclass of KHTMLPart.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::incomingReferrer): Added. Uses the bridge.
* kwq/WebCoreBridge.h: Added incomingReferrer.
2003-01-24 Trey Matteson <trey@apple.com>
3155162 - cursor changes to I-beam after dragging image
3154468 - no mouseup event comes through after text snippet drag
Export a means to reset the cursor to WebKit, which is used to fix these bugs.
Reviewed by Darin.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::resetCursor): New method that just calls through to khtmlview's
private resetCursor method.
* kwq/WebCoreBridge.h: Add new method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge resetCursor]): Call view's reset cursor.
2003-01-23 Trey Matteson <trey@apple.com>
I ran our KURL tests and found that my previous fix for "localhost" urls, fixed too much.
This now passes all the tests.
Reviewed by Darin.
* kwq/KWQKURL.mm:
(KURL::parse): Use different logic for deciding to add //authority to the URL
and stripping localhost off of file URLs.
2003-01-24 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed null view and hang part of 3153612 -- REGRESSION: null view and hang loading cycleworld.com
* khtml/xml/xml_tokenizer.cpp: (XMLHandler::XMLHandler): Initialize the line number
to 0 so we can detect the case where we didn't get a fatal error callback.
(XMLTokenizer::finish): Construct an error page without an XML excerpt if the line
number if 0.
2003-01-24 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3140945 -- crash viewing www.nextthing.org
* khtml/rendering/render_container.cpp: (RenderContainer::removeLeftoverAnonymousBoxes):
Change this function so it will never remove a table cell. Although a table cell that is
created automatically is anonymous, it is not an anonymous box in the sense that this
function is trying to deal with. Maybe there will be a better way to fix this some day,
but this is the best Dave and I could come up with.
- fixed 3155700 -- nil-dereference in khtml::RenderTableRow::detach shortly after visiting www.alltheweb.com
* khtml/rendering/render_table.cpp: (RenderTableRow::detach):
Check for nil before calling setNeedCellRecalc in case we are being detached after our
parent is already nil.
2003-01-23 Richard Williamson <rjw@apple.com>
Fix for 3152494. Set the default iframe width to 300 and
height to 150. This copies the behavior of mozilla and IE.
Reviewed by hyatt.
* khtml/css/html4.css:
2003-01-23 Richard Williamson <rjw@apple.com>
Fixed whitespace exclusion code. Fixes many sites
that have problems that were exposed after
fixing 3119777.
Reviewed by hyatt.
* khtml/rendering/bidi.cpp:
(RenderFlow::bidiReorderLine):
(RenderFlow::findNextLineBreak):
* khtml/rendering/break_lines.cpp:
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
2003-01-23 David Hyatt <hyatt@apple.com>
Dump textslaves in the regression tests.
Reviewed by rjw.
* kwq/KWQRenderTreeDebug.cpp:
(operator<<):
(write):
2003-01-23 David Hyatt <hyatt@apple.com>
Fix for 3144763, inlines clear too many floats, and jump all the
way to the end of the lowest float instead of only moving as far
down as they have to in order to fit.
Reviewed by darin
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
* khtml/rendering/render_flow.cpp:
(RenderFlow::nearestFloatBottom):
* khtml/rendering/render_flow.h:
2003-01-23 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3144560 -- non-reproducible nil-dereference in HTMLFrameElementImpl::updateForNewURL at macfixit
* khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL): Add check for nil view.
2003-01-23 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3154647 -- Triple clicked on a line of text (to select entire line), crashola
* khtml/khtml_part.cpp:
(firstSlaveAt): Loop instead of using recursion for siblings.
(lastSlaveAt): Ditto, only backwards.
2003-01-23 David Hyatt <hyatt@apple.com>
Fix for 3142124.
When pseudo-elements have display:none, they should not generate
rendering objects.
Reviewed by rjw, kocienda.
* khtml/rendering/render_container.cpp:
(RenderContainer::insertPseudoChild):
2003-01-23 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3129556 -- can't search on japanese string at yahoo.co.jp
The key to fixing this was to look up character sets in a way that does not
pay attention to punctuation. Only alphanumeric characters count. Also did
a little belt tightening and speeding up while I was at it.
* kwq/KWQCharsets.h: Use const char * instead of CFStringRef.
* kwq/KWQCharsets.mm:
(buildDictionaries): Store const char * in the dictionaries instead of CFStringRef,
and use the key compare and hash functions that obey only alphanumeric characters.
(KWQCFStringEncodingFromIANACharsetName): Use const char * directly.
(KWQCFStringEncodingFromMIB): Tweak code a bit.
(KWQCFStringEncodingToIANACharsetName): Use const char * directly.
(KWQCFStringEncodingToMIB): Tweak code a bit.
(encodingNamesEqual): Added. Compares two names, ignoring non-alphanumeric characters.
(encodingNameHash): Added.
* kwq/KWQKCharsets.h: Take a const char * instead of a QString. Also overload for QCString.
This fixes conversion back and forth from QString that was happening before.
* kwq/KWQKCharsets.mm: (KCharsets::codecForName): Update for above parameter change.
* kwq/KWQTextCodec.mm:
(codecForCFStringEncoding): Add check for kCFStringEncodingInvalidId.
(QTextCodec::codecForMib): Simplify because of above check.
(QTextCodec::codecForName): Simplify because we don't need to make a CFStringRef, and
because of above check.
(QTextCodec::name): No need to convert the CFStringRef back to a const char * now.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge textEncoding]): Convert character set name to a const char * to pass in.
(+[WebCoreBridge stringWithData:textEncodingName:]): Ditto.
* kwq/WebCoreEncodings.mm:
(+[WebCoreEncodings charsetNameForEncoding:]): Convert character set name to an NSString
to use as a return value.
(+[WebCoreEncodings encodingForCharsetName:]): Convert character set name to a const char *
to pass in.
2003-01-23 Chris Blumenberg <cblu@apple.com>
Fixed a divide by zero problem.
Reviewed by darin.
* WebCore.pbproj/project.pbxproj:
* khtml/rendering/render_image.cpp:
(RenderImage::calcReplacedWidth):
(RenderImage::calcReplacedHeight):
2003-01-23 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed last minute screwup in my last patch fixing onchange
* kwq/KWQTextField.mm:
(-[KWQTextField fieldEditorWillBecomeFirstResponder]): Renamed
from fieldWillBecomeFirstResponder.
(-[KWQTextField fieldEditorWillResignFirstResponder]): Renamed
from fieldWillResignFirstResponder.
2003-01-23 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3151442 - mac.com homepage editing - selection and clicking with mouse don't work
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent): Only allow a false return value to
prevent default if this is an html event handler, rather than one
set with addEventListener or the like.
2003-01-23 Chris Blumenberg <cblu@apple.com>
Replaced the paint phase constants with the PaintAction enum. Added PaintActionSelection as a paint action. This will eventually allow us to only paint selected objects. This is needed for the text dragging image.
Reviewed by dave.
* khtml/rendering/render_box.cpp:
(RenderBox::paint):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paint):
(RenderFlow::paintObject):
(RenderFlow::paintFloats):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_html.cpp:
(RenderHtml::paint):
* khtml/rendering/render_html.h:
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject):
* khtml/rendering/render_image.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
* khtml/rendering/render_list.cpp:
(RenderListItem::paint):
(RenderListItem::paintObject):
(RenderListMarker::paint):
(RenderListMarker::paintObject):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::paint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
(RenderWidget::paintObject):
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::paint):
(RenderRoot::paintObject):
* khtml/rendering/render_root.h:
* khtml/rendering/render_table.cpp:
(RenderTable::paint):
(RenderTableSection::paint):
(RenderTableCell::paint):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
(RenderText::paint):
* khtml/rendering/render_text.h:
2003-01-23 David Hyatt <hyatt@apple.com>
Fix for 3147995, empty <li> tags don't render bullets.
Reviewed by john.
* khtml/rendering/render_list.cpp:
(RenderListItem::layout):
* khtml/rendering/render_list.h:
2003-01-23 David Hyatt <hyatt@apple.com>
Fix for 3134613, bullets overlapping text on weather.com. Make
sure min/max widths get updated when the marker moves around.
Reviewed by john
* khtml/rendering/render_list.cpp:
(RenderListItem::updateMarkerLocation):
(RenderListItem::calcMinMaxWidth):
(RenderListItem::layout):
* khtml/rendering/render_list.h:
=== Safari-54 ===
2003-01-23 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3154575 -- REGRESSION: Right sidebar on Yahoo! page in base PLT renders incorrectly
* khtml/rendering/break_lines.cpp: (isBreakable): Pass kUCTextBreakLineMask to the
UC calls, which looks for places where line breaks are allowed, instead of kUCTextBreakWordMask,
which finds all word breaks instead. We still pass all the layout tests, so I think this means
Japanese word breaking is still OK.
- fixed 3154416 -- images that specify width but not height should keep aspect ratio (example at thegods.org.uk)
* khtml/rendering/render_image.h: Declared new member functions.
* khtml/rendering/render_image.cpp:
(RenderImage::widthSpecified): Added helper function.
(RenderImage::heightSpecified): Added helper function.
(RenderImage::calcReplacedWidth): Added. Derives width from height keeping aspect ratio if we
have a specified height and no width.
(RenderImage::calcReplacedHeight): Added. Same thing in the opposite direction.
2003-01-22 Trey Matteson <trey@apple.com>
3153313 cursor changes during text selection when we cross links
Reviewed by Dave.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMousePressEvent): Remember mouse is down.
(KHTMLView::viewportMouseMoveEvent): Use ibeam while mouse down.
(KHTMLView::viewportMouseReleaseEvent): Remember that it's up.
2003-01-22 David Hyatt <hyatt@apple.com>
Fix first-line regression caused by my removal of a local variable.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
2003-01-22 Richard Williamson <rjw@apple.com>
Fix the fix to 3119777 to scan for break over entire string
instead of trying to optimize.
Reviewed by hyatt.
* khtml/rendering/break_lines.cpp:
Pass offset into entire string, rather than try to optimize
by passing a shorter string.
2003-01-22 David Hyatt <hyatt@apple.com>
Fix the CSS parser so that it disallows class names beginning
with a digit even in quirks mode.
Reviewed by rjw
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseSelector2):
2003-01-22 Richard Williamson <rjw@apple.com>
Fix 3119777 (and a host of other international bugs). Word break
was broken. Use unicode services to detect work breaks
for non basic latin1. We may want to go further and
always use unicode services so we get correct hyphenation
breaking.
Reviewed by hyatt.
* khtml/rendering/break_lines.cpp:
2003-01-22 David Hyatt <hyatt@apple.com>
Fix word-spacing bugs in text measurement calculations. This
fixes our issues on the CSS1 test suite. Regression tests have
been added for both positive and negative word-spacing.
Reviewed by rjw
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
(RenderText::containsOnlyWhitespace):
* khtml/rendering/render_text.h:
2003-01-22 Chris Blumenberg <cblu@apple.com>
Fixed: 3153969 - Should not be able drag text while double or triple-click selecting it
Fixed: 3154153 - Can drag an empty selection
Reviewed by rjw.
* khtml/khtml_part.cpp:
(KHTMLPart::isPointInsideSelection): consider an empty selection like no selection
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMouseMoveEvent): don't allow dragging after selection has started using double or triple click
2003-01-22 David Hyatt <hyatt@apple.com>
Fix absolute positioning problem for bottom-positioned elements.
This is a fix from the KHTML trunk.
Reviewed by john
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
2003-01-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3141566 -- non-reproducible nil-dereference in HTMLGenericFormElementImpl at firstdirect.com
* khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler):
Check for the case where the view is 0.
2003-01-22 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed two-day-old regression where we get nil-dereferences with text areas
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]): Don't do the setWidget: here because widget is always nil at this point.
(-[KWQTextArea initWithQTextEdit:]): Do it here instead.
2003-01-22 David Hyatt <hyatt@apple.com>
Fix for 3126927, don't let absolute positioned blocks grow
to accommodate content. They overflow instead.
Reviewed by mjs
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.h:
2003-01-22 David Hyatt <hyatt@apple.com>
Fix for 3153316, selection busted on google.com. For now keep
mouse events grabbing the absolutePosition of elements, and don't
ever let them grab the absolutePosition of text nodes.
Reviewed by john.
* khtml/khtml_events.cpp:
(khtml::MouseEvent::MouseEvent):
2003-01-22 Chris Blumenberg <cblu@apple.com>
Renamed isPointSelected to isPointInsideSelection because it's a better name.
Reviewed by darin.
* khtml/khtml_part.cpp:
(KHTMLPart::isPointInsideSelection):
(KHTMLPart::khtmlMousePressEvent):
* khtml/khtml_part.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]):
2003-01-21 Chris Blumenberg <cblu@apple.com>
Added support for text dragging.
Reviewed by dave.
* khtml/khtml_events.cpp:
(khtml::MouseEvent::offset): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
* khtml/khtml_part.cpp:
(KHTMLPart::isPointSelected): new
(KHTMLPart::khtmlMousePressEvent): don't restart the selection when click was on the selection
(KHTMLPart::khtmlMouseMoveEvent): restart the selection since we may not do it in khtmlMousePressEvent
(KHTMLPart::khtmlMouseReleaseEvent): clear the selection if no selection took place
* khtml/khtml_part.h:
* khtml/khtmlpart_p.h:
* khtml/rendering/render_object.cpp:
(RenderObject::checkSelectionPoint): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(RenderText::checkSelectionPoint): made checkSelectionPoint take x,y coords, passing the whole event is unnecessary
* khtml/rendering/render_text.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMousePressEvent): set booleans indicating that it is OK to drag or select
(KWQKHTMLPart::khtmlMouseMoveEvent): ask WebKit if we can drag. Make this decision here instead of in khtmlMousePressEvent because WebKit needs the drag hysteresis to make the decision.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): set the selection bit
2003-01-21 Trey Matteson <trey@apple.com>
3032718 - I-beam cursor behavior different between web view and text view
Now that the innerNode is the real text element instead of an enclosing
tag element, it's a piece of cake to test for a text node and set the ibeam cursor.
Reviewed by Chris
* khtml/khtmlview.cpp:
(KHTMLView::viewportMouseMoveEvent): Set iBeam if over text.
* kwq/KWQKCursor.mm:
(KCursor::ibeamCursor): Make this cursor have the Cocoa ibeam instead of arrow.
2003-01-21 David Hyatt <hyatt@apple.com>
Fix selection so that it will go up to the parent node
if the innerNode is text, preserving the old behavior for
now until we can rewrite selection to not require this.
Reviewed by cblu.
* khtml/khtml_events.cpp:
(khtml::MouseEvent::offset):
* khtml/khtml_part.cpp:
(KHTMLPart::khtmlMousePressEvent):
(KHTMLPart::khtmlMouseMoveEvent):
2003-01-21 Trey Matteson <trey@apple.com>
3121681 - "localhost" part of link is lost with relative links
Was broken for abs links with localhost too. Solution is to tighten up the test
for "localhost" removal to only apply to file urls.
canonical result.
Reviewed by Maciej.
* kwq/KWQKURL.mm:
(KURL::parse): Allow the authority processing even for links with
localhost. Only cut out the addition of host for locahost file links.
2003-01-21 David Hyatt <hyatt@apple.com>
Fix nodeAtPoint to return text nodes if the mouse is over them.
Make :active fully hierarchical so that e.g., <a><b>Foo</b></a>
gets an outline when clicked.
Reviewed by trey
* khtml/rendering/render_object.cpp:
(RenderObject::setHoverAndActive):
* khtml/rendering/render_text.cpp:
(RenderText::nodeAtPoint):
2003-01-21 David Hyatt <hyatt@apple.com>
Fix for regressions on layout-tests caused by new table code.
Make sure cell's padding is used and not just the table's cellpadding.
Also make sure cell padding can be changed dynamically.
Reviewed by darin.
* khtml/rendering/table_layout.cpp:
(AutoTableLayout::recalcColumn):
2003-01-21 Darin Adler <darin@apple.com>
- correct our copyrights to 2003; copyright is based on year of publication, not year worked on
2003-01-21 David Hyatt <hyatt@apple.com>
Fix for the 2.5% perf regression from the descendant rules
changes. This patch does 3 things:
(1) Fix the descendant rule check in the CSS parser. It
was incorrect.
(2) Fix DOM insertion/removal from setting the parent as needing
a style re-resolve.
(3) Fix whitespace inside <html> so that it doesn't make a premature
<body>.
Reviewed by mjs
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseSelector):
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::insertBefore):
(NodeBaseImpl::replaceChild):
(NodeBaseImpl::removeChild):
(NodeBaseImpl::appendChild):
2003-01-21 Darin Adler <darin@apple.com>
Reviewed by Richard.
- clean room rewrite of QCString
* kwq/KWQCString.mm: Replaced functions that needed rewrite.
2003-01-21 Richard Williamson <rjw@apple.com>
Added support to pause and resume javascript timers. This allows pages
that have javascript timers to be added to the page cache.
Fixes 3126138.
Reviewed by trey and maciej.
* khtml/ecma/kjs_window.cpp:
(Window::pauseTimeouts):
(Window::resumeTimeouts):
(WindowQObject::pauseTimeouts):
(WindowQObject::resumeTimeouts):
(WindowQObject::timerEvent):
* khtml/ecma/kjs_window.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::pauseActions):
(KWQKHTMLPart::resumeActions):
(KWQKHTMLPart::canCachePage):
(KWQKHTMLPart::openURLFromPageCache):
* kwq/KWQObject.h:
* kwq/KWQObject.mm:
(QObject::pauseTimer):
(QObject::_addTimer):
(QObject::clearPausedTimers):
(QObject::resumeTimers):
(QObject::startTimer):
* kwq/KWQPageState.h:
* kwq/KWQPageState.mm:
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
(-[KWQPageState setPausedActions:int::]):
(-[KWQPageState int::]):
(-[KWQPageState _cleanupPausedActions]):
(-[KWQPageState invalidate]):
(-[KWQPageState dealloc]):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
(-[WebCoreBridge saveDocumentToPageCache]):
2003-01-21 Darin Adler <darin@apple.com>
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::createRenderer):
Add return statements to fix compile on deployment build.
2003-01-21 Darin Adler <darin@apple.com>
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::rendererIsNeeded):
(HTMLInputElementImpl::attach):
Add return statements to fix compile on deployment build.
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Nobody, fixing an accidental commit.
* khtml/khtml_part.cpp:
* khtml/html/html_documentimpl.cpp:
* khtml/xml/dom_docimpl.h:
2003-01-21 Darin Adler <darin@apple.com>
Everything else reviewed by Maciej, dtd.cpp and htmlparser.cpp changes reviewed by Dave.
- fixed 3151098 -- REGRESSION: Frequent assert about renderer in DOM code
* khtml/html/dtd.cpp: (DOM::checkChild): Disallow text inside colgroup so it can be handled as a special case
inside the parser.
* khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): Discard text inside colgroup and don't pop the colgroup.
- fixed 3149792 -- memory trasher at robinlionheart.com
- fixed 3150664 -- failed assertion in HTMLFrameSetElementImpl::attach on page with frameset inside frameset
The key to fixing the 3149792 memory trasher was to avoid constructing trees where there
is a render object nested inside an object that is not a suitable container. In particular,
the code assumed that RenderFlow objects would only be inside other RenderFlow objects, and
this does not happen if you have an <object> that is an image, with objects inside it that
are intended to be used if the image fails to load.
The key to fixing the 3150664 assertion was to handle the case where a frame set's parent
didn't have a renderer, rather than just asserting about it.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout): Added an assertion and a FIXME from Dave's and my review of this code.
(RenderFlow::splitInlines): Add assertions that we have actual RenderFlow objects. Casting
non-RenderFlow objects was the cause of the memory trashing. The other parts of this change
assure we never hit these assertions by not creating any render objects for DOM objects
that are inside non-RenderFlow.
(RenderFlow::addChildWithContinuation): Add a similar assertion here.
* khtml/rendering/render_object.h: Declare new member function.
* khtml/rendering/render_object.cpp: (RenderObject::canHaveChildren): Return false.
* khtml/rendering/render_container.h: Declare new member function.
* khtml/rendering/render_container.cpp: (RenderContainer::canHaveChildren): Return true.
* khtml/rendering/render_replaced.h: Declare new member function.
* khtml/rendering/render_replaced.cpp: (RenderReplaced::canHaveChildren): Return false.
* khtml/xml/dom_nodeimpl.h: Declare new member functions.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::createRendererIfNeeded): Added. Checks to see if a renderer should be created,
and creates it if so. The bug fix is checking canHaveChildren() here. This also reduces
the amount of repeated code in various attach() methods.
(NodeImpl::styleForRenderer): Added. Default is parent style.
(NodeImpl::rendererIsNeeded): Added. Default is to create only if display is not none.
(NodeImpl::createRenderer): Added. Must never reach this function, but I didn't make it a pure
virtual because of subclasses like AttrImpl that don't ever call createRendererIfNeeded.
Could rethink this and improve it even more.
* khtml/xml/dom_elementimpl.h: Declare new member functions.
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::styleForRenderer): Override to get the style from the style selector rather
than from the parent renderer.
(ElementImpl::createRenderer): Call RenderObject::createObject to create the right type of renderer.
(ElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/html/html_baseimpl.h: Declare new member functions.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::createRenderer): Create a RenderBody.
(HTMLBodyElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLFrameElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLFrameElementImpl::createRenderer): Create a RenderFrame.
(HTMLFrameElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLFrameSetElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLFrameSetElementImpl::createRenderer): Create a RenderFrameSet.
(HTMLFrameSetElementImpl::attach): Call createRendererIfNeeded to do most of the work.
This fixes a bug where the parent doesn't have a renderer; we were asserting in
that case rather than just not creating a renderer ourselves, which was wrong.
(HTMLHtmlElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLHtmlElementImpl::createRenderer): Create a RenderHtml.
(HTMLHtmlElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLIFrameElementImpl::createRenderer): Create a RenderPartObject.
(HTMLIFrameElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/html/html_formimpl.h: Declare new member functions.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::attach): Remove now-unneeded code that is handled by
createRendererIfNeeded now.
(HTMLInputElementImpl::rendererIsNeeded): Return false for HIDDEN, otherwise call base.
(HTMLInputElementImpl::createRenderer): Create the appropriate type of RenderObject.
(HTMLInputElementImpl::attach): Call createRendererIfNeeded to do most of the work.
Determined that we don't need the special case for image buttons any more.
(HTMLSelectElementImpl::createRenderer): Create a RenderSelect.
(HTMLSelectElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLTextAreaElementImpl::createRenderer): Create a RenderTextArea.
(HTMLTextAreaElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/html/html_imageimpl.h: Declare new member function.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::createRenderer): Create a RenderImage.
(HTMLImageElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/html/html_inlineimpl.h: Declare new member function.
* khtml/html/html_inlineimpl.cpp:
(HTMLBRElementImpl::createRenderer): Create a RenderBR.
(HTMLBRElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/html/html_objectimpl.h: Declare new member functions.
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLAppletElementImpl::createRenderer): Create either a RenderApplet or RenderEmptyApplet.
(HTMLAppletElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLEmbedElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLEmbedElementImpl::createRenderer): Create a RenderPartObject.
(HTMLEmbedElementImpl::attach): Call createRendererIfNeeded to do most of the work.
(HTMLObjectElementImpl::rendererIsNeeded): Override to implement the different policy
this element uses to decide whether to make a renderer (same as old code).
(HTMLObjectElementImpl::createRenderer): Create either a RenderImage or a RenderPartObject.
(HTMLObjectElementImpl::attach): Call createRendererIfNeeded to do most of the work.
* khtml/xml/dom_textimpl.h: Declare new member functions.
* khtml/xml/dom_textimpl.cpp:
(TextImpl::rendererIsNeeded): Moved logic about not making renderers for only-whitespace
elements here. Left out the special case for textarea, since the fact that RenderReplaced
returns false from the canHaveChildren function now takes care of that of that case.
(TextImpl::createRenderer): Create a RenderText.
(TextImpl::attach): Call createRendererIfNeeded to do most of the work.
- fixed a buffer overrun that libgmalloc detected
* khtml/misc/decoder.cpp:
(KanjiCode::judge): Pass in a size parameter instead of using strlen.
(Decoder::decode): Pass in a size parameter.
- a little housekeeping
* WebCore.pbproj/project.pbxproj: Remove a bunch of the .moc files
from the project. I'm not sure why I put them in originally, but they
do no good in there.
* khtml/khtmlview.moc: Empty out this file.
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3145317 - Unable to add or remove menu items on Site Menu page using Safari Beta
This turned out to be a problem with event.layerX / event.layerY.
* khtml/xml/dom2_eventsimpl.cpp:
(MouseEventImpl::computeLayerPos): Since layer position is
relative to parent layer, go up the layer tree adjusting for layer
offset to compute true layer position.
2003-01-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3151982 - missing content at debka.com after iframe is written using document.write
- fixed 3000234 - javascript problem writing iframe at cycleworld.com
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::scriptHandler): If we come out of the script with
the parser in skip mode, don't throw away the whole rest of the
document - instead, parse it as usual. The parser's skip mode will
take care of skipping stuff as needed and will detect close tags
for special tags like <iframe>.
2003-01-20 David Hyatt <hyatt@apple.com>
Fix :hover performance regression on wsj.com. Moving my
<a name="foo"> quirk down into the :hover rule matching code,
so that we'll know never to apply :hover to anchorless <a>s.
Reviewed by gramps
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_object.cpp:
(RenderObject::setHoverAndActive):
2003-01-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey.
- fixed 3132120 - onchange handler not firing on mac.com webmail
* khtml/rendering/render_form.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::handleFocusOut): Moved empty virtual method here from render_form.
(RenderWidget::eventFilter): Uncomment call to handleFocusOut - we
need it to send onChange properly.
* khtml/rendering/render_replaced.h:
* kwq/KWQObject.h: Add empty eventFilter virtual method.
* kwq/KWQComboBox.h: Remove no longer needed empty eventFilter.
* kwq/KWQEvent.h: Implement a bit more of QFocusEvent.
* kwq/KWQTextArea.mm:
(-[KWQTextArea _createTextView]): Tell the text view its widget.
(-[KWQTextAreaTextView setWidget:]): New method to set widget.
(-[KWQTextAreaTextView becomeFirstResponder]): In addition to the usual stuff,
call the widget's event filter with a focus in event.
(-[KWQTextAreaTextView resignFirstResponder]): In addition to the usual stuff,
call the widget's event filter with a focus out event.
* kwq/KWQTextField.mm:
(-[KWQTextField becomeFirstResponder]): Cleaned up a bit.
(-[KWQTextField fieldWillBecomeFirstResponder]): Call the widget's event filter with a focus in event.
(-[KWQTextField fieldWillResignFirstResponder]): Call the widget's event filter with a focus out event.
* kwq/KWQView.mm:
2003-01-20 David Hyatt <hyatt@apple.com>
Fix for 3147213. <nobr> is treated like other inlines now,
so it can contain blocks. <wbr> is also fixed. This fixes
tvguide.com.
Reviewed by john
* khtml/html/dtd.cpp:
(DOM::checkChild):
2003-01-20 David Hyatt <hyatt@apple.com>
Gah. Fix positioned objects and floating objects so that they
don't append themselves to the list of runs in normal flow.
An astoundingly basic bug. :(
Reviewed by john
* khtml/rendering/bidi.cpp:
(appendRunsForObject):
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChildToFlow):
2003-01-19 David Hyatt <hyatt@apple.com>
Fixes for 3150561 (blog articles vanish on stylesheet switch) and
and 3150560 (crash changing fixed positioned element to normal
positioning dynamically).
This change makes layers able to deal with dynamic changes in
position that cause you to have to either remove a layer from
the hierarchy while preserving the children or to insert a
layer into the hierarchy in between a parent and its descendants.
This patch also rewrites :hover/:active so that they can actually
be used in selectors other than the rightmost selector (e.g., so you
can write a rule like "li:hover > a").
Also, layers will now properly clear out their hover/active state
when the mouse is no longer inside them.
With these fixes, Eric Meyer's "Pure CSS Menus" work (perfectly)
and the repainting problems on sites like brainjar.com and
diveintomark.org and wired.com are fixed.
Reviewed by mjs and john.
* khtml/css/css_stylesheetimpl.h:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseSelector):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/dom/html_head.cpp:
(HTMLLinkElement::setDisabled):
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::addChild):
(RenderLayer::removeOnlyThisLayer):
(RenderLayer::insertOnlyThisLayer):
(RenderLayer::clearOtherLayersHoverActiveState):
(RenderLayer::clearHoverAndActiveState):
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::addLayers):
(RenderObject::moveLayers):
(RenderObject::findNextLayer):
(RenderObject::setStyle):
(RenderObject::setHoverAndActive):
* khtml/rendering/render_object.h:
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
* khtml/rendering/render_style.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(NodeBaseImpl::setActive):
2003-01-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3149511 - Blogger.com window closes after update is posted
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): For now, don't allow closing the window at
all if it wasn't opened by JavaScript, since we don't support the
history object and so can't tell if the window has only one
history item.
2003-01-17 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed the crashing so the layout tests work
* khtml/rendering/render_layer.h: Add a node pointer result.
* khtml/rendering/render_layer.cpp: (RenderLayer::elementList):
Return the node pointer so we can destroy it when done with it.
* khtml/rendering/render_object.h: Make renderArena() const.
* khtml/rendering/render_object.cpp: (RenderObject::renderArena): Make it const.
* kwq/KWQRenderTreeDebug.cpp: (writeLayers): Free the Z layer list when done.
Without this things just crashed.
2003-01-17 Richard Williamson <rjw@apple.com>
Fixed 3126141. Allow pages with plugins to be cached. This is safe
because plugins are cleanly started/stopped when their containing views are
added/removed from the view hierarchy.
Reviewed by trey.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::canCachePage):
2003-01-17 David Hyatt <hyatt@apple.com>
The new table code from Lars. Also includes bug fixes for
percentage height children in table cells, for positioning
of tables, and for width distribution of percentage width
cells.
Reviewed by darin
* ForwardingHeaders/rendering/table_layout.h: Added.
* WebCore.pbproj/project.pbxproj:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseValue):
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssvalues.c:
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/dom/html_table.cpp:
(HTMLTableElement::insertRow):
(HTMLTableElement::deleteRow):
(HTMLTableRowElement::insertCell):
(HTMLTableRowElement::deleteCell):
(HTMLTableSectionElement::insertRow):
(HTMLTableSectionElement::deleteRow):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::HTMLTableElementImpl):
(HTMLTableElementImpl::setTFoot):
(HTMLTableElementImpl::setTBody):
(HTMLTableElementImpl::createTHead):
(HTMLTableElementImpl::createTFoot):
(HTMLTableElementImpl::insertRow):
(HTMLTableElementImpl::deleteRow):
(HTMLTableElementImpl::addChild):
(HTMLTableElementImpl::parseAttribute):
(HTMLTableElementImpl::attach):
(HTMLTablePartElementImpl::parseAttribute):
(HTMLTableSectionElementImpl::HTMLTableSectionElementImpl):
(HTMLTableSectionElementImpl::~HTMLTableSectionElementImpl):
(HTMLTableSectionElementImpl::insertRow):
(HTMLTableSectionElementImpl::deleteRow):
(HTMLTableSectionElementImpl::numRows):
(HTMLTableRowElementImpl::rowIndex):
(HTMLTableRowElementImpl::insertCell):
(HTMLTableRowElementImpl::deleteCell):
(HTMLTableCellElementImpl::HTMLTableCellElementImpl):
(HTMLTableCellElementImpl::parseAttribute):
(HTMLTableCellElementImpl::attach):
(HTMLTableColElementImpl::HTMLTableColElementImpl):
(HTMLTableColElementImpl::parseAttribute):
* khtml/html/html_tableimpl.h:
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
(KHTMLParser::getElement):
* khtml/rendering/bidi.cpp:
(RenderFlow::layoutInlineChildren):
* khtml/rendering/render_body.cpp:
(RenderBody::availableHeight):
* khtml/rendering/render_body.h:
* khtml/rendering/render_box.cpp:
(RenderBox::contentWidth):
(RenderBox::contentHeight):
(RenderBox::calcReplacedWidth):
(RenderBox::calcReplacedHeight):
(RenderBox::availableHeight):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::leftOffset):
(RenderFlow::rightOffset):
(RenderFlow::addOverHangingFloats):
(RenderFlow::calcBlockMinMaxWidth):
(RenderFlow::calcMinMaxWidth):
* khtml/rendering/render_form.cpp:
* khtml/rendering/render_form.h:
* khtml/rendering/render_frames.cpp:
* khtml/rendering/render_frames.h:
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
(RenderObject::paddingTop):
(RenderObject::paddingBottom):
(RenderObject::paddingLeft):
(RenderObject::paddingRight):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::calcMinMaxWidth):
* khtml/rendering/render_root.cpp:
(RenderRoot::RenderRoot):
(RenderRoot::layout):
(RenderRoot::paintObject):
* khtml/rendering/render_root.h:
* khtml/rendering/render_style.cpp:
(StyleSurroundData::StyleSurroundData):
* khtml/rendering/render_style.h:
* khtml/rendering/render_table.cpp:
(RenderTable::RenderTable):
(RenderTable::~RenderTable):
(RenderTable::setStyle):
(RenderTable::position):
(RenderTable::addChild):
(RenderTable::calcWidth):
(RenderTable::layout):
(RenderTable::setCellWidths):
(RenderTable::paint):
(RenderTable::calcMinMaxWidth):
(RenderTable::splitColumn):
(RenderTable::appendColumn):
(RenderTable::colElement):
(RenderTable::recalcSections):
(RenderTable::removeChildNode):
(RenderTable::dump):
(RenderTableSection::RenderTableSection):
(RenderTableSection::~RenderTableSection):
(RenderTableSection::detach):
(RenderTableSection::setStyle):
(RenderTableSection::addChild):
(RenderTableSection::ensureRows):
(RenderTableSection::addCell):
(RenderTableSection::setCellWidths):
(RenderTableSection::calcRowHeight):
(RenderTableSection::layoutRows):
(RenderTableSection::paint):
(RenderTableSection::recalcCells):
(RenderTableSection::clearGrid):
(RenderTableSection::removeChildNode):
(RenderTableSection::dump):
(RenderTableRow::RenderTableRow):
(RenderTableRow::detach):
(RenderTableRow::setStyle):
(RenderTableRow::addChild):
(RenderTableRow::removeChildNode):
(RenderTableRow::dump):
(RenderTableRow::layout):
(RenderTableCell::RenderTableCell):
(RenderTableCell::detach):
(RenderTableCell::updateFromElement):
(RenderTableCell::getCellPercentageHeight):
(RenderTableCell::setCellPercentageHeight):
(RenderTableCell::calcMinMaxWidth):
(RenderTableCell::baselinePosition):
(RenderTableCell::setStyle):
(RenderTableCell::paint):
(RenderTableCell::paintBoxDecorations):
(RenderTableCell::dump):
(RenderTableCol::RenderTableCol):
(RenderTableCol::updateFromElement):
(RenderTableCol::addChild):
(RenderTableCol::dump):
* khtml/rendering/render_table.h:
* khtml/rendering/table_layout.cpp: Added.
(FixedTableLayout::FixedTableLayout):
(FixedTableLayout::~FixedTableLayout):
(FixedTableLayout::calcWidthArray):
(FixedTableLayout::calcMinMaxWidth):
(FixedTableLayout::layout):
(AutoTableLayout::AutoTableLayout):
(AutoTableLayout::~AutoTableLayout):
(AutoTableLayout::recalcColumn):
(AutoTableLayout::fullRecalc):
(AutoTableLayout::calcMinMaxWidth):
(AutoTableLayout::calcEffectiveWidth):
(AutoTableLayout::insertSpanCell):
(AutoTableLayout::layout):
(AutoTableLayout::calcPercentages):
* khtml/rendering/table_layout.h: Added.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::NodeImpl):
(NodeImpl::dump):
* khtml/xml/dom_nodeimpl.h:
2003-01-17 Darin Adler <darin@apple.com>
Reviewed by Dave.
- clean room rewrite of QCString::operator<<.
* kwq/KWQCString.mm: (operator<<): Rewrote it.
- update format of render tree dumping for real use
* khtml/rendering/render_layer.h: Added elementList().
* khtml/rendering/render_layer.cpp: (RenderLayer::elementList): Added.
* kwq/KWQRenderTreeDebug.cpp:
(operator<<): Added an overload for writing out QRect.
(writeIndent): Added.
(write): Use the overload for QRect, also reorganize to dump layers.
(writeLayers): Use this to dump the layers.
(externalRepresentation): Call writeLayers instead of write.
2003-01-17 Darin Adler <darin@apple.com>
Reviewed by Ken.
- removed unused KWQDrawUtil code
* ForwardingHeaders/qdrawutil.h: Emptied this file out.
* kwq/KWQDrawUtil.h: Removed.
* kwq/KWQDrawUtil.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed KWQDrawUtil.
2003-01-17 Darin Adler <darin@apple.com>
Reviewed by John.
- updated copyright to include expat copyrights
* WebCore.pbproj/project.pbxproj: Added expat copyrights on the end.
Got text of copyrights from Acknowledgments.rtf in WebBrowser.
2003-01-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView): If setting the view to nil and we have a
document, detach the document. This means that we are removing a
frame from the tree, so we want to run it's onUnload handler now,
rather than later when things are no longer fully hooked up.
2003-01-16 Richard Williamson <rjw@apple.com>
Fixed 3148932. Account for zero width characters
in <pre> fixed-width optimization.
Reviewed by hyatt.
* khtml/rendering/render_text.cpp:
(RenderText::widthFromCache):
Reviewed by Richard (written by Mike S.) 'Clean' implementations of these
functions that were too similar to the Qt implementations.
* kwq/KWQString.mm:
(QString::left):
(QString::right):
(QString::mid):
2003-01-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org
I fixed this by making sure we couldn't send the unload event twice, which was
happening before in certain circumstances.
* khtml/khtml_part.cpp:
(KHTMLPart::closeURL): When emitting load event, note that unload
event has not yet been sent.
(KHTMLPart::checkEmitLoadEvent): Note when unload event has been
sent to avoid sending it twice.
* khtml/khtmlpart_p.h:
2003-01-16 Darin Adler <darin@apple.com>
Reviewed by John.
- added an API for dumping the external representation of the render tree for testing
* kwq/KWQRenderTreeDebug.h: Added.
* kwq/KWQRenderTreeDebug.cpp: Added.
* kwq/KWQTextStream.h: Added more overloads for operator<<.
* kwq/KWQTextStream.mm: (QTextStream::operator<<): Implemented them.
* kwq/WebCoreBridge.h: Added renderTreeAsExternalRepresentation.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge renderTreeAsExternalRepresentation]): Added.
- removed remnants of an earlier more-naive cut at this same sort of thing
- removed ForwardingHeaders from the project since that doesn't really help Project Builder
* kwq/WebCoreTestController.h: Removed.
* kwq/WebCoreTestController.m: Removed.
* WebCore.exp: Removed WebCoreTestController.
* WebCore-combined.exp: Re-generated.
* WebCore.pbproj/project.pbxproj: Removed WebCoreTestController and ForwardingHeaders.
=== Safari-52 ===
2003-01-15 Trey Matteson <trey@apple.com>
3144458 - user's credentials are present in a form that is revisited via b/f or history
We now never save/restore password fields. Also if the page has a form with a password
field that would be submitted securely, we do not save anything on that page.
Reviewed by Darin.
* force-clean-timestamp: PB isn't smart enough to know what to rebuild.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formWouldHaveSecureSubmission): Utility function.
(HTMLFormElementImpl::attach): Tell doc if we've added a secure form.
(HTMLFormElementImpl::parseAttribute): Tell doc if form became secure.
(HTMLInputElementImpl::state): Assert that we never save password fields.
(HTMLInputElementImpl::restoreState): Assert that we never restore password fields.
(HTMLInputElementImpl::attach): Tell doc if we've added a password field.
* khtml/html/html_formimpl.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): Init count of secure forms, password fields.
(DocumentImpl::passwordFieldAdded):
(DocumentImpl::passwordFieldRemoved):
(DocumentImpl::hasPasswordField): New methods to count password fields.
(DocumentImpl::secureFormAdded):
(DocumentImpl::secureFormRemoved):
(DocumentImpl::hasSecureForm): New methods to count secure forms.
* khtml/xml/dom_docimpl.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::canCachePage): Never let pages with password fields in the page cache.
(KWQKHTMLPart::saveDocumentState): Do not save form state if page has a form with
a password field that would be submitted securely
2003-01-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed problem where Content-Type was coming in with suffixes like "charset"
* kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
parameter, from openURL method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
content type from a parameter, and the refresh header from a separate parameter rather
than extracting both from a headers dictionary.
2003-01-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3147036 -- words separated only by newlines are getting rammed together on XML page
- fixed 3147032 -- preformatted text is missing much whitespace on XML page
* khtml/xml/xml_tokenizer.cpp: (XMLHandler::characters): Don't try to strip whitespace at all,
because it needs to be in the DOM.
- add support for more MIME types
* khtml/khtml_part.cpp: (KHTMLPart::begin): Add "application/xml" and "application/xhtml+xml".
2003-01-14 David Hyatt <hyatt@apple.com>
Make FOUC work with XML.
Reviewed by darin.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::attach):
* khtml/xml/dom_xmlimpl.cpp:
(ProcessingInstructionImpl::ProcessingInstructionImpl):
(ProcessingInstructionImpl::checkStyleSheet):
(ProcessingInstructionImpl::isLoading):
(ProcessingInstructionImpl::sheetLoaded):
(ProcessingInstructionImpl::setStyleSheet):
* khtml/xml/dom_xmlimpl.h:
2003-01-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- first cut at XML parsing with expat
* khtml/khtml_part.cpp: (KHTMLPart::begin): Remove APPLE_CHANGES and use the XML
code for text/xml documents.
* WebCore.pbproj/project.pbxproj: Added the ForwardingHeaders to the project.
Added new QXml files, removed old ones.
* kwq/KWQXml.h: Removed.
* kwq/KWQXml.mm: Removed.
* kwq/KWQXmlAttributes.h: Added.
* kwq/KWQXmlAttributes.mm: Added.
* kwq/KWQXmlDefaultHandler.h: Added.
* kwq/KWQXmlDefaultHandler.mm: Added.
* kwq/KWQXmlSimpleReader.h: Added.
* kwq/KWQXmlSimpleReader.mm: Added.
* kwq/KWQString.h: Add fromUtf8 functions.
* kwq/KWQString.mm: (QString::fromUtf8): Added. Simple implementation just
calls fromStringWithEncoding. We may need something more efficient later,
at least for all-ASCII text.
- other changes
* khtml/khtml_part.h: Fix spelling of occurrence.
* khtml/misc/decoder.cpp: (Decoder::decode): Turn on Japanese auto-detect.
It doesn't seem to work yet, but this does no harm.
2003-01-13 Richard Williamson <rjw@apple.com>
Fix for 3139120. This patch was contributed by Mitz Pettel. It correctly
handles the visually ordered encodings. The patch also picks up changes
from kde that accounts for european numbers correctly in bidiReorderLine().
Reviewed by Dave.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formData):
* khtml/misc/decoder.cpp:
(Decoder::setEncoding):
* khtml/rendering/bidi.cpp:
(RenderFlow::bidiReorderLine):
* khtml/rendering/bidi.h:
2003-01-13 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3143781 -- submitting the same form twice doesn't work properly
(example at directory.apple.com)
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::submitForm): Only run the "don't submit the same
form twice" logic when the form is one that affects the frame that the form is in.
2003-01-12 Darin Adler <darin@apple.com>
* WebCorePrefix.h: Needed to touch this file since we now have plain C source (expat).
* kwq/KWQKHTMLPart.cpp: Reformatted a bit.
2003-01-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- first step towards integrating expat for XML support: make it compile and link
* kwq/KWQXml.mm: (QXmlSimpleReader::parse): Put in a placeholder that calls expat.
Mainly just used to make sure we link.
* WebCore.pbproj/project.pbxproj: Added expat files.
* expat/COPYING: Added.
* expat/Changes: Added.
* expat/MANIFEST: Added.
* expat/README: Added.
* expat/expat_config.h: Added.
* expat/lib/ascii.h: Added.
* expat/lib/asciitab.h: Added.
* expat/lib/expat.h: Added.
* expat/lib/iasciitab.h: Added.
* expat/lib/internal.h: Added.
* expat/lib/latin1tab.h: Added.
* expat/lib/nametab.h: Added.
* expat/lib/utf8tab.h: Added.
* expat/lib/xmlparse.c: Added.
* expat/lib/xmlrole.c: Added.
* expat/lib/xmlrole.h: Added.
* expat/lib/xmltok.c: Added.
* expat/lib/xmltok.h: Added.
* expat/lib/xmltok_impl.c: Added.
* expat/lib/xmltok_impl.h: Added.
* expat/lib/xmltok_ns.c: Added.
2003-01-12 Darin Adler <darin@apple.com>
Reviewed by Dave.
- minor cleanup of plug-in-related classes in ECMA directory
* khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
ref() and deref(). Instead just make Plugin and MimeType both derive from
PluginBase and remove APPLE_CHANGES.
(Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
Just return Undefined() for that case since we will never reach it anyway.
- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
identical if statements, the logic of this function becomes much clearer.
2003-01-12 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.
* khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
* khtml/html/htmlparser.cpp: (KHTMLParser::insertNode):
* khtml/misc/loader.cpp: (Cache::requestImage), (Cache::requestStyleSheet):
* khtml/rendering/render_flow.cpp: (RenderFlow::setStyle):
Changed !x == y to x != y. In each case, there's a reason that this does not create
any problem in practice, which is why we didn't rush to get this in for beta 1.
2003-01-11 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3144789 -- reproducible crash in KHTMLParser::freeBlock on a page at www.library.arizona.edu
* khtml/html/htmlparser.cpp: (KHTMLParser::finished): Call freeBlock here rather than
waiting until the parser is destroyed. This fixes the bug because when the parser is
destroyed, the document is already destroyed, so we have a dangling current pointer to an
already-destroyed node.
- fixed 3142024 -- crash/hang/assert on java.sun.com in HTMLTokenizer
The bug was caused by an erroneous clicked signal that was being emitted by
QListBox at just the wrong time.
* kwq/KWQListBox.h: Added _changingSelection boolean.
* kwq/KWQListBox.mm: (QListBox::QListBox): Set _changingSelection to false.
(QListBox::setSelected): Set _changingSelection to true.
(-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Only emit the "clicked"
signal if _changingSelection is false.
* khtml/html/htmltokenizer.h: Add debug-only boolean inWrite.
* khtml/html/htmltokenizer.cpp: (HTMLTokenizer::HTMLTokenizer): Set inWrite to false.
(HTMLTokenizer::write): Set inWrite to true.
(HTMLTokenizer::~HTMLTokenizer): Assert that inWrite is not true.
2003-01-11 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3136944 -- mouseover feedback over non-mapped part of image map claims
link to current page
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]):
Change code so we won't call completeURL and complete a null ATTR_HREF (which is distinct
from an empty ATTR_HREF). Did a similar cleanup on the image code.
2003-01-09 Darin Adler <darin@apple.com>
* WebCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
remove NSHumanReadableCopyright, remove NSPrincipalClass, remove SKIP_INSTALL
that was in the Info plist instead of project settings.
* English.lproj/InfoPlist.strings: Update to match above.
2003-01-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed Radar 3143013 - hang trying to load spiny.com/software
* khtml/rendering/render_table.cpp:
(RenderTable::layoutRows): Check for the render root as a loop
termination condition, to avoid an infinite loop for an absolute
but non-fixed table cell.
2003-01-09 David Hyatt <hyatt@apple.com>
The "flow-mode" quirk for lists is just that - a quirk, and should
not be applied when in strict mode.
Fixes diveintomark.org's navigation bar on the front page (issue #2
on his list).
Reviewed by darin and maciej
* khtml/css/html4.css:
2003-01-08 David Hyatt <hyatt@apple.com>
Finish the KONQBLOCK removal and make sure that table rows and
cells encountered inside stray content cause the stray content to
close so that the rows and cells can be part of the table.
This fixes the versiontracker bug. #3142319.
Reviewed by darin.
* khtml/html/htmlparser.cpp:
(KHTMLParser::reset):
(isTableRelatedTag):
(KHTMLParser::insertNode):
(KHTMLParser::popOneBlock):
* khtml/html/htmlparser.h:
2003-01-08 David Hyatt <hyatt@apple.com>
Revert the redundancy that dirk noticed.
Fixing issue #3 on diveintomark.org's list, which actually involved
merging calcAbsoluteVertical to KHTML's trunk and then fixing
a math error in the bottom computation.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
2003-01-08 Chris Blumenberg <cblu@apple.com>
Fixed: 3111432 - Support OBJECT tags with type text/plain or text/html
Reviewed by dave.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart): call [_bridge frameRequiredForMIMEType:] to determine if we should create a plug-in view or iframe
* kwq/WebCoreBridge.h: add frameRequiredForMIMEType:
2003-01-08 Trey Matteson <trey@apple.com>
3136213 - Page loads stopped by backtracking don't finish when moving forward
We need to remove the entry from the KHTML image cache when a load
has an error, so it will be reloaded next time we try.
Reviewed by Darin,
* khtml/misc/loader.cpp:
(Loader::slotFinished): Remove cache entry on job error.
2003-01-08 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 96/72 dpi snafu; no need to do something different for AppKit,
because it always uses pixel sizes, not font size
* khtml/css/css_valueimpl.cpp:
* khtml/css/css_valueimpl.h:
* khtml/css/cssstyleselector.cpp:
* kwq/KWQPaintDeviceMetrics.mm:
Rolled out change from 2002-12-05
- a cut at implementing heretofore unimplemented QTextStream classes
* kwq/KWQTextStream.h:
* kwq/KWQTextStream.mm:
First cut implementation.
2003-01-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by no one cause I'm just changing copyright strings.
* WebCore.pbproj/project.pbxproj: Added non-Apple copyrights to
copyright strings.
* English.lproj/InfoPlist.strings: Likewise.
2003-01-05 Darin Adler <darin@apple.com>
* Resources/Info.plist: Fix "Apple Compupter" typo.
2003-01-04 Trey Matteson <trey@apple.com>
3098388 - Pressing the back button goes back two levels at allmusic.com
When processing an assignment to document.location, allow items to be added
to history. This parallels the existing treatment of window.location.href.
Reviewed by Richard, Darin
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::putValue): Pass false for lockHistory arg of scheduleRedirection()
2003-01-04 Richard Williamson <rjw@apple.com>
I checked in kjs_window.cpp by accident. The only change
was a logging printf. Back out that change.
Reviewed by me.
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
2003-01-03 Richard Williamson <rjw@apple.com>
Fix for 3138425. Don't open a new window when document.open() is called
with < 2 parameters.
Reviewed by darin.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall):
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
2003-01-03 Richard Williamson <rjw@apple.com>
Fixed 3138743, 3138678, and 3138854. Removed the RenderText
widths cache, replaced it with a much simply monospace character
cache. Should be much faster for covered cases too! Also fixed
buffer overrun problem causing the crash in 3138854.
Reviewed by darin.
* khtml/rendering/font.cpp:
(Font::isFixedPitch):
* khtml/rendering/font.h:
* khtml/rendering/render_text.cpp:
(TextSlave::checkSelectionPoint):
(RenderText::RenderText):
(RenderText::setStyle):
(RenderText::~RenderText):
(RenderText::shouldUseMonospaceCache):
(RenderText::cacheWidths):
(RenderText::widthFromCache):
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
(RenderText::setText):
(RenderText::width):
* khtml/rendering/render_text.h:
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFont::isFixedPitch):
* kwq/WebCoreTextRendererFactory.h:
* kwq/WebCoreTextRendererFactory.m:
(-[WebCoreTextRendererFactory isFontFixedPitch:]):
2003-01-03 John Sullivan <sullivan@apple.com>
- fixed 3138673 -- reproducible crash in JavaScript
Reviewed by Darin, OK'ed by Don.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setTitle):
Check for nil view or nil part before dereferencing.
2003-01-03 David Hyatt <hyatt@apple.com>
Fix for percentage table heights. A check was missing to
look for a fixed height on the containing block.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTable::layoutRows):
=== Alexander-48 ===
2003-01-02 David Hyatt <hyatt@apple.com>
Fix for 3136473. <object>s with no specified size should be
0x0. They should not be 300x200. Fixes thinker.org.
Reviewed by john and darin.
* khtml/rendering/render_frames.cpp:
(RenderPart::intrinsicWidth):
(RenderPart::intrinsicHeight):
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by Maciej and Trey.
- fixed 3138063 -- REGRESSION: JavaScript-submitted form activates input type=image (webmail.mac.com)
JavaScript-submitted forms must not get a submit button activated as return-key-submitted ones do.
* khtml/html/html_formimpl.h: Add boolean activateSubmitButton parameter to submit.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::prepareSubmit): Pass true for activateSubmitButton.
(HTMLFormElementImpl::submit): Only activate a button if activateSubmitButton is true.
* khtml/dom/html_form.cpp: (HTMLFormElement::submit): Pass false for activateSubmitButton.
2003-01-02 David Hyatt <hyatt@apple.com>
Fix for the 3137790. This patch passes the mouse event x and y as
distinct arguments to constructZTree, so that the damageRect can
really reflect your clip rect.
This allows me to prune out layers that are clipped so
that if x,y aren't inside the clip rect, the layer doesn't get added to
the list.
This patch also makes the "clip" property apply to the element that specifies the clip instead of to the element's kids. This is ambiguous in the spec, but it turns out other browsers do it this way, so there really is an interpretation that must be fol
lowed. :)
Reviewed by darin
* khtml/rendering/render_layer.cpp:
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
2003-01-02 David Hyatt <hyatt@apple.com>
Fix for bug #3137935. When a float causes a line to get
moved down past the float, the line would incorrectly break
rather than expanding to use the newly-available width.
Reviewed by darin.
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3131190 -- <textarea wrap="hard"> eats text on blur
* kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Add missing parentheses so we don't
always return 0 or 1 for the number of paragraphs.
2002-12-31 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3130831 - HOMEPAGE: JavaScript that tries to intercept onmousedown fails, image gets dragged instead
- fixed 3125554 - while dragging to select text in a nested frame, you can start dragging a link or image
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Initialize new mouseDownMayStartDrag
and mouseDownMayStartSelect methods.
(KWQKHTMLPart::khtmlMousePressEvent): Make sure a mouse down
won't be used to start a drag or selection if the default action
is prevented on the mouse down event.
(KWQKHTMLPart::mouseDown): Since the default action wasn't
prevented, decide if this might be the start of a drag or
selection.
(KWQKHTMLPart::khtmlMouseMoveEvent): On a drag or selection, call
back to the bridge to handle selection or autoscrolling
appropriately.
* kwq/WebCoreBridge.h: Prototype new methods.
2003-01-01 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3137566 -- non-reproducible nil-dereference in KHTMLView::clearPart
deallocating KWQPageState
* kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Add nil check.
2003-01-01 David Hyatt <hyatt@apple.com>
Fix tables so that malformations inside them are properly pulled
out of the table without being flattened.
Fixes 3131480.
Reviewed by gramps
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
=== Alexander-47 ===
2002-12-30 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3132141 -- enter key does not work with input type=image
Made the logic handle image and submit type inputs in the same way.
* khtml/html/html_formimpl.h: Remove unused m_clicked flags.
* khtml/html/html_formimpl.cpp:
(HTMLButtonElementImpl::HTMLButtonElementImpl): Remove code to set the m_clicked flag.
The only place this flag was looked at is better handled by the m_activeSubmit flag.
(HTMLButtonElementImpl::defaultEventHandler): Remove more m_clicked flag code.
(HTMLInputElementImpl::HTMLInputElementImpl): Remove more m_clicked flag code.
(HTMLInputElementImpl::isSuccessfulSubmitButton): An image is also a successful submit
button, and unlike a submit element, it doesn't require a name because it will just submit
x and y with no name in that case. I suppose we could rename this function, but I think it's
still a pretty clear name even if not 100% accurate.
(HTMLInputElementImpl::encoding): Remove use of m_clicked and use m_activeSubmit instead.
This was the only place using m_clicked at all. Also remove bogus check for a -1 coordinate.
The coordinate defaults to 0, not -1, and it was never happening.
(HTMLInputElementImpl::defaultEventHandler): Remove more m_clicked flag code.
2002-12-30 David Hyatt <hyatt@apple.com>
Fix for 3129016, make sure that zero-height tables and lists
will be skipped in a search for floats that occur before
them. Makes usatoday work.
Reviewed by gramps
* khtml/rendering/render_flow.cpp:
(RenderFlow::clearFloats):
2002-12-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3135642 -- ad frames are missing at channels.netscape.com
* khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): Updated to use the
same rule as Mozilla: Empty URL for an iframe means "about:blank".
* khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Loosen things so that it's safe for
a frame to manipulate an empty child frame, as well as an empty opened window. Also remove
the useless check for an empty document -- it never happens in practice.
2002-12-30 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin and Gramps
Fix for this bug:
Radar 3136795 (type URL with ../ in it, get assertion)
The code to remove relative portions from URLs was eating leading slashes on
URL paths. This caused absolute paths with relative portions to get mangled,
resulting in a URL that the engine could not use. Now, leading slashes are no
longer removed from URL paths, resulting in usuable URLs.
* kwq/KWQKURL.mm:
(copyPathRemovingDots)
2002-12-29 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3103287 -- body of page not rendered (page uses JavaScript trick to be both a frameset and a frame)
Our self-reference protection prevented this page from working.
To fix the bug, I did three things:
1) fixed the hole in the WebCore self-reference protection, so we could remove the WebKit one
(the hole was that it didn't ignore #xxx suffixes)
2) moved the self-reference protection into a single function so it wasn't copied and pasted all over
3) allowed one level of self-reference; still enough to prevent infinite recursion
Then I tested with the site from bug 3103287 and the one from bug 3083732 to make sure that was still OK.
* khtml/html/html_baseimpl.h: Added isURLAllowed().
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::isURLAllowed): Added. Does the self-reference check and the "local only" check.
This logic was repeated in three different places before. Note that since we don't use the "local only"
feature, it's not too risky to slightly change how it works.
(HTMLFrameElementImpl::updateForNewURL): Use isURLAllowed.
(HTMLFrameElementImpl::attach): Ditto.
(HTMLIFrameElementImpl::attach): Ditto.
2002-12-29 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3130566 -- REGRESSION: list item numbers are overlapping the text of the list items
Moved the hack that handles list items that are not in lists out of the parser and into
the DOM and Render tree code itself. This fixes the issue where the parser doesn't know which
will be the parent node of the list item, and other problems with the old hack.
* khtml/html/html_listimpl.cpp: (HTMLLIElementImpl::attach): Find the parent list (OL or UL).
If there is no parent list, set a "not in list" flag on the render object so it knows to render
"inside" no matter what the style says. Also use this parent and a safer check to make the
start attribute work even when there is an intervening DOM element in the hierarchy.
* khtml/html/htmlparser.cpp: (KHTMLParser::getElement): Remove the code that tries to set
the style of an LI based on the current node at the time it's parsed, because the current node
is now often not the OL or the UL due to our DTD fix to allow other nodes in lists.
* khtml/rendering/render_list.h: Add isInside() to RenderListMarker, setNotInList(), notInList(),
and _notInList to RenderListItem.
* khtml/rendering/render_list.cpp:
(RenderListItem::RenderListItem): Initialize _notInList to false.
(RenderListMarker::paintObject): Use isInside() instead of checking listStylePosition().
(RenderListMarker::calcMinMaxWidth): Ditto.
(RenderListMarker::baselinePosition): Ditto.
(RenderListMarker::isInside): Return true if we are not in a list, or if "inside" style is requested.
2002-12-29 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3134346 -- country menu at www.apple.com does not work when you go back to that page
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Add call to checkCompleted().
2002-12-29 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3136391 -- PianoNanny.com screens turn to garbage when resized
Turns out browsers pass open calls to the window object if they show up at the document
with parameters. We now emulate that too.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLDocFunction::tryCall): If we get an open call with
parameters, pass it on to the window.
2002-12-29 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3134560 -- Lord of the Rings desktops don't load
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Removed the APPLE_CHANGES here.
The comment claims that we don't need the code because "JavaScript will do the work
below on demand", but that's not true for setting the base URL. Also, the comment
claims that this "adds an extra entry to the back/forward list", but testing does not
bear that out.
=== Alexander-46 ===
2002-12-28 Ken Kocienda <kocienda@apple.com>
Reviewed by Gramps and Richard.
Fix for this bug:
Radar 3112233 (400 response when attaching files at mail.yahoo.com)
KHTML multipart form code called into KMimeType class to determine
the mime type for file attachments, however, our implementation of
KMimeType has only stubs which call ERROR.
I added some code into KWQKHTMLPart and WebCoreBridge so that the
code in html_formimpl can call through to the WebFoundation mime
file map we maintain.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formData)
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::mimeTypeForFileName)
* kwq/WebCoreBridge.h:
2002-12-26 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3136262 -- Shockwave Flash at movies.yahoo.com does not work
* khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget):
Moved the class ID special case MIME types out of the if statement so they can be shared
in the case where we have an embed tag but no MIME type.
2002-12-26 Darin Adler <darin@apple.com>
Reviewed by Don.
* kwq/KWQAssertions.h: Fixed CRASH macro to use 0xbbadbeef instead of 0xbadbeef
to reduce the chance that the address will be valid once we have allocated a lot of memory.
2002-12-24 Richard Williamson <rjw@apple.com>
Fix for 3134543 (and widely reported dupes). Don't use render_text
widths cache except for whitespace == PRE. The problem was that additional
spaces in the RenderText's string were being inappropiately measured.
An alternate, more complex and risky, fix would account for the whitespace
properties during scanning of the RenderText width buffer. Considering
the scenario for which this optimization was added (3133261), this
simpler fix is adequate.
Reviewed by Darin and Don.
* khtml/rendering/render_text.cpp:
(RenderText::computeWidths):
2002-12-24 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3135010 -- nil-dereference in KHTMLPart::xmlDocImpl() at channels.netscape.com
* khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::contentDocument):
Add missing nil check. Also added lots of FIXME comments about problems I observed here.
2002-12-24 Darin Adler <darin@apple.com>
Reviewed by Richard and Don.
- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com
My previous attempt to fix this dealt with the case where a RenderFrame object was
not yet created, but not with the case where a RenderFrame object was created without
a corresponding part. Somehow I overlooked this last time when I was doing testing.
Testing this time confirms this takes care of the remaining problem at movies.real.com.
* khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::updateForNewURL):
Use the same kind of requestFrame call here as in attach when there's a RenderFrame,
but no corresponding part. Maybe we can fix this an even more elegant way later.
=== Alexander-45 ===
2002-12-23 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3134558 -- REGRESSION: Lord of the Rings site problems
This regression was caused when we fixed the abcnews.com problem (3124933).
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createEmptyDocument):
Despite its name, this function was never intended to overwrite an existing document with
an empty document. When we changed it do do the creation in a better way, we lost the
check that prevents it from doing anything at all if we already have a document.
2002-12-22 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3134383 -- crash in KWQKHTMLPart::canCachePage at www.apple.com
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage):
Check for nil in the result of Window::retrieveWindow.
=== Alexander-44 ===
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by Trey and Don.
- fixed 3132160 -- meta refresh does not work if there's a space after the refresh interval value
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
Added a call to stripWhiteSpace here. The other places that processes delays for
meta refresh already had the stripWhiteSpace call, but this was missing it.
2002-12-20 David Hyatt <hyatt@apple.com>
Fix for 3134163, a regression from the reduction of
styleForElement calls. Make sure image buttons
get the width attribute and add it to style info
before styleForElement gets called.
Reviewed by rjw
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::attach):
2002-12-20 David Hyatt <hyatt@apple.com>
Fix for 3134133. Back out the render_text code I gave to rjw
to check in. It wasn't filling in a value for hasBreak, so it
became random whether or not you'd break or not.
Reviewed by rjw
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
* khtml/rendering/render_text.h:
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3133801 -- REGRESSION: Japanese page comes up hash
* khtml/khtml_part.cpp: (KHTMLPart::write): Roll back to original KHTML code here,
removing the "all ASCII" optimization.
2002-12-20 David Hyatt <hyatt@apple.com>
Fix for 3133081, slashdot messed up when changing font sizes.
setStyle in RenderFlow was messed up for continuations. A
block in the middle of a continuation incorrectly propagated
its style to the following inlines.
Reviewed by darin
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
2002-12-20 Richard Williamson <rjw@apple.com>
Fix for 3133601. Play the same trick we do in
KHTMLPartBrowserExtension::openURLRequest to create an empty
document if necessary.
Reviewed by darin.
* khtml/ecma/kjs_window.cpp:
(Window::get):
2002-12-19 David Hyatt <hyatt@apple.com>
Remove the clip hack from setLayout and make it
asynchronous instead. This fixes the crasher
on autosite.com, which had a sync layout occur
while in the middle of making a block box's
children get wrapped in anonymous boxes. It
was only half done when the layout got
triggered, which is what caused the assert to fire.
The bug # is 3129534.
Reviewed by rjw
* khtml/khtmlview.cpp:
(KHTMLView::KHTMLView):
(KHTMLView::timerEvent):
(KHTMLView::scheduleRelayout):
* khtml/khtmlview.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::scheduleRelayout):
* khtml/rendering/render_object.h:
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)
* kwq/KWQTextArea.mm:
(-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
paragraph number along with the index within the paragraph. Also made it return a paragraph one
past the end with an index of 0 for cases where you are at the end of the text.
(-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
would also have prevented the exception.
=== Alexander-43 ===
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3132382 -- crash in khtml::CachedImage
The source of this bug was my long-ago fix to bug 3079499.
I changed the code to copy the clients list. But this doesn't work if
one of the clients is removed while iterating because it's deleted.
So I made a new class, CachedObjectClientWalker, that does the iterating safely.
Now both this new bug and the original are fixed.
* khtml/misc/loader.cpp:
(CachedCSSStyleSheet::checkNotify): Use CachedObjectClientWalker to walk the list.
(CachedScript::checkNotify): Ditto.
(CachedImage::do_notify): Ditto.
(CachedImage::movieStatus): Ditto.
(CachedImage::checkNotify): Ditto.
(CachedObjectClientWalker::next): Walk the list using a list iterator, which is
safe against the current item being removed. But go that safety one better by making
sure you don't miss the item after one that's removed.
2002-12-20 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
The issue is that we submit the login form more than once when the user hits
the return key to submit rather than clicking the submit button. We are also
susceptible to double form submissions from buggy scripts that ask to submit
more than one form.
The fix is to prevent the KWQKHTMLPart from submitting more than one form by
setting and checking a flag.
* kwq/KWQKHTMLPart.h: Add a form submit flag.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
has already been submitted.
(KWQKHTMLPart::setView): Reset form flag. This is done since the part
may have been retrieved for reuse from the bac/forward cache.
2002-12-20 Richard Williamson <rjw@apple.com>
Fixed 3133261. This fix really has two parts. This first part
fixes the stupid stack allocated buffer that caused the crash.
The second part makes any RenderText with a large string perform
much faster. The page mentioned in the bug used to load and draw
in about 15 minutes. Now it loads in about 10 seconds and draws in about
2 seconds. The performance optimization caches a widths array
for the string in the RenderText, and only updates that array if
the font or text for the RenderText change.
Reviewed by john.
* khtml/rendering/render_text.cpp:
(RenderText::RenderText):
(RenderText::setStyle):
(RenderText::~RenderText):
(RenderText::computeWidths):
(RenderText::widthFromBuffer):
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
(RenderText::setText):
(RenderText::width):
* khtml/rendering/render_text.h:
2002-12-20 Trey Matteson <trey@apple.com>
We now build with symbols the B&I. Deployment builds are without symbols,
so it is easy to generate a non-huge app as a one-off.
Reviewed by Darin
* WebCore.pbproj/project.pbxproj:
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3129824 -- crash in QWidget::getView in KWQKHTMLPart::passSubframeEventToSubframe
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
Check for a nil QWidget in a RenderWidget, and ERROR and return true in that case.
We don't want to return false because otherwise the KHTML code will try to draw a frame splitter.
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3131449 -- crash in DOMNamedNodesCollection::tryGet opening a new window from JavaScript
* khtml/ecma/kjs_dom.cpp: (DOMNamedNodesCollection::tryGet):
Add range checking. If the index is out of range fall back to the parent tryGet,
which will eventually just return Undefined().
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by Richard and John.
- fixed 3133207 -- crash in HTMLFrameElementImpl updateForNewURL at home.real.com
This refines Maciej's fix for 3052113, 3075392, and 3125412.
* khtml/html/html_baseimpl.h: Remove detach() and parentWidget from HTMLFrameElementImpl.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::HTMLFrameElementImpl): Take out initialization of unused parentWidget.
(HTMLFrameElementImpl::updateForNewURL): Add case for when we are attached by did not allocate
a render object. In that case we just detach so we can attach again. Also fix the self-reference
check which was in there but not working.
(HTMLFrameElementImpl::detach): Remove method since all it did was set unused parentWidget.
(HTMLIFrameElementImpl::attach): Remove unused depth computation.
- fixed more leaks
* khtml/rendering/render_replaced.h: Made the deref method inherited from khtml::Shared
private by using private inheritance. Changed the name of arenaDeref to deref, but it still
takes an arena parameter. Now incorrect deref's are compile-time errors instead of potential leaks.
* khtml/rendering/render_replaced.cpp:
(RenderWidget::detach): Rename arenaDeref to deref.
(RenderWidget::resizeWidget): Ditto.
(RenderWidget::eventFilter): Ditto.
(RenderWidget::deref): Ditto.
* khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked):
Pass the arena when deref'ing the RenderFormElement.
* kwq/WebCoreBridge.h: Add a field for the arena for the RenderPart.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dealloc]): Pass the arena when deref'ing the RenderPart.
(-[WebCoreBridge setRenderPart:]): Pass the arena when deref'ing the RenderPart. Store the arena
of the new part when storing the part pointer.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): Assert that the render object is
not nil, in an attempt to catch a leak I observed yesterday.
2002-12-20 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3129129 -- leak of 820 RenderStyle objects each time we run cvs-base
The RenderStyle objects were the tip of an iceberg.
I fixed a lot of leaks, but there are still some remaining.
Note that these changes will make Development builds slower because they disable
the arena allocator in favor of assertions that check we are using it correctly.
But the changes make Deployment builds slightly faster.
* khtml/html/html_baseimpl.cpp: (HTMLFrameSetElementImpl::attach):
Fix a leak in the !isStyleAvailable() case by ref'ing and deref'ing the style.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::attach): Fix a leak by getting the style from the render
object instead of calling styleForElement again, which makes a new one.
(HTMLFormElementImpl::parseAttribute): Ditto.
(HTMLInputElementImpl::attach): Fix a leak by using the style in the local
variable rather than calling styleForElement again.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::parseAttribute): Fix a leak by getting the style from the render
object instead of calling styleForElement again, which makes a new one.
(HTMLImageElementImpl::attach): Fix a leak by using the style in the local
variable rather than calling styleForElement again.
* khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
Fix a leak in the display() == NONE case by ref'ing and deref'ing the style.
* khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): Fix a leak by using
the style in the local variable rather than calling styleForElement again.
* khtml/rendering/bidi.cpp:
(BidiIterator::detach): Added debugging code to detect if someone does a delete directly,
which will not deallocate the object because it won't run the correct arena code.
(BidiIterator::operator delete): Ditto.
(appendRunsForObject): Fix a leak by detaching bidi iterators when they are removed from
the list. The list can't delete them because it doesn't have the arena pointer.
(deleteMidpoints): Fix a leak by not removing the items from the list until done iterating.
The old code would fail to delete half the items.
* khtml/rendering/render_container.cpp:
(RenderContainer::detach): Detach the continuation here. Before we removed it but did not
detach it, which led to a leak.
(RenderContainer::removeChild): Do not remove the continuation here. If we do, then we can't
detach successfully. No one depends on this removing the continuation.
(RenderContainer::removeLeftoverAnonymousBoxes): Detach the child, don't just delete it.
This fixes a leak.
* khtml/rendering/render_flow.cpp: (RenderFlow::removeChild): Detach the child, don't just
delete it. This fixes a leak.
* khtml/rendering/render_object.h: Added arenaDelete.
* khtml/rendering/render_object.cpp:
(RenderObject::operator delete): Added debugging code to detect if someone does a delete directly,
which will not deallocate the object because it won't run the correct arena code.
(RenderObject::detach): Ditto.
(RenderObject::arenaDelete): Put the low-level delete here, so that subclasses (RenderWidget)
can call it.
* khtml/rendering/render_replaced.h: Add arenaDeref and make deref private so derived classes
won't use it by accident.
* khtml/rendering/render_replaced.cpp:
(RenderWidget::detach): Use the new arenaDeref instead of deref, since we need to pass the
arena pointer in to delete.
(RenderWidget::resizeWidget): Ditto. Store the arena before calling back, since we can't get it
once it's detached from its parent.
(RenderWidget::eventFilter): Ditto.
(RenderWidget::arenaDeref): Added. Calls RenderObject's arenaDelete.
- other changes
* khtml/rendering/render_arena.cpp:
(RenderArena::allocate): Added debugging code that stores a signature, arena pointer, and size,
and uses malloc rather than the arena.
(RenderArena::free): Check the signature, arena pointer, and size, and use free.
* khtml/rendering/render_layer.cpp:
(RenderLayer::operator delete): Added debugging code to detect if someone does a delete directly,
which will not deallocate the object because it won't run the correct arena code.
(RenderLayer::detach): Ditto.
(RenderLayer::RenderLayerElement::operator delete): Ditto.
(RenderLayer::RenderLayerElement::detach): Ditto.
(RenderLayer::RenderZTreeNode::operator delete): Ditto.
(RenderLayer::RenderZTreeNode::detach): Ditto.
* khtml/rendering/render_text.cpp:
(TextSlave::detach): Added debugging code to detect if someone does a delete directly,
which will not deallocate the object because it won't run the correct arena code.
(TextSlave::operator delete): Ditto.
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment):
Save one new/delete by using a stack-based HTMLTokenizer and add FIXMEs about
some possible leaks I spotted here.
* khtml/rendering/render_list.cpp: (RenderListItem::setStyle): Took out APPLE_CHANGES from around
a generally useful bug fix.
* WebCore.pbproj/project.pbxproj: Let Electron be Electron.
=== Alexander-42 ===
2002-12-19 David Hyatt <hyatt@apple.com>
Fix for 3129393, crasher on sundancecatalog.com. There
are two elements to this fix. The basic problem was that
sundancecatalog was saying:
<table style="display: inline">
In WinIE, this turns into an inline-table and not an inline.
In Gecko this does not happen. Like Gecko, we treated this
as an inline, so we triggered a problem in my inline splitting
code.
The first fix was to bulletproof my inline splitting code to
ensure all new render objects are fully connected before children
are added, so that you can get to renderArenas at all times.
The second fix implements the WinIE quirk and turns the table
into an inline-table so that you avoid a complete garbage
render tree.
Reviewed by trey
* khtml/css/html4.css:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
(RenderFlow::splitFlow):
(RenderFlow::addChildToFlow):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_list.cpp:
(RenderListMarker::lineHeight):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::createObject):
* khtml/rendering/render_table.cpp:
(RenderTable::lineHeight):
(RenderTable::baselinePosition):
(RenderTable::setStyle):
* khtml/rendering/render_table.h:
2002-12-19 Darin Adler <darin@apple.com>
Reviewed by John.
A number of non-reproducible bugs look like they may be due to bad
event objects. I was assuming that callers retained the events until
the functions handling them returned, but that assumption may be wrong.
So I'm retaining/releasing the current event. This is correct in any case.
I'm also adding a new assertion, but since assertions are in Development
builds only that is very low risk.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyEvent): Add retain/release and a new assertion.
(KWQKHTMLPart::mouseDown): Ditto.
(KWQKHTMLPart::mouseDragged): Ditto.
(KWQKHTMLPart::mouseUp): Ditto.
(KWQKHTMLPart::mouseMoved): Ditto.
=== Alexander-41 ===
2002-12-18 Richard Williamson <rjw@apple.com>
Added an ASSERT to ensure that 3127329 isn't still happening.
This bug should have been fixed be earlier changes.
Reviewed by darin.
* kwq/KWQPageState.mm:
(-[KWQPageState dealloc]):
2002-12-18 Chris Blumenberg <cblu@apple.com>
Fixed: 3131267 - REGRESSION: Java 1.4.1 Applets Restarted When Window is Resized
Fixed: 3131244 - REGRESSION: Java 1.4.1 Multiple Copies of Applet Started When Window is Resized
Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and w
ould create a new java view for each layout. We now only create a java view when the java view hasn't already been created.
Reviewed by darin.
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet): If the view of the widget is still a KWQView, we haven't replaced it with the Java view. This stops multiple view from being created.
=== Alexander-40 ===
2002-12-18 Trey Matteson <trey@apple.com>
3098388 - Pressing the back button goes back two levels at allmusic.com
In support of the fix for this bug, WebCore passes khtml's lockHistory setting
up through the bridge.
Reviewed by Darin
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Pass it along.
* kwq/WebCoreBridge.h:
2002-12-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
* English.lproj/InfoPlist.strings:
2002-12-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Trey and Darin.
- fixed 3124933 - abcnews.com leads to empty window with sheet complaining about javascript: URL
- fixed 3091248 - picture does not show up in window from epinions
* khtml/ecma/kjs_window.cpp:
(Window::get): Put back document-creating code that was in #if
!APPLE_CHANGES.
(Window::isSafeScript): Extend access to a window that was opened
to no URL or to about:blank by the active window.
(shouldLoadAsEmptyDocument): Helper for the above.
(WindowFunc::tryCall): Update APPLE_CHANGES comments - now it's
clear we don't need to create a document in a fresh window
(accessing document will take care of that), and that it will be
counter-productive, possibly adding a useless entry to the
back/forward list.
* khtml/khtml_part.cpp:
(KHTMLPart::begin): If we're not loading a URL, make a dummy
document (the call will check if we have a dummy document
already).
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createEmptyDocument): Isntead of setting up a
half-assed document, ask bridge to synchronously load a fully
assed (but empty) document. Renamed from createDummyDocument.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::openURLRequest): Decode script. Also,
check if return value is a string - if so, write it into the
document. Maybe we want this to be more general.
* kwq/KWQKURL.mm:
(KURL::KURL): Changed to successfully resolve absolute URLs
against an empty base URL.
* kwq/WebCoreBridge.h: prototyped new
loadEmptyDocumentSynchronously method.
2002-12-18 Chris Blumenberg <cblu@apple.com>
Fixed: 3052731 - qt file complains about lack of active-x handler
Fixed: 3025872 - Black square where lion should be on mgm.com
3052731: The page has a syntax error. Notice the missing ">"? He treat this as an OBJECT without an EMBED. khtml actually has a fallback for this. They check the classid and map a mime type to it. They currently map for realaudio and flash, but not quic
ktime. I added a quicktime mapping as well as a mapping for shockwave.
3025872: khtml was unable to parse the EMBED tag within the OBJECT tag (similar to 3052731). When this happens, it looks at the classid and maps it to a mime type. This part was successful because it has a classid->mime type mapping for flash. The strang
e thing was that it was setting the main URL of the plug-in to "dummy". The code has this comment:
url = "dummy"; // Not needed, but KHTMLPart aborts the request if empty
It does this even if the url is valid. It even handles the invalid url case before even calling the part. The fix is to disable this line of code.
Reviewed by trey.
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget):
2002-12-18 Trey Matteson <trey@apple.com>
3105755 - can't log in to amex
The problem was on c/r khtml would not pick a submit button to add to the
form state that is sent. We now "activate" the first submit button that meets the
criteria for being a "successful" form element, if no button was already
activated by being clicked on.
Reviewed by Darin.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submit): Pick a submit button to use, if none was already
chosen by virtue of being clicked.
(HTMLButtonElementImpl::isSuccessfulSubmitButton): New getter to support
submit button selection.
(HTMLButtonElementImpl::isActivatedSubmit): New getter on existing prop.
(HTMLButtonElementImpl::setActivatedSubmit): New setter on existing prop.
(HTMLInputElementImpl::isSuccessfulSubmitButton): New getter to support
submit button selection.
(HTMLInputElementImpl::isActivatedSubmit): New getter on existing prop.
(HTMLInputElementImpl::setActivatedSubmit): New setter on existing prop.
* khtml/html/html_formimpl.h: Add new methods to common superclass.
2002-12-17 Don Melton <gramps@apple.com>
Reviewed by Joyce Chow.
* khtml/misc/arena.cpp:
* khtml/misc/arena.h:
* khtml/rendering/render_arena.cpp:
* khtml/rendering/render_arena.h:
* khtml/rendering/render_layer.cpp:
* khtml/rendering/render_layer.h:
Changed copyright and licensing.
2002-12-17 David Hyatt <hyatt@apple.com>
NOWRAP was completely broken. This fixes the problem
and makes porsche.com look ok again.
Bug #3131287.
Reviewed by gramps
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-12-17 Darin Adler <darin@apple.com>
Reviewed by Trey.
* WebCore.pbproj/project.pbxproj: Remove signature.
* kwq/KWQColor.mm: Turn off inlining so we can build even on the
compiler that warns about static data in inline functions.
2002-12-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3120729 - HOMEPAGE: Can't set a DIV innerHTML property
with html content starting with <html><head><head/><body>
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Pop <html> and
<body>, and remove <head> to allow a full HTML document to be made
and inserted as a contextual fragment.
=== Alexander-39 ===
2002-12-17 David Hyatt <hyatt@apple.com>
Make sure that anonymous block construction works properly
when you try to insert a block in between two inlines that
have already been wrapped in an anonymous block.
Reviewed by mjs
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChildToFlow):
(RenderFlow::makeChildrenNonInline):
=== Alexander-38 ===
2002-12-16 Darin Adler <darin@apple.com>
Reviewed by Don and Maciej.
- fixed 3129115 -- need Apple copyright added to open source documents
* tons of files: Added copyright message to files we modified and
standardized format of copyrights too.
- fixed 3129235 -- assert in LRUList visiting apple.com if "Display images" preference is off
* khtml/misc/loader.cpp:
(Cache::getLRUListFor): Use the first list for 0-sized objects.
(Cache::removeFromLRUList): Allow 0-sized objects.
- other changes
* khtml/rendering/render_style.h: Remove bogus unused private constructor.
* kwq/KWQFont.h: Added copy constructor and assignment operator.
* kwq/KWQFont.mm:
(QFont::QFont): Copy constructor now retains the NSFont. The old version didn't which could
cause retain/release problems.
(QFont::operator=): Retain the new NSFont and release the old one.
* WebCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
2002-12-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero
There were two problems here. First, the calls to get image width
and height didn't force a layout in all the cases where it was
required. Second, layout wouldn't lay out images at all until
parsing was done, due to a hack to block inline layout until that
point. I'm not sure if this will have other bad consquences, but
nearly every page I tried, including Hebrew and Japanese pages as
well as every page on the base PLT laid out properly.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::width): Force a layout if not laid out.
(HTMLImageElementImpl::height): Likewise.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
preventing images from getting laid out until the document was
totally done parsing.
* khtml/rendering/render_flow.cpp:
(RenderFlow::RenderFlow): More setBLockBidi removal.
(RenderFlow::layout): Likewise.
(RenderFlow::close): Likewise.
(RenderFlow::addChildToFlow): Likewise.
(RenderFlow::printTree): Likewise.
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.h:
2002-12-16 David Hyatt <hyatt@apple.com>
When a clear occurs (thus causing a block to move underneath
a float), make sure the block gets a fresh layout, so that it
can readjust its contents now that they don't have to flow
around the float.
Reviewed by darin
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-12-16 Richard Williamson <rjw@apple.com>
Fixed 3128477. Check KJS::Window before saving js objects.
Reviewed by darin.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::saveWindowProperties):
(KWQKHTMLPart::saveLocationProperties):
(KWQKHTMLPart::restoreWindowProperties):
(KWQKHTMLPart::restoreLocationProperties):
=== Alexander-37 ===
2002-12-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing
* khtml/html/html_baseimpl.h:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
to be called if src attribute is set explicitly and the element is already
attached.
(HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
attrinute is set.
(HTMLFrameElementImpl::contentDocument): Don't involve render widget
in getting the content document.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Allow contextual
fragments to be created (and therefore innerHTML to be set on) TR
and HTML elements.
2002-12-16 David Hyatt <hyatt@apple.com>
Use the layer's bounds as the damage rect not the object's.
The layer knows about the overflow out of the object. The
object does not. Duh.
Fixes disney.com bustage.
Reviewed by sullivan
* khtml/rendering/render_layer.cpp:
(RenderLayer::constructZTree):
2002-12-16 David Hyatt <hyatt@apple.com>
Code needs to go in calcMinMaxWidth instead, so parents computing
their own minmax widths will get the correct value during the ifrst
pass. With this change weather.com is actually fixed.
Reviewed by mjs
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcMinMaxWidth):
2002-12-16 David Hyatt <hyatt@apple.com>
Fix for 3128843, horked layout on weather.com. Ensure that
overflow: hidden elements bounds-check their minwidth and maxwidth
values to ensure that you don't grow the clipped element.
Reviewed by mjs
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
2002-12-16 Trey Matteson <trey@apple.com>
3129175 - we're doing needless GETs when using b/f cache
Turns out that an empty UserStyle was causing WebCore to reload the base URL
of the page, since it tried to load the style "".
Reviewed by Darin
* khtml/khtml_part.cpp:
(KHTMLPart::reparseConfiguration): Of the UserStyle is empty, set it to an
empty string instead of an empty URL.
2002-12-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3129008 - REGRESSION: Successive hot/cached runs of cvs-base PLT are slightly slower
This was due to me reintroducing a leak of the document. Now fixed.
* khtml/ecma/kjs_dom.cpp:
(DOMDocument::~DOMDocument): forget self from cached DOM object table.
(KJS::getDOMDocumentNode): Instead of storing the document in the
marked per-document table, store it in the unmarked table, and as
a property on the Window object.
(KJS::getDOMNode): use getDocumentNode when appropriate.
* khtml/ecma/kjs_dom.h:
2002-12-15 David Hyatt <hyatt@apple.com>
Fix for 3128728. Ensure that list markers get placed into an
existing line box if possible. This patch also fixes RTL bullets
and line height calculations involving image bullets that are the
biggest thing on the line. List markers also correctly move
to avoid floats.
Reviewed by mjs
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
(getLineBoxParent):
(RenderListItem::layout):
(RenderListMarker::calcMinMaxWidth):
2002-12-16 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3128766 -- macconnection.com tries to add properties to the navigator DOM object, which fails
* khtml/ecma/kjs_window.cpp: (Window::get): Set up properties named navigator and clientInformation
the first time either is queried. These will hold a persistent shared object rather than making one
every time it's asked for.
* WebCore.pbproj/project.pbxproj: Let Electron undo Maciej's evil.
=== WebKit-37u2 ===
2002-12-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* WebCore.pbproj/project.pbxproj: Updated source version to 37u2.
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed regression where clicked-on buttons were getting keyboard focus
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMousePressEvent): Check clickCount here the way NSWindow does.
See below for rationale.
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): I didn't read the code in
[NSWindow sendEvent:] that I was stealing carefully enough. The old needsPanelToBecomeKey
flag is used to decide whether something should really get first responder, and I need to
do check that too. And while I was in here, did the same clickCount check that NSWindow
does for good measure.
2002-12-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3128383 - DOM nodes should always use the same JS object
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::ScriptInterpreter): Set auto-delete to true on
document dictionary.
(ScriptInterpreter::getDOMObjectForDocument): New function - gets
DOM object from per-document dictionary.
(ScriptInterpreter::putDOMObjectForDocument): New function - put
DOM object into per-document dictionary.
(ScriptInterpreter::deleteDOMObjectsForDocument): Clear all
objects from specific per-document dictionary.
(ScriptInterpreter::mark): Mark per-document objects.
(ScriptInterpreter::forgetDOMObjectsForDocument): Clear objects
for this document from all interpreters.
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_dom.cpp:
(KJS::getDOMNode): Use per-document rather than general DOM object
dictionary.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::~DocumentImpl): Call forgetDOMObjectsForDocument.
2002-12-15 David Hyatt <hyatt@apple.com>
Fix for 3057974 and 3128713. I needed to make frames check to
see if their parentNode had a renderer to complete the FOUC
fix. Completing the FOUC fix finally solves 3057974.
Reviewed by darin
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::attach):
2002-12-15 David Hyatt <hyatt@apple.com>
Fix for 3109226, epinions page is mostly blank. Add a hack
to disallow > but only inside attribute values for which there
is no corresponding attribute name.
Also fix attribute values with no name so that the value is
used as the name so that e.g., <option "selected"> works.
Reviewed by darin
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::HTMLTokenizer):
* khtml/html/htmltokenizer.h:
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3127900 -- REGRESSION: text fields select all their text when clicked on with the mouse
* kwq/KWQKHTMLPart.h: Add _firstResponderAtMouseDownTime.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMousePressEvent): Don't call makeFirstResponder: if it's already set.
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Using _firstResponderAtMouseDownTime, catch the
case where an NSTextField's editor was just created and became first responder. In those cases,
pass the mouseDown: to the text field, not the newly created editor. Even though it shouldn't make
a difference it does. Also don't makeFirstResponder: if it's already set.
(KWQKHTMLPart::mouseDown): Set _firstResponderAtMouseDownTime.
* kwq/KWQWidget.mm: (QWidget::setFocus): Don't call makeFirstResponder: if it's already set.
2002-12-15 David Hyatt <hyatt@apple.com>
Make sure framesets don't get built twice when FOUC delays
their loading.
Reviewed by gramps
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameSetElementImpl::attach):
* khtml/rendering/render_style.cpp:
(RenderStyle::operator==):
(RenderStyle::isStyleAvailable):
* khtml/rendering/render_style.h:
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed ==/= typo in QFontMetrics that caused a part of my recent speedup to not take effect
- fixed 3128582 -- REGRESSION: Crash on planetquake.com
* kwq/KWQFontMetrics.mm:
(QFontMetricsPrivate::setFont): Fix a horrifying "== instead of =" mistake.
(QFontMetrics::ascent): Give an ERROR message, don't crash, when this is called on a
font metrics object that hasn't been updated to work for a particular font.
(QFontMetrics::descent): Ditto.
(QFontMetrics::lineSpacing): Ditto.
(QFontMetrics::xHeight): Ditto.
(QFontMetrics::width): Ditto.
(QFontMetrics::floatWidth): Ditto.
(QFontMetrics::floatCharacterWidths): Ditto.
* khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach):
Eliminated what was causing us to hit the above. BR elements need to respect display() == NONE.
- fixed the fix for operator==; needs to work even if the pseudo type was
extracted already for one of the two, and not the other
* khtml/css/cssparser.cpp:
(CSSSelector::extractPseudoType): Only do work when the selector is Pseudo.
(CSSSelector::operator==): Call pseudoType() instead of going right at _pseudoType.
2002-12-15 David Hyatt <hyatt@apple.com>
Fix for 3128402, missing content on voodooextreme. Don't allow
object/embed inside the head.
Reviewed by cblu
* khtml/html/dtd.cpp:
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3127898 -- Crash going to altavista.com after visiting sony.com
* khtml/ecma/kjs_window.cpp: (Window::get): Change lots of properties to return "undefined"
rather than crashing when the view is NULL. I'm not sure that undefined is the perfect thing
to return in this case, but it's better than crashing the program. We can refine later as needed.
- fixed 3127157 -- REGRESSION: applet does not become first responder when clicked-on
- fixed 3127934 -- Crash in KWQKHTMLPart::widgetWillReleaseView scrolling around
* kwq/KWQKHTMLPart.h: Get rid of widgetWillReleaseView(). Add mouseDownViewIfStillGood().
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Call makeFirstResponder: in the same way that
the NSWindow does before delivering a mouseDown: message. This oversight caused the applet problem.
(findViewInSubviews): Added.
(KWQKHTMLPart::mouseDownViewIfStillGood): Added. Gets _mouseDownView, but then checks that it's
still a subview before returning it. A little inefficient, but the only way to do it given that
there's no general way to find out that an NSView is being removed from your view hierarchy or deallocated.
This fixes the crash in widgetWillReleaseView.
(KWQKHTMLPart::khtmlMouseMoveEvent): Use mouseDownViewIfStillGood() instead of _mouseDownView directly.
(KWQKHTMLPart::khtmlMouseReleaseEvent): Ditto.
(KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
* kwq/KWQWidget.mm:
(QWidget::~QWidget): Remove call to widgetWillReleaseView().
(QWidget::setView): Ditto.
2002-12-15 David Hyatt <hyatt@apple.com>
operator== on CSSSelectors needed to be updated to compare
_pseudoTypes. A nice subtle bug from the mega-patch.
Reviewed by mjs
* khtml/css/cssparser.cpp:
(CSSSelector::operator == ):
2002-12-15 David Hyatt <hyatt@apple.com>
Fix for 3128429, sans-serif font got broken. Just a typo
from darin's mega-patch.
Reviewed by mjs
* khtml/css/cssstyleselector.cpp:
2002-12-14 Darin Adler <darin@apple.com>
Reviewed by Maciej and Dave.
- optimizations that improve speed; total is 13.8% on cached cvs-base on my machine
* khtml/css/css_valueimpl.h: Add isKonqBody() and genericFamilyType() to find out if
a font is a standard one. This is much faster than doing string comparisons all the time.
* khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl):
Check the font names against the standard ones on time when the FontFamilyValueImpl
object is constructed rather than every time the stuff is matched.
* khtml/css/cssparser.h: Add pseudoType() and extractPseudoType() to CSSSelector so we
don't have to do string compares all the time.
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseValue): Use QConstString in a way that's effective (with an
object that has a long enough lifetime), or don't use it at all.
(StyleBaseImpl::parseContent): Ditto.
(StyleBaseImpl::preprocess): Preprocess into a buffer, usually on the stack, rather than
using QString += QChar over and over again.
(CSSSelector::extractPseudoType): Convert the value string into a type, and get rid of it.
Saves memory because the string goes away. And doing it once is much faster than string
comparing each time.
* khtml/css/cssstyleselector.cpp:
(cleanPath): Restructure to save one find() in the common case.
(checkPseudoState): Restructure to avoid some DOMString creation/destruction in the case
where the tag is not an <A>. Also use QConstString correctly.
(CSSStyleSelector::checkOneSelector): Use the new pseudoType() instead of string compares.
(CSSStyleSelector::applyRule): Use isKonqBody() and genericFamilyType() instead of string
comparisons.
* khtml/dom/dom_string.h: Make the destructor non-virtual. This was a big win, and a mistake
the way it was before. Also make the DOMString constructor with no parameters inline.
* khtml/dom/dom_string.cpp:
(DOMString::string): Don't use QConstString here, since it does no good.
(DOM::operator==): Rewrite to do things faster and avoid calling strlen.
* khtml/html/html_objectimpl.h: Don't use QConstString in places where it does harm and no good.
* khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Use QConstString properly.
* khtml/html/htmltokenizer.cpp:
(tagMatch): Added.
(HTMLTokenizer::parseSpecial): Change tokenizing so it doesn't construct temporary strings (with
QConstString) just to compare small substrings.
* khtml/khtml_part.cpp: (KHTMLPart::write): Don't use a decoder object when source is all ASCII.
* kwq/KWQColor.mm:
(hex2int): Don't bother with uppercase hex since we always lowercase anyway.
(QColor::setNamedColor): Use a new gperf-based table instead of an NSDictionary to look up colors.
* kwq/KWQColorData.c: Added this autogenerated file.
* kwq/KWQColorData.gperf: Added. Source file with list of colors and color values.
* kwq/Makefile.am: Build KWQColorData.c from KWQColorData.gperf.
* WebCore.pbproj/project.pbxproj: Added KWQColorData.gperf.
* khtml/misc/helper.cpp: (khtml::setNamedColor): Don't call setNamedColor again with the lowercased
color name, since our QColor::setNamedColor already has to lowercase the name (because it has to check
all names before checking any hex values).
* khtml/rendering/font.h: Don't initialize the QFontMetrics since in every case we end up changing
the font later anyway. Also remove unused field.
* khtml/rendering/font.cpp: (Font::update): Use the new QFontMetrics::setFont for speed.
* khtml/rendering/render_object.cpp: (RenderObject::enclosingLayer): Change it so it doesn't get
the layer twice. This function showed up on the sample so we know it's hot.
* khtml/xml/dom_stringimpl.cpp: (DOMStringImpl::containsOnlyWhitespace): Did a faster implementation
that doesn't call QChar::direction() except for non-ASCII characters.
* kwq/KWQFontMetrics.h: Add empty constructor for use in font.cpp. Add accessor and setter for the
font too. Made baselineOffset() inline since it's trivial.
* kwq/KWQFontMetrics.mm:
(QFontMetricsPrivate::QFontMetricsPrivate): Don't make the renderer until we use it.
(QFontMetricsPrivate::getRenderer): Make it here.
(QFontMetricsPrivate::font): Added.
(QFontMetricsPrivate::setFont): Added. Dumps the renderer if the font is different.
(QFontMetrics::QFontMetrics): Added empty constructor.
(QFontMetrics::setFont): Added.
* kwq/KWQKURL.mm: (KURL::parse): Avoid function call overhead calling strncasecmp and strncmp.
Also made the check for localhost case insensitive.
* kwq/KWQString.h: Remove _isUnicodeInternal and _isAsciiInternal, since they are trivially
computed, and it saves time to not have that extra field to manipulate. Removed private
data() function since it's the same as *dataHandle and not really more clear. Made ascii()
and unicode() simpler and inline. Also made latin1() and getCFString() inline. Renamed
QStringData to KWQStringData.
* kwq/KWQString.mm:
(QStringData::QStringData): Remove initializers for the xxxInternal.
(QStringData::initialize): Removed some unnecessary if statements, and made a slight improvement
in the case of a 0-length string that comes with a pointer for Unicode (can't do it in the
char * case because it's a feature that's used).
(QString::makeSharedNull): No need to set _isUnicodeInternal.
(QStringData::~QStringData): Use the new functions instead of the old bits.
(QStringData::increaseAsciiSize): Grow faster when we get to larger sizes where the "good size"
call doesn't have as much of an effect. Simplified by removing unneeded code.
(QStringData::increaseUnicodeSize): Ditto.
(QStringData::makeAscii): Update for removal of _isAsciiInternal.
(QStringData::makeUnicode): Update for removal of _isUnicodeInternal.
(QString::detachIfInternal): Add this new inline to speed things up for the common case where
there's no detaching needed.
(QString::at): Simplify, there were excess if branches here.
(QString::toDouble): Use kjs_strtod and don't copy the string using QCString for additional speed.
(QString::lower): Don't detach if the string is already all lowercase. Added a FIXME about the
code that assumes all "ASCII" bytes are truly ASCII. This code blurs the distinction between Latin-1
and ASCII in a way that will not work right for Latin-1 characters in an 8-byte character QString.
(QString::detachInternal): Update for removal of _isUnicodeInternal.
(QString::detach): Removed a special case for shared_null that was dead code since shared_null has
the _isUnicodeValid flag set.
(operator==): Rewrote the comparison with char * to avoid the costly call to strlen.
* Makefile.am: Updated the rules here so the force clean timestamp works right.
* force-clean-timestamp: Touched this since the header dependencies don't seem right
for the DOMString constructor change, at least.
* WebCore-tests.exp: Exported a symbol now needed by tests since QString does more inlining.
* WebCore-combined.exp: Re-generated.
2002-12-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- slightly improved situation with 3124933 (abcnews.com leads to
empty window with sheet complaining about javascript: URL); the
popup window still comes up empty but it doesn't put up a sheet.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::openURLRequest): Handled "javascript:"
URLs here.
2002-12-14 David Hyatt <hyatt@apple.com>
Fix insidemacgames.com. Reinstate rules I removed
and fix other rules to be !important so that the
td[align=right] rules won't affect child tables
with align=center.
Reviewed by gramps
* khtml/css/html4.css:
2002-12-14 David Hyatt <hyatt@apple.com>
Fix for 3016385, menus on webreference.com don't show up.
Fixes to make webreference.com menus show up. This involved
fixing layers to not clip positioned objects when overflow:hidden
is set, fixing the stupid clip/sync layout hack for livepage
so that it doesn't break webreference, and implementing
navigator.productSub (right now the date is set to
Christmas 2002).
Reviewed by gramps/maciej.
* khtml/ecma/kjs_navigator.cpp:
(Navigator::getValueProperty):
* khtml/ecma/kjs_navigator.h:
* khtml/ecma/kjs_navigator.lut.h:
* khtml/rendering/render_box.cpp:
(RenderBox::getOverflowClipRect):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
* khtml/rendering/render_object.h:
2002-12-14 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
Radar 3128159 (Netscape non-standard DOM event attribute "which" unsupported)
* khtml/dom/dom2_events.cpp:
(UIEvent::which): Added which() definition.
* khtml/dom/dom2_events.h: Added declarations for which() functions in UIEvent.
* khtml/ecma/kjs_events.cpp:
(DOMUIEvent::getValueProperty): Added which property.
* khtml/ecma/kjs_events.h: Ditto.
* khtml/ecma/kjs_events.lut.h: File regenerated.
2002-12-13 Richard Williamson <rjw@apple.com>
Fixed 3127310 and 3127920.
Implemented findWordBoundary. We now correctly detect word boundaries.
This function makes use of carbon unicode utilities.
With help from hyatt, made selection correctly account for render
continuations. This fixes many of the 'unable to select' issues.
Reviewed by trey and hyatt.
* khtml/khtml_events.cpp:
(khtml::MouseEvent::offset):
* khtml/khtml_part.cpp:
(findWordBoundary):
(KHTMLPart::khtmlMousePressEvent):
(KHTMLPart::khtmlMouseMoveEvent):
* khtml/rendering/render_object.cpp:
(RenderObject::checkSelectionPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(RenderText::checkSelectionPoint):
* khtml/rendering/render_text.h:
2002-12-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- fixed build.
* ForwardingHeaders/rendering/render_layer.h: Added.
2002-12-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- fixed 3114737 - DHTML image content mispositioned on lexus.com
* khtml/dom/dom2_events.cpp:
(UIEvent::layerX): Added to support nonstandard Mozilla
event.layerX property.
(UIEvent::layerY): Added to support nonstandard Mozilla
event.layerY property.
* khtml/dom/dom2_events.h:
* khtml/ecma/kjs_events.cpp:
(DOMUIEvent::getValueProperty): Implemented layerX and layerY
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_events.lut.h:
* khtml/xml/dom2_eventsimpl.cpp:
(MouseEventImpl::MouseEventImpl): Added call to computeLayerPos.
(MouseEventImpl::computeLayerPos): Compute layer position.
(MouseEventImpl::layerX): Added.
(MouseEventImpl::layerY): Added.
(MouseEventImpl::initMouseEvent): Added call to computeLayerPos.
* khtml/xml/dom2_eventsimpl.h:
2002-12-13 David Hyatt <hyatt@apple.com>
Fix for 314799, image at wired.com doesn't show up. Block
level replaced floating elements were being treated as though
they didn't float.
Reviewed by gramps
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-12-13 David Hyatt <hyatt@apple.com>
Fix for 3098045.
Do not treat XHTML-style tags e.g., <br/> or <table/> as
self-closing. This is absolutely wrong, and it does not
match the behavior of other browsers. According to the HTML4
spec for parsing, / is an erroneous character and should simply
be dropped, so <table/> should be treated like <table>.
Fixes for crashes on glazman's blog and on tantek's blog. Both
still mis-render, but at least they don't crash.
Reviewed by gramps (and darin too)
* khtml/html/htmltokenizer.cpp:
* khtml/rendering/render_container.cpp:
* khtml/rendering/render_style.cpp:
=== Alexander-37u1 ===
2002-12-13 David Hyatt <hyatt@apple.com>
Two fixes. Bugs are 3121024, which had to do with handling
escaped characters in the CSS content property, and
bug 3127375 (44854 in bugs.kde.org), which had to do with
making sure table cells relayout properly when images load
async.
Reviewed by darin and john
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseContent):
(StyleBaseImpl::isHexadecimal):
* khtml/css/cssparser.h:
* khtml/rendering/bidi.cpp:
(RenderFlow::layoutInlineChildren):
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
* khtml/rendering/render_flow.h:
2002-12-13 Darin Adler <darin@apple.com>
Reviewed by Trey.
- moved KWQFontFamily and KWQPageState to new homes
* kwq/KWQFontFamily.h: Added.
* kwq/KWQFontFamily.mm: Added.
* kwq/KWQPageState.h: Added.
* kwq/KWQPageState.mm: Added.
* WebCore.pbproj/project.pbxproj: Added new source files.
* kwq/KWQFont.h: Removed KWQFontFamily.
* kwq/KWQFont.mm: Removed KWQFontFamily.
* kwq/WebCoreBridge.mm: Removed KWQPageState.
2002-12-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3083814 - dhtml at www.bayarea.com doesn't hide on some mouse movements
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_events.cpp:
(DOMUIEvent::getValueProperty): Implemented pageX and pageY properties.
* khtml/ecma/kjs_events.lut.h: Regenerated.
* khtml/dom/dom2_events.h:
* khtml/dom/dom2_events.cpp:
(UIEvent::pageX): Get x coordinate if a mouse event.
(UIEvent::pageY): Get y coordinate if a mouse event.
2002-12-13 Richard Williamson <rjw@apple.com>
Fixed 3127225. Set WebCore object cache size when first bridge is created.
Reviewed by gramps.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge init]):
2002-12-13 Darin Adler <darin@apple.com>
Reviewed by John.
Overall speedup on cvs-base is about 5%.
- reduce QString use in the tokenizer and tighten up QString implementation for a speedup
- fix up the QFontFamily implementation, using new QString features too, for a speedup
* khtml/html/htmltokenizer.h: Take const QString & instead of QString to avoid an extra copy.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::begin): Use QString::null instead of "" for QString objects; faster.
(HTMLTokenizer::scriptHandler): In APPLE_CHANGES, use new prepend that avoids the need to
create a temporary QString. Use QString::null instead of QString() for a null string, and
also made other small fixes to avoid temporary QStrings.
(HTMLTokenizer::setSrc): Take const QString & instead of QString to avoid an extra copy.
* kwq/KWQFont.h: Rename QFontFamily to KWQFontFamily. Make family() inline, add inline
familyIsEmpty(). Change KWQFontFamily to store both the QString for the family and the
NSString instead of only the NSString to avoid constant conversions back and forth.
Remove type cases in CREATE_FAMILY_ARRAY that could result in copying the font object.
* kwq/KWQFont.mm:
(KWQFontFamily::KWQFontFamily): Fix bug where a copied family object would have a random
ref count instead of a ref count of 0. Also update for NSString change.
(KWQFontFamily::operator=): Use the ref before deref algorithm instead of the check for
self-assignment.
(KWQFontFamily::getNSFamily): Compute the NSString for the family name here. To avoid
making an NSString every time, use a CFDictionary with QString as a key and NSString as
a value instead of using an NSSet.
(KWQFontFamily::setFamily): Invalidate the NSString family when the QString family is
changed. Moved the code to make things unique to getNSFamily.
(KWQFontFamily::operator==): Call getNSFamily rather than
* kwq/KWQString.h: Added a prepend and insert overload that take a QChar pointer and length, for
use in the tokenizer, and a hash function, for use in CFDictionary. Also added a global set of
CFDictionaryKeyCallBacks.
* kwq/KWQString.mm:
(QString::prepend): New overload calls new insert overload.
(QString::insert): Old insert slightly tightened by calling detach() only after the early exit
and removing an extra detach from a function that already does forceUnicode. Added the new insert
that takes a QChar * and a length.
(operator==): Rewrite this so that it is efficient and doesn't involve creating a QString temporary
or doing a function call.
(QString::hash): Wrote this. Used the same hash algorithm I did in my recent KJS work.
(retainQString): Added. For use in CFDictionaryKey callback.
(releaseQString): Added. For use in CFDictionaryKey callback.
(describeQString): Added. For use in CFDictionaryKey callback.
(equalQString): Added. For use in CFDictionaryKey callback.
(hashQString): Added. For use in CFDictionaryKey callback.
* khtml/rendering/font.h: Change name to KWQFontFamily.
* khtml/rendering/font.cpp: (Font::update): Call familyIsEmpty() instead of family().isEmpty()
to avoid making and destroying a QString every time. Also put this batch of KWQFontFamily-specific
changes inside #if APPLE_CHANGES. Much to my dismay, we have others elsewhere that aren't ifdef'd.
* khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule): Change name to KWQFontFamily.
Clearly this code needs some #if APPLE_CHANGES, and changing the class name helps make that clear.
- change KHTMLSettings so using it doesn't require copying QStrings for a speedup
* kwq/KWQKHTMLSettings.h: Made all the functions static members to avoid the unnecessary
overhead of passing a this pointer. Added lots of setXXX functions for use by the WebCoreSettings
code that gets called by WebKit when settings are changed. Return objects by reference because we
can and it avoids copying QString objects.
* kwq/KWQKHTMLSettings.mm: Changed all the functions in here to return the same global object
each time, and made the set functions update those globals.
* kwq/WebCoreSettings.mm: All the setters now call through to KHTMLSettings set functions.
- fixed 3126513 -- crash in KWQKHTMLPart::clearTimers() deallocating KWQPageState
- did some cleanup in the bridge and the part; part of the process of moving real work out of the bridge
* kwq/KWQKHTMLPart.h: Rearrange things to be a little more logical. Mark isFrameSet() const.
added an attributedString function here so it's not inside WebCoreBridge. Added an overload
of clearTimers that takes a view parameter.
* kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Mark this const.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clearTimers): Add the overload that takes the view parameter.
(KWQKHTMLPart::attributedString): Moved this code in here from the bridge.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectedAttributedString]): Call the attributedString function in its new home in
KWQKHTMLPart.
(-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]):
Take a const KURL & instead of a KURL to avoid unnecessary copying.
(-[KWQPageState dealloc]): Call the new clearTimers that takes a view parameter. This should fix the
crash in autorelease pool deallocation mentioned above.
2002-12-13 David Hyatt <hyatt@apple.com>
Fix for 3121865, content missing at disney.com. Make
sure blocks track width overflow as well as height
overflow and ensure that a layer's dimensions expand
to encompass both width and height overflow.
Also fixes a bug with line breaking that allowed unbreakable
words to actually be broken up when they were the only word
on a line. This is wrong and differs from all other
browsers, so the patch in bidi.cpp fixes us to match
other browsers. (This was required to fix the above bug.)
Reviewed by mjs.
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
* khtml/rendering/render_flow.cpp:
(RenderFlow::RenderFlow):
(RenderFlow::layout):
(RenderFlow::layoutBlockChildren):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPosition):
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_table.h:
2002-12-12 Richard Williamson <rjw@apple.com>
Fixed 3116584. Made letter-spacing, word-spacing, and text-decoration play
well together.
Reviewed by hyatt.
Changes made with trey to enable to release of page cache from the
"Empty Cache" menu item in Alex.
Reviewed by trey.
* khtml/rendering/font.cpp:
(Font::drawLineForText):
(Font::drawText):
* khtml/rendering/font.h:
* khtml/rendering/render_text.cpp:
(TextSlave::paintDecoration):
(RenderText::paintObject):
* khtml/rendering/render_text.h:
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawLineForText):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dealloc]):
(-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
(-[KWQPageState invalidate]):
(-[KWQPageState dealloc]):
* kwq/WebCoreTextRenderer.h:
2002-12-12 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej and Darin
Final fix for this bug:
Radar 3062858 (REGRESSION: failed login at www.usaa.com doesn't return error text)
We were down to a case where submitting the login form with the return key
failed since we did not implement either non-standard keyCode (IE-style) or
which (Netscape-style) UI event extension for getting the value of a key
press. The form submission code depended on sensing the value of the
key press by checking one of these properties.
Since the "which" property also can be used for mouse events, and fixing
this bug could be done by implementing either keyCode or which, I chose
to implement keyCode only.
* khtml/dom/dom2_events.cpp: Added keyCode function definition.
* khtml/dom/dom2_events.h: Added keyCode function declaration.
* khtml/ecma/kjs_events.cpp:
(DOMUIEvent::getValueProperty): Added new KeyCode attribute.
* khtml/ecma/kjs_events.h: New generated file.
* khtml/ecma/kjs_events.lut.h: Ditto.
* khtml/xml/dom2_eventsimpl.cpp:
(KeyEventImpl::KeyEventImpl): Fixed a bug in khtml that prevented the
m_keyVal field on KeyEventImpl from ever being set correctly.
I guess I am the first person ever to care about that value. :-)
=== Alexander-36 ===
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3126042 -- Failure to send onkeypress event on key down causes forms to submit incorrectly
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Fixed the code to send the second event with repeat
set equal to true. Before it was constructing the event but never sending it because result was true.
Also fixed a problem where it was considering sending a second mouse up event. What we're doing here
is a bit of a hack and probably should be fixed -- it seems that the behavior in dispatchKeyEvent where
it sends only a down and not a press for the a non-autorepeat event is a KHTML bug that we should fix
instead of work around eventually.
- fix to something that made this harder to debug
* khtml/xml/dom2_eventsimpl.cpp: (KeyEventImpl::KeyEventImpl): Logging the type was showing the wrong
type, and I narrowed it down to this code here. Changing m_id after the fact doesn't change the type
string, so you need to compute the correct ID and pass it to the constructor.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3125886 -- Failure to set document onkeypress handler causes return key to submit forms incorrectly
The handler was getting ignored because the property setting code never got to the DOMNode level.
* khtml/ecma/kjs_dom.cpp: (DOMDocument::tryPut): Pass correct parent class, DOMNode, instead
of DOMObject. By passing DOMObject, we skipped all the properties inherited from DOMNode,
including onkeypress.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Trey and Ken.
- fixed 3125613 -- REGRESSION: resizing frames after clicking on scroll bar doesn't work right
The problem was that the mouse dragged events were going to the scroll bar because the new click
on the frame resizer didn't fall into the code path that sets _mouseDownView.
* kwq/KWQKHTMLPart.h: Add override of khtmlMouseMoveEvent.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Don't set _mouseDownView. This is now handled
at the higher level when the mouseDown comes in.
(KWQKHTMLPart::khtmlMouseMoveEvent): Added. Pass along mouseDragged: events. I didn't have this
before because I don't want or need to pass mouseMoved: events along, but the KHTML mouse move
event corresponds to both AppKit mouseDragged and mouseMoved.
(KWQKHTMLPart::khtmlMouseReleaseEvent): Don't clear _mouseDownView. This is now handled at the
higher level when the mouseUp comes in.
(KWQKHTMLPart::passSubframeEventToSubframe): Ditto.
(KWQKHTMLPart::mouseDown): Set _mouseDownView to nil; it will be set by passWidgetMouseDownEventToWidget
if we end up passing the event down. This is the change that actually fixes the bug mentioned above.
(KWQKHTMLPart::mouseUp): Set _mouseDownView to nil after handling the mouseUp. It's OK if we don't
clear this out in cases where we don't get a mouseUp event -- we'll get a mouseDown later -- but it's
still probably a good idea to clear it when we know the mouse is no longer down.
- used update-kwq-assert to update the code that's a shared copy of WebFoundation code
* kwq/KWQAssertions.m: (vprintf_stderr_objc): Got the UTF-8 fix I did a while back.
2002-12-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* force-js-clean-timestamp: Update for JavaScriptCore changes.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3125504 -- REGRESSION: Selection not working correctly for text area on http://glish.com/css/7.asp
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): Call makeFirstResponder here explicitly,
since we are disabling the makeFirstResponder that normally happens during window event dispatching
in WebKit.
* kwq/KWQScrollView.h: Define getDocumentView().
* kwq/KWQScrollView.mm: Use getDocumentView() everywhere.
(QScrollView::getDocumentView): Define it here.
2002-12-12 Darin Adler <darin@apple.com>
Reviewed by Maciej and Richard.
- fixed 3125497 -- REGRESSION: Infinite recursion with mouseUp: events
The problem was that events could end up back at the same part due to the responder chain.
* kwq/KWQKHTMLPart.h: Added mouseDown, mouseDragged, mouseUp, mouseMoved, buttonForCurrentEvent,
and stateForCurrentEvent. Remove setCurrentEvent and currentEvent. Renamed handleMouseDownEventForWidget
to passWidgetMouseDownEventToWidget. John and I had agreed to this name change before the last commit,
but I forgot.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Initialize _sendingEventToSubview to false. No need to initialize
_mouseDownWasInSubframe at all since it's only looked at when _mouseDownView is non-nil.
(KWQKHTMLPart::keyEvent): Save and restore _currentEvent instead of setting to nil.
Use stateForCurrentEvent instead of stateForEvent:.
(KWQKHTMLPart::khtmlMousePressEvent): Name change.
(KWQKHTMLPart::khtmlMouseDoubleClickEvent): Name change.
(KWQKHTMLPart::passWidgetMouseDownEventToWidget): Name change. Set _sendingEventToSubview when
sending event to subview.
(KWQKHTMLPart::khtmlMouseReleaseEvent): Name change. Set _sendingEventToSubview when sending
event to subview.
(KWQKHTMLPart::passSubframeEventToSubframe): Name change. Set _sendingEventToSubview when
sending event to subview.
(KWQKHTMLPart::buttonForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
(KWQKHTMLPart::stateForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
(KWQKHTMLPart::mouseDown): Added. Similar to code I moved here from WebCoreBridge, except returns
and does nothing if _sendingEventToSubview is set.
(KWQKHTMLPart::mouseDragged): Ditto.
(KWQKHTMLPart::mouseUp): Ditto.
(KWQKHTMLPart::mouseMoved): Added. Similar to code I moved here from WebCoreBridge.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge mouseDown:]): Just call _part->mouseDown().
(-[WebCoreBridge mouseDragged:]): Just call _part->mouseDragged().
(-[WebCoreBridge mouseUp:]): Just call _part->mouseUp().
(-[WebCoreBridge mouseMoved:]): Just call _part->mouseMoved().
* kwq/WebCoreBridgePrivate.h: Removed.
* WebCore.pbproj/project.pbxproj: Removed WebCoreBridgePrivate.h.
2002-12-12 Richard Williamson <rjw@apple.com>
Fixed 3125583. Don't redraw view under resize bar
on mouseup.
Reviewed by gramps.
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::userResize):
2002-12-11 David Hyatt <hyatt@apple.com>
Fix hang on monkeyvoodoo.net and on skramkoob.com. The bugs
are 3105714 and 3045965. Also fix margin collapsing churn
on thestar by not laying out a second time when collapsing
margins make you move unless you contain floats.
Reviewed by: gramps
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren);
2002-12-11 Richard Williamson <rjw@apple.com>
Fixed 3124121, 3124716 (and other dupes). Regressions related to b/f crash.
Reviewed by hyatt.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURLFromPageCache):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge dealloc]):
(-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
2002-12-11 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3124263 -- REGRESSION: Crash running development build of PLT
* kwq/KWQWidget.mm:
(QWidget::~QWidget): Don't worry about the outer view here, since we can never hit one of those.
Just pass the view to KWQKHTMLPart::widgetWillReleaseView.
(QWidget::getOuterView): Re-add the assertion I had removed.
- fixed 3124837 -- Crash trying to handle weird javascript URL in page address field
* kwq/KWQKURL.mm: (KURL::decode_string): Made this function return the URL still encoded
rather than a null string (actually, crashing) when CFURLCreateStringByReplacingPercentEscapes
rejects the passed-in string. Also updated the FIXME.
(appendEscapingBadChars): Fixed problem with high-bit-set characters.
* kwq/KWQString.mm: (QString::setBufferFromCFString): Made this tolerant of NULL.
2002-12-11 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed handling of mouse events so I could turn the mechanism on all the way
- fixed anomalies in the red-painting-for-null-view-detection
- fixed 3123105 -- REGRESSION: Crash in KHTMLView::unscheduleRelayout on exit
- fixed 3124047 -- REGRESSION: crash in KWQKHTMLPart::handleMouseDownEventForWidget at nwa.com
* kwq/KWQKHTMLPart.h: Add setCurrentEvent()/currentEvent()/_currentEvent back, because we can
end up doing a lot of work and processing a lot of events before we get around to handling the
current event, so [NSApp currentEvent] won't cut it. Also add clearTimers, passSubframeEventToSubframe,
an overload for handleMouseDownEventForWidget, and _mouseDownWasInSubframe boolean.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::submitForm): Use _currentEvent.
(KWQKHTMLPart::urlSelected): Use _currentEvent.
(KWQKHTMLPart::paint): Fixed red-drawing-for-debug code by using KWQPainter instead of going
directly to the AppKit level.
(KWQKHTMLPart::keyEvent): Moved the check for null node up a bit, and set _currentEvent.
(KWQKHTMLPart::handleMouseDownEventForWidget): Break into two pieces, so we can share the
code with the new passSubframeEventToSubframe. Set _mouseDownWasInSubframe to false
when setting _mouseDownView. Use getView() instead of getOuterView() since we really don't
care about the WebView after all. Use _currentEvent. Add a check for nodes that lack a renderer
to fix the crash at nwa.com above.
(KWQKHTMLPart::khtmlMouseReleaseEvent): Use _currentEvent.
(KWQKHTMLPart::clearTimers): Added. Checks for null view, which fixes the crash on exit above.
(KWQKHTMLPart::passSubframeEventToSubframe): Added. Checks for the categories of events that we
can pass to subframes, which are mouse down, up, and dragged events, and passes them along.
This is the main fix that makes subframes work properly.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMousePressEvent): Add call to the new passSubframeEventToSubframe.
(KHTMLView::viewportMouseDoubleClickEvent): Ditto.
(KHTMLView::viewportMouseMoveEvent): Ditto.
(KHTMLView::viewportMouseReleaseEvent): Ditto.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge saveDocumentToPageCache]): Call clearTimers on the part now, instead of the document.
(-[WebCoreBridge mouseUp:]): Call setCurrentEvent.
(-[WebCoreBridge mouseDown:]): Ditto.
(-[WebCoreBridge mouseMoved:]): Ditto.
(-[WebCoreBridge mouseDragged:]): Ditto.
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:]): Call clearTimers on the
part now, instead of the document.
- other changes
* khtml/ecma/kjs_window.lut.h: Let this be regenerated. I think I accidentally checked
in an obsolete version of this earlier.
* khtml/html/html_documentimpl.h: Remove clearTimers(). We don't need it here in APPLE_CHANGES.
* khtml/html/html_documentimpl.cpp: Ditto.
* khtml/khtmlpart_p.h: Removed unneeded APPLE_CHANGES. We don't use m_frameNameId any more, nor
do we need m_savingPageState or m_restoringPageState.
* khtml/khtml_part.cpp: (KHTMLPart::clear): Removed unneeded APPLE_CHANGES, now that we don't
use m_frameNameId any more.
* kwq/KWQWidget.mm: (KWQWidget::getOuterView): Tolerate nil for view here, so we can use this from
the QWidget destructor.
2002-12-11 Darin Adler <darin@apple.com>
Rolled out changes I accidentally checked in last night.
2002-12-10 John Sullivan <sullivan@apple.com>
Fixed more "Alexander"s that were lurking in places I forgot
to look before.
Reviewed by Darin
* Makefile.am:
"rm -rf $(SYMROOTS)/Safari.app/Frameworks/WebCore.framework"
2002-12-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Don.
- really fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
http://www.pixar.com/howwedoit/
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Call Cache::init before
KHTMLPart::init so we have a loader to connect the signals to.
2002-12-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3123727 - SJ: Viewmaster arm sometimes doesn't animate on
http://www.pixar.com/howwedoit/
* khtml/khtml_part.cpp:
(KHTMLPart::KHTMLPart): Don't call KHTMLPart::init at all...
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Call it here instead so that signal
connections happen properly.
2002-12-10 David Hyatt <hyatt@apple.com>
Fix for 3116996. My hack to make selects ignore fixed CSS
widths that are smaller than their intrinsic width was not
good. Remove the hack.
Reviewed by darin
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
2002-12-10 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3108912 -- onclick handlers not supported on form elements
We now pass the events back to the NSView here in WebCore; they pass through all the
machinery in the DOM before getting sent on.
* kwq/KWQKHTMLPart.h: Add widgetWillReleaseView and handleMouseDownEventForWidget functions,
overrides for khtmlMousePressEvent, khtmlMouseDoubleClickEvent, khtmlMouseReleaseEvent, and
a new _mouseDownView field.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Initialize _mouseDownView to nil.
(KWQKHTMLPart::khtmlMousePressEvent): Call handleMouseDownEventForWidget, but if it returns
false call through to the base class function.
(KWQKHTMLPart::khtmlMouseDoubleClickEvent): Ditto.
(KWQKHTMLPart::handleMouseDownEventForWidget): Do a hit test to find out which view to send
the mouse down event to, and then send it.
(KWQKHTMLPart::khtmlMouseReleaseEvent): Send the mouse up event to the view we sent a mouse
down event to, or call through to the base class otherwise.
(KWQKHTMLPart::widgetWillReleaseView): Clear out the _mouseDownView field if the view is
being released by the QWidget that owns it.
* kwq/KWQWidget.mm:
(QWidget::~QWidget): Call KWQKHTMLPart::widgetWillReleaseView.
(QWidget::setView): Call KWQKHTMLPart::widgetWillReleaseView on the old view.
2002-12-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* WebCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
2002-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3117734 - fail at document.releaseEvents in js at rollingstone.com
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall): Added no-op implementations of
captureEvents and releaseEvents.
(KJS::HTMLDocument::tryGet):
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_window.cpp:
(Window::get, WindowFunc::tryCall): Added no-op implementation of
releaseEvents.
* khtml/ecma/kjs_window.h:
* khtml/ecma/kjs_html.lut.h: Regenerated.
* khtml/ecma/kjs_window.lut.h: Regenerated.
2002-12-09 David Hyatt <hyatt@apple.com>
Fix for the CSS test suite link. Need to make sure inlines
that are obscured by blocks are properly considered to be
above the block background.
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
2002-12-09 Darin Adler <darin@apple.com>
Reviewed by Trey.
- made KWQKHTMLPart a subclass of KHTMLPart so we can override virtual functions
* khtml/khtml_part.h: Get rid of kwq pointer.
* khtml/khtml_part.cpp:
(KHTMLPart::init): No need to make a KWQKHTMLPart any more.
(KHTMLPart::~KHTMLPart): No need to delete a KWQKHTMLPart any more.
(KHTMLPart::closeURL): KWQKHTMLPart does saveDocumentState in an override now.
(KHTMLPart::begin): KWQ() instead of ->kwq.
(KHTMLPart::checkCompleted): KWQ() instead of ->kwq, and ifdef out some unneeded code.
(KHTMLPart::urlSelected): KWQ() instead of ->kwq.
(KHTMLPart::requestFrameName): KWQ() instead of ->kwq.
(KHTMLPart::processObjectRequest): Just call openURL, since we are now KWQKHTMLPart.
(KHTMLPart::submitForm): KWQ() instead of ->kwq.
(KHTMLPart::popupMenu): Did a bit more ifdef'int out here.
* kwq/KWQKHTMLPart.h: Include "khtml_part.h" and remove includes we don't need any more.
Inherit from KHTMLPart instead of QObject. Remove KHTMLPart parameter from constructor.
Override openURL and closeURL. Remove part and d pointers. Add KWQ() inline to avoid casting.
* kwq/KWQKHTMLPart.mm:
(KHTMLPart::completed): KWQ() instead of ->kwq.
(KHTMLPart::openURL): Never reached now, since we override.
(KHTMLPart::setStatusBarText): KWQ() instead of ->kwq.
(KHTMLPart::started): KWQ() instead of ->kwq.
(KWQKHTMLPart::KWQKHTMLPart): No need to deal with separate part.
(KWQKHTMLPart::bridgeForFrameName): KWQ() instead of ->kwq.
(KWQKHTMLPart::openURL): Add bool return value so we can override the existing openURL.
(KWQKHTMLPart::slotData): Remove unneeded part->.
(KWQKHTMLPart::setView): Remove unneeded part->.
(KWQKHTMLPart::document): Remove unneeded part->.
(KWQKHTMLPart::renderer): Remove unneeded part->.
(KWQKHTMLPart::userAgent): Remove unneeded part->.
(KWQKHTMLPart::nextKeyViewInFrame): KWQ() instead of ->kwq.
(KWQKHTMLPart::nextKeyViewInFrameHierarchy): KWQ() instead of ->kwq.
(KWQKHTMLPart::canCachePage): Remove unneeded part->.
(KWQKHTMLPart::saveWindowProperties): Use this instead of part.
(KWQKHTMLPart::saveLocationProperties): Use this instead of part.
(KWQKHTMLPart::restoreWindowProperties): Use this instead of part.
(KWQKHTMLPart::restoreLocationProperties): Use this instead of part.
(KWQKHTMLPart::openURLFromPageCache): Remove unneeded part->.
(KWQKHTMLPart::partForNode): KWQ() instead of ->kwq.
(KWQKHTMLPart::updatePolicyBaseURL): Remove unneeded part->.
(KWQKHTMLPart::setPolicyBaseURL): Remove unneeded part->.
(KWQKHTMLPart::createDummyDocument): Use this instead of part.
(KWQKHTMLPart::scrollToAnchor): Remove unneeded part->.
(KWQKHTMLPart::closeURL): Added. Calls saveDocumentState().
* kwq/WebCoreBridge.h: Use KWQKHTMLPart instead of KHTMLPart.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge init]): Make a KWQKHTMLPart.
Use _part instead of _part->kwq in the rest of the file.
* kwq/KWQSignal.mm: (KWQSignal::disconnect): Add the names of a few signals that are
disconnected after the KWQKHTMLPart part of the KHTMLPart is destroyed, to avoid noise.
* khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty): KWQ() instead of ->kwq.
* khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript): KWQ() instead of ->kwq.
* khtml/ecma/kjs_window.cpp:
(Window::scheduleClose): KWQ() instead of ->kwq.
(WindowFunc::tryCall): KWQ() instead of ->kwq.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle): KWQ() instead of ->kwq.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::openURLRequest): KWQ() instead of ->kwq.
(KHTMLPartBrowserExtension::createNewWindow): KWQ() instead of ->kwq.
(KHTMLPartBrowserExtension::setIconURL): KWQ() instead of ->kwq.
(KHTMLPartBrowserExtension::setTypedIconURL): KWQ() instead of ->kwq.
* kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::showApplet): KWQ() instead of ->kwq.
* kwq/KWQLoader.mm:
(KWQServeRequest): Cast to KWQKHTMLPart instead of casting to KHTMLPart and doing ->kwq.
(KWQCheckIfReloading): Ditto.
(KWQCheckCacheObjectStatus): Ditto.
* WebCore.pbproj/project.pbxproj: Let Electron punish the wicked.
2002-12-09 Richard Williamson <rjw@apple.com>
Many changes for b/f list.
1. Always attempt to cache snap back items.
2. Lazily release resources from page cache. This garners gains on the PLT (and presumably iBench) tests, both for uncached.
3. Set the page cache size to 4 (+ snap back items). After releasing resources we hover around 28MB footprint. Closing windows releases all resources.
4. Turn on the back/forward cache by default. The menu item still allows you to toggle b/f on and off. Useful when conducting speed comparison in the PLT.
5. Addition of lazy update to PLT memory statistics to show footprint after lazy release of page cache resources.
6. Delayed to leak detector to account for lazy release of resources.
7. A change when saving a page to back/forward cache to clear and restore the documents root renderer. Without this fix pages would appear to 'flicker' more when content arrived.
8. A change to ensure a layout when restoring a page from the b/f cache. Without this fix scrollbars wouldn't appear correctly.
9. A change to ensure that khtmlview layout and paint timers are unscheduled when a page is placed in the b/f cache.
10. A fix to decouple of khtmlview from it's part when placed in the b/f cache. This fixed a crash caused by inappropriate deference of the part when a page cache item was released.
11. A comment in KHTMLPageCache.h explaining the that our page cache is not the same as the khtml page cache. (Their cache just cached the html source.)
12. Reapply styles when loading page from cache. This ensures that visited link get the appropriate style.
Reviewed by kocienda.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::clearTimers):
* khtml/html/html_documentimpl.h:
* khtml/khtmlview.cpp:
(KHTMLView::clearPart):
(KHTMLView::timerEvent):
* khtml/khtmlview.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::restoreRenderer):
(DocumentImpl::detach):
* khtml/xml/dom_docimpl.h:
* kwq/KWQKHTMLPageCache.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
(-[WebCoreBridge saveDocumentToPageCache]):
(-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
(-[KWQPageState dealloc]):
(-[KWQPageState KJS::]):
(-[KWQPageState khtml::]):
2002-12-08 Trey Matteson <trey@apple.com>
Fixed 3115903 - exchangehomes.com sometimes has form state poorly restored
KHTML is much smarter about restoring form state now, taking into account element names and
types instead of blindly blasting data by simple element ordering. We encode the name
and type at the front of the "state" strings that previously just held the value of the
element.
QString::endsWith() was just plain wrong. Looks like it had some copied code, but was
never really implemented.
Reviewed by: Darin Adler
* WebCore.pbproj/project.pbxproj: PB is hellbent on adding "shouldUseHeadermap = 0;"
* khtml/html/html_formimpl.cpp:
(encodedElementName): Utility func to encode an element name, escaping amp and lt
(HTMLGenericFormElementImpl::state): Build the prefix of an element's state string,
e.g. ELEMENT_NAME&ELEMENT_TYPE&
(HTMLGenericFormElementImpl::findMatchingState): Find a matching piece of state out of
the list of state strings that were previously saved.
(HTMLFieldSetElementImpl::type): Return our element type.
(HTMLInputElementImpl::state): Call super as part of building state string.
(HTMLInputElementImpl::restoreState): Use findMatchingState.
(HTMLLegendElementImpl::type): Return our element type.
(HTMLSelectElementImpl::state): Call super as part of building state string.
(HTMLSelectElementImpl::restoreState): Use findMatchingState.
(HTMLKeygenElementImpl::type): Return our element type.
(HTMLOptGroupElementImpl::type): Return our element type.
(HTMLOptionElementImpl::type): Return our element type.
(HTMLTextAreaElementImpl::state): Call super as part of building state string.
(HTMLTextAreaElementImpl::restoreState): Use findMatchingState.
* khtml/html/html_formimpl.h: type() is moved up to HTMLGenericFormElementImpl
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode): Pass list of states to restoreState.
(KHTMLParser::popOneBlock): Pass list of states to restoreState.
* khtml/xml/dom_docimpl.h: Add method to return the whole list of form states.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::restoreState): Nodes receive the whole list of form states to restore from,
not just a single state that has already been chosen.
* khtml/xml/dom_nodeimpl.h:
* kwq/KWQString.mm:
(QString::endsWith): Walk the search string correctly.
2002-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3103954 - preferences not displayed properly at excite.com
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::value): If a radio or checkbox input has a
value, return that rather than something based on the checked
state. Only fall back on the checked state if there is no value.
2002-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3103036 - REGRESSION: scripts dropped from DOM tree;
javascript text rendered to screen
The problem here is that we don't allow SCRIPT inside MAP, so the
script tag gets thrown away in the DOM and the text is added
directly to the MAP. I can't see a good reason not to allow SCRIPT
here, so I think the best thing to do is relax the DTD.
* khtml/html/dtd.cpp:
(DOM::checkChild): Relax the DTD to allow SCRIPT inside MAP.
2002-12-08 David Hyatt <hyatt@apple.com>
Fix for 3007276, styles do not cascade properly through
tables. The font was being reset to the default font
(konq_default) when it needed to be reset to the body's font.
I added a new font family value called konq_body and the
style system resolves that value to be the body's font family list.
Reviewed by: gramps and mjs
* khtml/css/cssstyleselector.cpp:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::attach):
2002-12-08 David Hyatt <hyatt@apple.com>
Fix for 3121814. Forms inside table elements (tbody and table
etc.) can be inline. Just remove the assert and replace it
with a bailout.
Fix for 3036479. Tables with specified heights but cells
with no height (or no cells at all) were not honoring
the specified height.
Reviewed by: gramps
* khtml/rendering/render_table.cpp:
(RenderTable::RenderTable):
(RenderTable::startRow):
(RenderTable::layoutRows):
(RenderTable::paint):
(RenderTable::recalcCells):
2002-12-08 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 2981252 - JavaScript inside <!-- --> comments inside <select> is not executed
This problem is caused by the hack to turn all whitespace into
spaces inside <select>, so that it's collapsed in the DOM. But
this is especially bad for scripts inside select tags, so I
changed the select special case to not apply inside scripts.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::addPending):
(HTMLTokenizer::write):
2002-12-08 Darin Adler <darin@apple.com>
Reviewed by Don and Dave.
- fixed 3115845 -- bad-pointer crash destroying DOM tree reproducible at a particular site
All hail libgmalloc, without which this would just be another bug I can't reproduce!
This memory trasher bug was caused bug calling setChildrenLoaded after casting a node to
HTMLObjectElementImpl, when the node wasn't always an object element. It turns out that this
fix was made obsolete a while back when I changed close on renderers to be delivered even for
cases where the renderer is not created yet at close time.
* khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): Remove the special case for
</object>. Now that this is fixed another way we don't need this at all.
* khtml/html/html_objectimpl.h: Remove setChildrenLoaded and m_childrenLoaded.
* khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl):
Remove code that sets m_childrenLoaded to false.
(HTMLObjectElementImpl::attach): Remove code that looks at m_childrenLoaded, since we don't
need it any more (and in fact there's no way to set it any more).
- fixed 3120578 -- REGRESSION: going to about:blank creates null view
If no tokens are ever sent to the parser, then we end up without a render tree.
* khtml/html/htmlparser.h: Add finished() function.
* khtml/html/htmlparser.cpp: (KHTMLParser::finished): Make an HTML element if the document is still
empty at this point. This is identical to what KHTMLParser::insertNode does when you insert any kind
of element other than an HTML element.
* khtml/html/htmltokenizer.cpp: (HTMLTokenizer::end): Call finished() to let the parser know.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Turn on the "paint red" feature in development builds.
Null view problems are particularly hard to debug without something like this, and we don't care
if development builds are ever-so-slightly slower. No change in deployment.
- fixed 3121527 -- crash in WebCoreBridge frameBorderStyle
* kwq/WebCoreBridge.mm: (-[WebCoreBridge frameBorderStyle]): Handle case where this is called and
we don't have a KHTMLView yet.
- other changes
* WebCore.pbproj/project.pbxproj: Electron is doing his thing.
2002-12-08 David Hyatt <hyatt@apple.com>
Fix for image bullets. They were neglecting to offset
themselves by their own width, and were just relying on
sheer luck (the default margin) to accommodate their
size. The bug is 3007040 (borkware.com).
Reviewed by: gramps
* khtml/rendering/render_list.cpp:
(RenderListMarker::paintObject):
2002-12-07 David Hyatt <hyatt@apple.com>
This change fixes three bugs in list items.
(1) Stop implementing markers as floats. This is simply
wrong. The bullet doesn't affect the height of the line
box if it's a float, and it can also affect other
list items that follow the bullet's enclosing list item
(leading to odd staggered layout of lists).
(2) Relax the DTD. It was trying to obey strict HTML, which
is hopeless in the case of lists. Match the behavior of
both Gecko and the IEs (mac and win32) and allow non-list
content to be inserted between list items without being
wrapped in its own list item. Lists were making empty
items for whitespace in between items, and this stops that
and makes our lists behave much more like Gecko and the IEs.
(3) The bullet's min and max width weren't getting set, which
could lead to confused line width calculations when image
bullets were used.
Reviewed by: gramps
* ChangeLog:
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
(RenderListMarker::calcMinMaxWidth):
2002-12-07 Ken Kocienda <kocienda@apple.com>
Reviewed by: Maciej
Fix for this bug:
Radar 3073988 (URLs with /../ are not resolved before being sent to the host)
* kwq/KWQKURL.mm:
(KURL::KURL):
(copyPathRemovingDots): New function containing code that was pulled out of
the existing relative URL resolution code.
(KURL::parse): Call new copyPathRemovingDots function instead of doing same work
inline.
2002-12-06 David Hyatt <hyatt@apple.com>
Sigh. I forgot to commit the first layer fix (that has already
been reviewed), so now this is also including that.
The first layer fix was to deal with the yale.edu crasher.
It involved making sure that append/remove of render object
trees drill down into those trees to remove/append corresponding
layers (instead of just checking the root of the trees).
The second fix involves making sure that cliprects are right
for painting backgrounds and borders of clipped objects.
Fixes benoit's bug.
Reviewed by: mjs and darin (fix 1), mjs and gramps (fix 2)
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChildNode):
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_container.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
(RenderLayer::constructZTree):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::appendLayers):
(RenderObject::removeLayers):
(RenderObject::enclosingLayer):
* khtml/rendering/render_object.h:
2002-12-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by: Darin
- fixed 3077227 - netflix "top 100" page JavaScript runs so
slowly, it seems like a hang
I fixed this by adding hash tables of image and form elements by
name and id. This allows scans of the whole document to be avoided
in many cases.
This also results in a small speedup (~1%) on cvs-js-ibench.
* khtml/dom/html_document.cpp:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::hasProperty):
(KJS::HTMLDocument::tryGet):
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::addNamedImageOrForm):
(HTMLDocumentImpl::removeNamedImageOrForm):
(HTMLDocumentImpl::haveNamedImageOrForm):
* khtml/html/html_documentimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::attach):
(HTMLFormElementImpl::detach):
(HTMLFormElementImpl::parseAttribute):
* khtml/html/html_formimpl.h:
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::parseAttribute):
(HTMLImageElementImpl::attach):
(HTMLImageElementImpl::detach):
* khtml/html/html_imageimpl.h:
2002-12-06 David Hyatt <hyatt@apple.com>
Hack to make i-bench paint every fourth page. We can tune
this # as needed.
Reviewed by: darin
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/rendering/render_flow.h:
2002-12-06 Darin Adler <darin@apple.com>
Reviewed by Trey.
Update to latest character-sets document.
* kwq/character-sets.txt: Got the newest one and merged in our change.
* kwq/KWQCharsetData.c: Regenerated this. Added just one character set name.
2002-12-06 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* khtml/ecma/kjs_events.h: Add listenerObjImp() method so we don't have to
ref/unref for speed-critical uses.
* khtml/ecma/kjs_window.cpp: (Window::getJSEventListener): Change this
to work with ObjectImp so we don't ref/unref each listener. This should give
us some extra speed.
2002-12-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by: Darin Adler
- made framework embedding work correctly with buildit
* WebCore.pbproj/project.pbxproj: Give framework a relative
install path, don't install it the normal way, and copy it
manually to /AppleInternal/Library/Frameworks if installing. Also
look for other frameworks in
${DSTROOT}/AppleInternal/Library/Frameworks.
2002-12-06 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3111903 -- crash in DOM::HTMLDocumentImpl::close
* khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::close):
Check for the case where view() is 0 so we don't do a null-dereference.
Also, remove some of the unneeded redundant isNull/isEmpty checking here.
2002-12-05 Darin Adler <darin@apple.com>
Reviewed by Don.
- fixed 3116149 -- REGRESSION: assert on invalid encoding trying to show accuweather.com source
The regression was caused when we updated the View Source window to try to get the encoding right.
* kwq/WebCoreBridge.mm: (+[WebCoreBridge stringWithData:textEncoding:]):
Make this function decode the string as Windows Latin-1 if the passed-in encoding is
invalid or ISO Latin-1, since that's what we always want.
* kwq/mac-encodings.txt: Add "8859_1" since we have now seen it "in the wild".
* kwq/KWQCharsetData.c: Check in new version of generated file.
2002-12-05 David Hyatt <hyatt@apple.com>
Fix for javadoc page. It specified an invalid unit, and our
unit match was on a substring, so it allowed "pts" when it
shouldn't. This patch adds some code to help handle this
error case.
Bug # is 3119830.
Reviewed by: rjw
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseUnit):
2002-12-05 Chris Blumenberg <cblu@apple.com>
Reviewed by: rjw
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectedString]): renamed to reflect WebDocument API change
(-[WebCoreBridge deselectAll]): added
(-[WebCoreBridge elementAtPoint:]): call selectedString
2002-12-05 David Hyatt <hyatt@apple.com>
Fix relative positioned elements to add in the right offset
when repainting themselves.
Reviewed by: darin
* khtml/rendering/render_box.cpp:
(RenderBox::repaintRectangle):
2002-12-05 Richard Williamson <rjw@apple.com>
Fixed two issues relating to font sizes. Fixes any page
that specifies font size in device independent units, i.e.
www.abcnews.com.
1. Change dpi to 72. Mac OS X does appear to assume 72, not 96!
2. Don't appply DPI adjustments to font selections, instead
normalize values to points. OS X takes care of device scaling.
Reviewed by: gramps
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::computeLengthFloat):
(CSSPrimitiveValueImpl::computePointFloat):
* khtml/css/css_valueimpl.h:
* khtml/css/cssstyleselector.cpp:
* kwq/KWQPaintDeviceMetrics.mm:
(QPaintDeviceMetrics::logicalDpiY):
2002-12-05 David Hyatt <hyatt@apple.com>
Make sure that blocks with block children compute their
minwidth and maxwidth correctly. This fixes 4-5 bugs on my
list, including the becblog.blogspot.com misrender and
the wrapping list item on webstandards.org.
The fix ensures that the margins of a child have been
computed before they are asked for by the parent in
calcBlockMinMaxWidth.
Also fix a bug in collapsing margins that caused the height
of positioned elements that contained only zero-height children
to not compute their heights correctly. We now pass tests 2
and 3 on the collapsing margin tests with this fix.
Reviewed by: trey
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::calcBlockMinMaxWidth):
2002-12-05 David Hyatt <hyatt@apple.com>
Fix for wsj.com orange underline regression. In quirks mode
only, don't let anchors without hrefs go into :hover. This
matches MacIE's behavior.
The bug is 3118643.
Reviewed by: mjs
* khtml/rendering/render_object.cpp:
(RenderObject::setHoverAndActive):
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.h:
2002-12-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by: David Hyatt
- fixed 3118083 - WebCore includes config.h from Labyrinth top level
* Makefile.am: Regenerate config.h from top-level version, but
make sure not to alter date if it has not changed.
* config.h: Added (autogenerated but checked in for benefit of B&I).
* ForwardingHeaders/config.h: Include WebCore copy rather than
Labyrinth copy.
2002-12-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by: David Hyatt
- fixed 3049601 - support the equivalent of
createcontextualfragment(NS6) or insertAdjacentHTML (IE)
- fixed 3108065 - DHTML at expedia.com doesn't work-- lack of
support for createContextualFragment
- fixed 3114627 - DHTML menus used in Yahoo mail don't work-- lack
of support for createContextualFragment
- improvement towards 3052113 - "site menu" part of .mac home page
editing doesn't work
* khtml/ecma/kjs_range.h:
* khtml/ecma/kjs_range.cpp:
(DOMRangeProtoFunc::tryCall): Added suppor for
createContextualFragment method.
* khtml/ecma/kjs_range.lut.h: Regenerated.
* khtml/dom/dom2_range.h:
* khtml/dom/dom2_range.cpp:
(Range::createContextualFragment): Implemented (calls impl).
* khtml/html/html_elementimpl.h:
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Factored out of setInnerHTML.
(HTMLElementImpl::setInnerHTML): Call createContextualFragment to
make the fragment.
* khtml/xml/dom2_rangeimpl.h:
* khtml/xml/dom2_rangeimpl.cpp:
(RangeImpl::createContextualFragment): Implemented (calls start
container element).
2002-12-04 David Hyatt <hyatt@apple.com>
Fix assert on compuserve page. <form> under <table> should not
get a layout() call.
Reviewed by: gramps
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
2002-12-04 David Hyatt <hyatt@apple.com>
Fix shroudedisles.com table misalignment by removing more\
bogus rules from html4.css.
Fix forums on macosx.com by implementing support for the align
attribute on the <P> tag.
Implement min-width and max-width for block level floating
and normal flow elements.
Fix event handling so that :hover notifications get through to
objects inside floats.
Reviewed by: rjw
* khtml/css/html4.css:
* khtml/html/html_blockimpl.cpp:
(HTMLParagraphElementImpl::parseAttribute):
* khtml/html/html_blockimpl.h:
* khtml/rendering/render_box.cpp:
(RenderBox::calcWidth):
(RenderBox::calcWidthUsing):
(RenderBox::calcHeight):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::nodeAtPoint):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::nodeAtPoint):
* khtml/rendering/render_frames.h:
* khtml/rendering/render_image.cpp:
(RenderImage::nodeAtPoint):
* khtml/rendering/render_image.h:
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
* khtml/rendering/render_object.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::calcHeight):
* khtml/rendering/render_style.cpp:
(StyleBoxData::StyleBoxData):
* khtml/rendering/render_text.cpp:
(RenderText::nodeAtPoint):
* khtml/rendering/render_text.h:
2002-12-04 Darin Adler <darin@apple.com>
Reviewed by Trey and Maciej.
- fixed 3117558 -- Assertion failure in KWQKHTMLPart::slotData after typing "amazon.com" twice
- got rid of the per-part NSEvent in preparation for NSView mouse event handling going through WebCore
* khtml/khtml_part.h: Added declaration for didOpenURL.
* khtml/khtml_part.cpp: (KHTMLPart::openURL): Changed name to didOpenURL in the APPLE_CHANGES
version because calls to openURL from within KHTML need to make the round trip to WebKit.
Also disabled the "scroll to anchor" part.
* kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): Fix to return false when document is 0.
* kwq/KWQKHTMLPart.h: Add scrollToAnchor, remove setCurrentEvent and _currentEvent
* kwq/KWQKHTMLPart.mm:
(KHTMLPart::openURL): Pass the openURL call to the KWQKHTMLPart.
(KWQKHTMLPart::KWQKHTMLPart): Don't initialize _currentEvent.
(KWQKHTMLPart::~KWQKHTMLPart): Don't release _currentEvent.
(KWQKHTMLPart::submitForm): Pass [NSApp currentEvent] instead of _currentEvent.
(KWQKHTMLPart::urlSelected): Pass [NSApp currentEvent] instead of _currentEvent.
(KWQKHTMLPart::scrollToAnchor): Added. Contains the code from the anchor case inside
KHTMLPart::openURL.
* kwq/WebCoreBridge.h: Added scrollToAnchorWithURL:.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]): Change around so that we
don't do a bunch of irrelevant stuff in the page cache case. I think we might just want to
make a separate method for the page cache case.
(-[WebCoreBridge scrollToAnchorWithURL:]): Added.
(-[WebCoreBridge mouseUp:]): Simplify check for nil view. Remove calls to setCurrentEvent.
(-[WebCoreBridge mouseDown:]): Simplify check for nil view. Fix event type constants for
right mouse button and other mouse button.
(-[WebCoreBridge mouseMoved:]): Simplify check for nil view.
(-[WebCoreBridge mouseDragged:]): Simplify check for nil view.
2002-12-04 Richard Williamson <rjw@apple.com>
Cache the NSFont in QFont after doing family based lookup.
Use that cached font to find a text renderer.
Reviewed by: Darin
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFont::QFont):
(QFont::~QFont):
(QFont::setFamily):
(QFont::setFirstFamily):
(QFont::setPixelSize):
(QFont::setWeight):
(QFont::setItalic):
(QFont::getNSFont):
* kwq/KWQFontMetrics.mm:
* kwq/KWQPainter.mm:
(QPainter::_updateRenderer):
* kwq/WebCoreTextRendererFactory.h:
* kwq/WebCoreTextRendererFactory.m:
(-[WebCoreTextRendererFactory rendererWithFont:]):
2002-12-04 Richard Williamson <rjw@apple.com>
Cache the last used text renderer to avoid expensive lookup
when font hasn't changed.
Reviewed by: maciej
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::_updateRenderer):
(QPainter::drawText):
(QPainter::drawUnderlineForText):
== Rolled over to ChangeLog-2002-12-03 ==
|