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 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634 20635 20636 20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 20688 20689 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 20732 20733 20734 20735 20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 20752 20753 20754 20755 20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 20772 20773 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 20785 20786 20787 20788 20789 20790 20791 20792 20793 20794 20795 20796 20797 20798 20799 20800 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 20811 20812 20813 20814 20815 20816 20817 20818 20819 20820 20821 20822 20823 20824 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 20839 20840 20841 20842 20843 20844 20845 20846 20847 20848 20849 20850 20851 20852 20853 20854 20855 20856 20857 20858 20859 20860 20861 20862 20863 20864 20865 20866 20867 20868 20869 20870 20871 20872 20873 20874 20875 20876 20877 20878 20879 20880 20881 20882 20883 20884 20885 20886 20887 20888 20889 20890 20891 20892 20893 20894 20895 20896 20897 20898 20899 20900 20901 20902 20903 20904 20905 20906 20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 20918 20919 20920 20921 20922 20923 20924 20925 20926 20927 20928 20929 20930 20931 20932 20933 20934 20935 20936 20937 20938 20939 20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 20951 20952 20953 20954 20955 20956 20957 20958 20959 20960 20961 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 20977 20978 20979 20980 20981 20982 20983 20984 20985 20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 21022 21023 21024 21025 21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 21056 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 21116 21117 21118 21119 21120 21121 21122 21123 21124 21125 21126 21127 21128 21129 21130 21131 21132 21133 21134 21135 21136 21137 21138 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 21170 21171 21172 21173 21174 21175 21176 21177 21178 21179 21180 21181 21182 21183 21184 21185 21186 21187 21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 21200 21201 21202 21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 21218 21219 21220 21221 21222 21223 21224 21225 21226 21227 21228 21229 21230 21231 21232 21233 21234 21235 21236 21237 21238 21239 21240 21241 21242 21243 21244 21245 21246 21247 21248 21249 21250 21251 21252 21253 21254 21255 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 21312 21313 21314 21315 21316 21317 21318 21319 21320 21321 21322 21323 21324 21325 21326 21327 21328 21329 21330 21331 21332 21333 21334 21335 21336 21337 21338 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 21354 21355 21356 21357 21358 21359 21360 21361 21362 21363 21364 21365 21366 21367 21368 21369 21370 21371 21372 21373 21374 21375 21376 21377 21378 21379 21380 21381 21382 21383 21384 21385 21386 21387 21388 21389 21390 21391 21392 21393 21394 21395 21396 21397 21398 21399 21400 21401 21402 21403 21404 21405 21406 21407 21408 21409 21410 21411 21412 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 21447 21448 21449 21450 21451 21452 21453 21454 21455 21456 21457 21458 21459 21460 21461 21462 21463 21464 21465 21466 21467 21468 21469 21470 21471 21472 21473 21474 21475 21476 21477 21478 21479 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 21522 21523 21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 21577 21578 21579 21580 21581 21582 21583 21584 21585 21586 21587 21588 21589 21590 21591 21592 21593 21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 21909 21910 21911 21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 21947 21948 21949 21950 21951 21952 21953 21954 21955 21956 21957 21958 21959 21960 21961 21962 21963 21964 21965 21966 21967 21968 21969 21970 21971 21972 21973 21974 21975 21976 21977 21978 21979 21980 21981 21982 21983 21984 21985 21986 21987 21988 21989 21990 21991 21992 21993 21994 21995 21996 21997 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 22945 22946 22947 22948 22949 22950 22951 22952 22953 22954 22955 22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000 23001 23002 23003 23004 23005 23006 23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 23045 23046 23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 23085 23086 23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 23125 23126 23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 23165 23166 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 23205 23206 23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 23245 23246 23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 23449 23450 23451 23452 23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 23472 23473 23474 23475 23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 23495 23496 23497 23498 23499 23500 23501 23502 23503 23504 23505 23506 23507 23508 23509 23510 23511 23512 23513 23514 23515 23516 23517 23518 23519 23520 23521 23522 23523 23524 23525 23526 23527 23528 23529 23530 23531 23532 23533 23534 23535 23536 23537 23538 23539 23540 23541 23542 23543 23544 23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 23571 23572 23573 23574 23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 23594 23595 23596 23597 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 23640 23641 23642 23643 23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 23663 23664 23665 23666 23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 23692 23693 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 23707 23708 23709 23710 23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 23779 23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 23799 23800 23801 23802 23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 23825 23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 23845 23846 23847 23848 23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 23869 23870 23871 23872 23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 23892 23893 23894 23895 23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 23922 23923 23924 23925 23926 23927 23928 23929 23930 23931 23932 23933 23934 23935 23936 23937 23938 23939 23940 23941 23942 23943 23944 23945 23946 23947 23948 23949 23950 23951 23952 23953 23954 23955 23956 23957 23958 23959 23960 23961 23962 23963 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 23978 23979 23980 23981 23982 23983 23984 23985 23986 23987 23988 23989 23990 23991 23992 23993 23994 23995 23996 23997 23998 23999 24000 24001 24002 24003 24004 24005 24006 24007 24008 24009 24010 24011 24012 24013 24014 24015 24016 24017 24018 24019 24020 24021 24022 24023 24024 24025 24026 24027 24028 24029 24030 24031 24032 24033 24034 24035 24036 24037 24038 24039 24040 24041 24042 24043 24044 24045 24046 24047 24048 24049 24050 24051 24052 24053 24054 24055 24056 24057 24058 24059 24060 24061 24062 24063 24064 24065 24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 24252 24253 24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 24281 24282 24283 24284 24285 24286 24287 24288 24289 24290 24291 24292 24293 24294 24295 24296 24297 24298 24299 24300 24301 24302 24303 24304 24305 24306 24307 24308 24309 24310 24311 24312 24313 24314 24315 24316 24317 24318 24319 24320 24321 24322 24323 24324 24325 24326 24327 24328 24329 24330 24331 24332 24333 24334 24335 24336 24337 24338 24339 24340 24341 24342 24343 24344 24345 24346 24347 24348 24349 24350 24351 24352 24353 24354 24355 24356 24357 24358 24359 24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 24371 24372 24373 24374 24375 24376 24377 24378 24379 24380 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402 24403 24404 24405 24406 24407 24408 24409 24410 24411 24412 24413 24414 24415 24416 24417 24418 24419 24420 24421 24422 24423 24424 24425 24426 24427 24428 24429 24430 24431 24432 24433 24434 24435 24436 24437 24438 24439 24440 24441 24442 24443 24444 24445 24446 24447 24448 24449 24450 24451 24452 24453 24454 24455 24456 24457 24458 24459 24460 24461 24462 24463 24464 24465 24466 24467 24468 24469 24470 24471 24472 24473 24474 24475 24476 24477 24478 24479 24480 24481 24482 24483 24484 24485 24486 24487 24488 24489 24490 24491 24492 24493 24494 24495 24496 24497 24498 24499 24500 24501 24502 24503 24504 24505 24506 24507 24508 24509 24510 24511 24512 24513 24514 24515 24516 24517 24518 24519 24520 24521 24522 24523 24524 24525 24526 24527 24528 24529 24530 24531 24532 24533 24534 24535 24536 24537 24538 24539 24540 24541 24542 24543 24544 24545 24546 24547 24548 24549 24550 24551 24552 24553 24554 24555 24556 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 24569 24570 24571 24572 24573 24574 24575 24576 24577 24578 24579 24580 24581 24582 24583 24584 24585 24586 24587 24588 24589 24590 24591 24592 24593 24594 24595 24596 24597 24598 24599 24600 24601 24602 24603 24604 24605 24606 24607 24608 24609 24610 24611 24612 24613 24614 24615 24616 24617 24618 24619 24620 24621 24622 24623 24624 24625 24626 24627 24628 24629 24630 24631 24632 24633 24634 24635 24636 24637 24638 24639 24640 24641 24642 24643 24644 24645 24646 24647 24648 24649 24650 24651 24652 24653 24654 24655 24656 24657 24658 24659 24660 24661 24662 24663 24664 24665 24666 24667 24668 24669 24670 24671 24672 24673 24674 24675 24676 24677 24678 24679 24680 24681 24682 24683 24684 24685 24686 24687 24688 24689 24690 24691 24692 24693 24694 24695 24696 24697 24698 24699 24700 24701 24702 24703 24704 24705 24706 24707 24708 24709 24710 24711 24712 24713 24714 24715 24716 24717 24718 24719 24720 24721 24722 24723 24724 24725 24726 24727 24728 24729 24730 24731 24732 24733 24734 24735 24736 24737 24738 24739 24740 24741 24742 24743 24744 24745 24746 24747 24748 24749 24750 24751 24752 24753 24754 24755 24756 24757 24758 24759 24760 24761 24762 24763 24764 24765 24766 24767 24768 24769 24770 24771 24772 24773 24774 24775 24776 24777 24778 24779 24780 24781 24782 24783 24784 24785 24786 24787 24788 24789 24790 24791 24792 24793 24794 24795 24796 24797 24798 24799 24800 24801 24802 24803 24804 24805 24806 24807 24808 24809 24810 24811 24812 24813 24814 24815 24816 24817 24818 24819 24820 24821 24822 24823 24824 24825 24826 24827 24828 24829 24830 24831 24832 24833 24834 24835 24836 24837 24838 24839 24840 24841 24842 24843 24844 24845 24846 24847 24848 24849 24850 24851 24852 24853 24854 24855 24856 24857 24858 24859 24860 24861 24862 24863 24864 24865 24866 24867 24868 24869 24870 24871 24872 24873 24874 24875 24876 24877 24878 24879 24880 24881 24882 24883 24884 24885 24886 24887 24888 24889 24890 24891 24892 24893 24894 24895 24896 24897 24898 24899 24900 24901 24902 24903 24904 24905 24906 24907 24908 24909 24910 24911 24912 24913 24914 24915 24916 24917 24918 24919 24920 24921 24922 24923 24924 24925 24926 24927 24928 24929 24930 24931 24932 24933 24934 24935 24936 24937 24938 24939 24940 24941 24942 24943 24944 24945 24946 24947 24948 24949 24950 24951 24952 24953 24954 24955 24956 24957 24958 24959 24960 24961 24962 24963 24964 24965 24966 24967 24968 24969 24970 24971 24972 24973 24974 24975 24976 24977 24978 24979 24980 24981 24982 24983 24984 24985 24986 24987 24988 24989 24990 24991 24992 24993 24994 24995 24996 24997 24998 24999 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25010 25011 25012 25013 25014 25015 25016 25017 25018 25019 25020 25021 25022 25023 25024 25025 25026 25027 25028 25029 25030 25031 25032 25033 25034 25035 25036 25037 25038 25039 25040 25041 25042 25043 25044 25045 25046 25047 25048 25049 25050 25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 25068 25069 25070 25071 25072 25073 25074 25075 25076 25077 25078 25079 25080 25081 25082 25083 25084 25085 25086 25087 25088 25089 25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 25100 25101 25102 25103 25104 25105 25106 25107 25108 25109 25110 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123 25124 25125 25126 25127 25128 25129 25130 25131 25132 25133 25134 25135 25136 25137 25138 25139 25140 25141 25142 25143 25144 25145 25146 25147 25148 25149 25150 25151 25152 25153 25154 25155 25156 25157 25158 25159 25160 25161 25162 25163 25164 25165 25166 25167 25168 25169 25170 25171 25172 25173 25174 25175 25176 25177 25178 25179 25180 25181 25182 25183 25184 25185 25186 25187 25188 25189 25190 25191 25192 25193 25194 25195 25196 25197 25198 25199 25200 25201 25202 25203 25204 25205 25206 25207 25208 25209 25210 25211 25212 25213 25214 25215 25216 25217 25218 25219 25220 25221 25222 25223 25224 25225 25226 25227 25228 25229 25230 25231 25232 25233 25234 25235 25236 25237 25238 25239 25240 25241 25242 25243 25244 25245 25246 25247 25248 25249 25250 25251 25252 25253 25254 25255 25256 25257 25258 25259 25260 25261 25262 25263 25264 25265 25266 25267 25268 25269 25270 25271 25272 25273 25274 25275 25276 25277 25278 25279 25280 25281 25282 25283 25284 25285 25286 25287 25288 25289 25290 25291 25292 25293 25294 25295 25296 25297 25298 25299 25300 25301 25302 25303 25304 25305 25306 25307 25308 25309 25310 25311 25312 25313 25314 25315 25316 25317 25318 25319 25320 25321 25322 25323 25324 25325 25326 25327 25328 25329 25330 25331 25332 25333 25334 25335 25336 25337 25338 25339 25340 25341 25342 25343 25344 25345 25346 25347 25348 25349 25350 25351 25352 25353 25354 25355 25356 25357 25358 25359 25360 25361 25362 25363 25364 25365 25366 25367 25368 25369 25370 25371 25372 25373 25374 25375 25376 25377 25378 25379 25380 25381 25382 25383 25384 25385 25386 25387 25388 25389 25390 25391 25392 25393 25394 25395 25396 25397 25398 25399 25400 25401 25402 25403 25404 25405 25406 25407 25408 25409 25410 25411 25412 25413 25414 25415 25416 25417 25418 25419 25420 25421 25422 25423 25424 25425 25426 25427 25428 25429 25430 25431 25432 25433 25434 25435 25436 25437 25438 25439 25440 25441 25442 25443 25444 25445 25446 25447 25448 25449 25450 25451 25452 25453 25454 25455 25456 25457 25458 25459 25460 25461 25462 25463 25464 25465 25466 25467 25468 25469 25470 25471 25472 25473 25474 25475 25476 25477 25478 25479 25480 25481 25482 25483 25484 25485 25486 25487 25488 25489 25490 25491 25492 25493 25494 25495 25496 25497 25498 25499 25500 25501 25502 25503 25504 25505 25506 25507 25508 25509 25510 25511 25512 25513 25514 25515 25516 25517 25518 25519 25520 25521 25522 25523 25524 25525 25526 25527 25528 25529 25530 25531 25532 25533 25534 25535 25536 25537 25538 25539 25540 25541 25542 25543 25544 25545 25546 25547 25548 25549 25550 25551 25552 25553 25554 25555 25556 25557 25558 25559 25560 25561 25562 25563 25564 25565 25566 25567 25568 25569 25570 25571 25572 25573 25574 25575 25576 25577 25578 25579 25580 25581 25582 25583 25584 25585 25586 25587 25588 25589 25590 25591 25592 25593 25594 25595 25596 25597 25598 25599 25600 25601 25602 25603 25604 25605 25606 25607 25608 25609 25610 25611 25612 25613 25614 25615 25616 25617 25618 25619 25620 25621 25622 25623 25624 25625 25626 25627 25628 25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949 25950 25951 25952 25953 25954 25955 25956 25957 25958 25959 25960 25961 25962 25963 25964 25965 25966 25967 25968 25969 25970 25971 25972 25973 25974 25975 25976 25977 25978 25979 25980 25981 25982 25983 25984 25985 25986 25987 25988 25989 25990 25991 25992 25993 25994 25995 25996 25997 25998 25999 26000 26001 26002 26003 26004 26005 26006 26007 26008 26009 26010 26011 26012 26013 26014 26015 26016 26017 26018 26019 26020 26021 26022 26023 26024 26025 26026 26027 26028 26029 26030 26031 26032 26033 26034 26035 26036 26037 26038 26039 26040 26041 26042 26043 26044 26045 26046 26047 26048 26049 26050 26051 26052 26053 26054 26055 26056 26057 26058 26059 26060 26061 26062 26063 26064 26065 26066 26067 26068 26069 26070 26071 26072 26073 26074 26075 26076 26077 26078 26079 26080 26081 26082 26083 26084 26085 26086 26087 26088 26089 26090 26091 26092 26093 26094 26095 26096 26097 26098 26099 26100 26101 26102 26103 26104 26105 26106 26107 26108 26109 26110 26111 26112 26113 26114 26115 26116 26117 26118 26119 26120 26121 26122 26123 26124 26125 26126 26127 26128 26129 26130 26131 26132 26133 26134 26135 26136 26137 26138 26139 26140 26141 26142 26143 26144 26145 26146 26147 26148 26149 26150 26151 26152 26153 26154 26155 26156 26157 26158 26159 26160 26161 26162 26163 26164 26165 26166 26167 26168 26169 26170 26171 26172 26173 26174 26175 26176 26177 26178 26179 26180 26181 26182 26183 26184 26185 26186 26187 26188 26189 26190 26191 26192 26193 26194 26195 26196 26197 26198 26199 26200 26201 26202 26203 26204 26205 26206 26207 26208 26209 26210 26211 26212 26213 26214 26215 26216 26217 26218 26219 26220 26221 26222 26223 26224 26225 26226 26227 26228 26229 26230 26231 26232 26233 26234 26235 26236 26237 26238 26239 26240 26241 26242 26243 26244 26245 26246 26247 26248 26249 26250 26251 26252 26253 26254 26255 26256 26257 26258 26259 26260 26261 26262 26263 26264 26265 26266 26267 26268 26269 26270 26271 26272 26273 26274 26275 26276 26277 26278 26279 26280 26281 26282 26283 26284 26285 26286 26287 26288 26289 26290 26291 26292 26293 26294 26295 26296 26297 26298 26299 26300 26301 26302 26303 26304 26305 26306 26307 26308 26309 26310 26311 26312 26313 26314 26315 26316 26317 26318 26319 26320 26321 26322 26323 26324 26325 26326 26327 26328 26329 26330 26331 26332 26333 26334 26335 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 26357 26358 26359 26360 26361 26362 26363 26364 26365 26366 26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434 26435 26436 26437 26438 26439 26440 26441 26442 26443 26444 26445 26446 26447 26448 26449 26450 26451 26452 26453 26454 26455 26456 26457 26458 26459 26460 26461 26462 26463 26464 26465 26466 26467 26468 26469 26470 26471 26472 26473 26474 26475 26476 26477 26478 26479 26480 26481 26482 26483 26484 26485 26486 26487 26488 26489 26490 26491 26492 26493 26494 26495 26496 26497 26498 26499 26500 26501 26502 26503 26504 26505 26506 26507 26508 26509 26510 26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 26522 26523 26524 26525 26526 26527 26528 26529 26530 26531 26532 26533 26534 26535 26536 26537 26538 26539 26540 26541 26542 26543 26544 26545 26546 26547 26548 26549 26550 26551 26552 26553 26554 26555 26556 26557 26558 26559 26560 26561 26562 26563 26564 26565 26566 26567 26568 26569 26570 26571 26572 26573 26574 26575 26576 26577 26578 26579 26580 26581 26582 26583 26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 26594 26595 26596 26597 26598 26599 26600 26601 26602 26603 26604 26605 26606 26607 26608 26609 26610 26611 26612 26613 26614 26615 26616 26617 26618 26619 26620 26621 26622 26623 26624 26625 26626 26627 26628 26629 26630 26631 26632 26633 26634 26635 26636 26637 26638 26639 26640 26641 26642 26643 26644 26645 26646 26647 26648 26649 26650 26651 26652 26653 26654 26655 26656 26657 26658 26659 26660 26661 26662 26663 26664 26665 26666 26667 26668 26669 26670 26671 26672 26673 26674 26675 26676 26677 26678 26679 26680 26681 26682 26683 26684 26685 26686 26687 26688 26689 26690 26691 26692 26693 26694 26695 26696 26697 26698 26699 26700 26701 26702 26703 26704 26705 26706 26707 26708 26709 26710 26711 26712 26713 26714 26715 26716 26717 26718 26719 26720 26721 26722 26723 26724 26725 26726 26727 26728 26729 26730 26731 26732 26733 26734 26735 26736 26737 26738 26739 26740 26741 26742 26743 26744 26745 26746 26747 26748 26749 26750 26751 26752 26753 26754 26755 26756 26757 26758 26759 26760 26761 26762 26763 26764 26765 26766 26767 26768 26769 26770 26771 26772 26773 26774 26775 26776 26777 26778 26779 26780 26781 26782 26783 26784 26785 26786 26787 26788 26789 26790 26791 26792 26793 26794 26795 26796 26797 26798 26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856 26857 26858 26859 26860 26861 26862 26863 26864 26865 26866 26867 26868 26869 26870 26871 26872 26873 26874 26875 26876 26877 26878 26879 26880 26881 26882 26883 26884 26885 26886 26887 26888 26889 26890 26891 26892 26893 26894 26895 26896 26897 26898 26899 26900 26901 26902 26903 26904 26905 26906 26907 26908 26909 26910 26911 26912 26913 26914 26915 26916 26917 26918 26919 26920 26921 26922 26923 26924 26925 26926 26927 26928 26929 26930 26931 26932 26933 26934 26935 26936 26937 26938 26939 26940 26941 26942 26943 26944 26945 26946 26947 26948 26949 26950 26951 26952 26953 26954 26955 26956 26957 26958 26959 26960 26961 26962 26963 26964 26965 26966 26967 26968 26969 26970 26971 26972 26973 26974 26975 26976 26977 26978 26979 26980 26981 26982 26983 26984 26985 26986 26987 26988 26989 26990 26991 26992 26993 26994 26995 26996 26997 26998 26999 27000 27001 27002 27003 27004 27005 27006 27007 27008 27009 27010 27011 27012 27013 27014 27015 27016 27017 27018 27019 27020 27021 27022 27023 27024 27025 27026 27027 27028 27029 27030 27031 27032 27033 27034 27035 27036 27037 27038 27039 27040 27041 27042 27043 27044 27045 27046 27047 27048 27049 27050 27051 27052 27053 27054 27055 27056 27057 27058 27059 27060 27061 27062 27063 27064 27065 27066 27067 27068 27069 27070 27071 27072 27073 27074 27075 27076 27077 27078 27079 27080 27081 27082 27083 27084 27085 27086 27087 27088 27089 27090 27091 27092 27093 27094 27095 27096 27097 27098 27099 27100 27101 27102 27103 27104 27105 27106 27107 27108 27109 27110 27111 27112 27113 27114 27115 27116 27117 27118 27119 27120 27121 27122 27123 27124 27125 27126 27127 27128 27129 27130 27131 27132 27133 27134 27135 27136 27137 27138 27139 27140 27141 27142 27143 27144 27145 27146 27147 27148 27149 27150 27151 27152 27153 27154 27155 27156 27157 27158 27159 27160 27161 27162 27163 27164 27165 27166 27167 27168 27169 27170 27171 27172 27173 27174 27175 27176 27177 27178 27179 27180 27181 27182 27183 27184 27185 27186 27187 27188 27189 27190 27191 27192 27193 27194 27195 27196 27197 27198 27199 27200 27201 27202 27203 27204 27205 27206 27207 27208 27209 27210 27211 27212 27213 27214 27215 27216 27217 27218 27219 27220 27221 27222 27223 27224 27225 27226 27227 27228 27229 27230 27231 27232 27233 27234 27235 27236 27237 27238 27239 27240 27241 27242 27243 27244 27245 27246 27247 27248 27249 27250 27251 27252 27253 27254 27255 27256 27257 27258 27259 27260 27261 27262 27263 27264 27265 27266 27267 27268 27269 27270 27271 27272 27273 27274 27275 27276 27277 27278 27279 27280 27281 27282 27283 27284 27285 27286 27287 27288 27289 27290 27291 27292 27293 27294 27295 27296 27297 27298 27299 27300 27301 27302 27303 27304 27305 27306 27307 27308 27309 27310 27311 27312 27313 27314 27315 27316 27317 27318 27319 27320 27321 27322 27323 27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 27343 27344 27345 27346 27347 27348 27349 27350 27351 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 27362 27363 27364 27365 27366 27367 27368 27369 27370 27371 27372 27373 27374 27375 27376 27377 27378 27379 27380 27381 27382 27383 27384 27385 27386 27387 27388 27389 27390 27391 27392 27393 27394 27395 27396 27397 27398 27399 27400 27401 27402 27403 27404 27405 27406 27407 27408 27409 27410 27411 27412 27413 27414 27415 27416 27417 27418 27419 27420 27421 27422 27423 27424 27425 27426 27427 27428 27429 27430 27431 27432 27433 27434 27435 27436 27437 27438 27439 27440 27441 27442 27443 27444 27445 27446 27447 27448 27449 27450 27451 27452 27453 27454 27455 27456 27457 27458 27459 27460 27461 27462 27463 27464 27465 27466 27467 27468 27469 27470 27471 27472 27473 27474 27475 27476 27477 27478 27479 27480 27481 27482 27483 27484 27485 27486 27487 27488 27489 27490 27491 27492 27493 27494 27495 27496 27497 27498 27499 27500 27501 27502 27503 27504 27505 27506 27507 27508 27509 27510 27511 27512 27513 27514 27515 27516 27517 27518 27519 27520 27521 27522 27523 27524 27525 27526 27527 27528 27529 27530 27531 27532 27533 27534 27535 27536 27537 27538 27539 27540 27541 27542 27543 27544 27545 27546 27547 27548 27549 27550 27551 27552 27553 27554 27555 27556 27557 27558 27559 27560 27561 27562 27563 27564 27565 27566 27567 27568 27569 27570 27571 27572 27573 27574 27575 27576 27577 27578 27579 27580 27581 27582 27583 27584 27585 27586 27587 27588 27589 27590 27591 27592 27593 27594 27595 27596 27597 27598 27599 27600 27601 27602 27603 27604 27605 27606 27607 27608 27609 27610 27611 27612 27613 27614 27615 27616 27617 27618 27619 27620 27621 27622 27623 27624 27625 27626 27627 27628 27629 27630 27631 27632 27633 27634 27635 27636 27637 27638 27639 27640 27641 27642 27643 27644 27645 27646 27647 27648 27649 27650 27651 27652 27653 27654 27655 27656 27657 27658 27659 27660 27661 27662 27663 27664 27665 27666 27667 27668 27669 27670 27671 27672 27673 27674 27675 27676 27677 27678 27679 27680 27681 27682 27683 27684 27685 27686 27687 27688 27689 27690 27691 27692 27693 27694 27695 27696 27697 27698 27699 27700 27701 27702 27703 27704 27705 27706 27707 27708 27709 27710 27711 27712 27713 27714 27715 27716 27717 27718 27719 27720 27721 27722 27723 27724 27725 27726 27727 27728 27729 27730 27731 27732 27733 27734 27735 27736 27737 27738 27739 27740 27741 27742 27743 27744 27745 27746 27747 27748 27749 27750 27751 27752 27753 27754 27755 27756 27757 27758 27759 27760 27761 27762 27763 27764 27765 27766 27767 27768 27769 27770 27771 27772 27773 27774 27775 27776 27777 27778 27779 27780 27781 27782 27783 27784 27785 27786 27787 27788 27789 27790 27791 27792 27793 27794 27795 27796 27797 27798 27799 27800 27801 27802 27803 27804 27805 27806 27807 27808 27809 27810 27811 27812 27813 27814 27815 27816 27817 27818 27819 27820 27821 27822 27823 27824 27825 27826 27827 27828 27829 27830 27831 27832 27833 27834 27835 27836 27837 27838 27839 27840 27841 27842 27843 27844 27845 27846 27847 27848 27849 27850 27851 27852 27853 27854 27855 27856 27857 27858 27859 27860 27861 27862 27863 27864 27865 27866 27867 27868 27869 27870 27871 27872 27873 27874 27875 27876 27877 27878 27879 27880 27881 27882 27883 27884 27885 27886 27887 27888 27889 27890 27891 27892 27893 27894 27895 27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951 27952 27953 27954 27955 27956 27957 27958 27959 27960 27961 27962 27963 27964 27965 27966 27967 27968 27969 27970 27971 27972 27973 27974 27975 27976 27977 27978 27979 27980 27981 27982 27983 27984 27985 27986 27987 27988 27989 27990 27991 27992 27993 27994 27995 27996 27997 27998 27999 28000 28001 28002 28003 28004 28005 28006 28007 28008 28009 28010 28011 28012 28013 28014 28015 28016 28017 28018 28019 28020 28021 28022 28023 28024 28025 28026 28027 28028 28029 28030 28031 28032 28033 28034 28035 28036 28037 28038 28039 28040 28041 28042 28043 28044 28045 28046 28047 28048 28049 28050 28051 28052 28053 28054 28055 28056 28057 28058 28059 28060 28061 28062 28063 28064 28065 28066 28067 28068 28069 28070 28071 28072 28073 28074 28075 28076 28077 28078 28079 28080 28081 28082 28083 28084 28085 28086 28087 28088 28089 28090 28091 28092 28093 28094 28095 28096 28097 28098 28099 28100 28101 28102 28103 28104 28105 28106 28107 28108 28109 28110 28111 28112 28113 28114 28115 28116 28117 28118 28119 28120 28121 28122 28123 28124 28125 28126 28127 28128 28129 28130 28131 28132 28133 28134 28135 28136 28137 28138 28139 28140 28141 28142 28143 28144 28145 28146 28147 28148 28149 28150 28151 28152 28153 28154 28155 28156 28157 28158 28159 28160 28161 28162 28163 28164 28165 28166 28167 28168 28169 28170 28171 28172 28173 28174 28175 28176 28177 28178 28179 28180 28181 28182 28183 28184 28185 28186 28187 28188 28189 28190 28191 28192 28193 28194 28195 28196 28197 28198 28199 28200 28201 28202 28203 28204 28205 28206 28207 28208 28209 28210 28211 28212 28213 28214 28215 28216 28217 28218 28219 28220 28221 28222 28223 28224 28225 28226 28227 28228 28229 28230 28231 28232 28233 28234 28235 28236 28237 28238 28239 28240 28241 28242 28243 28244 28245 28246 28247 28248 28249 28250 28251 28252 28253 28254 28255 28256 28257 28258 28259 28260 28261 28262 28263 28264 28265 28266 28267 28268 28269 28270 28271 28272 28273 28274 28275 28276 28277 28278 28279 28280 28281 28282 28283 28284 28285 28286 28287 28288 28289 28290 28291 28292 28293 28294 28295 28296 28297 28298 28299 28300 28301 28302 28303 28304 28305 28306 28307 28308 28309 28310 28311 28312 28313 28314 28315 28316 28317 28318 28319 28320 28321 28322 28323 28324 28325 28326 28327 28328 28329 28330 28331 28332 28333 28334 28335 28336 28337 28338 28339 28340 28341 28342 28343 28344 28345 28346 28347 28348 28349 28350 28351 28352 28353 28354 28355 28356 28357 28358 28359 28360 28361 28362 28363 28364 28365 28366 28367 28368 28369 28370 28371 28372 28373 28374 28375 28376 28377 28378 28379 28380 28381 28382 28383 28384 28385 28386 28387 28388 28389 28390 28391 28392 28393 28394 28395 28396 28397 28398 28399 28400 28401 28402 28403 28404 28405 28406 28407 28408 28409 28410 28411 28412 28413 28414 28415 28416 28417 28418 28419 28420 28421 28422 28423 28424 28425 28426 28427 28428 28429 28430 28431 28432 28433 28434 28435 28436 28437 28438 28439 28440 28441 28442 28443 28444 28445 28446 28447 28448 28449 28450 28451 28452 28453 28454 28455 28456 28457 28458 28459 28460 28461 28462 28463 28464 28465 28466 28467 28468 28469 28470 28471 28472 28473 28474 28475 28476 28477 28478 28479 28480 28481 28482 28483 28484 28485 28486 28487 28488 28489 28490 28491 28492 28493 28494 28495 28496 28497 28498 28499 28500 28501 28502 28503 28504 28505 28506 28507 28508 28509 28510 28511 28512 28513 28514 28515 28516 28517 28518 28519 28520 28521 28522 28523 28524 28525 28526 28527 28528 28529 28530 28531 28532 28533 28534 28535 28536 28537 28538 28539 28540 28541 28542 28543 28544 28545 28546 28547 28548 28549 28550 28551 28552 28553 28554 28555 28556 28557 28558 28559 28560 28561 28562 28563 28564 28565 28566 28567 28568 28569 28570 28571 28572 28573 28574 28575 28576 28577 28578 28579 28580 28581 28582 28583 28584 28585 28586 28587 28588 28589 28590 28591 28592 28593 28594 28595 28596 28597 28598 28599 28600 28601 28602 28603 28604 28605 28606 28607 28608 28609 28610 28611 28612 28613 28614 28615 28616 28617 28618 28619 28620 28621 28622 28623 28624 28625 28626 28627 28628 28629 28630 28631 28632 28633 28634 28635 28636 28637 28638 28639 28640 28641 28642 28643 28644 28645 28646 28647 28648 28649 28650 28651 28652 28653 28654 28655 28656 28657 28658 28659 28660 28661 28662 28663 28664 28665 28666 28667 28668 28669 28670 28671 28672 28673 28674 28675 28676 28677 28678 28679 28680 28681 28682 28683 28684 28685 28686 28687 28688 28689 28690 28691 28692 28693 28694 28695 28696 28697 28698 28699 28700 28701 28702 28703 28704 28705 28706 28707 28708 28709 28710 28711 28712 28713 28714 28715 28716 28717 28718 28719 28720 28721 28722 28723 28724 28725 28726 28727 28728 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 28777 28778 28779 28780 28781 28782 28783 28784 28785 28786 28787 28788 28789 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 28809 28810 28811 28812 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 28828 28829 28830 28831 28832 28833 28834 28835 28836 28837 28838 28839 28840 28841 28842 28843 28844 28845 28846 28847 28848 28849 28850 28851 28852 28853 28854 28855 28856 28857 28858 28859 28860 28861 28862 28863 28864 28865 28866 28867 28868 28869 28870 28871 28872 28873 28874 28875 28876 28877 28878 28879 28880 28881 28882 28883 28884 28885 28886 28887 28888 28889 28890 28891 28892 28893 28894 28895 28896 28897 28898 28899 28900 28901 28902 28903 28904 28905 28906 28907 28908 28909 28910 28911 28912 28913 28914 28915 28916 28917 28918 28919 28920 28921 28922 28923 28924 28925 28926 28927 28928 28929 28930 28931 28932 28933 28934 28935 28936 28937 28938 28939 28940 28941 28942 28943 28944 28945 28946 28947 28948 28949 28950 28951 28952 28953 28954 28955 28956 28957 28958 28959 28960 28961 28962 28963 28964 28965 28966 28967 28968 28969 28970 28971 28972 28973 28974 28975 28976 28977 28978 28979 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 28993 28994 28995 28996 28997 28998 28999 29000 29001 29002 29003 29004 29005 29006 29007 29008 29009 29010 29011 29012 29013 29014 29015 29016 29017 29018 29019 29020 29021 29022 29023 29024 29025 29026 29027 29028 29029 29030 29031 29032 29033 29034 29035 29036 29037 29038 29039 29040 29041 29042 29043 29044 29045 29046 29047 29048 29049 29050 29051 29052 29053 29054 29055 29056 29057 29058 29059 29060 29061 29062 29063 29064 29065 29066 29067 29068 29069 29070 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 29082 29083 29084 29085 29086 29087 29088 29089 29090 29091 29092 29093 29094 29095 29096 29097 29098 29099 29100 29101 29102 29103 29104 29105 29106 29107 29108 29109 29110 29111 29112 29113 29114 29115 29116 29117 29118 29119 29120 29121 29122 29123 29124 29125 29126 29127 29128 29129 29130 29131 29132 29133 29134 29135 29136 29137 29138 29139 29140 29141 29142 29143 29144 29145 29146 29147 29148 29149 29150 29151 29152 29153 29154 29155 29156 29157 29158 29159 29160 29161 29162 29163 29164 29165 29166 29167 29168 29169 29170 29171 29172 29173 29174 29175 29176 29177 29178 29179 29180 29181 29182 29183 29184 29185 29186 29187 29188 29189 29190 29191 29192 29193 29194 29195 29196 29197 29198 29199 29200 29201 29202 29203 29204 29205 29206 29207 29208 29209 29210 29211 29212 29213 29214 29215 29216 29217 29218 29219 29220 29221 29222 29223 29224 29225 29226 29227 29228 29229 29230 29231 29232 29233 29234 29235 29236 29237 29238 29239 29240 29241 29242 29243 29244 29245 29246 29247 29248 29249 29250 29251 29252 29253 29254 29255 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268 29269 29270 29271 29272 29273 29274 29275 29276 29277 29278 29279 29280 29281 29282 29283 29284 29285 29286 29287 29288 29289 29290 29291 29292 29293 29294 29295 29296 29297 29298 29299 29300 29301 29302 29303 29304 29305 29306 29307 29308 29309 29310 29311 29312 29313 29314 29315 29316 29317 29318 29319 29320 29321 29322 29323 29324 29325 29326 29327 29328 29329 29330 29331 29332 29333 29334 29335 29336 29337 29338 29339 29340 29341 29342 29343 29344 29345 29346 29347 29348 29349 29350 29351 29352 29353 29354 29355 29356 29357 29358 29359 29360 29361 29362 29363 29364 29365 29366 29367 29368 29369 29370 29371 29372 29373 29374 29375 29376 29377 29378 29379 29380 29381 29382 29383 29384 29385 29386 29387 29388 29389 29390 29391 29392 29393 29394 29395 29396 29397 29398 29399 29400 29401 29402 29403 29404 29405 29406 29407 29408 29409 29410 29411 29412 29413 29414 29415 29416 29417 29418 29419 29420 29421 29422 29423 29424 29425 29426 29427 29428 29429 29430 29431 29432 29433 29434 29435 29436 29437 29438 29439 29440 29441 29442 29443 29444 29445 29446 29447 29448 29449 29450 29451 29452 29453 29454 29455 29456 29457 29458 29459 29460 29461 29462 29463 29464 29465 29466 29467 29468 29469 29470 29471 29472 29473 29474 29475 29476 29477 29478 29479 29480 29481 29482 29483 29484 29485 29486 29487 29488 29489 29490 29491 29492 29493 29494 29495 29496 29497 29498 29499 29500 29501 29502 29503 29504 29505 29506 29507 29508 29509 29510 29511 29512 29513 29514 29515 29516 29517 29518 29519 29520 29521 29522 29523 29524 29525 29526 29527 29528 29529 29530 29531 29532 29533 29534 29535 29536 29537 29538 29539 29540 29541 29542 29543 29544 29545 29546 29547 29548 29549 29550 29551 29552 29553 29554 29555 29556 29557 29558 29559 29560 29561 29562 29563 29564 29565 29566 29567 29568 29569 29570 29571 29572 29573 29574 29575 29576 29577 29578 29579 29580 29581 29582 29583 29584 29585 29586 29587 29588 29589 29590 29591 29592 29593 29594 29595 29596 29597 29598 29599 29600 29601 29602 29603 29604 29605 29606 29607 29608 29609 29610 29611 29612 29613 29614 29615 29616 29617 29618 29619 29620 29621 29622 29623 29624 29625 29626 29627 29628 29629 29630 29631 29632 29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 29644 29645 29646 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 29659 29660 29661 29662 29663 29664 29665 29666 29667 29668 29669 29670 29671 29672 29673 29674 29675 29676 29677 29678 29679 29680 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698 29699 29700 29701 29702 29703 29704 29705 29706 29707 29708 29709 29710 29711 29712 29713 29714 29715 29716 29717 29718 29719 29720 29721 29722 29723 29724 29725 29726 29727 29728 29729 29730 29731 29732 29733 29734 29735 29736 29737 29738 29739 29740 29741 29742 29743 29744 29745 29746 29747 29748 29749 29750 29751 29752 29753 29754 29755 29756 29757 29758 29759 29760 29761 29762 29763 29764 29765 29766 29767 29768 29769 29770 29771 29772 29773 29774 29775 29776 29777 29778 29779 29780 29781 29782 29783 29784 29785 29786 29787 29788 29789 29790 29791 29792 29793 29794 29795 29796 29797 29798 29799 29800 29801 29802 29803 29804 29805 29806 29807 29808 29809 29810 29811 29812 29813 29814 29815 29816 29817 29818 29819 29820 29821 29822 29823 29824 29825 29826 29827 29828 29829 29830 29831 29832 29833 29834 29835 29836 29837 29838 29839 29840 29841 29842 29843 29844 29845 29846 29847 29848 29849 29850 29851 29852 29853 29854 29855 29856 29857 29858 29859 29860 29861 29862 29863 29864 29865 29866 29867 29868 29869 29870 29871 29872 29873 29874 29875 29876 29877 29878 29879 29880 29881 29882 29883 29884 29885 29886 29887 29888 29889 29890 29891 29892 29893 29894 29895 29896 29897 29898 29899 29900 29901 29902 29903 29904 29905 29906 29907 29908 29909 29910 29911 29912 29913 29914 29915 29916 29917 29918 29919 29920 29921 29922 29923 29924 29925 29926 29927 29928 29929 29930 29931 29932 29933 29934 29935 29936 29937 29938 29939 29940 29941 29942 29943 29944 29945 29946 29947 29948 29949 29950 29951 29952 29953 29954 29955 29956 29957 29958 29959 29960 29961 29962 29963 29964 29965 29966 29967 29968 29969 29970 29971 29972 29973 29974 29975 29976 29977 29978 29979 29980 29981 29982 29983 29984 29985 29986 29987 29988 29989 29990 29991 29992 29993 29994 29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 30017 30018 30019 30020 30021 30022 30023 30024 30025 30026 30027 30028 30029 30030 30031 30032 30033 30034 30035 30036 30037 30038 30039 30040 30041 30042 30043 30044 30045 30046 30047 30048 30049 30050 30051 30052 30053 30054 30055 30056 30057 30058 30059 30060 30061 30062 30063 30064 30065 30066 30067 30068 30069 30070 30071 30072 30073 30074 30075 30076 30077 30078 30079 30080 30081 30082 30083 30084 30085 30086 30087 30088 30089 30090 30091 30092 30093 30094 30095 30096 30097 30098 30099 30100 30101 30102 30103 30104 30105 30106 30107 30108 30109 30110 30111 30112 30113 30114 30115 30116 30117 30118 30119 30120 30121 30122 30123 30124 30125 30126 30127 30128 30129 30130 30131 30132 30133 30134 30135 30136 30137 30138 30139 30140 30141 30142 30143 30144 30145 30146 30147 30148 30149 30150 30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209 30210 30211 30212 30213 30214 30215 30216 30217 30218 30219 30220 30221 30222 30223 30224 30225 30226 30227 30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254 30255 30256 30257 30258 30259 30260 30261 30262 30263 30264 30265 30266 30267 30268 30269 30270 30271 30272 30273 30274 30275 30276 30277 30278 30279 30280 30281 30282 30283 30284 30285 30286 30287 30288 30289 30290 30291 30292 30293 30294 30295 30296 30297 30298 30299 30300 30301 30302 30303 30304 30305 30306 30307 30308 30309 30310 30311 30312 30313 30314 30315 30316 30317 30318 30319 30320 30321 30322 30323 30324 30325 30326 30327 30328 30329 30330 30331 30332 30333 30334 30335 30336 30337 30338 30339 30340 30341 30342 30343 30344 30345 30346 30347 30348 30349 30350 30351 30352 30353 30354 30355 30356 30357 30358 30359 30360 30361 30362 30363 30364 30365 30366 30367 30368 30369 30370 30371 30372 30373 30374 30375 30376 30377 30378 30379 30380 30381 30382 30383 30384 30385 30386 30387 30388 30389 30390 30391 30392 30393 30394 30395 30396 30397 30398 30399 30400 30401 30402 30403 30404 30405 30406 30407 30408 30409 30410 30411 30412 30413 30414 30415 30416 30417 30418 30419 30420 30421 30422 30423 30424 30425 30426 30427 30428 30429 30430 30431 30432 30433 30434 30435 30436 30437 30438 30439 30440 30441 30442 30443 30444 30445 30446 30447 30448 30449 30450 30451 30452 30453 30454 30455 30456 30457 30458 30459 30460 30461 30462 30463 30464 30465 30466 30467 30468 30469 30470 30471 30472 30473 30474 30475 30476 30477 30478 30479 30480 30481 30482 30483 30484 30485 30486 30487 30488 30489 30490 30491 30492 30493 30494 30495 30496 30497 30498 30499 30500 30501 30502 30503 30504 30505 30506 30507 30508 30509 30510 30511 30512 30513 30514 30515 30516 30517 30518 30519 30520 30521 30522 30523 30524 30525 30526 30527 30528 30529 30530 30531 30532 30533 30534 30535 30536 30537 30538 30539 30540 30541 30542 30543 30544 30545 30546 30547 30548 30549 30550 30551 30552 30553 30554 30555 30556 30557 30558 30559 30560 30561 30562 30563 30564 30565 30566 30567 30568 30569 30570 30571 30572 30573 30574 30575 30576 30577 30578 30579 30580 30581 30582 30583 30584 30585 30586 30587 30588 30589 30590 30591 30592 30593 30594 30595 30596 30597 30598 30599 30600 30601 30602 30603 30604 30605 30606 30607 30608 30609 30610 30611 30612 30613 30614 30615 30616 30617 30618 30619 30620 30621 30622 30623 30624 30625 30626 30627 30628 30629 30630 30631 30632 30633 30634 30635 30636 30637 30638 30639 30640 30641 30642 30643 30644 30645 30646 30647 30648 30649 30650 30651 30652 30653 30654 30655 30656 30657 30658 30659 30660 30661 30662 30663 30664 30665 30666 30667 30668 30669 30670 30671 30672 30673 30674 30675 30676 30677 30678 30679 30680 30681 30682 30683 30684 30685 30686 30687 30688 30689 30690 30691 30692 30693 30694 30695 30696 30697 30698 30699 30700 30701 30702 30703 30704 30705 30706 30707 30708 30709 30710 30711 30712 30713 30714 30715 30716 30717 30718 30719 30720 30721 30722 30723 30724 30725 30726 30727 30728 30729 30730 30731 30732 30733 30734 30735 30736 30737 30738 30739 30740 30741 30742 30743 30744 30745 30746 30747 30748 30749 30750 30751 30752 30753 30754 30755 30756 30757 30758 30759 30760 30761 30762 30763 30764 30765 30766 30767 30768 30769 30770 30771 30772 30773 30774 30775 30776 30777 30778 30779 30780 30781 30782 30783 30784 30785 30786 30787 30788 30789 30790 30791 30792 30793 30794 30795 30796 30797 30798 30799 30800 30801 30802 30803 30804 30805 30806 30807 30808 30809 30810 30811 30812 30813 30814 30815 30816 30817 30818 30819 30820 30821 30822 30823 30824 30825 30826 30827 30828 30829 30830 30831 30832 30833 30834 30835 30836 30837 30838 30839 30840 30841 30842 30843 30844 30845 30846 30847 30848 30849 30850 30851 30852 30853 30854 30855 30856 30857 30858 30859 30860 30861 30862 30863 30864 30865 30866 30867 30868 30869 30870 30871 30872 30873 30874 30875 30876 30877 30878 30879 30880 30881 30882 30883 30884 30885 30886 30887 30888 30889 30890 30891 30892 30893 30894 30895 30896 30897 30898 30899 30900 30901 30902 30903 30904 30905 30906 30907 30908 30909 30910 30911 30912 30913 30914 30915 30916 30917 30918 30919 30920 30921 30922 30923 30924 30925 30926 30927 30928 30929 30930 30931 30932 30933 30934 30935 30936 30937 30938 30939 30940 30941 30942 30943 30944 30945 30946 30947 30948 30949 30950 30951 30952 30953 30954 30955 30956 30957 30958 30959 30960 30961 30962 30963 30964 30965 30966 30967 30968 30969 30970 30971 30972 30973 30974 30975 30976 30977 30978 30979 30980 30981 30982 30983 30984 30985 30986 30987 30988 30989 30990 30991 30992 30993 30994 30995 30996 30997 30998 30999 31000 31001 31002 31003 31004 31005 31006 31007 31008 31009 31010 31011 31012 31013 31014 31015 31016 31017 31018 31019 31020 31021 31022 31023 31024 31025 31026 31027 31028 31029 31030 31031 31032 31033 31034 31035 31036 31037 31038 31039 31040 31041 31042 31043 31044 31045 31046 31047 31048 31049 31050 31051 31052 31053 31054 31055 31056 31057 31058 31059 31060 31061 31062 31063 31064 31065 31066 31067 31068 31069 31070 31071 31072 31073 31074 31075 31076 31077 31078 31079 31080 31081 31082 31083 31084 31085 31086 31087 31088 31089 31090 31091 31092 31093 31094 31095 31096 31097 31098 31099 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 31110 31111 31112 31113 31114 31115 31116 31117 31118 31119 31120 31121 31122 31123 31124 31125 31126 31127 31128 31129 31130 31131 31132 31133 31134 31135 31136 31137 31138 31139 31140 31141 31142 31143 31144 31145 31146 31147 31148 31149 31150 31151 31152 31153 31154 31155 31156 31157 31158 31159 31160 31161 31162 31163 31164 31165 31166 31167 31168 31169 31170 31171 31172 31173 31174 31175 31176 31177 31178 31179 31180 31181 31182 31183 31184 31185 31186 31187 31188 31189 31190 31191 31192 31193 31194 31195 31196 31197 31198 31199 31200 31201 31202 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 31213 31214 31215 31216 31217 31218 31219 31220 31221 31222 31223 31224 31225 31226 31227 31228 31229 31230 31231 31232 31233 31234 31235 31236 31237 31238 31239 31240 31241 31242 31243 31244 31245 31246 31247 31248 31249 31250 31251 31252 31253 31254 31255 31256 31257 31258 31259 31260 31261 31262 31263 31264 31265 31266 31267 31268 31269 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 31345 31346 31347 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 31369 31370 31371 31372 31373 31374 31375 31376 31377 31378 31379 31380 31381 31382 31383 31384 31385 31386 31387 31388 31389 31390 31391 31392 31393 31394 31395 31396 31397 31398 31399 31400 31401 31402 31403 31404 31405 31406 31407 31408 31409 31410 31411 31412 31413 31414 31415 31416 31417 31418 31419 31420 31421 31422 31423 31424 31425 31426 31427 31428 31429 31430 31431 31432 31433 31434 31435 31436 31437 31438 31439 31440 31441 31442 31443 31444 31445 31446 31447 31448 31449 31450 31451 31452 31453 31454 31455 31456 31457 31458 31459 31460 31461 31462 31463 31464 31465 31466 31467 31468 31469 31470 31471 31472 31473 31474 31475 31476 31477 31478 31479 31480 31481 31482 31483 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 31515 31516 31517 31518 31519 31520 31521 31522 31523 31524 31525 31526 31527 31528 31529 31530 31531 31532 31533 31534 31535 31536 31537 31538 31539 31540 31541 31542 31543 31544 31545 31546 31547 31548 31549 31550 31551 31552 31553 31554 31555 31556 31557 31558 31559 31560 31561 31562 31563 31564 31565 31566 31567 31568 31569 31570 31571 31572 31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 31595 31596 31597 31598 31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 31610 31611 31612 31613 31614 31615 31616 31617 31618 31619 31620
|
2013-06-10 Timothy Hatcher <timothy@apple.com>
Remove Xcode 4 skin and only have the Xcode 5 look.
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body.window-inactive .toolbar .dashboard):
(.toolbar.collapsed .dashboard):
(.toolbar.collapsed .dashboard > .logs):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
(WebInspector.DashboardView.prototype._setItemEnabled):
* UserInterface/DetailsSection.css:
* UserInterface/DividerNavigationItem.css:
(.navigation-bar .item.divider):
* UserInterface/FilterBar.css:
(.filter-bar > input[type="search"]):
(.filter-bar > input[type="search"]::-webkit-input-placeholder):
(.filter-bar > input[type="search"]:valid):
* UserInterface/FindBanner.css:
(.find-banner > input[type="search"]):
(.find-banner > button):
* UserInterface/HierarchicalPathComponent.css:
* UserInterface/InstrumentSidebarPanel.css:
* UserInterface/LayerTreeSidebarPanel.css:
* UserInterface/Main.css:
(#split-content-browser > .navigation-bar):
* UserInterface/NavigationBar.css:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected):
* UserInterface/ResourceSidebarPanel.css:
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
* UserInterface/ScopeBar.css:
(.scope-bar > li):
(.scope-bar > li:active):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
* UserInterface/SearchBar.css:
(.search-bar > input[type="search"]):
(.search-bar > input[type="search"]::-webkit-input-placeholder):
(.search-bar > input[type="search"]:valid):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-06-08 Timothy Hatcher <timothy@apple.com>
Improve switching from the full view console to the Resource sidebar, so the previous resource is shown in the content browser again.
Also cleans up my earlier changes and removes an assert that can fire often now.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
(WebInspector._sidebarCollapsedStateDidChange): Call _updateNavigationSidebarForCurrentContentView for the navigation sidebar.
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Only do this work if the sidebar is not collapsed. We don't
want to deselect items if the sidebar is collapsed, preserving the selection is important when showing the sidebar later.
(WebInspector._updateNavigationSidebarForCurrentContentView): Added. Split off from _navigationSidebarPanelSelected. Only do this work
if the sidebar is not collapsed.
(WebInspector._navigationSidebarPanelSelected): Call _updateNavigationSidebarForCurrentContentView.
(WebInspector._contentBrowserCurrentContentViewDidChange): Clean up by returning early if there is no current content view.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Remove an assert that can happen a lot now.
2013-06-07 Antoine Quint <graouts@apple.com>
<rdar://problem/14094308> Styles should come before Layers details sidebar
Switch Layers and Styles.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2013-06-07 Timothy Hatcher <timothy@apple.com>
Keep the selected tree element in sync with the current content view.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Added.
(WebInspector._navigationSidebarPanelSelected): Call _revealAndSelectRepresentedObjectInNavigationSidebar.
(WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
2013-06-07 Timothy Hatcher <timothy@apple.com>
Keep the navigation sidebar and the current content view in sync with a set of allowed sidebars per content view.
<rdar://problem/14075352> Jumping to a resource from the Timelines panel should reveal file in Resources sidebar when showing resource
Reviewed by Antoine Quint.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/Main.js:
(WebInspector.showSplitConsole): Show the navigation sidebar if it was showing.
(WebInspector.showFullHeightConsole): Hide the navigation sidebar and remember if it was showing.
(WebInspector.toggleConsoleView): Show the sidebar if it was showing.
(WebInspector._navigationSidebarPanelSelected): Ensure the navigation sidebar panel is allowed by the current content view.
(WebInspector._contentBrowserCurrentContentViewDidChange): Ditto.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.showContentViewForCurrentSelection):
(WebInspector.NavigationSidebarPanel.prototype.shown):
* UserInterface/ProfileView.js:
(WebInspector.ProfileView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.get allowedNavigationSidebarPanels): Added.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.get allowedNavigationSidebarPanels): Added.
2013-06-06 Timothy Hatcher <timothy@apple.com>
Properly filter into resources with a source map if they haven't been expanded yet.
<rdar://problem/14072548> Resources filter shows "No Filter Results" after reload with SourceMaps
Reviewed by Joseph Pecoraro.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass false to
traverseNextTreeElement to cause the tree elements to be populated. This matches the interactive
case when typing into the filter bar, which already worked with source maps.
2013-06-05 Antoine Quint <graouts@apple.com>
<rdar://problem/14077407> Jumping to an error in a JS file form the console highlights to white first before going back to red
Remove the explicit to color in the CSS animation we use to highlight a link
in the text editor as it is revealed, which means the to color will be the
underlying color set on the element. This will animate to red for errors,
yellow for warnings, and transparent for regular lines.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.css:
(@-webkit-keyframes text-editor-highlight-fadeout):
2013-06-05 Antoine Quint <graouts@apple.com>
<rdar://problem/14077152> Activity viewer does not update error count for grouped errors when inspector is closed.
Take into account the repeat count of an error when incrementing
the message count.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager.prototype._consoleMessageAdded):
(WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
(WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14072409> Pressing Enter/Esc when editing a breakpoint (conditional breakpoint) should dismiss popover
Handle Esc and Enter on the <input> to dismiss the popover.
This behaves like Xcode's breakpoint condition popover.
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown):
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
2013-06-05 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14054886> Pressing Enter in a blank console should do nothing, not insert a newline
Reviewed by Antoine Quint.
* UserInterface/ConsolePrompt.js:
2013-06-05 Timothy Hatcher <timothy@apple.com>
Add/update copyright and license to all the user interface files in
preparation for open sourcing to WebKit.
Rubber-stamped by Antoine Quint.
* UserInterface/ActivateButtonNavigationItem.js:
* UserInterface/ActivateButtonToolbarItem.js:
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
* UserInterface/ApplicationCacheFrame.js:
* UserInterface/ApplicationCacheFrameContentView.css:
* UserInterface/ApplicationCacheFrameContentView.js:
* UserInterface/ApplicationCacheFrameTreeElement.js:
* UserInterface/ApplicationCacheIcons.css:
* UserInterface/ApplicationCacheManager.js:
* UserInterface/ApplicationCacheManifest.js:
* UserInterface/ApplicationCacheManifestTreeElement.js:
* UserInterface/ApplicationCacheObserver.js:
* UserInterface/BinarySearch.js:
* UserInterface/BlankStylePropertiesSection.js:
* UserInterface/BottomUpProfileDataGridTree.js:
* UserInterface/BoxModelDetailsSectionRow.css:
* UserInterface/BoxModelDetailsSectionRow.js:
* UserInterface/Branch.js:
* UserInterface/BranchManager.js:
* UserInterface/Breakpoint.css:
* UserInterface/Breakpoint.js:
* UserInterface/BreakpointIcons.css:
* UserInterface/BreakpointTreeElement.css:
* UserInterface/BreakpointTreeElement.js:
* UserInterface/ButtonNavigationItem.css:
* UserInterface/ButtonNavigationItem.js:
* UserInterface/ButtonToolbarItem.css:
* UserInterface/ButtonToolbarItem.js:
* UserInterface/CSSCompletions.js:
* UserInterface/CSSKeywordCompletions.js:
* UserInterface/CSSMedia.js:
* UserInterface/CSSObserver.js:
* UserInterface/CSSProperty.js:
* UserInterface/CSSRule.js:
* UserInterface/CSSSelectorProfileObject.js:
* UserInterface/CSSSelectorProfileType.js:
* UserInterface/CSSSelectorProfileView.js:
* UserInterface/CSSStyleDeclaration.js:
* UserInterface/CSSStyleDeclarationSection.css:
* UserInterface/CSSStyleDeclarationSection.js:
* UserInterface/CSSStyleDeclarationTextEditor.css:
* UserInterface/CSSStyleDeclarationTextEditor.js:
* UserInterface/CSSStyleDetailsSidebarPanel.css:
* UserInterface/CSSStyleDetailsSidebarPanel.js:
* UserInterface/CSSStyleManager.js:
* UserInterface/CSSStyleSheet.js:
* UserInterface/CallFrame.js:
* UserInterface/CallFrameIcons.css:
* UserInterface/CallFrameTreeElement.js:
* UserInterface/ClusterContentView.css:
* UserInterface/ClusterContentView.js:
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/CodeMirrorCompletionController.css:
* UserInterface/CodeMirrorCompletionController.js:
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/CodeMirrorTokenTrackingController.css:
* UserInterface/CodeMirrorTokenTrackingController.js:
* UserInterface/Color.js:
* UserInterface/CompletionSuggestionsView.css:
* UserInterface/CompletionSuggestionsView.js:
* UserInterface/ComputedStyleDetailsPanel.js:
* UserInterface/ConsoleCommand.js:
* UserInterface/ConsoleCommandResult.js:
* UserInterface/ConsoleGroup.js:
* UserInterface/ConsoleMessage.js:
* UserInterface/ConsoleMessageImpl.js:
* UserInterface/ConsoleObserver.js:
* UserInterface/ConsolePrompt.css:
* UserInterface/ConsolePrompt.js:
* UserInterface/ContentBrowser.css:
* UserInterface/ContentBrowser.js:
* UserInterface/ContentView.css:
* UserInterface/ContentView.js:
* UserInterface/ContentViewContainer.css:
* UserInterface/ContentViewContainer.js:
* UserInterface/ContextMenu.js:
* UserInterface/ControlToolbarItem.css:
* UserInterface/ControlToolbarItem.js:
* UserInterface/CookieIcon.css:
* UserInterface/CookieStorageContentView.css:
* UserInterface/CookieStorageContentView.js:
* UserInterface/CookieStorageObject.js:
* UserInterface/CookieStorageTreeElement.js:
* UserInterface/DOMDetailsSidebarPanel.js:
* UserInterface/DOMNode.js:
* UserInterface/DOMNodeDetailsSidebarPanel.js:
* UserInterface/DOMNodeStyles.js:
* UserInterface/DOMObserver.js:
* UserInterface/DOMSearchMatchObject.js:
* UserInterface/DOMStorageContentView.css:
* UserInterface/DOMStorageContentView.js:
* UserInterface/DOMStorageIcons.css:
* UserInterface/DOMStorageObject.js:
* UserInterface/DOMStorageObserver.js:
* UserInterface/DOMStorageTreeElement.js:
* UserInterface/DOMTree.js:
* UserInterface/DOMTreeContentView.css:
* UserInterface/DOMTreeContentView.js:
* UserInterface/DOMTreeElement.js:
* UserInterface/DOMTreeElementPathComponent.js:
* UserInterface/DOMTreeManager.js:
* UserInterface/DOMTreeOutline.css:
* UserInterface/DOMTreeOutline.js:
* UserInterface/DOMTreeUpdater.js:
* UserInterface/DOMUtilities.js:
* UserInterface/DashboardManager.js:
* UserInterface/DashboardView.css:
* UserInterface/DashboardView.js:
* UserInterface/DataGrid.css:
* UserInterface/DataGrid.js:
* UserInterface/DatabaseContentView.css:
* UserInterface/DatabaseContentView.js:
* UserInterface/DatabaseHostTreeElement.js:
* UserInterface/DatabaseIcon.css:
* UserInterface/DatabaseObject.js:
* UserInterface/DatabaseObserver.js:
* UserInterface/DatabaseTableContentView.css:
* UserInterface/DatabaseTableContentView.js:
* UserInterface/DatabaseTableIcon.css:
* UserInterface/DatabaseTableObject.js:
* UserInterface/DatabaseTableTreeElement.js:
* UserInterface/DatabaseTreeElement.js:
* UserInterface/DebuggerManager.js:
* UserInterface/DebuggerObserver.js:
* UserInterface/DebuggerSidebarPanel.css:
* UserInterface/DebuggerSidebarPanel.js:
* UserInterface/DetailsSection.css:
* UserInterface/DetailsSection.js:
* UserInterface/DetailsSectionDataGridRow.js:
* UserInterface/DetailsSectionGroup.js:
* UserInterface/DetailsSectionPropertiesRow.js:
* UserInterface/DetailsSectionRow.js:
* UserInterface/DetailsSectionSimpleRow.js:
* UserInterface/DetailsSidebarPanel.css:
* UserInterface/DetailsSidebarPanel.js:
* UserInterface/DividerNavigationItem.css:
* UserInterface/DividerNavigationItem.js:
* UserInterface/Editing.css:
* UserInterface/EditingSupport.js:
* UserInterface/EventHandler.js:
* UserInterface/EventListenerSection.js:
* UserInterface/EventListenerSectionGroup.css:
* UserInterface/EventListenerSectionGroup.js:
* UserInterface/ExecutionContext.js:
* UserInterface/ExecutionContextList.js:
* UserInterface/FilterBar.css:
* UserInterface/FilterBar.js:
* UserInterface/FindBanner.css:
* UserInterface/FindBanner.js:
* UserInterface/FlexibleSpaceNavigationItem.css:
* UserInterface/FlexibleSpaceNavigationItem.js:
* UserInterface/FolderIcon.css:
* UserInterface/FolderTreeElement.js:
* UserInterface/FontResourceContentView.css:
* UserInterface/FontResourceContentView.js:
* UserInterface/Formatter.js:
* UserInterface/FormatterContentBuilder.js:
* UserInterface/FormatterSourceMap.js:
* UserInterface/Frame.js:
* UserInterface/FrameContentView.js:
* UserInterface/FrameResourceManager.js:
* UserInterface/FrameTreeElement.js:
* UserInterface/GeneralTreeElement.js:
* UserInterface/GeneralTreeElementPathComponent.js:
* UserInterface/GenericResourceContentView.js:
* UserInterface/Geometry.js:
* UserInterface/HierarchicalPathComponent.css:
* UserInterface/HierarchicalPathComponent.js:
* UserInterface/HierarchicalPathNavigationItem.js:
* UserInterface/ImageResourceContentView.css:
* UserInterface/ImageResourceContentView.js:
* UserInterface/ImageUtilities.js:
* UserInterface/IndeterminateProgressSpinner.css:
* UserInterface/IndeterminateProgressSpinner.js:
* UserInterface/InspectorBackend.js:
* UserInterface/InspectorFrontendAPI.js:
* UserInterface/InspectorObserver.js:
* UserInterface/InstrumentIcons.css:
* UserInterface/InstrumentSidebarPanel.css:
* UserInterface/InstrumentSidebarPanel.js:
* UserInterface/IssueManager.js:
* UserInterface/IssueMessage.js:
* UserInterface/JavaScriptLogViewController.js:
* UserInterface/JavaScriptProfileObject.js:
* UserInterface/JavaScriptProfileType.js:
* UserInterface/JavaScriptProfileView.css:
* UserInterface/JavaScriptProfileView.js:
* UserInterface/KeyboardShortcut.js:
* UserInterface/LayerTreeDataGrid.js:
* UserInterface/LayerTreeDataGridNode.js:
* UserInterface/LayerTreeManager.js:
* UserInterface/LayerTreeObserver.js:
* UserInterface/LayerTreeSidebarPanel.css:
* UserInterface/LayerTreeSidebarPanel.js:
* UserInterface/LayoutTimelineDataGrid.js:
* UserInterface/LayoutTimelineDataGridNode.js:
* UserInterface/LayoutTimelineRecord.js:
* UserInterface/LoadInspectorBackendCommands.js:
* UserInterface/LoadLocalizedStrings.js:
* UserInterface/LogContentView.css:
* UserInterface/LogContentView.js:
* UserInterface/LogIcon.css:
* UserInterface/LogManager.js:
* UserInterface/LogObject.js:
* UserInterface/LogTreeElement.js:
* UserInterface/MIMETypeUtilities.js:
* UserInterface/Main.css:
* UserInterface/Main.html:
* UserInterface/Main.js:
* UserInterface/MetricsStyleDetailsPanel.js:
* UserInterface/NavigationBar.css:
* UserInterface/NavigationBar.js:
* UserInterface/NavigationItem.js:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/NavigationSidebarPanel.js:
* UserInterface/NetworkDataGrid.css:
* UserInterface/NetworkDataGrid.js:
* UserInterface/NetworkGraphCalculator.js:
* UserInterface/NetworkObserver.js:
* UserInterface/NetworkTimeline.css:
* UserInterface/Object.js:
* UserInterface/ObjectPropertiesSection.js:
* UserInterface/PageObserver.js:
* UserInterface/PathComponentIcons.css:
* UserInterface/Popover.css:
* UserInterface/Popover.js:
* UserInterface/ProfileManager.js:
* UserInterface/ProfileObject.js:
* UserInterface/ProfileType.js:
* UserInterface/ProfileView.css:
* UserInterface/ProfileView.js:
* UserInterface/ProfilerObserver.js:
* UserInterface/PropertiesSection.js:
* UserInterface/QuickConsole.css:
* UserInterface/QuickConsole.js:
* UserInterface/QuickConsoleNavigationBar.js:
* UserInterface/RadioButtonNavigationItem.css:
* UserInterface/RadioButtonNavigationItem.js:
* UserInterface/Resource.js:
* UserInterface/ResourceClusterContentView.js:
* UserInterface/ResourceCollection.js:
* UserInterface/ResourceContentView.js:
* UserInterface/ResourceDetailsSidebarPanel.js:
* UserInterface/ResourceIcons.css:
* UserInterface/ResourceSearchMatchObject.js:
* UserInterface/ResourceSidebarPanel.css:
* UserInterface/ResourceSidebarPanel.js:
* UserInterface/ResourceTimelineDataGridNode.js:
* UserInterface/ResourceTimelineDataGridNodePathComponent.js:
* UserInterface/ResourceTimelineRecord.js:
* UserInterface/ResourceTreeElement.css:
* UserInterface/ResourceTreeElement.js:
* UserInterface/Revision.js:
* UserInterface/RulesStyleDetailsPanel.css:
* UserInterface/RulesStyleDetailsPanel.js:
* UserInterface/RuntimeObserver.js:
* UserInterface/ScopeBar.css:
* UserInterface/ScopeBar.js:
* UserInterface/ScopeBarItem.js:
* UserInterface/ScopeChainDetailsSidebarPanel.js:
* UserInterface/ScopeChainNode.js:
* UserInterface/ScopeVariableTreeElement.js:
* UserInterface/Script.js:
* UserInterface/ScriptContentView.css:
* UserInterface/ScriptContentView.js:
* UserInterface/ScriptTimelineDataGrid.js:
* UserInterface/ScriptTimelineDataGridNode.js:
* UserInterface/ScriptTimelineRecord.js:
* UserInterface/ScriptTreeElement.js:
* UserInterface/SearchBar.css:
* UserInterface/SearchBar.js:
* UserInterface/SearchIcons.css:
* UserInterface/SearchResultTreeElement.js:
* UserInterface/Section.css:
* UserInterface/Section.js:
* UserInterface/Setting.js:
* UserInterface/Sidebar.css:
* UserInterface/Sidebar.js:
* UserInterface/SidebarPanel.js:
* UserInterface/SourceCode.js:
* UserInterface/SourceCodeLocation.js:
* UserInterface/SourceCodePosition.js:
* UserInterface/SourceCodeRevision.js:
* UserInterface/SourceCodeTextEditor.css:
* UserInterface/SourceCodeTextEditor.js:
* UserInterface/SourceCodeTextRange.js:
* UserInterface/SourceCodeTreeElement.js:
* UserInterface/SourceMap.js:
* UserInterface/SourceMapManager.js:
* UserInterface/SourceMapResource.js:
* UserInterface/SourceMapResourceTreeElement.js:
* UserInterface/StorageManager.js:
* UserInterface/StorageTreeElement.js:
* UserInterface/StyleDetailsPanel.js:
* UserInterface/StyleRuleIcons.css:
* UserInterface/SyntaxHighlightingDefaultTheme.css:
* UserInterface/SyntaxHighlightingSupport.js:
* UserInterface/TextContentView.css:
* UserInterface/TextContentView.js:
* UserInterface/TextEditor.css:
* UserInterface/TextEditor.js:
* UserInterface/TextRange.js:
* UserInterface/TextResourceContentView.css:
* UserInterface/TextResourceContentView.js:
* UserInterface/TimelineDataGrid.css:
* UserInterface/TimelineDataGrid.js:
* UserInterface/TimelineDecorations.css:
* UserInterface/TimelineDecorations.js:
* UserInterface/TimelineEventMarker.js:
* UserInterface/TimelineManager.js:
* UserInterface/TimelineObserver.js:
* UserInterface/TimelineOverview.css:
* UserInterface/TimelineOverview.js:
* UserInterface/TimelineRecord.js:
* UserInterface/TimelinesContentView.css:
* UserInterface/TimelinesContentView.js:
* UserInterface/TimelinesObject.js:
* UserInterface/ToggleButtonNavigationItem.js:
* UserInterface/ToggleControlToolbarItem.js:
* UserInterface/Toolbar.css:
* UserInterface/Toolbar.js:
* UserInterface/TreeOutline.js:
* UserInterface/Utilities.js:
* UserInterface/WebInspector.js:
2013-06-05 Timothy Hatcher <timothy@apple.com>
Properly update the boundaries for the NetworkTransferTimeCalculator.
It is expected that _lowerBound and _upperBound return NaN instead of 0.
<rdar://problem/14040314> Web Inspector says it takes ~15,000 days to load developer library
Reviewed by Joseph Pecoraro.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Unlocalize the box model labels.
<rdar://problem/14057745> [WebBrowser]: Euro: 13A476r: Box model should not be localized
Reviewed by Ada Chan.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Syntax highlight inherit, initial and function names in CSS as keywords.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.propertyNamesCallback):
Strip function parenthesis from names. Process the color list to strip function parenthesis from rgb(), etc.
2013-06-05 Timothy Hatcher <timothy@apple.com>
Improve the implicit suffix handling when editing in the middle of a CSS value.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2013-06-05 Timothy Hatcher <timothy@apple.com>
Autocomplete property names for transition and transition-property.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.get values):
* UserInterface/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
2013-06-04 Timothy Hatcher <timothy@apple.com>
Properly autocomplete CSS values if the property name is on a previous line.
Part of: <rdar://problem/14053613> "-webkit-transform" autocompletes with colon in -webkit-transition definition
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2013-06-03 Timothy Hatcher <timothy@apple.com>
Add property names to the value keywords list so they are highlighted for -webkit-transition.
<rdar://problem/14052662> "-webkit-transform" is not correctly highlighted when editing CSS resource
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14047312> Add New Rules sometimes doesn't do anything
Better handle generating selectors for nodes with spaces in class or id attributes.
Tests: (Cases that were failing before)
<div class=" x "> => Before: (..x.) After: (.x)
<div id=" x "> => Before: (# x ) After: (div[id=" x "])
<div id='"x"'> => Before: (#"x") After: (div[id="\"x\""])
Reviewed by Timothy Hatcher.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.appropriateSelectorFor):
* UserInterface/DOMUtilities.js:
(WebInspector.displayNameForNode):
2013-06-03 Antoine Quint <graouts@apple.com>
<rdar://problem/13932229> Update CSSKeywordCompletions.js for iOS properties
Add support for the new -apple-prefixed values for the font property.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
2013-06-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14047029> Exception CallFrameTreeElement.js:19: TypeError: 'null' is not an object (evaluating 'callFrame.sourceCodeLocation.displaySourceCode')
Only include a subtitle for call frame tree elements if there is a
source code location, because that is used to determine the subtitle.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
2013-06-03 Timothy Hatcher <timothy@apple.com>
Hide the caret in read-only style declarations.
<rdar://problem/14047344> Locked rules (UA stylesheets) in Styles sidebar shouldn't display a caret
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor.read-only > .CodeMirror .CodeMirror-cursor): Added.
2013-06-03 Timothy Hatcher <timothy@apple.com>
Correctly stop auto recording the Timeline after the load event or a maximum duration (which ever comes first).
The original fix for <rdar://problem/13180009> was incorrect and caused <rdar://problem/13919974>
and also caused infinite auto recording on pages with indefinite timers that rapidly adds records.
<rdar://problem/14043180> REGRESSION (6.0.5-Curie): Safari Web Content: 100% CPU when using Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
Don't call _stopAutoRecordingSoon for the DOMContent event.
(WebInspector.TimelineManager.prototype._addRecord):
Don't call _stopAutoRecordingSoon. Add the call to _resetAutoRecordingDeadTimeTimeout back.
(WebInspector.TimelineManager.prototype._startAutoRecording):
Use MaximumAutoRecordDuration instead of MaximumAutoRecordDurationAfterLastRecord for the timeout.
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
Remove the dead time timeout now that it is back in _addRecord.
2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14040519> BoxModelDetailsSectionRow.js:120: ERROR: TypeError: 'null' is not an object (evaluating 'style.propertyForName(width).value')
Make the sidebar resilient against the possibility of an empty computed
style object. The ultimate issue is that the DOM Tree does not have a
selected node, but this could should be resilient anyways.
Reviewed by Timothy Hatcher.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
2013-06-02 Joseph Pecoraro <pecoraro@apple.com>
Reveal line sometimes doesn't work with content right at the edge of the screen.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._isPositionVisible):
2013-05-31 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14039888> Should not have spellchecking during most HTML editing
Allow EditingConfig to specify whether or not spellchecking should be enabled.
Spellcheck is off by default, because most of the time it is code, and it is
only enabled when editing a TextNode in the DOM Tree.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingTextNode):
* UserInterface/EditingSupport.js:
(WebInspector.EditingConfig):
(.cleanUpAfterEditing):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Previously the SourceCodeTextEditor was automatically formatting the
content after the content was set on the TextEditor and some initial
processing; such as revealing a pending position. This change lets
the SourceCodeTextEditor signal to the TextEditor that it should
automatically format the incoming string before the extra processing
takes place. Now the pending position is updated in _prettyPrint,
and revealed appropriately.
Reviewed by Antoine Quint.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
Move the auto formatting decision from didPopulate to willPopulate.
If autoformatting is needed, we signal the TextEditor before setting
the string.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.set autoFormat):
Keep a boolean for whether or not we should auto format when setting
the string. When setting the string, format if needed, after clearing
the history and before any pending position reveals.
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Rename "revealLine" to "revealPosition". Now, if the first reveal is
for a position in pretty printed code, it can be remapped to an
appropriate (line, column), instead of whatever (line, 0) mapped to.
There is one bug fix here, the _prettyPrint in TextEditor was
incorrectly doing this._lineNumberToReveal.lineNumber, which should
have just been this._lineNumberToReveal. However, this code was not
getting reached in its current form. That will be addressed in the
next part.
Reviewed by Antoine Quint.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode):
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
(WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.revealPosition):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.revealPosition):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype.line):
(WebInspector.TextEditor.prototype.updateLayout):
(WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition):
(WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.revealPosition):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Add WebInspector.SourceCodePosition. Rather than passing lineNumber
and columnNumber as separate parameters all over the place, we can
pass a position object. Create positions as appropriate from other
classes like SourceCodeLocation and TextRange.
Reviewed by Antoine Quint.
* UserInterface/Main.html:
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.position):
(WebInspector.SourceCodeLocation.prototype.formattedPosition):
(WebInspector.SourceCodeLocation.prototype.displayPosition):
* UserInterface/SourceCodePosition.js: Added.
(WebInspector.SourceCodePosition):
(WebInspector.SourceCodePosition.prototype.get lineNumber):
(WebInspector.SourceCodePosition.prototype.get columnNumber):
* UserInterface/TextRange.js:
(WebInspector.TextRange.prototype.startPosition):
(WebInspector.TextRange.prototype.endPosition):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14030289> Goto arrow from Timelines to autoformatted script not highlighting line correctly
Remove a reveal that always happens with line number 0.
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.toggleConsoleView):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
Unprefix uses of "-webkit-calc".
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14028576> Inspector finds CSS color names in other strings
Be a little more picky with our CSS regex, and include some post-processing
to act as a negative lookbehind, which is not supported in JavaScript regexes.
Do not allow color names that are prefixed or post-fixed with '-' or '.'.
Tests cases that previously would have produced swatches:
url(gold.png);
url("fools-gold.png");
url(fools.gold.png);
Using a regex is of course an imperfect solution, but it covers the majority
of cases and works well. It also allows us to detect colors in comments and
provide color swatches for those. This allows us to filter out some more
inappropriate cases.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14023649> No -webkit-filter autocompletion
Add functions to CSS completion suggestions. When the completion
suggestion is showing it has both parens, when committed, the cursor is
placed inside the two parens so users can keep typing.
This adds a bunch of common function completions.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13994485> Hovering element breadcrumbs should highlight element on page
When hovering DOMTreeElementPathComponents highlight the associated
node on the page, like when you hover the DOMTreeElement.
Reviewed by Dean Jackson.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOver):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseOut):
Provide hooks for subclass mouseOver and mouseOut functions.
* UserInterface/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling):
(WebInspector.DOMTreeElementPathComponent.prototype.mouseOver):
(WebInspector.DOMTreeElementPathComponent.prototype.mouseOut):
Implement the mouseOver and mouseOut to show / hide the DOM highlight.
2013-05-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14020206> Debugger popover not showing for "this"
Allow popover for the keyword "this".
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14007495> Web Inspector has "Instruments," but this is already a feature in Xcode
Rename the "Instruments" Navigation Sidebar to "Timelines". Marketing
had concerns about using the same name in multiple places.
Rubber-stamped by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
2013-05-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/14006550> Console errors persist when you navigate to other pages
The console can clear in two ways, handle both events.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Fix copy handeling for DataGrid.
When text selection was disabled in r48866, that broke the copy event
handlers for DataGrid. That change prevents focus from making a caret
selection inside the DataGrid (it goes outside to the nearest selectable
text). This broke bubbling of the copy event to the right elements.
Reviewed by Antoine Quint.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.handleBeforeCopyEvent):
(WebInspector.DataGrid.prototype.handleCopyEvent):
* UserInterface/Main.js:
(WebInspector._beforecopy):
(WebInspector._copy):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Allow data grid value column's in details sections wrap to multiple lines.
<rdar://problem/12329905> Can't easily view long header values
Reviewed by Antoine Quint.
* UserInterface/DataGrid.css:
(.data-grid tr.selected):
(.data-grid:focus tr.selected):
* UserInterface/DetailsSection.css:
(.details-section > .content .data-grid table.data):
(.details-section > .content .data-grid tr:nth-child(even)):
(.details-section > .content .data-grid tr:nth-child(odd)):
(.details-section > .content .data-grid td.value-column):
(.details-section > .content .data-grid td.value-column > div):
2013-05-27 Timothy Hatcher <timothy@apple.com>
Only add event markers for the main frame.
The event markers for frame heavy pages are too noisy and not very
useful. We also didn't distinguish frames in the marker tooltips.
Reviewed by Antoine Quint.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-26 Timothy Hatcher <timothy@apple.com>
Stop using a CSS drop-shadow filter for the Web Inspector popover.
Use the existing background canvas to draw the drop shadow instead.
<rdar://problem/13991902> Stop using CSS filters for Popover
This also fixes:
<rdar://problem/13977466> Popover arrow is not perfectly centered with content
Reviewed by Joseph Pecoraro.
* UserInterface/Popover.css:
(.popover):
(.popover > .container):
* UserInterface/Popover.js:
(WebInspector.Popover.prototype._update):
(WebInspector.Popover.prototype._drawBackground):
(WebInspector.Popover.prototype._bestMetricsForEdge):
2013-05-25 Timothy Hatcher <timothy@apple.com>
Show the popover after a delay so quickly arrowing down the grid does not flash the popover.
Also prevent showing the popover if the element is hidden, which was happening sometimes for
rows at the bottom which were marked as offscreen still. Put MIN_Y before MAX_X so the popover
is more predictably positioned, and this matches NSPopover. Plus always clear the popover
TreeOutline after giving the popover time to animate out when hiding.
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon.delayedWork):
(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
(WebInspector.TimelineDataGrid.prototype._hidePopover):
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Show a highlight quad on the screen when selecting a Layout/Paint record.
If we know the Quad / Rect of a Paint / Layout we can highlight that
portion on the inspected page. Unfortunately this information is not
very useful after the page scrolls, but it can be useful.
Reviewed by Timothy Hatcher.
* UserInterface/Geometry.js:
(WebInspector.Quad.prototype.toProtocol):
* UserInterface/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.reset):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.LayoutTimelineDataGrid.prototype.hidden):
(WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged):
(WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.shown):
(WebInspector.TimelineDataGrid.prototype.hidden):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType):
(WebInspector.TimelinesContentView.prototype.shown):
(WebInspector.TimelinesContentView.prototype.hidden):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
Clear the popover's contents when the content view is reset so
we don't leak anything held by the CallFrameTreeElements.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.reset):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.reset):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12656683> Show whole JS stack for layout & rendering triggers
Stack trace information is already available from the backend. Display
it in a popover when the corresponding row in the data grid is selected.
Users can then click a call frame to jump to that source code location.
Because both Layout and Script timelines include call traces, this is
made generic an put in TimelineDataGrid. Subclasses tell the superclass
which element to anchor the popover next to, but the superclass handles
showing the popover.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Allow a CallFrameTreeElement for native code call frames. Such call
frames don't have a source code location, so they have no subtitle.
* UserInterface/Images/Native.pdf: Added.
* UserInterface/CallFrameIcons.css:
(.native-icon .icon):
This is a duplicate of the DOMNode.pdf gray [N] icon.
* UserInterface/Main.html:
Include new files.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
* UserInterface/ScriptTimelineDataGrid.js: Added.
(WebInspector.ScriptTimelineDataGrid):
(WebInspector.ScriptTimelineDataGrid.prototype.callFramePopoverAnchorElement):
* UserInterface/LayoutTimelineDataGrid.js: Added.
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
Give each TimelineDataGrid subclass its own class. Implement only
what is needed. The new subclasses provide the element for the
superclass to anchor the call frame popover.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
Instantiate the specific DataGrid types.
* UserInterface/TimelineDataGrid.css: Added.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
(WebInspector.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
(WebInspector.TimelineDataGrid.prototype._windowResized):
(WebInspector.TimelineDataGrid.prototype._hidePopover):
(WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
Show and manager the popover.
(WebInspector.TimelineDataGrid.prototype._createPopoverContent):
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
Popover content is a TreeOutline containing CallFrameTreeElements.
When a call frame is selected, reveal the source code location.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
Helper for accessing a specific <td> inside a <tr> by column name.
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Switch from "X" and "Y" to "Area" in the Layout Timeline
For transformed paint rects an X, Y, Width and Height, didn't make
sense, so the backend switched to quads. Instead of showing approximate
values, like the bounding box, lets just remove unknowns and switch
to showing the Area instead.
Reviewed by Timothy Hatcher.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Restore Width and Height values for Layouts and Paints in Timeline
The backend changed a while back from including rect values, to quad
values. We should move away from X and Y and instead show Area.
Reviewed by Timothy Hatcher.
* UserInterface/Geometry.js:
(WebInspector.Quad):
Provide a wrapper object for the protocol Quad representation.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
Ingest new and old Layout and Paint timeline record.
* UserInterface/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord):
(WebInspector.LayoutTimelineRecord.prototype.get area):
(WebInspector.LayoutTimelineRecord.prototype.get rect):
(WebInspector.LayoutTimelineRecord.prototype.get quad):
A record may be wrapping a quad.
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Use SourceCodeLocations when displaying Script locations.
Using SourceCodeLocations allows the locations to show formatted
and display locations and is therefore more accurate. It also shows
the tooltip and display strings consistent with the rest of the UI.
Reviewed by Timothy Hatcher.
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
(WebInspector.ScriptTimelineRecord.prototype.get callFrames):
(WebInspector.ScriptTimelineRecord.prototype.get sourceCodeLocation):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Add Script Timeline records for Installing / Removing Timelines
We had records for TimerFired but not install / remove. It is sometimes
useful to see the stack traces where timers are added and removed.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
2013-05-24 Joseph Pecoraro <pecoraro@apple.com>
Remove some unused old style DataGrid events.
These events are not used anywhere, and we have a new style event.
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Turn off spellchecking on some text inputs.
Reviewed by David Kilzer.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
* UserInterface/FindBanner.js:
(WebInspector.FindBanner):
2013-05-24 Timothy Hatcher <timothy@apple.com>
Tag all Web Inspector images with copyright info.
Added to all images: Copyright 2013 Apple Inc. All rights reserved.
Requested by Joyce Chow.
* UserInterface/Images/ApplicationCache.png:
* UserInterface/Images/ApplicationCache@2x.png:
* UserInterface/Images/ApplicationCacheManifest.png:
* UserInterface/Images/ApplicationCacheManifest@2x.png:
* UserInterface/Images/BackArrow.pdf:
* UserInterface/Images/BottomUpTree.pdf:
* UserInterface/Images/Breakpoint.png:
* UserInterface/Images/Breakpoint@2x.png:
* UserInterface/Images/BreakpointButton.pdf:
* UserInterface/Images/BreakpointInactive.png:
* UserInterface/Images/BreakpointInactive@2x.png:
* UserInterface/Images/BreakpointInactiveButton.pdf:
* UserInterface/Images/ClippingCSS.png:
* UserInterface/Images/ClippingCSS@2x.png:
* UserInterface/Images/ClippingGeneric.png:
* UserInterface/Images/ClippingGeneric@2x.png:
* UserInterface/Images/ClippingJS.png:
* UserInterface/Images/ClippingJS@2x.png:
* UserInterface/Images/Close.pdf:
* UserInterface/Images/Colors.png:
* UserInterface/Images/Colors@2x.png:
* UserInterface/Images/Cookie.png:
* UserInterface/Images/Cookie@2x.png:
* UserInterface/Images/Crosshair.pdf:
* UserInterface/Images/DOMCharacterData.pdf:
* UserInterface/Images/DOMComment.pdf:
* UserInterface/Images/DOMDocument.pdf:
* UserInterface/Images/DOMDocumentType.pdf:
* UserInterface/Images/DOMElement.pdf:
* UserInterface/Images/DOMNode.pdf:
* UserInterface/Images/DOMTextNode.pdf:
* UserInterface/Images/DOMTree.pdf:
* UserInterface/Images/Database.png:
* UserInterface/Images/Database@2x.png:
* UserInterface/Images/DatabaseTable.png:
* UserInterface/Images/DatabaseTable@2x.png:
* UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
* UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
* UserInterface/Images/DisclosureTriangleTinyClosed.pdf:
* UserInterface/Images/DisclosureTriangleTinyOpen.pdf:
* UserInterface/Images/DockBottom.pdf:
* UserInterface/Images/DockRight.pdf:
* UserInterface/Images/DocumentCSS.png:
* UserInterface/Images/DocumentCSS@2x.png:
* UserInterface/Images/DocumentFont.png:
* UserInterface/Images/DocumentFont@2x.png:
* UserInterface/Images/DocumentGeneric.png:
* UserInterface/Images/DocumentGeneric@2x.png:
* UserInterface/Images/DocumentImage.png:
* UserInterface/Images/DocumentImage@2x.png:
* UserInterface/Images/DocumentJS.png:
* UserInterface/Images/DocumentJS@2x.png:
* UserInterface/Images/DocumentMarkup.png:
* UserInterface/Images/DocumentMarkup@2x.png:
* UserInterface/Images/Error.pdf:
* UserInterface/Images/ErrorSmall.pdf:
* UserInterface/Images/Errors.svg:
* UserInterface/Images/ErrorsEnabled.svg:
* UserInterface/Images/EventListener.pdf:
* UserInterface/Images/Exception.pdf:
* UserInterface/Images/FilterFieldGlyph.pdf:
* UserInterface/Images/FolderGeneric.png:
* UserInterface/Images/FolderGeneric@2x.png:
* UserInterface/Images/ForwardArrow.pdf:
* UserInterface/Images/Function.pdf:
* UserInterface/Images/GoToArrow.pdf:
* UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
* UserInterface/Images/IndeterminateProgressSpinner1.pdf:
* UserInterface/Images/IndeterminateProgressSpinner10.pdf:
* UserInterface/Images/IndeterminateProgressSpinner11.pdf:
* UserInterface/Images/IndeterminateProgressSpinner12.pdf:
* UserInterface/Images/IndeterminateProgressSpinner2.pdf:
* UserInterface/Images/IndeterminateProgressSpinner3.pdf:
* UserInterface/Images/IndeterminateProgressSpinner4.pdf:
* UserInterface/Images/IndeterminateProgressSpinner5.pdf:
* UserInterface/Images/IndeterminateProgressSpinner6.pdf:
* UserInterface/Images/IndeterminateProgressSpinner7.pdf:
* UserInterface/Images/IndeterminateProgressSpinner8.pdf:
* UserInterface/Images/IndeterminateProgressSpinner9.pdf:
* UserInterface/Images/InstructionPointer.png:
* UserInterface/Images/InstructionPointer@2x.png:
* UserInterface/Images/Issues.svg:
* UserInterface/Images/IssuesEnabled.svg:
* UserInterface/Images/LayerBorders.pdf:
* UserInterface/Images/LessColumns.pdf:
* UserInterface/Images/LocalStorage.png:
* UserInterface/Images/LocalStorage@2x.png:
* UserInterface/Images/Locked.pdf:
* UserInterface/Images/Log.png:
* UserInterface/Images/Log@2x.png:
* UserInterface/Images/Logs.svg:
* UserInterface/Images/Memory.svg:
* UserInterface/Images/MoreColumns.pdf:
* UserInterface/Images/NavigationItemAngleBrackets.pdf:
* UserInterface/Images/NavigationItemBrushAndRuler.pdf:
* UserInterface/Images/NavigationItemBug.pdf:
* UserInterface/Images/NavigationItemCurleyBraces.pdf:
* UserInterface/Images/NavigationItemFile.pdf:
* UserInterface/Images/NavigationItemLayers.pdf:
* UserInterface/Images/NavigationItemLog.pdf:
* UserInterface/Images/NavigationItemMagnifyingGlass.pdf:
* UserInterface/Images/NavigationItemStopwatch.pdf:
* UserInterface/Images/NavigationItemStorage.pdf:
* UserInterface/Images/NavigationItemTrash.pdf:
* UserInterface/Images/NavigationItemVariable.pdf:
* UserInterface/Images/Network.png:
* UserInterface/Images/Network@2x.png:
* UserInterface/Images/NetworkBarBlue.png:
* UserInterface/Images/NetworkBarBlue@2x.png:
* UserInterface/Images/NetworkBarGray.png:
* UserInterface/Images/NetworkBarGray@2x.png:
* UserInterface/Images/NetworkBarGreen.png:
* UserInterface/Images/NetworkBarGreen@2x.png:
* UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
* UserInterface/Images/NetworkBarOrange.png:
* UserInterface/Images/NetworkBarOrange@2x.png:
* UserInterface/Images/NetworkBarPurple.png:
* UserInterface/Images/NetworkBarPurple@2x.png:
* UserInterface/Images/NetworkBarRed.png:
* UserInterface/Images/NetworkBarRed@2x.png:
* UserInterface/Images/NetworkBarWhiteFlat.png:
* UserInterface/Images/NetworkBarWhiteFlat@2x.png:
* UserInterface/Images/NetworkBarYellow.png:
* UserInterface/Images/NetworkBarYellow@2x.png:
* UserInterface/Images/NetworkHollowBarBlue.png:
* UserInterface/Images/NetworkHollowBarBlue@2x.png:
* UserInterface/Images/NetworkHollowBarGray.png:
* UserInterface/Images/NetworkHollowBarGray@2x.png:
* UserInterface/Images/NetworkHollowBarGreen.png:
* UserInterface/Images/NetworkHollowBarGreen@2x.png:
* UserInterface/Images/NetworkHollowBarOrange.png:
* UserInterface/Images/NetworkHollowBarOrange@2x.png:
* UserInterface/Images/NetworkHollowBarPurple.png:
* UserInterface/Images/NetworkHollowBarPurple@2x.png:
* UserInterface/Images/NetworkHollowBarRed.png:
* UserInterface/Images/NetworkHollowBarRed@2x.png:
* UserInterface/Images/NetworkHollowBarYellow.png:
* UserInterface/Images/NetworkHollowBarYellow@2x.png:
* UserInterface/Images/Pause.pdf:
* UserInterface/Images/Percent.pdf:
* UserInterface/Images/Plus.pdf:
* UserInterface/Images/Profile.png:
* UserInterface/Images/Profile@2x.png:
* UserInterface/Images/PseudoElement.pdf:
* UserInterface/Images/Recording.png:
* UserInterface/Images/Recording@2x.png:
* UserInterface/Images/RecordingHovered.png:
* UserInterface/Images/RecordingHovered@2x.png:
* UserInterface/Images/RecordingStopped.png:
* UserInterface/Images/RecordingStopped@2x.png:
* UserInterface/Images/Reflection.pdf:
* UserInterface/Images/Reload.svg:
* UserInterface/Images/ReloadSelected.svg:
* UserInterface/Images/Request.pdf:
* UserInterface/Images/Resources.svg:
* UserInterface/Images/Response.pdf:
* UserInterface/Images/ResultLine.pdf:
* UserInterface/Images/Resume.pdf:
* UserInterface/Images/Script.png:
* UserInterface/Images/Script@2x.png:
* UserInterface/Images/SessionStorage.png:
* UserInterface/Images/SessionStorage@2x.png:
* UserInterface/Images/ShadowDOM.pdf:
* UserInterface/Images/SortIndicatorDownArrow.pdf:
* UserInterface/Images/SortIndicatorUpArrow.pdf:
* UserInterface/Images/SourceCode.pdf:
* UserInterface/Images/SplitToggleDown.pdf:
* UserInterface/Images/SplitToggleUp.pdf:
* UserInterface/Images/StepInto.pdf:
* UserInterface/Images/StepOut.pdf:
* UserInterface/Images/StepOver.pdf:
* UserInterface/Images/Stopwatch.png:
* UserInterface/Images/Stopwatch@2x.png:
* UserInterface/Images/StyleRuleAuthor.pdf:
* UserInterface/Images/StyleRuleInherited.pdf:
* UserInterface/Images/StyleRuleInheritedElement.pdf:
* UserInterface/Images/StyleRuleInspector.pdf:
* UserInterface/Images/StyleRuleUser.pdf:
* UserInterface/Images/StyleRuleUserAgent.pdf:
* UserInterface/Images/Time.svg:
* UserInterface/Images/TimelineBarBlue.png:
* UserInterface/Images/TimelineBarBlue@2x.png:
* UserInterface/Images/TimelineBarOrange.png:
* UserInterface/Images/TimelineBarOrange@2x.png:
* UserInterface/Images/TimelineBarPurple.png:
* UserInterface/Images/TimelineBarPurple@2x.png:
* UserInterface/Images/Undock.pdf:
* UserInterface/Images/UpDownArrows.svg:
* UserInterface/Images/UserInputPrompt.pdf:
* UserInterface/Images/UserInputPromptPrevious.pdf:
* UserInterface/Images/UserInputPromptPreviousSelected.pdf:
* UserInterface/Images/UserInputResult.pdf:
* UserInterface/Images/UserInputResultSelected.pdf:
* UserInterface/Images/Warning.pdf:
* UserInterface/Images/WarningSmall.pdf:
* UserInterface/Images/Weight.svg:
2013-05-24 Timothy Hatcher <timothy@apple.com>
Workaround an error with minifying the Web Inspector.
jsmin.py does not like: return //.test();
<rdar://problem/13983475> REGRESSION(r51583): Cannot show web inspector in recent spades
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
2013-05-23 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.12 to 3.13.
Include the new comment.js addon and hook it up to Command-/.
Reviewed by Joseph Pecoraro.
* Scripts/update-codemirror-resources.rb: Added comment.js.
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/External/CodeMirror/clojure.js:
* UserInterface/External/CodeMirror/codemirror.css:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js: Added.
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/less.js:
* UserInterface/External/CodeMirror/placeholder.js:
* UserInterface/External/CodeMirror/runmode.js:
* UserInterface/External/CodeMirror/sass.js:
* UserInterface/External/CodeMirror/searchcursor.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:
* UserInterface/Main.html: Include comment.js.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13972577> ER: when deleting break points on a file, don't move up if you can't delete
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Don't implicitly preventDefault with the keyboard shortcut. This allows the
default behavior of populating the system find pasteboard.
Reviewed by Timothy Hatcher.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Pass the "changeFocus" parameter through the internal cursor relative reveal functions.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPreviousSearchResult):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Instead of continuing the binary search when we encounter an invalid entry,
just break out immediately. This way we can revalidate all of the search results
and accurately search forward or back.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
(WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
(WebInspector.TextEditor.prototype._revalidateSearchResults):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Clear the automaticallyRevealFirstSearchResult state after revealing a search term.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
When searching forwards and backwards search relative to the current cursor position.
If we were already on a particular result we can keep the old path and just move
forward / back in the result list. Otherwise we binary search the closest position
to the cursor. Because results can be removed in the search path we have a
bit of added complexity.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
(WebInspector.TextEditor.prototype.addSearchResults.markRanges):
When automatically revealing, do so relative to the cursor.
(WebInspector.TextEditor.prototype.revealPreviousSearchResult):
(WebInspector.TextEditor.prototype.revealNextSearchResult):
(WebInspector.TextEditor.prototype._cursorDoesNotMatchLastRevealedSearchResult):
If we don't have a search result index, or if the cursor moved off
of the last search result index, search relative to the cursor.
(WebInspector.TextEditor.prototype._comparePositions):
(WebInspector.TextEditor.prototype._binarySearchInsertionIndexInSearchResults):
(WebInspector.TextEditor.prototype._revealFirstSearchResultBeforeCursor):
(WebInspector.TextEditor.prototype._revealFirstSearchResultAfterCursor):
Binary search search results handling the possibility that a search result
could be null. I'm not sure if this works perfectly in such cases, but
it worked fine in practice.
(WebInspector.TextEditor.prototype._revalidateSearchResults):
When we try to traverse to a search result and it was deleted, revalidate
all the search results. This can happen if in a CSS file and the user
deleted some instances of a search result.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/7545262> Command-E should put selected text in the search box
Step 1, make Command+E populate the FindBanner's search query, and silently
perform the search so that Command+G and Shift+Command+G work. Expose a
new ContentView method "searchQueryWithSelection" to get a search query
from the selection in that ContentView. This currently only works with
TextEditor ContentViews.
Reviewed by Timothy Hatcher.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner): Add the keyboard shortcut.
(WebInspector.FindBanner.prototype._populateSearchQueryFromSelection):
Ask the delegate (ContentBrowser) for a search query from selection.
If we get one, silently perform a search.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.searchQueryWithSelection):
Get the selection from CodeMirror and return that.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.searchQueryWithSelection):
Default implementation returns null, meaning no change.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.searchQueryWithSelection):
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.findBannerSearchQueryForSelection):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.searchQueryWithSelection):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.searchQueryWithSelection):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.searchQueryWithSelection):
Plumbing the message down the content views heirarchy.
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Remove unnecessary return for setter.
This was just a copy / paste error from when it was originally written.
Reviewed by Timothy Hatcher.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
2013-05-23 Joseph Pecoraro <pecoraro@apple.com>
Remove unused instance variable TextEditor._pendingSearchResultLineNumbers
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13961791> Stopping recording clears the timeline
It actually seems like a non-main frame resource change causes the
timeline to clear. Only clear on main frame main resource changes.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
When a BreakpointTreeElement is selected and the page is reloaded the
breakpoint tree elements are removed. When removing the tree element
the parent, ResourceTreeElement, was selected and the tree outline
created a content view to show for that resource. This content view
was being orphaned and replaced when new resources were loaded.
We never want to create a content view for a Script/ResourceTreeElement
in the DebuggerSidebarPanel when it has no children. That is a sign
that the tree element is about to be deleted.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
Prevent the populate with script content path from requesting content
multiple times. This is just an optimization to prevent duplicated work.
This can happen the first time the debugger is paused, by setting the
active call frame, opening the resource, and then triggering the active
call frame did change notification.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
On iOS 6, when associating a Script with a Resource also update the type
to be Script, that way the resource will get a TextResourceContentView
instead of a GeneralResourceContentView and fall into the existing path
that will fetch Script Source for an editor when it is on a breakpoint
and cannot load the resource content.
Also, replace instances of "scriptsForResource" with the new scripts
accessor on WebInspector.Resource.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.associateWithScript):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
2013-05-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12837326> REGRESSION: Content just displays a spinner when it stops on a breakpoint during load
Never loading content while on a breakpoint is possible in scripts if
the backend is paused executing the script before it has sent the
frontend information that the resource has finished loading. In these
cases, it is still possible for the frontend to get the "script source"
instead of the "resource content". These patches do that.
Start by creating an association between WebInspector.Resource and
WebInspector.Script. The order of events is always such that the Resource
is created first:
- Network.requestWillBeSent => create WebInspector.Resource
- Debugger.scriptParsed => create WebInspector.Script
So associate a Script with a Resource, if there is one, when the Script
is created. Currently we can only create the association with URLs,
which is not perfect if resources have the same URL but different
contents. That has never worked perfectly.
Reviewed by Timothy Hatcher.
* UserInterface/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.get resource):
(WebInspector.Script.prototype.requestContentFromBackend):
(WebInspector.Script.prototype._resolveResource):
On creation associate with a Resource via URL.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get scripts):
(WebInspector.Resource.prototype.associateWithScript):
Allow a Script to associate with this resource.
* UserInterface/FrameResourceManager.js:
Remove "resourceForScript". Script's now have a resource property.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/Main.js:
(WebInspector.linkifyLocation):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
* UserInterface/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
Refactor to the simpler script.resource.
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Remove generic event listeners when ClusterContentViews are closed.
Some event listeners were removed, but not all. This would have
caused the cluster content views to be leaked.
Reviewed by Timothy Hatcher.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.closed):
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Remove the concept of left and right navigation items.
They are unused. So just remove them.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar):
2013-05-22 Timothy Hatcher <timothy@apple.com>
Fix auto complete property caching.
<rdar://problem/13961832> Autocomplete of function return value causes side-effects multiple times
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
2013-05-21 Antoine Quint <graouts@apple.com>
<rdar://problem/13948862> REGRESSION (r150395): Sticky headers are mis-positioned
Reviewed by Joseph Pecoraro.
* UserInterface/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
Position and layer the headers correctly such that they snap to
the right position when scrolling.
* UserInterface/Main.js:
(WebInspector.updateDockedState):
(WebInspector._toolbarDisplayModeDidChange):
(WebInspector._toolbarSizeModeDidChange):
Remove unnecessary code now that sticky-positioned elements behave
as expected in overflow: scroll elements.
2013-05-21 Antoine Quint <graouts@apple.com>
<rdar://problem/13941438> Debugger popovers should prefer placement to the bottom/right over left to not cover expression
Reviewed by Timothy Hatcher.
Let Popover.present() be provided with a list of preferred edges in order
of preference and let the source code popovers prefer layout above, below and on
the right, in this order.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
Adopt new Popover.present() parameter type.
* UserInterface/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.present):
Rename preferredEdge to preferredEdges (plural).
(WebInspector.Popover.prototype._update):
Instead of gathering metrics sorted by keys, gather them sorted in the
order of preference provided by the preferredEdges argument.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
Adopt new Popover.present() parameter type and provide the desired list
of preferred edges in order.
2013-05-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13945892> Console messages not working with iOS 6
Reviewed by Timothy Hatcher.
Don't use the enums right now. They were not generated for the iOS 6
InspectorBackend commands file. In the future we should generate it
for Legacy systems as well as trunk, and use constants instead of
magic values in code.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
2013-05-19 Timothy Hatcher <timothy@apple.com>
Prevent selection and deselect all messages when clicking disclosure triangles in the console.
This mostly worked before, but if a selection did happen it wouldn't go away by itself. Now
it will go away if a disclosure triangle is clicked. Also the initial focus mouse down always
selected the row, now it does not.
<rdar://problem/13839762> REGRESSION: When inspecting an object in the console, the entire object becomes highlighted
Reviewed by Joseph Pecoraro.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.addMessage):
(WebInspector.ConsoleGroup.prototype._titleMouseDown): Added.
(WebInspector.ConsoleGroup.prototype._titleClicked):
Don't select a group row when the title is clicked.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._onmousedown):
Prevent default instead of stopping propagation.
* UserInterface/LogContentView.css:
(.outline-disclosure li.parent::before):
Drive by disclosure triangle position tweak.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mousedown):
Check for defaultPrevented and deselect all messages.
* UserInterface/TreeOutline.js:
(TreeElement.treeElementMouseDown):
Prevent default instead of stopping propagation.
2013-05-19 Timothy Hatcher <timothy@apple.com>
Fix the issue where console logs would overlap on reload.
Rejigger the console elements so the flex element can grow to fit and the parent does the scrolling.
<rdar://problem/13932826> REGRESSION (r147261): Reloading page causes overlapping console logs (116404)
Reviewed by Antoine Quint.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom):
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork):
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom):
* UserInterface/LogContentView.css:
(.content-view.log):
(.console-messages):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.updateLayout):
(WebInspector.LogContentView.prototype.get scrollableElements):
(WebInspector.LogContentView.prototype._ensureMessageIsVisible):
(WebInspector.LogContentView.prototype._positionForMessage):
2013-05-18 Timothy Hatcher <timothy@apple.com>
Make prefixed keywords syntax highlight correctly.
CodeMirror parses the vendor prefix separate from the property or keyword name,
so we need to strip vendor prefixes from our all our names, not just properties.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.nameForCodeMirror):
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
2013-05-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13774412> Update CSSKeywordCompletions.js for Curie + iOS
This is a pretty mechanical update to CSS autocompletion suggestions.
Also fix suggestions not working for "-webkit-" properties.
Most of this list was manually generated by looking at specifications
and walking CSSParser::parseValue, isValidKeywordPropertyAndValue,
CSSProperty::isInheritedProperty, the related .in files, and a bit
of sleuthing. It is not meant to be perfect, webkit differs from
specs slightly and doesn't implement all properties, but it does
a better job than before.
Rubber-stamped by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.forProperty):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Drop -webkit- prefixes from CSS properties that no longer require them.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.css:
* UserInterface/CodeMirrorOverrides.css:
* UserInterface/DOMTreeOutline.css:
* UserInterface/Editing.css:
* UserInterface/LogContentView.css:
* UserInterface/Main.css:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/Section.css:
* UserInterface/TimelinesContentView.css:
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13919974> 11A368: Instruments tab of RWI is almost empty when loading apple.com on device
Fix a typo in the constant name. It was using a non-existent constant
which resulted in a 0ms timeout instead of the intended 15s.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._startAutoRecording):
2013-05-16 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13917982> Inconsistency between right-clicking and control-clicking in Debugger gutter
Ignore "Ctrl + Left Click" in more places:
* in drag / resize scenarios
* text editor gutter on a breakpoint
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._startResizerDragging):
(WebInspector.DataGrid.prototype._resizerDragging):
(WebInspector.DataGrid.prototype._endResizerDragging):
* UserInterface/Main.js:
(WebInspector._dockedResizerMouseDown.dockedResizerDrag):
(WebInspector._dockedResizerMouseDown.dockedResizerDragEnd):
(WebInspector._dockedResizerMouseDown):
(WebInspector._moveWindowMouseDown.toolbarDrag):
(WebInspector._moveWindowMouseDown.toolbarDragEnd):
(WebInspector._moveWindowMouseDown):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype._resizerMouseDown):
(WebInspector.Sidebar.prototype._resizerMouseUp):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._gutterMouseDown):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Make clicking completions work again in the Style details sidebar.
<rdar://problem/13919341> REGRESSION: Mouse clicking a CSS autocompletion suggestion no longer works
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured):
Clicking a suggestion causes the editor to blur. We don't want to reset content in this case.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype.isHandlingClickEvent): Added.
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions): Use this.isHandlingClickEvent().
2013-05-16 Timothy Hatcher <timothy@apple.com>
Reset the branches when the main frame navigates.
This makes sure the SourceCodeRevisions don't stick around between page loads and take up memory.
Reviewed by Joseph Pecoraro.
* UserInterface/BranchManager.js:
(WebInspector.BranchManager):
(WebInspector.BranchManager.prototype.initialize):
(WebInspector.BranchManager.prototype.deleteBranch):
(WebInspector.BranchManager.prototype._mainResourceDidChange):
2013-05-16 Timothy Hatcher <timothy@apple.com>
Some random style tweaks.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header): Smaller top margin to align with the icon better.
* UserInterface/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-gutters): Lighter border color to match Xcode 5.
2013-05-16 Timothy Hatcher <timothy@apple.com>
Fix a case where we would enter an infinite loop, consuming memory and hang.
<rdar://problem/13911608> REGRESSION (r50998): Massive memory growth and hanging (115811)
Reviewed by Joseph Pecoraro.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.updateForRedirectResponse):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.increaseSize):
(WebInspector.Resource.prototype.markAsFinished):
(WebInspector.Resource.prototype.markAsFailed):
Timestamps are expected to be NaN instead of null. This wasn't an issue before because
the timeline code didn't use these timestamps. Now Resource.firstTimestamp uses them,
which is used by ResourceTimelineRecord.startTime.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Allow Command-K to clear the console anywhere in the Inspector.
<rdar://problem/13888241> Command-K doesn't clear the Console unless it has focus
Reviewed by Antoine Quint.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
2013-05-15 Timothy Hatcher <timothy@apple.com>
Fix the Save As... keyboard shortcut.
Reviewed by Antoine Quint.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
Don't require the Option key. It is Command-Shift-S.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Make clicking the console icons in the dashboard toggle the scope.
<rdar://problem/13884713> Improve console filtering via the dashboard buttons
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
If the requested scope is already selected and the console is showing, then switch back to All.
2013-05-15 Timothy Hatcher <timothy@apple.com>
Make the tab key commit the completion of there is only one suggestion.
<rdar://problem/13897001> REGRESSION (Safari 6): Tab to accept autocomplete with 1 result
should dismiss completion suggestions popover
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
Commit the current completion if there is only one suggestion.
2013-05-14 Timothy Hatcher <timothy@apple.com>
Always evaluate the console prompt if the cursor is not at the last position.
<rdar://problem/13854691> New Return key behavior in Web Inspector breaks my typical usage
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
* UserInterface/JavaScriptLogViewController.js:
2013-05-14 Timothy Hatcher <timothy@apple.com>
Update Frame.securityOrigin when committing the provisional load.
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.commitProvisionalLoad):
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
2013-05-14 Timothy Hatcher <timothy@apple.com>
Add DOMStorage when the main resource changes.
<rdar://problem/13844066> REGRESSION: If the Web Inspector is displayed when you refresh the page, local and session storage is not visible
Reviewed by Joseph Pecoraro.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype._mainResourceDidChange):
(WebInspector.StorageManager.prototype._addDOMStorageIfNeeded):
(WebInspector.StorageManager.prototype._securityOriginDidChange):
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13876379> Pretty printing while paused in the debugger loses the execution line
When pretty printing we replace the entire contents of the editor. If
the display location didn't change at all, then when we re-set the
execution line number, we wouldn't update the style on the line.
This change makes updating the execution line more of the TextEditor's
responsibility on a pretty print. Previously it was working in most cases
but now it should always work as long as the TextEditor has been given
an accurate execution line and column number. In pretty print we delete
the execution line handle so we are guaranteed to recreate it.
Just in case, also update SourceCodeLocation to listen to any location
changes, not just display location changes.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get executionColumnNumber):
(WebInspector.TextEditor.prototype.set executionColumnNumber):
2013-05-13 Timothy Hatcher <timothy@apple.com>
Fix the shortcut for the Layer details sidebar panel.
Also fix the naming of the toolbar buttons for the Style details sidebar and
Layer details sidebar so they are plural while the name in the tooltip is still singular.
<rdar://problem/13871872> Layers details sidebar shortcut should be control-shift-4, not control-shift-5
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel):
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
2013-05-13 Timothy Hatcher <timothy@apple.com>
Tweak the console completions to work as expected in more cases.
Also prevent empty prefix completions unless it is the start of property access.
This was a regression from the fix for <rdar://problem/13860627>.
<rdar://problem/13871885> Command-line API functions don't autocomplete when passed as parameter
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
* UserInterface/JavaScriptLogViewController.js:
2013-05-12 Timothy Hatcher <timothy@apple.com>
Update the toolbar height so the save sheet is positioned correctly and window gradient is accurate.
<rdar://problem/13871067> Save sheet on the Web Inspector does not come out from under the toolbar
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._updateToolbarHeight):
(WebInspector._toolbarDisplayModeDidChange):
(WebInspector._toolbarSizeModeDidChange):
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
Improve String.prototype.startsWith to not search the entire string.
Using the optional second parameter of lastIndexOf we can only search
for a substring from index 0, and not check the rest of the string.
I also went through and replaced all uses of str.indexOf(...) === 0 with
str.startsWith(...), or if a single character str.charAt(0) === "?".
Reviewed by Timothy Hatcher.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.startsWith):
(WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
* UserInterface/CookieStorageContentView.js:
(WebInspector.cookieMatchesResourceURL):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
* UserInterface/EditingSupport.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
* UserInterface/JavaScriptProfileView.js:
* UserInterface/Main.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
* UserInterface/Resource.js:
(WebInspector.Resource.Type.fromMIMEType):
* UserInterface/Utilities.js:
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
Make mailto: href links behave correctly.
Test: data:text/html,<a href="mailto:pecoraro@apple.com?subject=email">Email Joe</a>
Reviewed by Timothy Hatcher.
* UserInterface/Utilities.js:
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
TextEditor / SourceCodeTextEditor (most resources) already had behavior where
clicking a "link" would attempt to open it in the Inspector, and fallback to
opening a new browser tab for the URL. This hardens that behavior in the
"jump to symbol" case, and makes it work in the CSS Sidebar with Command+Click.
To encourage editing in the style sidebar, style url(...)s as strings,
which is how they displayed before these patches.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._openClickedLinks):
Cleanup the code a bit.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Don't jump to symbol when clicking a link. Fallback to TextEditor's link opening behavior.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype):
Handle jump to symbol when clicking a link to behave link TextEditor's link opening behavior.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .cm-link):
In the Style sidebar editors display links as strings by default.
2013-05-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13572739> REGRESSION: Styles sidebar url(...) should have a way to jump to the resource
Add extendedCSSToken, modeled after extendedXMLToken to parse url(...)
links and give them a "link" style class.
Normally CodeMirror parses "url", "(", <optionally quoted string>, ")".
We hook into this case and manually parse the optionally quoted string
ourselves so that we can handle quotes and whitespace exactly how we
want to.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
2013-05-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13865123> REGRESSION: Incorrect link tokenization of unquoted src/href links - <img src=...>
Handle unquoted attributes when we take over tokenization of link attribute values.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorAdditions.js:
2013-05-11 Timothy Hatcher <timothy@apple.com>
Make the tab behavior consistent among all CodeMirror editors.
Making this a setting is tracked by <rdar://problem/10593948>.
Reviewed by Darin Adler.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Allow editing any local file since edits can be saved and reloaded right from the Inspector.
Reviewed by Dean Jackson.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype._contentWillPopulate):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype._contentWillPopulate):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Support saving text resources and the console log to a local file.
<rdar://problem/5827275> PARITY (Chrome Developer Tools): Add an option to save a resource locally
Reviewed by Dean Jackson.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get supportsSave):
(WebInspector.ClusterContentView.prototype.get saveData):
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString): Always include the level. It was omitted
when we didn't have text range selection to make it easier to copy and paste. But we also include the
file and line info, so it was already has more info than just the message.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._saveDataToFile):
(WebInspector.ContentBrowser.prototype._save):
(WebInspector.ContentBrowser.prototype._saveAs):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.get supportsSave):
(WebInspector.LogContentView.prototype.get saveData):
(WebInspector.LogContentView.prototype.handleCopyEvent):
(WebInspector.LogContentView.prototype._formatMessagesAsData.var):
(WebInspector.LogContentView.prototype._formatMessagesAsData):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.get supportsSave):
(WebInspector.ScriptContentView.prototype.get saveData):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.get supportsSave):
(WebInspector.TextContentView.prototype.get saveData):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get supportsSave):
(WebInspector.TextResourceContentView.prototype.get saveData):
2013-05-11 Timothy Hatcher <timothy@apple.com>
Fix an exception I saw while navigating between pages.
I only reproduced this once, but the fix is a simple null check.
I'm assuming close was called a second time.
Reviewed by Anders Carlsson.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.close):
2013-05-10 Timothy Hatcher <timothy@apple.com>
Tweak layer borders icon.
<rdar://problem/13717886> Two layers buttons with different meanings
* UserInterface/Images/LayerBorders.pdf:
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Add a "jump to symbol" mode when the command key is down for the CSS
style sidebar to jump to the display CSS Resource.
Reviewed by Timothy Hatcher.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
Listen for GlobalModifierKeysDidChange events when the style for the
editor has an owner rule and that owner rule has a source code location.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Jump to the display resource when clicking the highlighted range.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
Immediately highlight hovered ranges for jump to symbol mode.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Add a "jump to symbol" mode when the command key is down, to quickly
jump between a SourceMapResource and the original resources for the
hovered token. This mode takes precedence over debugger popovers if
enabled (because the command key is pressed).
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
Listen for GlobalModifierKeysDidChange events when this file has a source map
(either it is a SourceMapResource or it is a SourceCode with sourceMap resources).
(WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
In SourceCodeTextEditors there are 2 possible reasons we may have hover tracking,
when on a breakpoint for JavaScript or in Jump To Symbol tracking mode.
(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
Switch between and different tracking modes with different settings.
(WebInspector.SourceCodeTextEditor.prototype._sourceCodeLocationForEditorPosition):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
When in jump to symbol mode, determine the sourceCodeLocation relating to the
token that was clicked and jump between resources.
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
When in jump to symbol mode, that takes precedence. Highlight just the hovered token.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Move token tracking out of TextEditor into its own class with settings,
CodeMirrorTokenTrackingController. You can now set the token mode on
the controller to get different types of candidate hovered token results
back to the delegate (TextEditor subclass).
The CodeMirrorTokenTrackingController can start/stop tracking, highlight
a given text range, set delays for mousing over and out of tokens before
actions are taken, and provide different candidates depending the chosen
mode. The current modes are:
NonSymbolTokens - returns a candidate for just the hovered token.
JavaScriptExpression - returns a candidate for the hovered token with
extra information about the JavaScript expression ending at that token.
When tracking is enabled, the delegate may be notified of changes:
tokenTrackingControllerCanReleaseHighlightedRange - should remove the highlight
tokenTrackingControllerHighlightedRangeReleased - the highlight was removed
tokenTrackingControllerHighlightedRangeWasClicked - the highlight was clicked
tokenTrackingControllerNewHighlightCandidate - new hovered highlight candidate
A plus side of this is that TextEditor now no longer knows about
"JavaScript". It shouldn't need to know about a certain mode of
content that it contains.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/CodeMirrorTokenTrackingController.css: Added.
(.CodeMirror .jump-to-symbol-highlight): Shared style for any type of editor.
* UserInterface/CodeMirrorTokenTrackingController.js: Added.
(WebInspector.CodeMirrorTokenTrackingController):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get delegate):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set delegate):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mode):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOverDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOverDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get mouseOutReleaseDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set mouseOutReleaseDelayDuration):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get classNameForHighlightedRange):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set classNameForHighlightedRange):
Different settings of the controller.
(WebInspector.CodeMirrorTokenTrackingController.prototype.get tracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get candidate):
Accessors for current state, but cannot be modified.
(WebInspector.CodeMirrorTokenTrackingController.prototype.startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.stopTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
(WebInspector.CodeMirrorTokenTrackingController.prototype.removeHighlightedRange):
API to make use of the tracker to start/stop/highlight.
(WebInspector.CodeMirrorTokenTrackingController.prototype.boundsForRange):
Helper for getting the bounds of a given codemirror text range.
(WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedWithMarkedText):
(WebInspector.CodeMirrorTokenTrackingController.prototype._markedTextIsNoLongerHovered):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOutOfEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasPressedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
Events handled while tracking. Very few changes.
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNonSymbolToken):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
When a token is hovered, create a candidate depending on the controller's mode.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get tokenTrackingController):
Create and expose the tokenTrackingController.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WebInspector.SourceCodeTextEditor.prototype._shouldTrackTokenHovering):
(WebInspector.SourceCodeTextEditor.prototype._startTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._stopTrackingTokenHoveringIfNeeded):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerCanReleaseHighlightedRange):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
Switch to the tracking controller instead of TextEditor methods and properties.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .hovered-expression-highlight):
(@-webkit-keyframes text-editor-hovered-expression-highlight-fadeout):
Renamed the class name for expressions to have "expression" in the name.
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13769698> Should be a way to jump between SourceMap resource and Original resource
Introduce WebInspector.modifierKeys to know which modifier keys are
active at any time (command, option, shift). Trigger events on changes
through WebInspector.notifications.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateModifierKeys):
(WebInspector._windowKeyDown):
(WebInspector._windowKeyUp):
* UserInterface/Object.js:
2013-05-10 Joseph Pecoraro <pecoraro@apple.com>
Do a little renaming on ResourceSidebarPanel show methods for text
ranges. This better matches the showSourceCodeLocation method names.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
2013-05-10 Timothy Hatcher <timothy@apple.com>
Make the console prompt suggest completions after typing "." or "[".
<rdar://problem/13860627> REGRESSION: Console autocompletion does not suggest anything until first character is typed
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Tell WebInspector.Resource about its type when it is created instead of changing it later.
This depends on: https://webkit.org/b/74935
<rdar://problem/13726105> Timeline network filters don't update as resources change type (74935)
Reviewed by David Kilzer.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
* UserInterface/InspectorBackendCommands.js:
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.requestWillBeSent):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Use a different image for the layer border toggle button.
<rdar://problem/13717886> Two layers buttons with different meanings
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
* UserInterface/Images/LayerBorders.pdf: Added.
2013-05-08 Timothy Hatcher <timothy@apple.com>
Fix the heirarchical path components for unrevealed source map resources.
<rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
Special case WebInspector.SourceMapResource.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
Revert r50608.
2013-05-07 Timothy Hatcher <timothy@apple.com>
Fix the background color for the Timeline navigation bar.
The container is taller than the navigation bar, and it used for mouse over slop.
So the background color needs to be on the navigation bar.
Reviewed by Joseph Pecoraro.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid > .navigation-bar-container):
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Compare async resource types by their first timestamp so they are in chronological order.
<rdar://problem/13827118> Web Inspector: cannot see order of xhrs in resource inspector (115728)
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.compareResourceTreeElements):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Fix and simplify the layout path for Toolbar.
<rdar://problem/13828232> REGRESSION: Toolbar overflows when using Icons and Text (Horizontal) mode
Reviewed by Joseph Pecoraro.
* UserInterface/Toolbar.css:
(.toolbar .control-section):
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout):
2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13821139> After deleting a node when remote inspecting, Web Inspector is broken
When using the remote inspector, there is enough of a delay between
messages that the didRemoveNode handler triggers the DOMTreeUpdater to
refresh the portion of the tree before this removeNodeCallback happens.
Since removeNodeCallback is asynchronous anyways, we should bail if
the tree element was already removed from the tree (has no parent).
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.remove.removeNodeCallback):
(WebInspector.DOMTreeElement.prototype.remove):
2013-05-07 Joseph Pecoraro <pecoraro@apple.com>
Fix member name typo.
This was the only occurrence of _selectDOMNode. This looks
like it was just a typo of _selectedDOMNode.
Reviewed by Darin Adler.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Use a brighter blue for selected labels in the label-only toolbar mode.
This better matches the blue used in the selected toolbar icons.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ButtonToolbarItem.css:
(.toolbar.label-only .item.activate.button.activated > .label):
2013-05-07 Timothy Hatcher <timothy@apple.com>
Only allow the LCD to be a single line, giving less difference between toolbar modes and sizes.
This better distributes the space in the LCD and makes it collapse down to 3 items when
there isn't enough room for all 6 items.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body.nightly-build .toolbar .dashboard):
(body.nightly-build .toolbar.collapsed .dashboard):
(body:not(.nightly-build) .toolbar.collapsed .dashboard):
(body:not(.nightly-build) .toolbar.collapsed .dashboard > .logs):
(.toolbar .dashboard > .item):
(.toolbar .dashboard > .resourcesSize):
(.toolbar .dashboard > .item > div):
(.toolbar.normal-size.icon-and-label-vertical .dashboard):
(.toolbar.normal-size.icon-and-label-horizontal .dashboard > .item):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update the LCD background to match Xcode 5.
This change is conditional to non-nightlies.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.css:
(.toolbar .dashboard):
(body:not(.nightly-build) .toolbar .dashboard):
(body.window-inactive:not(.nightly-build) .toolbar .dashboard):
(body.nightly-build .toolbar .dashboard):
(.toolbar .dashboard > .item):
(.toolbar.small-size.icon-and-label-horizontal .dashboard):
(body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard):
(.toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
(body.nightly-build .toolbar.small-size.icon-and-label-horizontal .dashboard > .item):
(.toolbar.normal-size.icon-and-label-horizontal .dashboard):
(body.nightly-build .toolbar.normal-size.icon-and-label-horizontal .dashboard):
(.toolbar.small-size.icon-and-label-vertical .dashboard):
(body.nightly-build .toolbar.small-size.icon-and-label-vertical .dashboard):
(.toolbar.normal-size.icon-and-label-vertical .dashboard):
(body.nightly-build .toolbar.normal-size.icon-and-label-vertical .dashboard):
(.toolbar.icon-and-label-vertical .dashboard > .item):
(body.nightly-build .toolbar.icon-and-label-vertical .dashboard > .item):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update the filter field placeholder in the Resources sidebar when showing search results.
Reviewed by Antoine Quint.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ResourceSidebarPanel.js:
2013-05-06 Timothy Hatcher <timothy@apple.com>
Always have the HierarchicalPathComponent take space so it gives the last item some padding.
Reviewed by Antoine Quint.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
Use visibility: hidden instead of display: none.
2013-05-06 Timothy Hatcher <timothy@apple.com>
Make ScopeBarItem and RadioButtonNavigationItem have a min-width so when they are selected the bold
weight does not cause the item to change its width.
This adds some updateLayout calls to places that needed it now or were missing it already.
This change is not conditional to non-nightlies. It does no harm to always do this.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set label):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
* UserInterface/Main.js:
(WebInspector._contentBrowserSizeDidChange):
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.get selected):
(WebInspector.RadioButtonNavigationItem.prototype.set selected):
(WebInspector.RadioButtonNavigationItem.prototype.get active):
(WebInspector.RadioButtonNavigationItem.prototype.set active):
(WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
* UserInterface/ScopeBar.js:
(WebInspector.ScopeBar.prototype.updateLayout):
(WebInspector.ScopeBar.prototype._populate):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.updateLayout):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Show overflow shadow pockets in the navigation sidebar when content can scroll.
This change is conditional to non-nightlies.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow):
(body.nightly-build .sidebar > .panel.navigation > .overflow-shadow):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.shown):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WebInspector.NavigationSidebarPanel.prototype._treeElementExpandedOrCollapsed):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/TreeOutline.js:
(TreeElement.prototype.collapse):
(TreeElement.prototype.expand):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update focus and active focus generated images to match the blues used by Xcode 5.
This change is not conditional to non-nightlies. It shouldn't be too revealing.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/ImageUtilities.js:
(.generateImage):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Update styles to match the majority of Xcode 5's design changes.
The style changes are conditional so they wont apply when running a WebKit nightly.
After WWDC we can remove the condition and the extra style rules this adds.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Rubber-stamped by Antoine Quint.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only):
(body.nightly .navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
* UserInterface/CodeMirrorOverrides.css:
(.CodeMirror .CodeMirror-gutters):
(.body.nightly-build .CodeMirror .CodeMirror-gutters):
(.CodeMirror .CodeMirror-linenumber):
* UserInterface/DetailsSection.css:
(.details-section > .header):
(.details-section .details-section > .header):
(body.nightly-build .details-section > .header):
(body.nightly-build .details-section .details-section > .header):
* UserInterface/DividerNavigationItem.css:
(.navigation-bar .item.divider):
(body.nightly .navigation-bar .item.divider):
* UserInterface/FilterBar.css:
(.filter-bar):
(body.nightly-build .filter-bar):
(body:not(.nightly-build) .filter-bar > input[type="search"]):
(body:not(.nightly-build) .filter-bar > input[type="search"]::-webkit-input-placeholder):
(body:not(.nightly-build) .filter-bar > input[type="search"]:valid):
* UserInterface/FilterBar.js:
(WebInspector.FilterBar):
* UserInterface/FindBanner.css:
(body.nightly-build .find-banner):
(body:not(.nightly) .find-banner > input[type="search"]):
(body:not(.nightly) .find-banner > button):
(.find-banner > button > .glyph):
(body.nightly .find-banner > button > .glyph):
* UserInterface/HierarchicalPathComponent.css:
(body.nightly .hierarchical-path-component > .separator):
(.hierarchical-path-component.text-only > select):
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .title-bar):
(body.nightly-build .sidebar > .panel.instrument > .title-bar):
(.sidebar > .panel.instrument > .title-bar.profiles):
(body.nightly-build .sidebar > .panel.instrument > .title-bar.profiles):
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .bottom-bar):
(body.nightly-build .layer-tree.panel .bottom-bar):
* UserInterface/Main.css:
(#split-content-browser > .navigation-bar):
(body.nightly-build #split-content-browser > .navigation-bar):
* UserInterface/NavigationBar.css:
(.navigation-bar):
(body.nightly-build .navigation-bar):
(body.nightly-build.window-inactive .navigation-bar):
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
(body.nightly-build .sidebar > .panel.navigation > .content):
(.sidebar > .panel.navigation > .overflow-shadow):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected):
(body:not(.nightly) .navigation-bar .item.radio.button.text-only.selected):
(body.nightly .navigation-bar .item.radio.button.selected):
* UserInterface/ResourceSidebarPanel.css:
(.sidebar > .panel.resource > .empty-content-placeholder):
(body.nightly-build .sidebar > .panel.resource > .empty-content-placeholder):
(.sidebar > .panel.resource > .search-bar):
(body.nightly-build .sidebar > .panel.resource > .search-bar):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/ScopeBar.css:
(.scope-bar > li):
(body:not(.nightly-build) .scope-bar > li):
(body:not(.nightly-build) .scope-bar > li:active):
(body:not(.nightly-build) .scope-bar > li.selected):
(body.nightly-build .scope-bar > li):
(body.nightly-build .scope-bar > li:active):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
(.scope-bar > li:active):
(body.nightly-build .scope-bar > li.selected):
* UserInterface/SearchBar.css:
(.search-bar > input[type="search"]):
(body:not(.nightly-build) .search-bar > input[type="search"]):
(body:not(.nightly-build) .search-bar > input[type="search"]::-webkit-input-placeholder):
(body:not(.nightly-build) .search-bar > input[type="search"]:valid):
* UserInterface/SearchBar.js:
(WebInspector.SearchBar):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid):
(body.nightly-build .content-view.timelines > .data-grid):
(.content-view.timelines > .data-grid th):
(body.nightly-build .content-view.timelines > .data-grid th):
(.content-view.timelines > .data-grid th:not(:last-child)):
(body.nightly-build .content-view.timelines > .data-grid th:not(:last-child)):
(.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
(body.nightly-build .content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
(.content-view.timelines > .data-grid th.sort-descending):
(body.nightly-build .content-view.timelines > .data-grid th.sort-descending):
(.content-view.timelines > .data-grid > .navigation-bar-container):
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
(body.nightly-build .content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
2013-05-06 Timothy Hatcher <timothy@apple.com>
Add a nightly-build class so we can hide new UI from nightly WebKit builds.
Part of: <rdar://problem/13810992> Update Web Inspector to match Xcode 5's new design language
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Set the nightly-build class on body if we are in a nightly build.
2013-05-03 Timothy Hatcher <timothy@apple.com>
Add stubs for savedURL and appendedToURL.
https://webkit.org/b/115561
rdar://problem/13806055
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.savedURL):
(InspectorFrontendAPI.appendedToURL):
2013-05-02 Timothy Hatcher <timothy@apple.com>
Fix the alignment of the titles in the Timelines sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
Only create a subtitle if the string has a value, not an empty string.
2013-05-01 Timothy Hatcher <timothy@apple.com>
Make the Dashboard timer and Timeline views more robust when going back/forward.
<rdar://problem/13612025> Dashboard: LCD timer never stops when going back/forward
<rdar://problem/13180009> Recording sometimes never stops because the load event marker is never added
<rdar://problem/13510955> Intermittently, timeline is in "days" after refreshing wsj.com site
Reviewed by Antoine Quint.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._mainResourceDidChange):
(WebInspector.DashboardManager.prototype._recordingStopped):
(WebInspector.DashboardManager.prototype._startUpdatingTime):
(WebInspector.DashboardManager.prototype._stopUpdatingTime): Added.
(WebInspector.DashboardManager.prototype._updateTime):
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
(WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
Don't return NaN for the bounds.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get firstTimestamp): Added.
Added as a helper to prevent using NaN as the start time.
* UserInterface/ResourceTimelineRecord.js:
(WebInspector.ResourceTimelineRecord.prototype.get startTime):
Use firstTimestamp.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.stopRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype._clear):
(WebInspector.TimelineManager.prototype._addRecord):
(WebInspector.TimelineManager.prototype._startAutoRecording):
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
(WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
Fire an event on clear so the timeline view clears even if recording does not start.
Track the main resource object and not the request identifier, since a resource
might not have a request identifier in the back/forward case. Auto stop recording soon
after every record, not just the load event since we don't always have load events.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._recordsCleared):
Use RecordsCleared event instead of RecordingStarted to clear the view.
2013-05-01 Timothy Hatcher <timothy@apple.com>
Reveal the line (if supplied) when showing a ScriptContentView.
<rdar://problem/13785027> REGRESSION: Extra Scripts: no autoscroll to debugger statement.
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
2013-05-01 Timothy Hatcher <timothy@apple.com>
Don't update the dashboard text unless it has changed.
Also step up the interval we update the time so it does not try to update every 50ms when the
duration is long enough to not matter.
<rdar://problem/13718056> While JS debugging, everything in the inspector window is repainting all the time
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager.prototype._startUpdatingTime):
(WebInspector.DashboardManager.prototype._updateTime):
* UserInterface/DashboardView.js:
(WebInspector.DashboardView.prototype.set logs):
(WebInspector.DashboardView.prototype.set issues):
(WebInspector.DashboardView.prototype.set errors):
(WebInspector.DashboardView.prototype.set time):
(WebInspector.DashboardView.prototype.set resourcesCount):
(WebInspector.DashboardView.prototype.set resourcesSize):
(WebInspector.DashboardView.prototype._appendElementForNamedItem.):
2013-05-01 Timothy Hatcher <timothy@apple.com>
Breakpoint context menu items should appear for Extra and Anonymous Scripts.
<rdar://problem/13776299>
Reviewed by Joseph Pecoraro.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
Check for WebInspector.ScriptTreeElement in addition to WebInspector.ResourceTreeElement.
2013-04-30 Timothy Hatcher <timothy@apple.com>
Disable spellcheck and smart quotes in the console prompt.
I'll upstream this to CodeMirror once I get approval from legal.
<rdar://problem/13757709>
Reviewed by Ricky Mondello.
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
2013-04-30 Timothy Hatcher <timothy@apple.com>
Tweak the Toolbar layout code to not hide the Dashboard when sizes are off by one.
This wasn't needed when sub-pixel layout was on, but that was disabled in http://webkit.org/b/149209.
<rdar://problem/13757354> REGRESSION: Toolbar thinks it is collapsed, so dashboard is hidden
Reviewed by Joseph Pecoraro.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.customUpdateLayout):
2013-04-30 Timothy Hatcher <timothy@apple.com>
Have dashboard buttons (console summary buttons) do filtering as well.
<rdar://problem/13685685>
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
(WebInspector.DashboardView.prototype._consoleItemWasClicked):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.get scopeBar):
* UserInterface/Main.js:
(WebInspector.showFullHeightConsole):
(WebInspector.showConsoleView):
2013-04-30 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12719925> Call stack should show live line number next to file name
Reviewed by Timothy Hatcher.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement):
(WebInspector.GeneralTreeElement.prototype.get tooltipHandledSeparately):
(WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
Allow clients to handle the tooltip themselves, and to set subtitle as
an element, instead of a string (already possible with mainTitle).
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Set the subtitle as a live location <span>.
(WebInspector.CallFrameTreeElement.prototype.onattach):
Set the tooltip on the entire tree element once it is created.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
Allow an optional prefix before the location string.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Remove an assert from StyleDetailsPanel.prototype.shown.
The shown function can be called multiple times. Just keep the early return.
Also make sure to call StyleDetailsPanel.prototype.hidden in another case.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.shown):
2013-04-29 Timothy Hatcher <timothy@apple.com>
Skip invalid properties when associating related properties.
<rdar://problem/13752586> DOMNodeStyles.js:981: console.assert(property.overridden); on html5please.com
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
Don't allow Command+Enter in the Console with an empty expression.
Reviewed by Timothy Hatcher.
* UserInterface/ConsolePrompt.js:
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13616567> Can no longer clear the console with clear()
LogContentView starts listening for an event in the constructor which
was getting removed in close and not being added back. This ContentView
is already treated like a singleton with other events, treat this the
same and just avoid removing event listeners in close.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13765474> REGRESSION: Console should not clear on reload
The backend sends the frontend a messagesCleared messages for many reasons.
We should not clear the active log when there was a navigation. In those
cases the LogManager will send out a Cleared or SessionStarted event.
It would be messy and brittle to determine if we are in the middle of a
main resource load, so it is easier to do a setTimeout and send an event
if we did not do a navigation.
This works well with all common cases, but breaks:
js> console.log(1); console.clear(); console.log(2);
Filed the follow-up bug to handle fixing this by providing the frontend
with the information it needs in messagesCleared.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
Don't append a blank ConsoleMessage row for console.clear messages.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
Defer ActiveLogCleared events so that we don't issue one while we
are reloading the page.
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13764663> Tooltips on live location links are no longer working
Changing the content in mousemove, even if the content was the same,
would cause the tooltip to disappear. Avoid changing the content unless
we absolutely need to.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.updateDisplayString):
Avoid unnecessary content updates.
(WebInspector.SourceCodeLocation.prototype._locationString):
Fix typo causing column numbers to not show up in tooltips.
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13763988> Jump to "rs.js" error location link not live on theverge.com
The URL in the ConsoleMessage is the URL of the Script, which contains
a fragment. The URL of the Resource does not contain the fragment. When
we create a sourceCodeLocation in linkifyLocation we want to get the
resource that has a sidebar item, because that is the resource in the
sidebar that will show a ContentView. So if we get a Script try to get
the Resource for that Script if one exists.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.linkifyLocation):
2013-04-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13442566> Console context selector should truncate or generate better names when the names are long
Truncate the context selector quick console nav bar item. And modify
how items are sorted in the context menu to show the frame name if one
is available.
Reviewed by Timothy Hatcher.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get displayName):
(WebInspector.HierarchicalPathComponent.prototype.set displayName):
(WebInspector.HierarchicalPathComponent.prototype.get truncatedDisplayNameLength):
(WebInspector.HierarchicalPathComponent.prototype.set truncatedDisplayNameLength):
Separate the display name property from the title element's content, so we
can truncate the display but store the real name.
(WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
Truncate the display in the navigation bar.
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
Work around an NSMenu issue and truncate in the option text in the context menu.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
(WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
Set the Frame on the PathComponents to use later for sorting.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Abort earlier when loading completions for a null or undefined value.
<rdar://problem/13764611> JavaScriptLogViewController.js:293: CONSOLEAPI ERROR: Unknown result type: undefined
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
Return early if the RemoteObject is null or undefined. Also release the completion group.
2013-04-29 Timothy Hatcher <timothy@apple.com>
Correct the layout of navigation items when an item has selector arrows.
<rdar://problem/13717922> Layer border toggle button disappears sometimes
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get minimumWidth): Added.
(WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
(WebInspector.HierarchicalPathComponent.prototype.get selectorArrows): Added.
(WebInspector.HierarchicalPathComponent.prototype.set selectorArrows): Added.
Account for the width of the selector arrows when using minimum width.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
Ask HierarchicalPathComponent for its minimum width.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayout):
Skip flexible space items since they can take up no space at the minimum width.
2013-04-27 Dean Jackson <dino@apple.com>
<rdar://problem/13441708> Make the Web Inspector work if HiDPI canvas is disabled on OS X
Reviewed by Tim Hatcher.
For <rdar://problem/13437328>, HIGH_DPI_CANVAS was disabled on retina devices, so
the places in the inspector that use a canvas must double the dimensions of
the image buffers they request.
* UserInterface/DashboardView.css:
(.toolbar .dashboard): Since the image being pased in as background might be 2x,
make sure that it uses the element size for the background.
* UserInterface/DashboardView.js: Request a 2x canvas if necessary.
* UserInterface/ImageUtilities.js:
(generateColoredImage): No need to pass in scale, as this method is passed the
correct width and height the caller needs. Use get/setImageData methods.
(generateColoredImagesForCSS): Calculate a scaledWidth/Height to be used throughout
this method. Make sure we create contexts with the correct dimensions, and save/restore
them at full size.
(._drawImageShadow): Use scaledWidth/Height.
(._invertMaskImage): No need to pass in width and height..
(._applyImageMask): Ditto.
(generateEmbossedImages): Calculate a scaledWidth/Height to be used throughout
this method. Make sure we create contexts with the correct dimensions.
* UserInterface/Popover.js:
(WebInspector.Popover.prototype.set frame): Make sure to set the background size when
the frame is updated.
(WebInspector.Popover.prototype._drawBackground): Create a correctly scaled canvas,
and some minor code cleanup.
2013-04-27 Timothy Hatcher <timothy@apple.com>
Fix the speed of typing in the Web Inspector.
ToggleControlToolbarItem regenerates its images every time 'toggled' is set, even
if the flag does not change! And the dock button updates 'toggled' on keydown and
keyup to update when Option is pressed.
<rdar://problem/13756496> REGRESSION: Dock/undock buttons regenerates ever keydown and keyup!
Reviewed by Dean Jackson.
* UserInterface/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Return early if flag does not change.
2013-04-27 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13143692> Object literal properties should not have popovers
Given test:
var foo = 300, o = { foo: 1 };
var result = o.foo;
This patch makes it so hovering "foo" in the object literal does not
show a popover, it used to show 300. While hovering the variable "foo"
or hovering the property access "o.foo" both show expected values.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
If we are hovering a JavaScript token inside of a <script> in HTML resources
then the JavaScript state is actually token.state.localState. If it is in
a JavaScript resource then it is just token.state. Pass the most specific
state on our partial "token" object.
(WebInspector.TextEditor.prototype._checkHoveredToken):
Bail for JavaScript object literal properties.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13753106> SourceCodeTextEditor.js:815: JS ERROR: TypeError: undefined is not an object (evaluating this.hoveredToken.bounds)
We have a complete token in tokenWasHovered, however between then and
when the async DebuggerAgent.evaluateOnCallFrame callback happens the
hovered token can change. If it changed, bail, so we don't end up
trying to put the popover on the wrong hovered token or worse
hit this exception and break execution.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
Add asserts and preventative bails in multiple places to catch
similar issues in the future if new paths are added.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13746094> Esc inside a read only editor (JavaScript) should not bring up completion suggestions
Pass on "Esc" if the editor is read only.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
<rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
Make the ConsoleMessage and Profiler links live when possible. Create
a live link with createSourceCodeLocationLink or linkifyLocation.
ConsoleMessages's have line and column information now both at the
base and in stack traces. Profiler nodes don't have column info, but we
can still make them live, just not entirely accurate.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
Use WebInspector.linkifyLocation with url, line, and column.
* UserInterface/Main.js:
(.showSourceCodeLocation):
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
If we have the resource with url passed into linkifyLocation
it creates a link with a sourceCodeLocation. Otherwise it just
creates a basic link with the appropriate styles.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorDataGridNode.prototype.createCell):
(WebInspector.CSSSelectorDataGridNode.prototype._linkifyLocation):
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype._linkifyLocation):
Use WebInspector.linkifyLocation with url and lineNumber. Add
a FIXME about the missing column number.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573902> Line numbers in JS console.log / console.error Messages should be live, they jump to the wrong location
<rdar://problem/13702357> Line numbers in JS Console Error Messages should be live, they jump to the wrong location
Give ConsoleMessage a column number. The backend now sends us this info.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
* UserInterface/ConsoleMessage.js:
(WebInspector.ConsoleMessage):
(WebInspector.ConsoleMessage.create):
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
(WebInspector.ConsoleMessageImpl.prototype.get levelString):
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13745104> First revealLine to SourceMapResource lineNumber is not working
SourceMapResource's may lazily load their data. In such cases the
ContentView for the resource will be Generic and ignore the revealLine.
Once loaded, the Generic ContentView will be replaced by a better view,
but the line number to reveal has been lost. Save that information in
the cluster content view, as long as the resource has not finished,
and pass it on to the new content view when the resource finishes.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
Mark as finished after updating types.
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
(WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
(WebInspector.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
If a revealLine comes in for a resource not yet finished loading, replay
the reveal line when the resource does finish. If subsequent reveals come
in, the most recent one wins.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor._prettyPrint.prettyPrintAndUpdateEditor):
When a file is formatted we updated the delayed line number to reveal, but
didn't update the delayed text range to select. Do that just in case.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
When hovering a link with Command we are showing the original,
unformatted location. So make sure that when clicked we jump
to that exact, unformatted location.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.createGoToArrowButton):
Handle Command+Click to jump to an unformatted location.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalUnformattedSourceCodeLocation):
Allow showing a source code that forces unformatting.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
(WebInspector.TextEditor.prototype.revealLine):
May need to unformat the resource before revealing the line.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode):
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.showResponse):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.revealLine):
* UserInterface/TextContentView.js:
(WebInspector.TextContentView.prototype.revealLine):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.revealLine):
Pass the forceUnformat option through revealLine paths.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701579> Styles sidebar should show source map location by default instead of on hover
Update the rules for a live location display.
- Show display location by default if there is one.
- Show display locations in italics, original locations display non-italics.
- Command+Mouseover a display location will show the original location.
- Provide different display styles for column numbers. Default to "OnlyIfLarge"
meaning only show column numbers if the column is > 80.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Simplify by using SourceCodeLocation.prototype.tooltipString.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.originalLocationString):
(WebInspector.SourceCodeLocation.prototype.formattedLocationString):
(WebInspector.SourceCodeLocation.prototype.displayLocationString):
Add the new column style parameter. Pass it through to _locationString.
(WebInspector.SourceCodeLocation.prototype.tooltipString):
Always show full URLs and columns in tooltips.
(WebInspector.SourceCodeLocation.prototype._locationString):
Respect the column style when including column numbers.
(WebInspector.SourceCodeLocation.prototype.updateDisplayString):
(WebInspector.SourceCodeLocation.prototype.mouseOverOrMove):
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
Update the default value to displayLocation. And the Command+Mouseover to originalLocation.
2013-04-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701576> SASS source map location is wrong on http://html5please.com
CSSRule.selectorList.range has column information, which allows us to
provide a much better location to jump to. So when selectorList and
its SourceRange is available, use that for its start line and column.
Fallback to the CSSRule.sourceLine which is always available.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.11+ to 3.12.
* UserInterface/External/CodeMirror/clojure.js: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/javascript.js: Updated.
* UserInterface/External/CodeMirror/searchcursor.js: Updated.
* UserInterface/External/CodeMirror/sql.js: Updated.
2013-04-26 Timothy Hatcher <timothy@apple.com>
Make completions work after open brackets.
This also improves things to limit keywords to certain contexts.
<rdar://problem/13746491> Should have JavaScript completion suggestions after a base of all open bracket characters, e.g. "if (tr|"
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Improve multi-line support in the console prompt.
Pressing return at the end of the expression now does a parse to see if the expression
is ready to evaluate. We will insert a new line if the error is recoverable, otherwise
we will evaluate it. Pressing enter will insert a new line when there is no text, when
the cursor is not at the last position or there is a selection. Command-Enter will now
always evaluate the expression.
<rdar://problem/13747367>
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype._handleEnterKey.positionsEqual): Added.
(WebInspector.ConsolePrompt.prototype._handleEnterKey.commitTextOrInsertNewLine): Added.
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
(WebInspector.ConsolePrompt.prototype._handleCommandEnterKey):
* UserInterface/InspectorBackendCommands.js:
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptShouldCommitText):
2013-04-25 Timothy Hatcher <timothy@apple.com>
Fix some edge cases with the default JavaScript completions.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Correct the check for switch statements which was missing the "type" parts. Use "info"
instead to check for "switch". Substring the suffix, since there are cases it can be longer.
Also prevent keyword completions in var declarations, except for "this".
2013-04-25 Timothy Hatcher <timothy@apple.com>
Properly handle duplicate query parameters and form encoded POST data.
<rdar://problem/13737105> Duplicate query parameters only show the last item in the sidebar data grids
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
Pass true to parseQueryString to get an array of name/value pairs. Then build
the DataGrid using that result.
* UserInterface/Utilities.js:
(parseLocationQueryParameters):
(parseQueryString):
Added arrayResult parameter to allow getting all values, not just the last one.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Improve the sort order for array index completions.
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames.compare):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
Try to sort in numerical order first, then as strings.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Allow autocompletion after "({a:1,b:2})" to suggest "a" and "b" properties.
<rdar://problem/5866281> Console should allow autocompletion after symbols like ), ], }
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
Ignore stop characters when we are inside brackets.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Remove TextPrompt and JavaScriptTextPrompt.
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptTextPrompt.css: Removed.
* UserInterface/JavaScriptTextPrompt.js: Removed.
* UserInterface/Main.html:
* UserInterface/TextPrompt.css: Removed.
* UserInterface/TextPrompt.js: Removed.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Update DatabaseContentView to use ConsolePrompt.
Reviewed by Joseph Pecoraro.
* UserInterface/DatabaseContentView.css:
(.database-query-prompt):
(.database-user-query::before, .database-query-prompt::before, .database-query-result::before):
(.database-user-query):
(.database-query-result):
* UserInterface/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
(WebInspector.DatabaseContentView.prototype.shown):
(WebInspector.DatabaseContentView.prototype.updateLayout):
(WebInspector.DatabaseContentView.prototype._messagesClicked):
(WebInspector.DatabaseContentView.prototype.accumulateMatches):
(WebInspector.DatabaseContentView.prototype.tableNamesCallback):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
(WebInspector.DatabaseContentView.prototype.consolePromptTextCommited):
(WebInspector.DatabaseContentView.prototype._appendQueryResult):
2013-04-24 Timothy Hatcher <timothy@apple.com>
Implement live completions for the ConsolePrompt.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.updateCompletions):
(WebInspector.ConsolePrompt.prototype.completionControllerCompletionsNeeded):
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated.getCompletions):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.evaluated):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNamesFromEvaluate):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded.receivedPropertyNames):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptCompletionsNeeded):
(WebInspector.JavaScriptLogViewController.prototype._clearLastProperties):
Most of this is copied and adapted from JavaScriptTextPrompt. The new part if the caching of property names.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Prevent the Escape key from toggling and triggering a completion.
When the prompt is empty we allow console toggling. When not empty it triggers completion.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
Call the completionControllerShouldAllowEscapeCompletion delegate function.
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype.completionControllerShouldAllowEscapeCompletion):
Added. Return true if the prompt is not empty.
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut._handleKeyDown):
Don't process the shortcut if default was prevented. We know someone already handled
the key, but didn't call stopPropagation. CodeMirror does this.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Implement default completions for JavaScript in CodeMirrorCompletionController.
Also hook up completions in ConsolePrompt to get the default completions.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchKeywords):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables.filterVariables):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions.matchVariables):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
* UserInterface/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
2013-04-24 Timothy Hatcher <timothy@apple.com>
Hook up the ConsolePrompt delegate to JavaScriptLogViewController.
This makes the prompt work and evaluate results. No auto completion yet.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited.printResult):
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommited):
(WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow.evalCallback):
(WebInspector.JavaScriptLogViewController.prototype._evaluateInInspectedWindow):
Copied from JavaScriptTextPrompt.evalInInspectedWindow.
2013-04-24 Timothy Hatcher <timothy@apple.com>
Start using ConsolePrompt in the QuickConsole.
This simplifies the DOM structure of the QuickConsole and makes resizing happen
automatically using flex layout instead of JavaScript.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.clear):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindNextShortcut):
(WebInspector.JavaScriptLogViewController.prototype._handleFindPreviousShortcut):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
Remove keydown and bind the the keyboard shortcuts to the messages element
and prompt element using specific event handlers.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.shown):
(WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus): Match _escapeWasPressed.
(WebInspector.LogContentView.prototype._activeLogCleared):
(WebInspector.LogContentView.prototype._keyDown):
Removed keyboard shortcut handling that was using private properties
from JavaScriptLogViewController.
* UserInterface/Main.html:
Include ConsolePrompt.js and ConsolePrompt.css.
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console > .console-prompt):
(.quick-console > .console-prompt::before):
(.quick-console > .console-prompt > .CodeMirror):
(.quick-console > .navigation-bar):
Simplified by removing redundant elements.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Removed redundant elements.
(WebInspector.QuickConsole.prototype.updateLayout):
Set max-height and stop calling _updateSize.
(WebInspector.QuickConsole.prototype._updateSize): Removed.
2013-04-23 Timothy Hatcher <timothy@apple.com>
Start using CodeMirror for the Console prompt.
This introduces a new class, ConsolePrompt.
Part of: <rdar://problem/13359916> Typing in the console is improved, but still much slower
than in Chrome / the WebKit inspector
Reviewed by Joseph Pecoraro.
* UserInterface/ConsolePrompt.css: Added.
(.console-prompt):
(.console-prompt > .CodeMirror):
(.console-prompt > .CodeMirror-scroll):
* UserInterface/ConsolePrompt.js: Added.
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype.get element):
(WebInspector.ConsolePrompt.prototype.get delegate):
(WebInspector.ConsolePrompt.prototype.set delegate):
(WebInspector.ConsolePrompt.prototype.get text):
(WebInspector.ConsolePrompt.prototype.set text):
(WebInspector.ConsolePrompt.prototype.get history):
(WebInspector.ConsolePrompt.prototype.set history):
(WebInspector.ConsolePrompt.prototype.get focused):
(WebInspector.ConsolePrompt.prototype.focus):
(WebInspector.ConsolePrompt.prototype.shown):
(WebInspector.ConsolePrompt.prototype._handlePreviousKey):
(WebInspector.ConsolePrompt.prototype._handleNextKey):
(WebInspector.ConsolePrompt.prototype._handleEnterKey):
(WebInspector.ConsolePrompt.prototype._restoreHistoryEntry):
(WebInspector.ConsolePrompt.prototype._historyEntryForCurrentText):
(WebInspector.ConsolePrompt.prototype._rememberCurrentTextInHistory):
2013-04-23 Antoine Quint <graouts@apple.com>
<rdar://problem/13681931> Debugger Popover should not dismiss when mouse is over the popover
We would always dismiss the popover when we'd hover more than 1 second
outside of the marked token in the text editor. This would also happen
if the mouse happened to be over the popover shown for the marked token.
We now track whether the mouse is over the presented popover and only
dismiss the popover when no longer hovering the marked text in case the
mouse is not over it.
Reviewed by Timothy Hatcher.
* UserInterface/EventHandler.js: Added.
(WebInspector.EventHandler):
(WebInspector.EventHandler.prototype.handleEvent):
New utility to handle events in a way that makes it convenient to start
and stop tracking events in the scope of that object without using closures.
* UserInterface/Main.html:
Add the new EventHandler helper.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):
(WebInspector.SourceCodeTextEditor.prototype._popoverMouseover):
(WebInspector.SourceCodeTextEditor.prototype._popoverMouseout):
2013-04-22 Timothy Hatcher <timothy@apple.com>
Teach CodeMirror about the CSS properties, keywords and colors we support in WebKit.
This keeps syntax highlighting in sync with code completion.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions.collectPropertyNameForCodeMirror):
(WebInspector.CSSCompletions.requestCSSNameCompletions.updateCodeMirrorCSSMode):
(WebInspector.CSSCompletions.requestCSSNameCompletions):
2013-04-21 Timothy Hatcher <timothy@apple.com>
Fix some selection issues in the Console.
Allow command-click on a single row selection to deselect that row the first time.
Before it was requiring two clicks -- because it would become selected twice --
before it would deselect.
Also make sure to clear focusable children after populating delayed results,
like a the DOM tree.
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
2013-04-21 Timothy Hatcher <timothy@apple.com>
Allow the context menu and clicking on any link in the console.
There are other links in the console besides those with the console-message-url
style class that should work and get the normal context menu.
<rdar://problem/13702031> can't click on a "failed to load" url in console
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
Check only for tag name, not class name.
2013-04-19 Timothy Hatcher <timothy@apple.com>
Allow both text and row selections in the Console.
Text selection switches to row selection if the text selection spans multiple rows.
<rdar://problem/13599610> REGRESSION: Can't select partial text of console output
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._onmousedown):
Call event.stopPropagation() to prevent row selection in the console.
* UserInterface/LogContentView.css:
(.console-message-text > span): Added. Allow text selection.
(.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
(.console-group-title::before):
Use px instead of em to fix a positioning issue.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._mousedown):
(WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
(WebInspector.LogContentView.prototype._mousemove):
Allow text selection that switches to row selection if the text selection spans multiple rows.
This involves delaying operations from mousedown until later in mousemove or mouseup.
* UserInterface/TreeOutline.js:
(TreeElement.treeElementMouseDown):
Call event.stopPropagation() to prevent row selection in the console.
2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701561> Improve SourceMap folder tree hierarchies
Implement a few improvements to folder tree hierarchies.
- if there is a sourceRoot in the sourceMap use that as the base for
subpaths, otherwise fallback to the sourceMappingURL (may change).
- if a source is an absolute URL on a different scheme / host, prefix
the subpath with a folder of the host name.
- flatten folder chains in the UI. Makes expanding folders easier.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMap.js:
(WebInspector.SourceMap):
(WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
(WebInspector.SourceMap.prototype._parseMap):
Save the sourceRoot. And return urlComponents for the basePath, instead of
just the path.
* UserInterface/Utilities.js:
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
Determine the subpath to display in the UI for this source map resource.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.findAndCombineFolderChains):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate):
Flatten folder chains.
2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701561> Improve SourceMap folder tree hierarchies
Correctly resolve dots when determining absolute URLs. Previously I had
left in extra "../s", however they should have been removed. And
absoluteURL should handle resolving any dots in the partialURL.
This fixes ASSERTs in Debug WebKit builds where we were calling
loadResourceSynchronously with a URL that was expected to be
absolute and wasn't.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMap.js:
* UserInterface/Utilities.js:
2013-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13701561> Improve SourceMap folder tree hierarchies
Remove the old combine folder chain code. It will be easier to follow
the new code with the old code gone.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.combineFolderChain):
2013-04-19 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
The Inspector protocol now tells us when a CSS response contains a
sourceMappingURL for a Resource. If we are given a source map URL,
download the source map and associate it with the Resource.
Give Stylesheet SourceMapResources (like sass stylesheets) a CSS
clipping icon instead of using the generic clipping icon.
Reviewed by Timothy Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
(WebInspector.FrameResourceManager.prototype._createResource):
If there is a sourceMapURL, download it and associate it with the Resource.
* UserInterface/Images/ClippingCSS.png: Added.
* UserInterface/Images/ClippingCSS@2x.png: Added.
* UserInterface/ResourceIcons.css:
(.source-map-resource.resource-icon.resource-type-stylesheet .icon):
CSS Clipping icon for stylesheet source map resources (like less / sass / scss).
* UserInterface/InspectorBackendCommands.js:
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.loadingFinished):
Handle and pass on the new "extraResourceInfo" parameter.
2013-04-19 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13654793> Source Maps: Support for Stylesheets (less / sass / scss) with SourceMaps
Follow OpenSource and merge PositionSourceMap into SourceMap.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMap.js:
(WebInspector.SourceMap):
(WebInspector.SourceMap.prototype.findEntry):
(WebInspector.SourceMap.prototype.findEntryReversed):
(WebInspector.SourceMap.prototype._parseMap):
* UserInterface/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
2013-04-18 Timothy Hatcher <timothy@apple.com>
Make sure to call shown on the current Style sub-panel when the sidebar visibility changes.
<rdar://problem/13604148> Content jumps in details sidebar when switching to styles pane
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
Call shown on the selected panel.
2013-04-18 Timothy Hatcher <timothy@apple.com>
Use CSSAgent.setStyleText for Style Attribute editing too.
<rdar://problem/13630483> Style Attribute editing in the Style details sidebar does not work on shadow content (114442)
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeStyleText):
2013-04-18 Timothy Hatcher <timothy@apple.com>
Switch from X-WebKit-CSP to Content-Security-Policy for the CSP header.
Also stop allowing 'unsafe-eval' since the one place we used eval() is dead code.
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype.loadFromJSONIfNeeded): Removed. Not used by Safari.
* UserInterface/Main.html:
2013-04-18 Timothy Hatcher <timothy@apple.com>
Make sure to always include the New Rule button in the Styles sidebar.
<rdar://problem/13683941> Can't add a new rule unless there is a matched rule already
Reviewed by Joseph Pecoraro.
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.addNewRuleButton): Added.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call addNewRuleButton if
addedNewRuleButton isn't true after the end of the loop.
2013-04-18 Timothy Hatcher <timothy@apple.com>
Remove workaround for <rdar://problem/13337211> now that it is fixed.
Removing this ends up fixing:
<rdar://problem/13612942> REGRESSION: Style sidebar does not update immediately with node change
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
Removed the repeat refresh polling logic.
2013-04-18 Timothy Hatcher <timothy@apple.com>
Properly handle !important properties from inherited rules.
<rdar://problem/13683742> Important properties from inherited rules
mistakenly strikeout the effective property
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
Mark properties as overridden from inherited elements if there
is already an effective property from another element.
2013-04-18 Timothy Hatcher <timothy@apple.com>
Adopt CSSAgent.setStyleText added in https://webkit.org/b/109340.
<rdar://problem/13337211> Editing styles on daringfireball.net interrupts autocompletion and flashes
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.styleChanged): Use CSSAgent.setStyleText.
* UserInterface/InspectorBackendCommands.js: Updated.
2013-04-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13681577> Unresolved breakpoint in SourceMapResource when reloading page
The ContentBrowser no longer contains ResourceContentViews directly, it
has ResourceClusterContentViews. Update the closeAll prototype call on
page navigations to make sure resource views get closed properly.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
2013-04-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13681487> Missing heirarchical path components selecting breakpoints in source map resources in Debugger sidebar
Force onpopulate to create the SourceMapTreeElements immediately,
instead of lazily waiting for the user to expand the Resource in
the Resources sidebar. Then, when we look up the TreeElement to
get the hierarchical path components it will be found.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
(WebInspector.SourceCodeTreeElement.prototype._sourceMapAdded):
2013-04-17 Joseph Pecoraro <pecoraro@apple.com>
ERROR: TypeError: 'undefined' is not an object (evaluating 'currentContentView.handleCopyEvent.bind')
Right clicking in an editor was producing an error. Check if both
the content view and the handleCopyEvent handler exist.
Reviewed by Timothy Hatcher.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get handleCopyEvent):
2013-04-15 Timothy Hatcher <timothy@apple.com>
Fix an exception that happens when clicking source links multiple times.
Reviewed by Antoine Quint.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView):
Return currentView if it is already showing. This matches the case where we return the view
if it wasn't already showing. Change other returns to return null instead of undefined.
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
Add an assert that we have a content view. This wasn't needed but I used to to pinpoint the bug.
2013-04-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13644426> Support %c - styled console messages - http://adamschwartz.co/log/
Merge OpenSource r130941, r131448, r134166, r134202.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.ConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.ConsoleMessageImpl.prototype.append):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2013-04-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13658744> Improve %f, %d, %i formatters for numbers and non-numeric input
Developer tools differ subtly in this area. I like Firefox's behavior
the most, calling parseFloat or parseInt on the argument. We now match
that behavior.
Chrome prints NaN for anything but primitive numbers. Which causes it
to print NaN for Infinity and "1.5". Firebug just prints out everything
like "%s", like we used to before this patch.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.ConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.ConsoleMessageImpl.prototype.integerFormatter):
2013-04-15 Timothy Hatcher <timothy@apple.com>
Don't call clearHistory or markClean in TextEditor after the first time.
This allows undo/redo in the content browser after editing in style sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Set _initialStringNotSet.
(WebInspector.TextEditor.prototype.set string.update):
Call clearHistory and markClean only if _initialStringNotSet is set.
And delete _initialStringNotSet afterwards.
2013-04-14 Timothy Hatcher <timothy@apple.com>
Default dockSide to "undocked" if it isn't specified in the query parameters.
This hides the dock buttons again in the iOS Inspector.
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2013-04-14 Timothy Hatcher <timothy@apple.com>
Don't allow Command-Z to clear the editor.
Reviewed by Antoine Quint.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update):
Call clearHistory and markClean.
2013-04-13 Timothy Hatcher <timothy@apple.com>
Fix an exception when inspecting a request that has a "Content-type"
header instead of "Content-Type".
All HTTP headers are case-insensitive, so we need to handle that.
Reviewed by Ricky Mondello.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get requestDataContentType):
(WebInspector.Resource.prototype.get encodedSize):
(WebInspector.Resource.prototype.get compressed):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.prototype.increaseSize):
Use valueForCaseInsensitiveKey to fetch headers.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
Set requestDataContentType to "" if it is null so the split() that comes later works.
* UserInterface/Utilities.js:
(Object.prototype.valueForCaseInsensitiveKey): Added.
2013-04-13 Timothy Hatcher <timothy@apple.com>
Rename "Post Data" to "Request Data" and show the data if it exists,
not just for the "POST" method.
Reviewed by Antoine Quint.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
* UserInterface/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.get requestData):
(WebInspector.Resource.prototype.get requestDataContentType):
* UserInterface/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.prototype.get requestContentView):
(WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
Remove a workaround for file data that is no longer needed.
2013-04-12 Timothy Hatcher <timothy@apple.com>
Prevent a double layout in the content browser navigation bar when switching views.
By default inserted navigation items schedule a layout soon, which prevents multiple consecutive layouts
when inserting many navigation items. Forcing a layout after inserting navigation items causes the
items to be displayed in their final positions and sizes right away.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
(WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
Call updateLayout after changing the navigation bar.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
Use updateLayoutSoon to coalesce multiple changes.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayout): Clear the timeout.
2013-04-12 Timothy Hatcher <timothy@apple.com>
Fix the layout of the selector arrows when components start to collapse.
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path-component.show-selector-arrows): Added.
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component.show-selector-arrows:last-child): Added.
Specify correct min-widths that include space for the selector arrows.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent): Add the show-selector-arrows class name to the element.
2013-04-12 Timothy Hatcher <timothy@apple.com>
Add the ability to see POST data that isn't in the application/x-www-form-urlencoded format.
<rdar://problem/12667485> REGRESSION (Safari 6): Missing POST request view for non-urlencoded data
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get handleCopyEvent): Added.
Handles passing through the current content view's handleCopyEvent function.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
Added TextContentView.
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.simple > .value .go-to-arrow): Added.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.createPathComponent): Pass true to get double arrows.
(WebInspector.FrameContentView.prototype.showResource): Added.
(WebInspector.FrameContentView.prototype.showSourceCode): Return the view. Use showResource.
(WebInspector.FrameContentView.prototype.showDOMTree): Return the view.
* UserInterface/Images/Request.pdf: Added.
* UserInterface/Images/Response.pdf: Added.
* UserInterface/Main.html: Included new files.
* UserInterface/PathComponentIcons.css:
(.request-icon .icon): Added.
(.response-icon .icon): Added.
* UserInterface/ResourceClusterContentView.js: Added.
(WebInspector.ResourceClusterContentView.createPathComponent):
(WebInspector.ResourceClusterContentView):
(WebInspector.ResourceClusterContentView.prototype.get resource):
(WebInspector.ResourceClusterContentView.prototype.get responseContentView):
(WebInspector.ResourceClusterContentView.prototype.get requestContentView):
(WebInspector.ResourceClusterContentView.prototype.get selectionPathComponents):
(WebInspector.ResourceClusterContentView.prototype.shown):
(WebInspector.ResourceClusterContentView.prototype.closed):
(WebInspector.ResourceClusterContentView.prototype.showRequest):
(WebInspector.ResourceClusterContentView.prototype.showResponse):
(WebInspector.ResourceClusterContentView.prototype._canShowRequestContentView):
(WebInspector.ResourceClusterContentView.prototype._pathComponentForContentView):
(WebInspector.ResourceClusterContentView.prototype._identifierForContentView):
(WebInspector.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WebInspector.ResourceClusterContentView.prototype._pathComponentSelected):
(WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView):
Removed code that handled resource type changes and concrete subclasses.
That is now handled by ResourceClusterContentView.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._goToPostDataClicked): Added.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection):
Renamed Size to Data in the Post Data section. Added a go-to arrow.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Handle ResourceClusterContentView.
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Ditto.
(WebInspector.ResourceSidebarPanel.prototype.showResourceRequest): Added.
* UserInterface/TextContentView.css: Added.
(.content-view.text > .text-editor):
* UserInterface/TextContentView.js: Added.
(WebInspector.TextContentView):
(WebInspector.TextContentView.prototype.get textEditor):
(WebInspector.TextContentView.prototype.get navigationItems):
(WebInspector.TextContentView.prototype.revealLine):
(WebInspector.TextContentView.prototype.shown):
(WebInspector.TextContentView.prototype.hidden):
(WebInspector.TextContentView.prototype.closed):
(WebInspector.TextContentView.prototype.get supportsSearch):
(WebInspector.TextContentView.prototype.get numberOfSearchResults):
(WebInspector.TextContentView.prototype.get hasPerformedSearch):
(WebInspector.TextContentView.prototype.set automaticallyRevealFirstSearchResult):
(WebInspector.TextContentView.prototype.performSearch):
(WebInspector.TextContentView.prototype.searchCleared):
(WebInspector.TextContentView.prototype.revealPreviousSearchResult):
(WebInspector.TextContentView.prototype.revealNextSearchResult):
(WebInspector.TextContentView.prototype.updateLayout):
(WebInspector.TextContentView.prototype._togglePrettyPrint):
(WebInspector.TextContentView.prototype._textEditorFormattingDidChange):
(WebInspector.TextContentView.prototype._numberOfSearchResultsDidChange):
2013-04-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13630859> Remote Web Inspector doesn't work for some sites (114447)
RWIInspectorFrontendHost always returns undefined for IFH.loadResourceSynchronously.
Gracefully handle that in our frontend while we either implement it, or create
a new Inspector protocol method to load resources through the backend.
Reviewed by Timothy Hatcher.
* UserInterface/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
2013-04-11 Timothy Hatcher <timothy@apple.com>
Force CodeMirror editors to be a stacking context to prevent creating many layers
inside when another element overlaps.
<rdar://problem/13608839> REGRESSION: Text in Web Inspector Source Code
view looks heavy (double rendered?)
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorOverrides.css:
(.CodeMirror): Added. Set z-index: 0. Position is already set in codemirror.css.
2013-04-10 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector database code tolerant of quota exceptions.
Reviewed by Joseph Pecoraro.
* UserInterface/ImageUtilities.js:
If we can't open the database it isn't the end of the world, we just will
always generate the images and not cache them for better load times.
2013-04-10 Timothy Hatcher <timothy@apple.com>
Drop the expected usage down to 5 MB to match the values in RWI and WK1.
This fixes an exception on load for first time users.
Reviewed by Brian Weinstein.
* UserInterface/ImageUtilities.js:
2013-04-10 Timothy Hatcher <timothy@apple.com>
Update the Style Attribute in the sidebar when the DOM attribute changes.
Also only update a style rule for external changes if the editor isn't focused.
This prevents external changes from fighting with user edits.
<rdar://problem/13619049>
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._editorBlured): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
Simplify when we reset the content to only do it when not focused.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._loadNodeAttributes):
Fire WebInspector.DOMNode.Event.AttributeModified. Remove StyleInvalidated event.
2013-04-10 Timothy Hatcher <timothy@apple.com>
Make DOMNodeStyles mark as needing refresh in all cases when a stylesheet changes.
The stylesheet change might be a rule that we didn't match yet, so checking existing matched
rules for the stylesheet will not trigger a refresh. This code was added back when refresh was
not as smart, so this is the correct thing to do now.
<rdar://problem/13387359> Undoing selector change does not show selector affecting the page anywhere
Reviewed by Antoine Quint.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
Simplify by always calling _markAsNeedsRefresh.
2013-04-09 Timothy Hatcher <timothy@apple.com>
Indent invalid style properties, not just blank lines.
Also strike out text that is not recognized as a property or comment.
This will now properly indent and strike out these two error cases:
padding; 0;
*line-height: 1;
<rdar://problem/13608848> Checkbox missing for a style property
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.css:
Strike out spans that are not comments or marked properties.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
Call _markLinesWithCheckboxPlaceholder so the placeholders are added if needed for
lines htat didn't have properties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
Remove use of __checkboxMarker, it is not set anymore.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._markLinesWithCheckboxPlaceholder):
Renamed from _markBlankLinesWithCheckboxPlaceholder and taught how to mark only lines that
need marked, and ignores the rest.
2013-04-08 Timothy Hatcher <timothy@apple.com>
Avoid a console error when viewing Anonymous scripts.
Reviewed by Geoffrey Garen.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
2013-04-08 Timothy Hatcher <timothy@apple.com>
Make the Scope Variables details sidebar work when evaluating in the Console.
<rdar://problem/12831236> REGRESSION (6.0.3-Curie): Scope Chain shows nothing while debugging
Reviewed by Joseph Pecoraro.
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Clear the timeout.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set a timeout.
2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
Copy PrettyPrinter updates into UserInterface to enact the changes.
Unreviewed, just moving reviewed code between directories.
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/Formatter.js:
(Formatter.prototype._handleToken):
2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13593779> Pretty printer should line "case" and "default" with "switch"
Dedent before case/default and indent after, so it lines up with the switch.
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/js-tests/switch-case-default-expected.js: Added.
* Tools/PrettyPrinting/js-tests/switch-case-default.js: Added.
2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13584713> Pretty printer should gracefully handle single line if/else/for/do/while blocks
This adds indentation support for single statement blocks. This had a
pretty big performance cost pretty printing jquery.min.js (20ms), but
I think it is worth it. In the inspector itself, I did not see pretty
printing actually taking longer. I'll continue to look at performance.
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/Formatter.js:
(Formatter.prototype._handleToken):
Let the Code modify state before / after the token is consumed.
Let the formatters specify multiple dedents at once.
* Tools/PrettyPrinting/FormatterDebug.js:
(Formatter.prototype.debug):
In JavaScript print out the previous lexical state.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
Pretty print a good chunk of JavaScript single statement blocks and
if/else chains.
* Tools/PrettyPrinting/javascript.js:
Update to "near" trunk CodeMirror JavaScript. The most recent commit
causes issues.
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/js-tests/block-comment-expected.js: Added.
* Tools/PrettyPrinting/js-tests/block-comment.js: Added.
* Tools/PrettyPrinting/js-tests/single-statement-blocks-expected.js: Added.
* Tools/PrettyPrinting/js-tests/single-statement-blocks.js: Added.
Added some micro-tests for recent pretty printing changes.
2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
Add a little test running harness to the PrettyPrinter tool. No tests yet.
Reviewed by Timothy Hatcher.
* Tools/PrettyPrinting/index.html:
2013-04-08 Joseph Pecoraro <pecoraro@apple.com>
Update the PrettyPrinting Tool to match UserInterface.
Unreviewed tools change.
* Tools/PrettyPrinting/codemirror.js:
(window.CodeMirror):
* Tools/PrettyPrinting/javascript.js:
2013-04-08 Timothy Hatcher <timothy@apple.com>
Enable completions for resource content views.
<rdar://problem/13598062>
Reviewed by Antoine Quint.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Hook up a WebInspector.CodeMirrorCompletionController.
2013-04-08 Timothy Hatcher <timothy@apple.com>
Delay computing suggestions for 250ms to keep from slowing down typing.
<rdar://problem/13598014> CSS completions can slow down typing
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
Clear the typing delay timeout.
(WebInspector.CodeMirrorCompletionController.prototype._handleChange):
Set _ignoreNextCursorActivity so hideCompletions isn't called.
2013-04-08 Antoine Quint <graouts@apple.com>
<rdar://problem/13597681> Layers sidebar panel may flash popovers with stale content
We only present the popover when the data grid node hasn't changed
between the time we called into the backend and the time the callback
is called.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
2013-04-08 Antoine Quint <graouts@apple.com>
<rdar://problem/12892280> Layer tree panel data grid should refresh less frequently when layers for nodes are recreated
Provide a custom DataGrid subclass for the Layers panel where we
use CSS transforms to update the position of data grid nodes
instead of relying on DOM order so that we can avoid DOM thrashing
and retain scroll position for rapidly changing content. We also
set the width of "Paints" and "Memory" columns for a nicely
consistent formatting.
Reviewed by Timothy Hatcher.
* UserInterface/DetailsSectionDataGridRow.js:
(WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
Perform a quick return in case the new data grid is the same
as the previous in order to remove the possibility of appending
the data grid's element if it was already the current data grid.
* UserInterface/LayerTreeDataGrid.js: Added.
(WebInspector.LayerTreeDataGrid):
Initialize the DataGrid with a custom set of columns and set the
width of the "Paints" and "Memory" columns.
(WebInspector.LayerTreeDataGrid.prototype.insertChild):
(WebInspector.LayerTreeDataGrid.prototype.removeChild):
Override these DataGrid methods to perform our custom layout of
cells when a child is added or removed.
(WebInspector.LayerTreeDataGrid.prototype.setChildren):
Public API used to set the list of children data grid nodes for
this data grid. We compare this new list to the previous list
and only remove / add the nodes that need to be, avoiding having
to remove the entire set of children to update the nodes list.
(WebInspector.LayerTreeDataGrid.prototype._updateChildren):
Position the children data grid nodes using CSS transforms instead
of DOM order. We also manually set the sibling relationship there
since it can no longer be accomplished in insertChild() or
removeChild() calls.
(WebInspector.LayerTreeDataGrid.prototype._recalculateSiblings):
Make this method a no-op since we manually perform the same task in
_updateChildren().
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode):
Add a new _outlets private ivar we use to stash the DOM elements
we'll need to update when the node's data changes.
(WebInspector.LayerTreeDataGridNode.prototype.createCells):
Override this DataGridNode API in order to add a flag that cells
were created which we'll use as a flag to allow the update of a
cell's data in the data setter.
(WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
(WebInspector.LayerTreeDataGridNode.prototype.get data):
(WebInspector.LayerTreeDataGridNode.prototype.set data):
Custom data setter as the default version would completely trash
the DOM tree and replace it with a whole new set of elements to
update the data. We choose a more incremental approach here since
individual fields for this node may change (paint count being the
most likely).
(WebInspector.LayerTreeDataGridNode.prototype._makeOutlet):
(WebInspector.LayerTreeDataGridNode.prototype._makeNameCell):
Prepare the DOM elements used to present the node's data. Many
elements for the name cell are dynamically added and removed in
_updateNameCellData().
(WebInspector.LayerTreeDataGridNode.prototype._updateCell):
(WebInspector.LayerTreeDataGridNode.prototype._updateNameCellData):
Update the information on outlets or their very availability based
on the current data and represented layer.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype.shown):
(WebInspector.LayerTreeSidebarPanel.prototype.hidden):
Remove the auto-sizing of data grid columns as we're not setting them
to be constant for a more consistent look.
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
Instantiate our new LayerTreeDataGrid class.
(WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
Use the custom setChildren() API on LayerTreeDataGrid to change the
children order.
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
* UserInterface/Main.html:
Add LayerTreeDataGrid.js.
2013-04-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13584696> Pretty printer should preserve whitespace in multi-line comments
Update CodeMirror to trunk to get a few recent fixes.
This update includes project wide tailing whitespace and tab removal
which is why so many files were changed.
Rubber-stamped by Timothy Hatcher.
* UserInterface/External/CodeMirror/clojure.js:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/less.js:
* UserInterface/External/CodeMirror/matchbrackets.js:
* UserInterface/External/CodeMirror/overlay.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:
2013-04-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13043550> REGRESSION: Scrollbar renders behind position: sticky elements in the Web Inspector
Give the Sidebar Panels a stacking context to work around the issue.
Reviewed by Ricky Mondello.
* UserInterface/Sidebar.css:
(.sidebar > .panel):
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
Add a small script to update the Tools/PrettyPrinting directory.
My workflow for fixing a PrettyPrinting bug is to first update the Tools
directory with exact replicas of files in UserInterface. Make changes
and test with the debug page, and then transfer the files back to the
inspector. This script helps automate those steps.
Reviewed by Cody Krieger.
* Scripts/update-codemirror-resources.rb:
* Scripts/update-pretty-printer.rb: Added.
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
Update the PrettyPrinting Tool with a few Debug changes.
Unreviewed tools change.
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/FormatterDebug.js:
(.pad):
(.debugToken):
(Formatter.prototype.debug):
Output null, undefined, or 'string' for tokens.
Previously null and undefined output as '-'.
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
Update the PrettyPrinting Tool with CodeMirror CSS changes.
Unreviewed tools change.
* Tools/PrettyPrinting/codemirror-additions.css: Added.
* Tools/PrettyPrinting/codemirror.css:
* Tools/PrettyPrinting/index.html:
2013-04-05 Timothy Hatcher <timothy@apple.com>
Tweak Web Inspector's image cache database.
We only want to keep the image data around for the first use. These
images are typically only used in one place. This keeps performance
good during page load and frees memory that typically won't be reused.
Also add transaction error logging and a better expected database size.
Reviewed by Joseph Pecoraro.
* UserInterface/ImageUtilities.js:
(_logSQLTransactionError):
(_prefetchCachedImagesAndUpdate):
(.restoreImageData):
(restoreImageFromStorage):
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
Update the PrettyPrinting Tool with new formatter changes.
Also some tweaks so that the Tools files are identical to the ones in
the actual Web Inspector (UserInterface).
Unreviewed tools change.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/Formatter.js:
(Formatter.prototype.format):
(Formatter.prototype._handleToken):
(Formatter.prototype._handleEmptyLine):
* Tools/PrettyPrinting/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.appendNewline):
(FormatterContentBuilder.prototype.appendMultipleNewlines):
(FormatterContentBuilder.prototype.removeLastNewline):
(FormatterContentBuilder.prototype._addFormattedLineEnding):
* Tools/PrettyPrinting/FormatterDebug.js: Added.
(Formatter.prototype.debug):
* Tools/PrettyPrinting/Utilities.js: Added.
* Tools/PrettyPrinting/codemirror.js:
* Tools/PrettyPrinting/css.js:
* Tools/PrettyPrinting/index.html:
* Tools/PrettyPrinting/javascript.js:
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
Win back performance in pretty-printing large files
With preserving newlines we lost a few ms. This wins back at
least the same amount and a bit more on JavaScript (2-3ms).
Checking if the current token is a comment is a very common
in our pretty printers. Only perform the work once, and pass
the result around as needed to prevent duplicated work.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/Formatter.js:
(Formatter.prototype._handleToken):
2013-04-05 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13582023> Web Inspector removes blank lines in my JS when pretty printing
When pretty-printing already pretty code we did a poor job of preserving
the nice extra whitespace the original code had. This preserves the empty
(whitespace only) lines in the original code.
Because our pretty printer sometimes adds multiple newlines, like in CSS
after each rule, we don't need to add yet another newline to just preserve
a blank line from the original content. Handle that gracefully.
This introduces a minor performance regression (1-3ms in large content)
but I think it is well worth it considering the results. Much prettier!
JavaScript Test:
Foo.prototype.f = function() {
// ...
}
Foo.prototype.g = function() {
// ...
}
CSS Test:
/* comment one */
/* comment two */
Reviewed by Antoine Quint.
* UserInterface/Formatter.js:
(Formatter.prototype.format):
(Formatter.prototype._handleToken):
(Formatter.prototype._handleEmptyLine):
Call handleEmptyLine for whitespace only lines, and force
append a newline unless the builder just had multiple.
* UserInterface/FormatterContentBuilder.js:
(FormatterContentBuilder):
(FormatterContentBuilder.prototype.appendNewline):
(FormatterContentBuilder.prototype.appendMultipleNewlines):
Helper for appending multiple newlines, to set some extra state.
2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13583718> Pretty printing should not move comments to the end of the previous line
Previously we removed newlines before comments if they were after a
semicolon. This was intended to keep comments on the same line as code.
This could backfire if the comment was really on actually on the next
line. So be more specific, and don't remove the previous newline if
the comment is the first token on a line.
JavaScript Test:
function() {
var a;
// test
}
CSS Test:
a {
color: red;
/* test */
}
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/Formatter.js:
(Formatter.prototype.format):
(Formatter.prototype._handleToken):
2013-04-05 Antoine Quint <graouts@apple.com>
<rdar://problem/13472300> Layers in sidebar panel should use iconography
Refreshing the look of the Layers sidebar panel data grid nodes
to use icons to identify the kind of layers presented (element,
pseudo-element or reflection). Also, we mark the pseudo-element
part of the CSS selector by displaying it in lighter text as well
as showing a " Reflection" extra label in the case of reflections.
Finally, we also trim the text in the CSS selector label and shorten
it to make room for the go-to arrow button should it be visible
when hovering the data grid node.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/PseudoElement.pdf: Added.
* UserInterface/Images/Reflection.pdf: Added.
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
(WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
(WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .data-grid table.data):
(.layer-tree.panel .data-container tr):
(.layer-tree.panel .data-container td > div):
(.layer-tree.panel .data-container .name-column):
(.layer-tree.panel .data-container .name-column .icon):
(.layer-tree.panel .data-container tr.reflection .name-column .icon):
(.layer-tree.panel .data-container tr.pseudo-element .name-column .icon):
(.layer-tree.panel .data-container .name-column .label):
(.layer-tree.panel .data-container tr:hover .name-column .label):
(.layer-tree.panel .data-container .name-column .reflection):
(.layer-tree.panel .data-container tr.selected .name-column .reflection):
(.layer-tree.panel .data-container .go-to-arrow):
(.layer-tree.panel .data-container tr:hover .go-to-arrow):
2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573165> Pressing Esc in a readOnly editor should still focus the quick console
Reviewed by Timothy Hatcher.
* UserInterface/EditingSupport.js:
(WebInspector.isEventTargetAnEditableField):
2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13580154> DOMTreeOutline.js:504: JS ERROR: TypeError: 'true' is not a function (evaluating 'this._contextMenuCallback(contextMenu, node)'
DOMTreeOutline constructors were passing 3 booleans. In the case of
outlines in the Console it was passing "true" expecting that to provide
a "Reveal Element" context menu item, but that mis-matched the
constructor. Fix the error, and add back the context menu item.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
Update parameters.
(WebInspector.DOMTreeOutline.prototype.revealElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
Append a "Reveal Element" context menu item if needed.
* UserInterface/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
Update the string. We don't have a panel, the nav bar labels this "DOM Tree".
2013-04-04 Joseph Pecoraro <pecoraro@apple.com>
ERROR URIError: URI error in FrameResourceManager.prototype.resourceForScript
decodeURI can throw a URIError, e.g. decodeURI("%"). Protect against
this in FrameResourceManager. This method is meant to work with both
already decoded and encoded URIs.
Reviewed by Timothy Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceForScript):
Wrap the code with decodeURI in a try/catch.
2013-04-04 Timothy Hatcher <timothy@apple.com>
Fix opening the Web Inspector in Production builds.
A function declaration was pushed up next to a parenthesis when minified.
This made the parser think we were trying to make a call. Adding a semicolon
is all we need to make things work again when combined and minified.
<rdar://problem/13577591> REGRESSION (r50120-50124): Can't open Web Inspector
Reviewed by Ricky Mondello.
* UserInterface/MIMETypeUtilities.js:
(WebInspector.fileExtensionForURL):
(WebInspector.mimeTypeForFileExtension):
2013-04-04 Antoine Quint <graouts@apple.com>
<rdar://problem/13570821> Reasons for compositing popover should adjust position if inspector window resizes
Allow for popovers to have their target frame updated independently
of their content so we can efficiently update their position as the
element for which a popover is presented changes position. Now that
we have this support, we update the popover presentation when the
window size changes and a popover is visible in the Layers sidebar
panel.
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
Adopt the updated Popover API.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
Track window resize events so that we may update the popover
presentation as it changes.
(WebInspector.LayerTreeSidebarPanel.prototype._windowResized):
Update the popover presentation in case there is a visible popover.
(WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
Use the new _updatePopoverForSelectedNode() method as the callback.
(WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
Adopt the updated Popover API and only set the popover's content
should one be provided, ie. when the method is called as callback
to _contentForPopover().
* UserInterface/Popover.js:
(WebInspector.Popover):
New private ivars to track some popover presentation state.
(WebInspector.Popover.prototype.get visible):
New public property to let clients check on popover visibility.
(WebInspector.Popover.prototype.set content):
(WebInspector.Popover.prototype.present):
New public property and method signature to let clients set the
content of the popover independently of its presentation attributes.
(WebInspector.Popover.prototype._update):
New private method called to update the presentation state
of the popover and basically the old content of the present()
method with use of the presentation ivars instead of method
arguments and some optimizations to check that we only update
the content and draw the canvas background should they have
changed.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
Adopt the updated Popover API.
2013-04-04 Timothy Hatcher <timothy@apple.com>
Make ContentViewContainer robust against null/undefined elements in contentView.scrollableElements.
DatabaseTableContentView can return a null element when the table is empty, and this causes exceptions.
Reviewed by Antoine Quint.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
(WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView):
2013-04-04 Timothy Hatcher <timothy@apple.com>
Don't use localStorage to cache generated images in the Web Inspector.
This migrates ImageUtilities off localStorage to a SQL database.
<rdar://problem/13574226> Web Inspector breaks when file:/// localStorage hits 5MB limit
Rubber-stamped by Antoine Quint.
* UserInterface/ImageUtilities.js:
(_devicePixelRatioChanged):
(_registerGeneratedImageUpdateFunction):
(_logSQLError):
(_prefetchCachedImagesAndUpdate.complete):
(_prefetchCachedImagesAndUpdate._generatedImageCacheDatabase.transaction):
(_prefetchCachedImagesAndUpdate):
(restoreImageFromStorage):
(generateColoredImagesForCSS.restoreImages):
(generateColoredImagesForCSS.restoreImages.restoreActiveImages):
(generateColoredImagesForCSS.restoreImage):
(generateColoredImagesForCSS.update):
(generateColoredImagesForCSS.generateImage):
(generateEmbossedImages):
(generateEmbossedImages.generateImages):
(generateEmbossedImages.generateImages.generateActiveImages):
2013-04-04 Antoine Quint <graouts@apple.com>
<rdar://problem/13570779> Reasons for compositing popover in layers sidebar is poorly aligned with selected datagrid row
Also apply padding to the target frame size, not just the origin, and
adjust the padding down to 2 to match the padding used for breakpoints.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13573798> REGRESSION: CodeMirror editor doesn't refresh when split console is hidden and more of the content view is visible
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged):
Trigger a DidResize event because the console would have changed
its visible size.
2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13474739> Respect sourcesContent in SourceMaps for SourceMapResources
If the resource's contents are available via the Source Map's
sourcesContent array, then use them. Otherwise, go the normal path of
downloading the resource. Because neither path can get the MIME type of
the resource right now, fallback to trying to determine the MIME type
from the resource's file extension.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/MIMETypeUtilities.js: Added.
(WebInspector.fileExtensionForURL):
(WebInspector.mimeTypeForFileExtension):
Helpers for extensions and MIME types.
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype._requestResourceAsynchronously):
Check for embedded sourcesContent content, and determine the MIME type
from the file extension.
* UserInterface/Resource.js:
Be sure to give types to some of the MIME types for CodeMirror supported
types, which may show up as SourceMap sources.
2013-04-03 Joseph Pecoraro <pecoraro@apple.com>
ERROR: console.assert(alternateImage) in ToggleButtonNavigationItem.js:4
Remove assert that there must be an alternateImage. The undock button
does not have an alternate image, and this assert would trigger each
time the inspector was opened.
Reviewed by Timothy Hatcher.
* UserInterface/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem):
2013-04-03 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-04-03 Timothy Hatcher <timothy@apple.com>
Add switch to activate / deactivate all breakpoints.
<rdar://problem/11329057> REGRESSION (Safari 6): Switch to activate / deactivate all
breakpoints is missing (debugger)
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype.get resolved):
Check DebuggerManager.breakpointsEnabled. This is the easiest approach to get the gray
icons for breakpoints in all the right places without adding checks at all call sites.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.get breakpointsEnabled):
(WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
(WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
Check the breakpointsEnabled setting when updating the break on exception state.
* UserInterface/DebuggerSidebarPanel.css:
(.sidebar > .panel.debugger .breakpoint-toggle): Added.
(.sidebar > .panel.debugger .breakpoint-toggle.enabled): Added.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsToggleButtonClicked):
Added a button to the Breakpoints section header.
2013-04-03 Antoine Quint <graouts@apple.com>
<rdar://problem/13566082> DOMTreeManager.highlightRect() does not take scrolling into account
Add support for the new "usePageCoordinates" argument to DOM.highlightRect()
and set it to true when highlighting the bounds of generated layers.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightRect):
* UserInterface/InspectorBackendCommands.js:
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
2013-04-03 Antoine Quint <graouts@apple.com>
<rdar://problem/13105224> Reflect data grid timeline filters in the Timeline overview
Apply the filtering of records directly into the timelineOverviewRecordsWithType()
method which is the method used by the TimelineOverview to gather data. Additionally,
we now update the content of the TimelineOverview when the filters applied to one of
the data grids change such that the timeline overview is kept in sync.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType):
(WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
2013-04-03 Antoine Quint <graouts@apple.com>
<rdar://problem/13557373> Layers panel doesn't know how to account for anonymous layers
Handle the new "isAnonymous" property on the protocol and the renamed
"pseudoElement" property. We also format use of pseudo-elements better
and handle the somewhat unlikely possibility that we would deal with
layers with unknown nodes.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New localized string for "Unknown node".
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
Update the "no-node" class on the data grid node's element.
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
Set an "Unknown node" label for layers with an unknown node, which
shouldn't really happen, but we should be prepared for the possibility.
Seeing this message means that the agent should be taught how to deal
with a probably edge case. We also update the code to deal with the
"pseudoElement" property instead of "pseudoClass" to match the protocol
change. Finally, we also update the "no-node" class on the data grid's node.
(WebInspector.LayerTreeDataGridNode.prototype._updateDOMNodeAvailability):
New method to update the "no-node" class on the data grid's node so
that we may hide the go-to arrow button in the case where there is
no associated node.
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .data-grid tr.no-node .go-to-arrow):
Hide the go-to arrow button in the case where there is no associated node.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
Also use highlightRect() in the case where the layer is anonymous.
2013-04-02 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13548470> REGRESSION: Web inspector hung after searching for "swf"
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._scrollIntoViewCentered):
Be more careful providing a center margin when the text size and editor
height can be fractional. If the margin is greater than half the size of
the editor, CodeMirror gets stuck in an infinite loop.
2013-04-02 Joseph Pecoraro <pecoraro@apple.com>
ERROR: TypeError: 'undefined' is not an object (evaluating 'this._profileView.showTimeAsPercent.value')
When selecting a CSS Profile, displayProfile could trigger from the
superclass constructor before the showTimeAsPercent Setting was
initialized, causing this error. ProfileView's are assumed to have
this property, and the ProfileView constructor had an unused
parameter, which looks like it was intended for this purpose.
Reviewed by Timothy Hatcher.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView):
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView):
* UserInterface/ProfileView.js:
(WebInspector.ProfileView):
2013-04-02 Timothy Hatcher <timothy@apple.com>
Update toolbar layout for recent flex box changes.
<rdar://problem/13556024>
Reviewed by Joseph Pecoraro.
* UserInterface/Toolbar.css:
(.toolbar .item-section): Added min-width: -webkit-min-content.
min-width now defaults to 0, but we need the sections to stop at the
content size so the JavaScript layout function can do the right thing.
2013-04-02 Antoine Quint <graouts@apple.com>
<rdar://problem/13545256> Automatic selection of a CSS profile upon finishing recording fails to show any content
Make sure we set the "showAsTimePercent" property before calling super since
it may be used by the generated WebInspector.CSSSelectorDataGridNode in
displayProfile() which would be called in the super call in the case where
the view is created as the profile finishes recording.
Reviewed by Timothy Hatcher.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView):
2013-04-01 Timothy Hatcher <timothy@apple.com>
Fix the icons for the exception breakpoints.
<rdar://problem/13552326> REGRESSION: Exception breakpoints are missing custom icons
Reviewed by Joseph Pecoraro.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName): Added.
This property was expected to exist but got removed at some point.
BreakpointTreeElement property handled undefined and used the generic icon.
2013-04-01 Timothy Hatcher <timothy@apple.com>
Compressed PNGs with pngcrush and further reduced the size of some PDFs by re-exporting them. Removed some unused images too.
This goes from 2.1 MB of images down to 1.2 MB.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/Images/ApplicationCache.png:
* UserInterface/Images/ApplicationCache@2x.png:
* UserInterface/Images/ApplicationCacheManifest.png:
* UserInterface/Images/ApplicationCacheManifest@2x.png:
* UserInterface/Images/Breakpoint.png:
* UserInterface/Images/Breakpoint@2x.png:
* UserInterface/Images/BreakpointInactive.png:
* UserInterface/Images/BreakpointInactive@2x.png:
* UserInterface/Images/ClippingGeneric.png:
* UserInterface/Images/ClippingGeneric@2x.png:
* UserInterface/Images/ClippingJS.png:
* UserInterface/Images/ClippingJS@2x.png:
* UserInterface/Images/Close.pdf:
* UserInterface/Images/Colors.png:
* UserInterface/Images/Colors@2x.png:
* UserInterface/Images/Cookie.png:
* UserInterface/Images/Cookie@2x.png:
* UserInterface/Images/Crosshair.pdf:
* UserInterface/Images/DOMCharacterData.pdf:
* UserInterface/Images/DOMComment.pdf:
* UserInterface/Images/DOMDocument.pdf:
* UserInterface/Images/DOMDocumentType.pdf:
* UserInterface/Images/DOMElement.pdf:
* UserInterface/Images/DOMNode.pdf:
* UserInterface/Images/DOMTextNode.pdf:
* UserInterface/Images/DOMTree.pdf:
* UserInterface/Images/Database.png:
* UserInterface/Images/Database@2x.png:
* UserInterface/Images/DatabaseTable.png:
* UserInterface/Images/DatabaseTable@2x.png:
* UserInterface/Images/DisclosureTriangleSmallClosed.pdf:
* UserInterface/Images/DisclosureTriangleSmallOpen.pdf:
* UserInterface/Images/DockBottom.pdf:
* UserInterface/Images/DockRight.pdf:
* UserInterface/Images/DocumentCSS.png:
* UserInterface/Images/DocumentCSS@2x.png:
* UserInterface/Images/DocumentFont.png:
* UserInterface/Images/DocumentFont@2x.png:
* UserInterface/Images/DocumentGeneric.png:
* UserInterface/Images/DocumentGeneric@2x.png:
* UserInterface/Images/DocumentImage.png:
* UserInterface/Images/DocumentImage@2x.png:
* UserInterface/Images/DocumentJS.png:
* UserInterface/Images/DocumentJS@2x.png:
* UserInterface/Images/DocumentMarkup.png:
* UserInterface/Images/DocumentMarkup@2x.png:
* UserInterface/Images/EventListener.pdf:
* UserInterface/Images/Exception.pdf:
* UserInterface/Images/FilterFieldGlyph.pdf:
* UserInterface/Images/FolderGeneric.png:
* UserInterface/Images/FolderGeneric@2x.png:
* UserInterface/Images/Function.pdf:
* UserInterface/Images/HierarchicalNavigationItemChevron.pdf:
* UserInterface/Images/InstructionPointer.png:
* UserInterface/Images/InstructionPointer@2x.png:
* UserInterface/Images/LeftSidebarClose.pdf: Removed.
* UserInterface/Images/LeftSidebarOpen.pdf: Removed.
* UserInterface/Images/LessColumns.pdf:
* UserInterface/Images/LocalStorage.png:
* UserInterface/Images/LocalStorage@2x.png:
* UserInterface/Images/Log.png:
* UserInterface/Images/Log@2x.png:
* UserInterface/Images/MoreColumns.pdf:
* UserInterface/Images/NavigationItemAngleBrackets.pdf:
* UserInterface/Images/NavigationItemBug.pdf:
* UserInterface/Images/NavigationItemCurleyBraces.pdf:
* UserInterface/Images/NavigationItemFile.pdf:
* UserInterface/Images/NavigationItemLayers.pdf:
* UserInterface/Images/NavigationItemLog.pdf:
* UserInterface/Images/NavigationItemRuler.pdf: Removed.
* UserInterface/Images/NavigationItemStopwatch.pdf:
* UserInterface/Images/NavigationItemStorage.pdf:
* UserInterface/Images/Network.png:
* UserInterface/Images/Network@2x.png:
* UserInterface/Images/NetworkBarBlue.png:
* UserInterface/Images/NetworkBarBlue@2x.png:
* UserInterface/Images/NetworkBarGray.png:
* UserInterface/Images/NetworkBarGray@2x.png:
* UserInterface/Images/NetworkBarGreen.png:
* UserInterface/Images/NetworkBarGreen@2x.png:
* UserInterface/Images/NetworkBarLabelCalloutLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutRight.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf:
* UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf:
* UserInterface/Images/NetworkBarOrange.png:
* UserInterface/Images/NetworkBarOrange@2x.png:
* UserInterface/Images/NetworkBarPurple.png:
* UserInterface/Images/NetworkBarPurple@2x.png:
* UserInterface/Images/NetworkBarRed.png:
* UserInterface/Images/NetworkBarRed@2x.png:
* UserInterface/Images/NetworkBarWhiteFlat.png:
* UserInterface/Images/NetworkBarWhiteFlat@2x.png:
* UserInterface/Images/NetworkBarYellow.png:
* UserInterface/Images/NetworkBarYellow@2x.png:
* UserInterface/Images/NetworkHollowBarBlue.png:
* UserInterface/Images/NetworkHollowBarBlue@2x.png:
* UserInterface/Images/NetworkHollowBarGray.png:
* UserInterface/Images/NetworkHollowBarGray@2x.png:
* UserInterface/Images/NetworkHollowBarGreen.png:
* UserInterface/Images/NetworkHollowBarGreen@2x.png:
* UserInterface/Images/NetworkHollowBarOrange.png:
* UserInterface/Images/NetworkHollowBarOrange@2x.png:
* UserInterface/Images/NetworkHollowBarPurple.png:
* UserInterface/Images/NetworkHollowBarPurple@2x.png:
* UserInterface/Images/NetworkHollowBarRed.png:
* UserInterface/Images/NetworkHollowBarRed@2x.png:
* UserInterface/Images/NetworkHollowBarYellow.png:
* UserInterface/Images/NetworkHollowBarYellow@2x.png:
* UserInterface/Images/Pause.pdf:
* UserInterface/Images/Profile.png:
* UserInterface/Images/Profile@2x.png:
* UserInterface/Images/Recording.png:
* UserInterface/Images/RecordingHovered.png:
* UserInterface/Images/RecordingHovered@2x.png:
* UserInterface/Images/RecordingStopped.png:
* UserInterface/Images/RecordingStopped@2x.png:
* UserInterface/Images/ResultLine.pdf:
* UserInterface/Images/Resume.pdf:
* UserInterface/Images/RightSidebarClose.pdf: Removed.
* UserInterface/Images/RightSidebarOpen.pdf: Removed.
* UserInterface/Images/Script.png:
* UserInterface/Images/Script@2x.png:
* UserInterface/Images/SessionStorage.png:
* UserInterface/Images/SessionStorage@2x.png:
* UserInterface/Images/SourceCode.pdf:
* UserInterface/Images/StepInto.pdf:
* UserInterface/Images/StepOut.pdf:
* UserInterface/Images/StepOver.pdf:
* UserInterface/Images/Stopwatch.png:
* UserInterface/Images/Stopwatch@2x.png:
* UserInterface/Images/StyleRuleAuthor.pdf:
* UserInterface/Images/StyleRuleInherited.pdf:
* UserInterface/Images/StyleRuleInheritedElement.pdf:
* UserInterface/Images/StyleRuleInspector.pdf:
* UserInterface/Images/StyleRuleUser.pdf:
* UserInterface/Images/StyleRuleUserAgent.pdf:
* UserInterface/Images/TimelineBarBlue.png:
* UserInterface/Images/TimelineBarBlue@2x.png:
* UserInterface/Images/TimelineBarOrange.png:
* UserInterface/Images/TimelineBarOrange@2x.png:
* UserInterface/Images/TimelineBarPurple.png:
* UserInterface/Images/TimelineBarPurple@2x.png:
* UserInterface/Images/ToggleArrowDown.pdf: Removed.
* UserInterface/Images/ToggleArrowUp.pdf: Removed.
* UserInterface/Images/Undock.pdf:
* UserInterface/Images/UserInputPrompt.pdf:
* UserInterface/Images/UserInputPromptPrevious.pdf:
* UserInterface/Images/UserInputResult.pdf:
2013-03-31 Timothy Hatcher <timothy@apple.com>
Allow changing Web Inspector dock sides without undocking first.
Holding option will change the undock button to the opposite attachment side. When clicked
the button will change to the other attachment side. Holding option with allow undock. This
keeps the last used option available if the user hardly undocks but frequently changes sides.
rdar://problem/13543127
Reviewed by Antoine Quint.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Images/Dock.pdf: Removed.
* UserInterface/Images/DockBottom.pdf: Added.
* UserInterface/Images/DockRight.pdf: Added.
* UserInterface/Main.js:
(WebInspector.loaded): Added key event listeners.
(WebInspector.contentLoaded): Use ToggleControlToolbarItem for undock button.
(WebInspector._windowKeyDown): Added.
(WebInspector._windowKeyUp): Added.
(WebInspector._undock):
(WebInspector._updateDockNavigationItems):
Set and check toggled state for undock button and do the right thing.
* UserInterface/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem.prototype.set alternateToolTip): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.set alternateImage): Added.
2013-04-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13492413> Improve line number subtitle for SourceMap Breakpoints in Debugger sidebar
If a breakpoint is in a SourceMapResource, there is a subtitle showing
the original location. If the original location is in a formatted file
show the italics formatted location that you would jump to. Don't show
a subtitle for breakpoints in formatted resources, just the Line:Column.
Reviewed by Timothy Hatcher.
* UserInterface/BreakpointTreeElement.css:
(.item.breakpoint .subtitle.formatted-location):
Italics if the subtitle is displaying a formatted location.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype._updateTitles):
For SourceMap resources, show the formatted / original location.
Always have the real original location in the tooltip.
(WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
Update the titles if any location changes (the original file may
have been formatted, and we'd want to update for that).
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.get subtitleElement):
Be sure to create the title element the subtitle gets appended to.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showOriginalOrFormattedSourceCodeLocation):
This essentially means, show location in the editor.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.formattedLocationString):
Helper for getting the display string for the formatted location.
2013-04-01 Joseph Pecoraro <pecoraro@apple.com>
Avoid some asserts that can happen when reformatting files with breakpoints.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.updateStyles):
(WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
2013-03-29 Timothy Hatcher <timothy@apple.com>
Add CSS as a known source type.
<rdar://problem/13498380> ASSERTION: IssueMessage.js:64: Unknown issue source: css
Reviewed by Ricky Mondello.
* UserInterface/IssueMessage.js:
(WebInspector.IssueMessage):
2013-03-29 Timothy Hatcher <timothy@apple.com>
Don't try to toggle visibility if a toggle is already pending.
<rdar://problem/13401011> New Shortcut to hide/show elements while
inspecting breaks if you leave the key pressed.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties):
(WebInspector.DOMTreeOutline.prototype._hideElement):
2013-03-29 Joseph Pecoraro <pecoraro@apple.com>
Avoid a SourceMapResource Folder chain of single level folders.
On of my test cases, <http://dev.fontdragr.com>, a resource with
a source map has all its source map resources in a "src" folder.
This creates a poor experience in the resources sidebar. When
expanding the resource, there is just a "src" folder. In those
cases, and in general if there is one long chain of folders,
don't even use folders.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.onpopulate.folderHasOnlyResourceChildren):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate):
(WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
Resolve "./" and "../" in URL paths in parseURL. Leave the path
unadjusted if we get to a point we don't know how to handle, e.g.
too many "../" components.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
* UserInterface/Utilities.js:
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13310717> Source Maps: should display folder hierarchy in the sidebar
Often SourceMap's include sources in a hierarchy. We should create
a folder structure for that hierarchy in the resources sidebar. When
the SourceMap is part of a Frame, we don't do this, we still just
sort SourceMapResources into their associated type folder.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):
Added a generic sort function that can take both Folder and Resource
tree elements. It sorts folders first, by name, then resources by their
normal sort order (type and name).
* UserInterface/SourceMap.js:
(WebInspector.SourceMap.prototype.get sourceMappingURLBasePath):
When the source map resolves its sources it builds an absolute URL
using the partial URL (map.sourceRoot + map.source[i]) and base URL
of the provided sourceMappingURL. We can use this "base path" to
get only the individual source's relative subpath later on.
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.get sourceMapRelativeSubpath):
Get the subpath relative to the SourceMap's url. This allows us
to get the path components and build a directory tree.
* UserInterface/SourceCodeTreeElement.js:
(WebInspector.SourceCodeTreeElement.prototype.onpopulate):
(WebInspector.SourceCodeTreeElement.prototype.createFoldersAsNeededForSubpath):
(WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
Given a subpath, create folders as needed and insert the actual
SourceMapResourceTreeElement inside the deepest folder. Cache
folders along the way so we don't re-create folders, and so that
we can look them up again later if needed.
2013-03-28 Timothy Hatcher <timothy@apple.com>
Combine and minify CodeMirror scripts and styles in Production builds.
<rdar://problem/13446918>
Reviewed by Joseph Pecoraro.
* Scripts/combine-resources.pl:
* Scripts/copy-user-interface-resources.sh:
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed. Missing semicolon causing warning when stripping asserts.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
CodeMirror issue has been fixed. Remove the "delay" form paths that
would have hit the exception before. They no longer do.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealAndHighlightLine):
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
(WebInspector.TextEditor.prototype._scrollIntoViewCentered):
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13412969> Reveal line centered hits a code mirror exception unless put in setTimeout
<rdar://problem/13512430> Idle Inspector recalculates styles a few times a second because of CodeMirror
Update CodeMirror to trunk to get a few recent fixes.
Reviewed by Timothy Hatcher.
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/sass.js:
2013-03-28 Joseph Pecoraro <pecoraro@apple.com>
Add a small script to update CodeMirror resources.
Reviewed by Cody Krieger.
* Scripts/update-codemirror-resources.rb: Added.
2013-03-28 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-03-28 Antoine Quint <graouts@apple.com>
<rdar://problem/13505485> REGRESSION: Can't copy links from the console via the context menu
Let the default context menu show if the user targeted an
<a> element that is not a console message URL.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
2013-03-28 Antoine Quint <graouts@apple.com>
<rdar://problem/13526203> Recording profiles in the Instruments sidebar should show a spinner
Remove the "Recording" prefix for profiles that are recording and
instead use an indeterminate spinner to indicate the profile is
recording.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Remove unused string "Recording JavaScript Profile %s\u2026".
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
Remove the indeterminate spinner from the tree element representing
the profile that finished recording.
(WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
For profiles that are presently recording, simulate the pending
addition of the tree element by adding 1 to the generated number.
This ensures that the generated title matches the one that will
appear as this method is called again upon recording completion.
(WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded):
Add an indeterminate spinner to the tree element representing
the newly-added profile.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.startProfilingCSSSelectors):
(WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
(WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
Use the final title directly since we're now using an indeterminate
spinner to indicate a profile is recording.
2013-03-28 Antoine Quint <graouts@apple.com>
<rdar://problem/13525984> Profile name in navigation bar breadcrumbs doesn't update when recording completes
Propagate an event when a GeneralTreeElement's "mainTitle"
property changes such that the NavigationBar may eventually
pick it up and update itself.
Reviewed by Timothy Hatcher.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
Dispatch the new MainTitleDidChange event.
* UserInterface/GeneralTreeElementPathComponent.js:
(WebInspector.GeneralTreeElementPathComponent):
Register a listener for the MainTitleDidChange event on the
provided GeneralTreeElement.
(WebInspector.GeneralTreeElementPathComponent.prototype._mainTitleDidChange):
Update the "displayName" property to match the GeneralTreeElement's
updated "mainTitle" property.
* UserInterface/TreeOutline.js:
(TreeOutline):
(TreeElement):
Make both TreeOutline and TreeElement subclasses of
WebInspector.Object such that they may dispatch events.
2013-03-28 Antoine Quint <graouts@apple.com>
<rdar://problem/13105775> Handle currently recording profiles in a more graceful manner
We now present a nice-looking "Recording" message when a recording
profile is selected in the instruments sidebar.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Recording" string used to present when we're recording a profile
of an unknown type (future-proofing).
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView):
(WebInspector.CSSSelectorProfileView.prototype.recordingTitle):
(WebInspector.CSSSelectorProfileView.prototype.displayProfile):
Implement the new ProfileView protocol to display the profile
data only when it's available.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView):
(WebInspector.JavaScriptProfileView.prototype.recordingTitle):
(WebInspector.JavaScriptProfileView.prototype.displayProfile.profileCallback):
(WebInspector.JavaScriptProfileView.prototype.displayProfile):
Implement the new ProfileView protocol to display the profile
data only when it's available.
* UserInterface/Main.html:
Add the new ProfileView.css file.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
Ensure we set the "recording" property last as it would fire the
new WebInspector.ProfileObject.Event.FinshedRecording event before
the profile data has been set on the object.
* UserInterface/ProfileObject.js:
(WebInspector.ProfileObject.prototype.set recording):
Dispatch a new WebInspector.ProfileObject.Event.FinshedRecording
event when the profile has finished recording.
* UserInterface/ProfileView.css: Added.
(.recording-profile-view):
(.recording-profile-view > .indeterminate-progress-spinner):
(.recording-profile-view > span):
New CSS support for the new recording message in ProfileView,
using CSS flexbox to vertically and horizontally center the
indeterminate spinner and text.
* UserInterface/ProfileView.js:
(WebInspector.ProfileView):
In case the profile for this ProfileView is still recording,
register for the WebInspector.ProfileObject.Event.FinshedRecording
event to be notified of when the profile is done recording
and show a "Recording" message until then.
(WebInspector.ProfileView.prototype.displayProfile):
New method called when the profile has finished recording and
we've removed the "Recording" message from display. Meant to
be implemented by subclasses.
(WebInspector.ProfileView.prototype.recordingTitle):
New method called when populating the "Recording" message allowing
subclasses to return a clearer message.
(WebInspector.ProfileView.prototype._profileFinishedRecording):
Event handler for the WebInspector.ProfileObject.Event.FinshedRecording
event which removes the "Recording" message and calls
displayProfile().
(WebInspector.ProfileView.prototype._showRecordingMessage):
Display the "Recording" message.
(WebInspector.ProfileView.prototype._hideRecordingMessage):
Removes the "Recording" message, if any.
2013-03-28 Antoine Quint <graouts@apple.com>
<rdar://problem/13483963> copying text from the web inspector includes [LOG] when you paste
Don't add [Log] prefix for log-level messages.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
2013-03-26 Timothy Hatcher <timothy@apple.com>
Support for dock-to-right in the Web Inspector.
rdar://problem/10368152
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setDockSide):
* UserInterface/Main.css:
(body.docked.bottom):
(body.docked.right):
(#docked-resizer):
(body.docked #docked-resizer):
(body.docked.bottom #docked-resizer):
(body.docked.right #docked-resizer):
(body.docked.bottom #toolbar):
(body.docked.bottom #toolbar .item:not(.flexible-space)):
(body.docked.right #navigation-sidebar.collapsed > .resizer):
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._toolbarDisplayModeDidChange):
(WebInspector._toolbarSizeModeDidChange):
(WebInspector._toolbarMouseDown):
(WebInspector._dockedResizerMouseDown.dockedResizerDrag):
(WebInspector._dockedResizerMouseDown):
2013-03-27 Antoine Quint <graouts@apple.com>
<rdar://problem/13105774> Recording a profile with the inspector UI should automatically select the new profile upon completion
Automatically select profiles that completed as a result of the user
pressing the record button in the instruments sidebar panel.
Reviewed by Timothy Hatcher.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
Check the "fromConsole" property on the ProfilingEnded event to
see whether this profile should be automatically selected.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
Also indicate whether the ProfilingEnded event is created as a
result of a profile finishing recording as a result of calling
one of the console APIs.
2013-03-27 Antoine Quint <graouts@apple.com>
<rdar://problem/13190009> Profile recorded prior to the current page load may show empty content view
We now create the content view for a profile that finished recording instantly
rather than delay it until selection. This ensures that all recorded profiles
are available across page loads, until we navigate away.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
Fix an oversight from the previous commit where we wouldn't distinguish
calls to console.profile() and console.profileEnd() made as a result
of starting a profile from the UI or starting a profile by actually
calling these methods.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._profilingEnded):
Force the creation of the content view for the provided profile so that
the profile is immediately retrieved from the backend and available
across page loads.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors):
(WebInspector.ProfileManager.prototype.addJavaScriptProfile):
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
Pass the currently recording profile as data to the ProfilingEnded
event dispatched.
2013-03-27 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-03-27 Antoine Quint <graouts@apple.com>
<rdar://problem/13515381> Profiles started from console API don't appear until done
We now intercept console.profile() and console.profileEnd() messages
appearing through the ConsoleObserver so that we can simulate
setRecordingJavaScriptProfile protocol events in the ConsoleManager.
This allows us to deal with console profiles in a more unified manner.
The recording button, however, does not go red when a profile is
recording from the console.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Changed string for "Recording JavaScript Profile" to allow for
a profile title as well, since it might be known form the
console.profile() call that initiated it.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
Check for console.profile() and console.profileEnd() calls and
inform the ProfileManager that a profile started or ended from
the console API.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.profileWasStartedFromConsole):
Simulate a setRecordingJavaScriptProfile protocol event and set up
the profile's title if provided.
(WebInspector.ProfileManager.prototype.profileWasEndedFromConsole):
Simulate a setRecordingJavaScriptProfile protocol event.
(WebInspector.ProfileManager.prototype.addJavaScriptProfile):
Remove custom logic to deal with the belated creation of a
JavaScriptProfileObject for a profile that would have been started
from the console API since we now get the notification via the simulated
setRecordingJavaScriptProfile protocol event.
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
Only dispatch the ProfilingStarted event if the profile was initiated
from the user interface.
2013-03-26 Joseph Pecoraro <pecoraro@apple.com>
Check-in some documentation files on the RWI protocols.
Better these be checked in then floating on my machine.
Rubber-stamped by Timothy Hatcher.
* Documentation/RWI-Messages.graffle: Added.
* Documentation/RWI-Messages.pdf: Added.
2013-03-26 Antoine Quint <graouts@apple.com>
<rdar://problem/13096650> Debugger popover does not appear sometimes (or is too slow to appear)
We now dismiss the debugger popover when the hovered token (or the
popover for it) is no longer hovered for a whole second. Additionally,
if there is marked text, we immediately show a popover for a newly
hovered token instead of waiting 500ms so that's easier to go from
token to token to get their information.
Reviewed by Joseph Pecoraro.
* UserInterface/Popover.js:
(WebInspector.Popover.prototype.get element):
Newly public property, used to check in hoveredElementCanReleaseHoveredToken() in
the SourceCodeTextEditor whether the newly hovered element is contained within
a popover.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.hoveredElementCanReleaseHoveredToken):
Check whether the newly hovered element is contained within the presented
popover or whether text in the popover is selected.
(WebInspector.SourceCodeTextEditor.prototype.hoveredTokenWasReleased):
Dismiss the popover since the user has moused out of the hovered token long
enough that it shouldn't be considered hovered anymore.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
Remove the window-wide mousemove event listener.
(WebInspector.TextEditor.prototype.handleEvent):
Route mousemove events to the _mouseMovedWithMarkedText() method
if it's the window-wide mousemove event listener.
(WebInspector.TextEditor.prototype.highlightHoveredExpression):
Start tracking mousemove events at the window level so that we can
detect any element, even outside of the text editor, that might be
hovered long enough to release the hovered token.
(WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
Remove the document-wide mousemove event listener and delete the
_tokenHighlightMarkedText property so that we can use its absence
to gather that there is no marked text when checking for a newly
hovered token in _mouseMovedOverEditor().
(WebInspector.TextEditor.prototype.hoveredElementCanReleaseHoveredToken):
Public method used to identify whether the hovered element qualifies
to release the hovered token. The default implementation simply checks
that the hovered element is the marked text for the hovered token.
(WebInspector.TextEditor.prototype.hoveredTokenWasReleased):
Public method meant to be subclassed, called when we've identified that
the hovered token has been moused out of for more than a second.
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
Immediately check the newly hovered token if there already is
hovered token, allowing for a quick inspection of hovered tokens.
(WebInspector.TextEditor.prototype._mouseMovedWithMarkedText):
Check the hovered element qualifies to release the hover token, and if it so,
start a one-second timer to release it.
(WebInspector.TextEditor.prototype._checkHoveredToken):
Stop the timer started in _mouseMovedWithMarkedText() to check whether
the currently hovered element could qualify to release the hovered token.
(WebInspector.TextEditor.prototype._markedTextIsNoLongerHovered):
Method called when the timer started in _mouseMovedWithMarkedText() to
check whether the currently hovered element could qualify to relase the
hovered token has fired.
2013-03-26 Antoine Quint <graouts@apple.com>
<rdar://problem/13505817> Debugger popovers don't appear for undefined values
Handle the RemoteObject type "undefined" and also implement better
handling of null Object values as well.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
2013-03-26 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
Reviewed by Conrad Shultz.
* Localizations/en.lproj/localizedStrings.js:
2013-03-26 Antoine Quint <graouts@apple.com>
<rdar://problem/13439854> REGRESSION: Copying array or object output does not contain values
We now simply use the _formattedMessage DOM node if available and
if the message isn't a stack trace. Then, we insert the URL line,
with repeat count if set, after the first line.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
2013-03-26 Antoine Quint <graouts@apple.com>
<rdar://problem/13345023> Logging an Array after it has been sorted results in its undefined elements not being shown
Merging code from OpenSource to match the handling of arrays in the Console.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
* UserInterface/RemoteObject.js:
(WebInspector.RemoteObject.prototype.release):
(WebInspector.RemoteObject.prototype.arrayLength):
2013-03-25 Timothy Hatcher <timothy@apple.com>
Don't include the main frame document as a separate resource in the sidebar.
<rdar://problem/13484805> REGRESSION: Main frame is included twice in the Resources sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
Skip resources with type "Document" and with the same url as the frame.
2013-03-25 Timothy Hatcher <timothy@apple.com>
Fix large image scaling after the switch to the new flex model
<rdar://problem/13493712> REGRESSION: Very poor image squishing when content
window is narrow / image is large (113222)
Reviewed by Joseph Pecoraro.
* UserInterface/ImageResourceContentView.css:
(.content-view.resource.image):
(.content-view.resource.image img):
Use min-width: 0 so the image can shrink.
2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
Turn on support for breakpoints in pretty printed resources and SourceMaps
We are now getting expected column information from the backend and
hitting breakpoints on columns as expected. This was the last change
needed to consider the following tasks complete:
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
Workaround while still investigating <rdar://problem/13412969>.
Jump to line centered can still throw an exception when revealing a
when the content first loads (reveal pending line). So delay in
just that case.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealAndHighlightLine):
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible):
2013-03-25 Antoine Quint <graouts@apple.com>
<rdar://problem/13495086> Commands and their result should not be subject to search filtering
No longer filter out commands and their results based on search terms.
We also change the CSS class name we use to hide messages that may be
filtered out due to the search terms to be exclusive rather than
inclusive.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.css:
(.search-in-progress .console-item.filtered-out-by-search):
(.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
(.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._isMessageVisible):
(WebInspector.LogContentView.prototype._visibleMessages):
(WebInspector.LogContentView.prototype._performSearch):
2013-03-25 Antoine Quint <graouts@apple.com>
<rdar://problem/13494748> Expandable console items should only select when clicking outside of the expandable part
We no longer select messages if the hit area is part of an expandable element.
This makes it easier to expand nodes and JS objects without first having to
select the console message.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mousedown):
(WebInspector.LogContentView.prototype._targetInMessageCanBeSelected):
2013-03-25 Antoine Quint <graouts@apple.com>
<rdar://problem/13495023> JS objects logged to console can't be expanded using keyboard
We now also handle expansion of JS objects logged to the console. To support this,
we add a new VisibleContentDidChange event to WebInspector.Section such that we can
when the visible content of a given WebInspector.ObjectPropertiesSection is updated,
since there is no onexpand() method available as is the case with TreeOutline.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed.else.bind):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
(WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent):
* UserInterface/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.updateProperties):
* UserInterface/Section.js:
(WebInspector.Section):
(WebInspector.Section.prototype.expand):
2013-03-25 Antoine Quint <graouts@apple.com>
<rdar://problem/13416461> Message repeat count causes bad layout in the Console
We now always display the warning or error icon as well as the repeat count
for the message, and we copy the repeat count to the clipboard as well.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/LogContentView.css:
(.console-message .bubble):
2013-03-25 Antoine Quint <graouts@apple.com>
<rdar://problem/13493775> Console log should scroll to reveal messages for highlighted search match
Make sure we scroll to reveal messages upon highlighting a match.
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13418317> REGRESSION: DOM Tree "Edit as HTML" is not inserting newlines with return
Give multiline WebInspector.startEditing edit boxes have better white-space behavior.
Reviewed by Timothy Hatcher.
* UserInterface/Editing.css:
(.editing.multiline):
* UserInterface/EditingSupport.js:
2013-03-24 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13491916> Searching forward or back in find banner should reveal in center
Reviewed by Dean Jackson.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._revealSearchResult):
(WebInspector.TextEditor.prototype._isPositionVisible):
(WebInspector.TextEditor.prototype._scrollIntoViewCentered):
When revealing a search result, reveal the line centered in
the editor if needed. Don't do the setTimeout, the lines in
the editor did not change so we shouldn't need to worry about
the CodeMirror exception.
(WebInspector.TextEditor.prototype.revealAndHighlightLine):
Share the isPositionVisible code.
(WebInspector.TextEditor.prototype._prettyPrint):
This is the only case where I know we need the setTimeout delay
to workaround a CodeMirror exception when autoformatting.
2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13491257> CSS pretty printing no longer works
For CSS there is now a "css-base" mode with a "text/css" variant,
and a "text/x-scss" variant. There is a convenience mode "css"
which explicitly gets the "text/css" variant of the "css-base" mode.
The pretty printer should extend "css-base". Whether the content
is "text/css" or "text/x-scss" the mode outputting the tokens will
be "css-base", and that mode needs to have the pretty printer
extensions.
Extend the "css-base" mode, instead of the overly specific text/css
css mode to have extendedToken and alternate name "css". So, as
"css-base" creates tokens for either "text/css" or "text/x-scss",
it will adds our "m-css" style classes and get our styles.
We still define the "css-rule" mode to be an alias of the text/css
specific mode. To workaround a limitation of CodeMirror, we don't
re-extend any properties that have already been extended (token,
alternate name) and only extend new properties. We get the earlier
extensions because internally when creating a "css-rule" mode,
CodeMirror get the text/css variant of "css-base" with "css-base"
extensions and then applies our extensions on top of that.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.hasFormatter):
* UserInterface/CodeMirrorAdditions.js:
2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13490780> Find banner status does not update after switching between source files
When switching content views, reset the find banner and perform a
search with the find banner's query in the new content view so that
keyboard shortcuts will work in the new content view even though
the find banner is hidden.
Reviewed by Timothy Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get hasPerformedSearch):
(WebInspector.ContentView.prototype.set automaticallyRevealFirstSearchResult):
Properties used by ContentBrowser to update the find banner when
switching to the ContentView. Allow a search to be performed on
a ContentView without automatically jumping to the first result.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._findBannerDidShow):
(WebInspector.ContentBrowser.prototype._findBannerDidHide):
Allow or disallow jumping to the first search result based on banner visibility.
Keyboard shortcuts will still work.
(WebInspector.ContentBrowser.prototype._updateFindBanner):
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
When the content view changes, update the banner. Search the new
content view so that keyboard shortcuts work.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner.prototype.show):
(WebInspector.FindBanner.prototype.hide):
Emit events for when the banner shows or hides.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get hasPerformedSearch):
(WebInspector.ClusterContentView.prototype.set automaticallyRevealFirstSearchResult):
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get hasPerformedSearch):
(WebInspector.DOMTreeContentView.prototype.set automaticallyRevealFirstSearchResult):
(WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady):
(WebInspector.DOMTreeContentView.prototype.performSearch):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.get hasPerformedSearch):
(WebInspector.ScriptContentView.prototype.set automaticallyRevealFirstSearchResult):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set automaticallyRevealFirstSearchResult):
(WebInspector.TextEditor.prototype.addSearchResults.markRanges):
(WebInspector.TextEditor.prototype.addSearchResults):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get hasPerformedSearch):
(WebInspector.TextResourceContentView.prototype.set automaticallyRevealFirstSearchResult):
Implement the new ContentView properties. Respect the
automaticallyRevealFirstSearchResult property by not jumping to the
first result unless we are allowed too.
2013-03-23 Joseph Pecoraro <pecoraro@apple.com>
Fix a typo causing warnings in the inspector.
Unreviewed.
* UserInterface/Main.html:
2013-03-23 Antoine Quint <graouts@apple.com>
<rdar://problem/11682467> Should be able to do a Find in a Log
Add a search / filter bar to the navigation bar of the console log.
The search bar can be given focus by hitting Cmd+F, and it can provide
focus back to the console prompt by hitting Esc. or Enter (which also
highlights the first matching search result). The Cmd+G and Cmd+Shift+G
keyboard shortcuts also work as expected.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
* UserInterface/LogContentView.css:
(.log-search-bar > input):
(.search-in-progress .console-item):
(.search-in-progress .console-item.matches-search:not(.filtered-out)):
(.search-in-progress .console-item.matches-search .highlighted):
(.search-in-progress .console-item.matches-search .highlighted.selected):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
Create the SearchBar.
(WebInspector.LogContentView.prototype.get navigationItems):
Add the SearchBar to the navigation bar.
(WebInspector.LogContentView.prototype.get searchInProgress):
Inidicates whether a search is in progress (ie. search term
isn't the empty string).
(WebInspector.LogContentView.prototype.focusSearchBar):
New API to bring focus to the SearchBar's input field.
(WebInspector.LogContentView.prototype.highlightPreviousSearchMatch):
New API to highlight the previous search match.
(WebInspector.LogContentView.prototype.highlightNextSearchMatch):
New API to highlight the next search match.
(WebInspector.LogContentView.prototype.searchBarWantsToLoseFocus):
SearchBar delegate method we use to move focus back to the prompt
as the user hit the Esc. key while the search bar has focus.
(WebInspector.LogContentView.prototype.searchBarDidActivate):
SearchBar delegate method we use to move focus back to the prompt
as the user hit the Enter key while the search bar has focus. We
also select the first search match to make it stand out.
(WebInspector.LogContentView.prototype._updateMessagesSelection):
Refactoring: _allVisibleMessages() is now _visibleMessages().
(WebInspector.LogContentView.prototype._isMessageVisible):
Take into account whether the message matches the search terms
so that it's filtered otherwise.
(WebInspector.LogContentView.prototype._selectAllMessages):
Refactoring: _allVisibleMessages() is now _visibleMessages().
(WebInspector.LogContentView.prototype._unfilteredMessages):
New method to provide the list of messsages that match the
filters provided via the scope bar.
(WebInspector.LogContentView.prototype._visibleMessages):
Refactoring: _allVisibleMessages() is now _visibleMessages().
Also take into account additional filtering via the search bar.
(WebInspector.LogContentView.prototype._filterMessages):
Perform a search after the filters have changed to ensure we
are showing the correct set of messages.
(WebInspector.LogContentView.prototype._keyDown):
Add support for the new Cmd+F, Cmd+G and Cmd+Shift+G keyboard shortcuts.
(WebInspector.LogContentView.prototype._commandFWasPressed):
Focus the search bar upon hitting Cmd+F.
(WebInspector.LogContentView.prototype._commandGWasPressed):
Highlight the next search match upon hitting Cmd+G.
(WebInspector.LogContentView.prototype._commandShiftGWasPressed):
Highlight the next search match upon hitting Cmd+Shift+G.
(WebInspector.LogContentView.prototype._upArrowWasPressed):
(WebInspector.LogContentView.prototype._downArrowWasPressed):
(WebInspector.LogContentView.prototype._previousMessage):
(WebInspector.LogContentView.prototype._nextMessage):
(WebInspector.LogContentView.prototype._clearFocusableChildren):
Refactoring: _allVisibleMessages() is now _visibleMessages().
(WebInspector.LogContentView.prototype._searchTextDidChange):
Run the search as the terms in the search bar changed.
(WebInspector.LogContentView.prototype._performSearch):
(WebInspector.LogContentView.prototype._highlightRanges):
Perform a search based on the text in the search bar and apply
a "matches-search" CSS class to all text ranges matching the
search terms. This is actually performed by method merged from
the OpenSource Web Inspector code.
(WebInspector.LogContentView.prototype._rangesOverlap):
Checks whether two text ranges overlap at all. We use this to identify
if the previously selected search term is still present in the new
set of matching search ranges.
(WebInspector.LogContentView.prototype._highlightSearchMatchAtIndex):
Highlights a given term in the array of highlighted elements created in
_performSearch().
* UserInterface/Main.html:
Include the new SearchBar files.
* UserInterface/Main.js:
(WebInspector.highlightRangesWithStyleClass):
(WebInspector.revertDomChanges):
Methods merged as-is from OpenSource.
* UserInterface/SearchBar.css: Added.
(.search-bar > input):
* UserInterface/SearchBar.js: Added.
(WebInspector.SearchBar):
(WebInspector.SearchBar.prototype.get text):
(WebInspector.SearchBar.prototype.set text):
(WebInspector.SearchBar.prototype.focus):
(WebInspector.SearchBar.prototype._handleSearchEvent):
(WebInspector.SearchBar.prototype._handleKeydownEvent):
New NavigationItem subclass to provide a SearchBar within a NavigationBar.
2013-03-22 Timothy Hatcher <timothy@apple.com>
Make the New Rule button 10px taller for a bigger hit target.
<rdar://problem/13470200> I expect the clickable area for "+ New Rule" to be bigger.
Reviewed by Joseph Pecoraro.
* UserInterface/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .new-rule):
2013-03-22 Timothy Hatcher <timothy@apple.com>
Show the compression status and the compression amount in the Resource details sidebar.
<rdar://problem/13201070> Show gzip status of resources more prominently
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get encodedSize): Added.
(WebInspector.Resource.prototype.get transferSize): Use encodedSize.
(WebInspector.Resource.prototype.get compressed): Added.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Added compression group.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Call _refreshCompressed.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshCompressed): Added.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize):
Call _refreshCompressed and update encoded size row.
2013-03-21 Timothy Hatcher <timothy@apple.com>
Add a placeholder for empty style rules in the Style details sidebar.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
Set the placeholder option based on the readOnly state.
2013-03-21 Timothy Hatcher <timothy@apple.com>
Enable auto closing brackets and quotes along with matching bracket highlighting.
Also share common CodeMirror styles in CodeMirrorOverrides.css.
Reviewed by Dean Jackson.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror):
(.css-style-text-editor > .CodeMirror-scroll):
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
* UserInterface/CodeMirrorOverrides.css: Added.
(.CodeMirror *):
(.CodeMirror .CodeMirror-lines):
(.CodeMirror pre):
(.CodeMirror .CodeMirror-selected):
(.CodeMirror.CodeMirror-focused .CodeMirror-selected):
(.CodeMirror .CodeMirror-cursor):
(.CodeMirror .CodeMirror-lines .CodeMirror-matchingbracket):
(.CodeMirror .CodeMirror-lines .CodeMirror-nonmatchingbracket):
(.CodeMirror .CodeMirror-gutters):
(.CodeMirror .CodeMirror-linenumber):
* UserInterface/Main.html:
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
2013-03-21 Timothy Hatcher <timothy@apple.com>
Update CodeMirror to ToT (v3.11+) which includes a scroll performance file and other changes.
Include the new placeholder and closebrackets add-ons so we can use them in our editors.
Also includes more modes that could be encountered on the web that we should syntax highlight.
I've included the SQL mode since I plan to switch the database prompt to use it soon.
<rdar://problem/13470814> Scrolling in the Style > Rules sidebar is kind of sluggish
Rubber-stamped by Joseph Pecoraro.
* UserInterface/External/CodeMirror/clojure.js: Added.
* UserInterface/External/CodeMirror/closebrackets.js: Added.
* UserInterface/External/CodeMirror/codemirror.css: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/coffeescript.js: Added.
* UserInterface/External/CodeMirror/css.js: Updated.
* UserInterface/External/CodeMirror/less.js: Added.
* UserInterface/External/CodeMirror/livescript.js: Added.
* UserInterface/External/CodeMirror/placeholder.js: Added.
* UserInterface/External/CodeMirror/sass.js: Added.
* UserInterface/External/CodeMirror/searchcursor.js: Updated.
* UserInterface/External/CodeMirror/sql.js: Added.
* UserInterface/External/CodeMirror/xml.js: Updated.
* UserInterface/Main.html: Include added files.
2013-03-21 Antoine Quint <graouts@apple.com>
<rdar://problem/13439837> REGRESSION: Copying the output of console.log(1,2,3) only copies "[Log] 1"
Use the _message property rather than _messageText to provide the base
textual representation of a console message, as hinted by the _formatMessage
method which says that _message "is used for inline message bubbles in
SourceFrames, or other plain-text representations".
Reviewed by Ricky Mondello.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
2013-03-20 Timothy Hatcher <timothy@apple.com>
Make the relaod button appear correctly when inspecting web archives.
<rdar://problem/13455883> Extra misplaced folder in Inspector sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceTreeElement.css:
(.item.resource > .status > .reload-button):
(.item.resource.selected > .status > .reload-button):
Use .resource instead of .resource-type-document. Since the button exists
for web archives, and they get .resource-type-other. Fixing web archives
to get a proper type is tracked by <rdar://problem/6420783>.
2013-03-20 Timothy Hatcher <timothy@apple.com>
Correct some inconsistencies with opening the Inspector and what content views are opened.
<rdar://problem/12947914> Opening web inspector with Show Page Resources can open inspector in inconsistent state
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showResources):
(InspectorFrontendAPI.showMainResourceForFrame):
Set ignoreLastContentCookie so the ResourceSidebarPanel has a chance to show the content view for the main frame
once the main frame is known.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Set collapsed after loading the pending frontend commands are dispatched so only the final selected sidebar panel
gets shown and has a say in what content view gets shown. Also removed code that collapsed the details sidebar,
now that sidebars are collapsed by default.
(WebInspector.sidebarPanelForCurrentContentView): Added.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.shown):
Only select the selected tree element again if the content view is from a different sidebar. This way showing the
Resources sidebar when you have gone back and forth between other resource wont jump to some old selected resource.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
Allow onselect if we aren't showing a content view yet. That way the main frame is selected and shown in the content.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype.set width):
Make collapsed by default. Only tell the sidebar panel about width changes if not collapsed.
2013-03-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13442600> Picking a frame in the console context selector menu should refocus the console input
Detect when the hidden <select> in the HierarchicalPathComponent was
interacted with, even if its value did not change, and trigger a
"Clicked" event for those interested. The Console refocuses its prompt
in these cases when the execution context selector is interacted with.
Reviewed by Antoine Quint.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseUp):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._pathComponentClicked):
2013-03-20 Timothy Hatcher <timothy@apple.com>
Make editing CSS resources work correctly again.
<rdar://problem/13457053> Safari Web Inspector: Editing .css files in main area is jumpy (112750)
Reviewed by Antoine Quint.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges):
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange):
(WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent):
We were relying on SourceCode.Event.ContentDidChange not firing if the content was equal. However, since we
coalesce changes the content might be briefly out of sync and the event was firing. That would cause us to
update TextEditor with a slightly older version of the content and mess up the user.
2013-03-19 Timothy Hatcher <timothy@apple.com>
Don't create a new console group on reload if the current one is empty.
Also make sure to scroll the new group into view when it is create so it is visible and ready to show new messages.
<rdar://problem/12951299> Web Inspector console shouldn't draw a line on refresh if nothing was printed
<rdar://problem/13209212> Console doesn't scroll to the bottom when a reloaded page logs
Reviewed by Joseph Pecoraro.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.hasMessages): Added.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
Reuse the previous group if it does not have messages. Also scroll the new session into view so it is ready
to show messages.
* UserInterface/LogContentView.css:
(.console-group.new-session .console-group-messages .console-item:first-child): Added.
Don't show a border when it is in a new-session since there is already a dashed border.
2013-03-19 Timothy Hatcher <timothy@apple.com>
Don't show storage if we don't have a security origin (about:blank).
Reviewed by Joseph Pecoraro.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype._securityOriginDidChange):
2013-03-19 Timothy Hatcher <timothy@apple.com>
Don't refresh the metrics display if the user is incrementing/decrementing via the arrow keys.
When editing is committed or canceled we do a refresh to pick up any changes.
<rdar://problem/13441338> REGRESSION: Safari Web Inspector: Using Up/Down to
modify margins loses focus (112566)
Reviewed by Joseph Pecoraro.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Return early if _ignoreNextRefresh.
(WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Set _ignoreNextRefresh.
2013-03-19 Timothy Hatcher <timothy@apple.com>
Make Local and Session storage work again.
<rdar://problem/13266278> REGRESSION: Local and Session storage protocol
changes break displaying these items
Reviewed by Joseph Pecoraro.
* UserInterface/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.getEntries):
Use DOMStorageAgent.getDOMStorageEntries or DOMStorageAgent.getDOMStorageItems.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.addDOMStorage):
Revert earlier Curie compatibility support since it changed again!
* UserInterface/StorageManager.js:
(WebInspector.StorageManager):
(WebInspector.StorageManager.prototype._securityOriginDidChange): Added.
(WebInspector.StorageManager.prototype._domStorageForId):
When a Frame's security origin changes, add local and session storage if they don't
already exist for that security origin.
2013-03-19 Timothy Hatcher <timothy@apple.com>
Add securityOrigin to WebInspector.Frame.
This will be needed to fix DOM Storage inspection.
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame):
(WebInspector.Frame.prototype.initialize):
(WebInspector.Frame.prototype.get securityOrigin): Added.
Added securityOrigin parameters. Also fire the NameDidChange at the end of initialize
so the Frame is in the final state instead of an intermediate state.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
(WebInspector.FrameResourceManager.prototype._createFrame):
Pass along the securityOrigin so Frame can be created or initialized with it.
Also pass along the frame name in places it was missing, now that we might need it.
2013-03-19 Timothy Hatcher <timothy@apple.com>
Update InspectorBackendCommands to the latest.
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype._getAgent):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype.registerEnum):
Added support for registerEnum, which is new.
* UserInterface/InspectorBackendCommands.js:
Updated to the latest from Open Source r146200.
2013-03-18 Timothy Hatcher <timothy@apple.com>
Make console messages bottom align if the log hasn't scrolled yet.
Also includes:
* Restore clicking the empty space in the log to focus the prompt.
* Make the prompt top border lighten when the log view is showing.
<rdar://problem/13442215> Maybe improve console typing UI (112588)
Reviewed by Joseph Pecoraro.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.addMessage):
* UserInterface/LogContentView.css:
(.console-messages):
(.console-messages :first-child):
Use flex layout and an auto top margin to push items to the bottom until scrolled.
(.console-item):
(.console-user-command .console-message):
Move the border to the top since items are bottom aligned now.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mousedown):
Focus the prompt if the click was in empty space.
* UserInterface/Main.js:
(WebInspector.showSplitConsole):
(WebInspector.hideSplitConsole):
(WebInspector.showFullHeightConsole):
(WebInspector._contentBrowserCurrentContentViewDidChange):
Notify the QuickConsole via consoleLogVisibilityChanged when the log view shows
or hides in the main content browser or split content browser.
* UserInterface/QuickConsole.css:
(.quick-console.showing-log): Added. Lighten the border color.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Added.
Add or remove the showing-log style class.
2013-03-17 Timothy Hatcher <timothy@apple.com>
Tweak how the console view and split console work.
Clicking the console button will always show the console full height. The console button
is only blue when the console view is full height. Pressing escape always shows the split
console. Add support for allowing the content view to decide if the split console can be
shown. If it can't the full height console is shown instead.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._showContentView):
(WebInspector.ContentViewContainer.prototype._hideContentView):
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._toggleSplit):
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector.isShowingSplitConsole):
(WebInspector.currentViewSupportsSplitContentBrowser):
(WebInspector.toggleSplitConsole):
(WebInspector.showSplitConsole):
(WebInspector.hideSplitConsole):
(WebInspector.showFullHeightConsole):
(WebInspector.isShowingConsoleView):
(WebInspector.showConsoleView):
(WebInspector.toggleConsoleView):
(WebInspector._contentBrowserCurrentContentViewDidChange):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._toggleOrFocus):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.get supportsSplitContentBrowser):
2013-03-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13443806> Safari Web Inspector: Point-to-inspect mode breaks when Node details sidebar open (112607)
Fix typos that could cause exceptions.
Reviewed by Timothy Hatcher.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
2013-03-17 Timothy Hatcher <timothy@apple.com>
Stop scaling the MoreColumns.pdf and LessColumns.pdf images.
Reviewed by Jon Honeycutt.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid th.collapser > .collapser-button):
* UserInterface/TimelinesContentView.js:
2013-03-17 Timothy Hatcher <timothy@apple.com>
Only call SidebarPanel's shown and hidden when the visibility actually changes.
This was causing the Console view to not be remembered between sessions because the
InstrumentsPanel was selecting a tree element in the shown function, even though
the sidebar panel was not visible.
Reviewed by Joseph Pecoraro.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.set collapsed):
2013-03-17 Timothy Hatcher <timothy@apple.com>
Speed up Web Inspector image generation some by using Uint32Array.
Reviewed by Joseph Pecoraro.
* UserInterface/ImageUtilities.js:
(generateColoredImage):
(generateEmbossedImages._invertMaskImage):
Use Uint32Array to process the pixels faster. Account for endianness (even though we don't
really need to since we don't support Windows or PowerPC.)
* UserInterface/Utilities.js:
(Uint32Array.isLittleEndian): Added.
2013-03-17 Timothy Hatcher <timothy@apple.com>
Cache and restore generated images to speed up the load time for the Web Inspector.
<rdar://problem/13436334> Web Inspector takes about 3s to activate
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype._generateImages):
Pass !this._imageCacheable to generateEmbossedImages.
* UserInterface/ImageUtilities.js:
(generateColoredImage):
Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
(generateColoredImagesForCSS):
(generateColoredImagesForCSS.imageLoaded): Added.
(generateColoredImagesForCSS.ensureImageIsLoaded): Added.
(generateColoredImagesForCSS.restoreImages): Added.
(generateColoredImagesForCSS.restoreImage): Added.
(generateColoredImagesForCSS.devicePixelRatioChanged): Added.
(generateColoredImagesForCSS.generateImagesIfNeeded): Renamed from generateImages.
(generateColoredImagesForCSS.generateImagesIfNeeded.generateActiveImages):
(generateColoredImagesForCSS.generateImage):
Try to restore the images first. If needed, load the image and regenerate them.
(_createImageLocalStorageKey): Added.
(saveImageToLocalStorage): Added.
(restoreImageFromLocalStorage): Added.
(restoreImageFromLocalStorage.parseVersion): Added.
Save and restore images via pixel arrays with localStorage. Abort the restore
if versions mismatch or the array size isn't correct.
(generateEmbossedImages):
(generateEmbossedImages.imageLoaded): Added.
(generateEmbossedImages.ensureImageIsLoaded): Added.
(generateEmbossedImages.restoreImages): Added.
(generateEmbossedImages.restoreImage): Added.
(generateEmbossedImages.devicePixelRatioChanged): Added.
(generateEmbossedImages.generateImagesIfNeeded): Added.
(generateEmbossedImages.generateImagesIfNeeded.generateActiveImages):
(generateEmbossedImages.generateImage): Renamed from _createEmbossedCanvasImage.
Try to restore the images first. If needed, load the image and regenerate them.
(generateEmbossedImages._invertMaskImage):
(generateEmbossedImages._applyImageMask):
Don't set globalCompositeOperation to "clear" before using webkitPutImageDataHD.
* UserInterface/ToggleButtonNavigationItem.js:
Mark the image as not cacheable. We need to swap images with the same identifiers.
2013-03-17 Timothy Hatcher <timothy@apple.com>
Make generateColoredImagesForCSS require passing image width and height.
This will be needed to cache and restore generated images for <rdar://problem/13436334>.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded):
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
* UserInterface/FindBanner.js:
(WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
* UserInterface/ImageUtilities.js:
(generateColoredImagesForCSS):
* UserInterface/Main.js:
(WebInspector._generateDisclosureTriangleImages):
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded):
2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
Simplify giving ExecutionContexts for Frames a name
Reviewed by Dean Jackson.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.executionContextCreated):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
Make both iOS 6 and trunk use the frame's main resource's display name.
2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
Clean-up Weight.svg a little more.
Rubber-stamped by Timothy Hatcher.
* UserInterface/Images/Weight.svg:
Removed the path id, and extra processing instruction attribute.
2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
Add Execution Context / Frame selector to the QuickConsole
<rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
Reviewed by Dean Jackson.
* UserInterface/ExecutionContext.js:
(WebInspector.ExecutionContext):
Allow an execution context with the special undefined identifier.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.get sizesToFit):
* UserInterface/QuickConsoleNavigationBar.js:
(WebInspector.QuickConsoleNavigationBar.prototype.get sizesToFit):
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
The QuickConsoleNavigationBar stretches. Respect that laying out a hierarchical path.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path-component > .selector-arrows):
(.hierarchical-path-component.text-only):
(.hierarchical-path-component.text-only > select):
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent):
* UserInterface/Images/UpDownArrows.svg: Added.
Allow creating a text only HierarchicalPathComponent, and one that shows
up/down popup selector arrows.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.commitProvisionalLoad):
(WebInspector.Frame.prototype.clearExecutionContexts):
Send an event when clearing contexts. Provide a flag for when it happens
while a frame is navigating, in which case we would expect a new execution
context soon for the new page.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
Register for events necessary to fill a selector picker with frames.
iOS 6 needs to provide frame ids, so listen for added / removed frames.
Trunk and later use ExecutionContexts which Frames broadcast changes for.
Executing in the main frame uses "undefined".
(WebInspector.QuickConsole.prototype.get executionContextIdentifier):
This is the selected identifier (contextId or frameId on iOS 6). If no
selector is shown, this will still be the main frame execution context.
(WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
(WebInspector.QuickConsole.prototype._rebuildExecutionContextPathComponents):
Update the nav bar components. There is a single segment, with the selected component.
(WebInspector.QuickConsole.prototype._framePageExecutionContextsCleared):
(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
Trunk, event handlers when frames get and clear execution contexts. When a frame
navigates we have a little bit of logic to reselect that frame when its new
execution context comes in.
(WebInspector.QuickConsole.prototype._frameAdded):
(WebInspector.QuickConsole.prototype._frameRemoved):
(WebInspector.QuickConsole.prototype._frameMainResourceChanged):
iOS 6 support. Track frame adds, removes, and resource changes to update the display.
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponent):
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
Helpers for creating path components. Handles iOS 6 and trunk to get the right id.
(WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
(WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
PathComponents are a linked list. We display them sorted. These are helpers for
inserting, removing, and updating a path component in that list.
(WebInspector.QuickConsole.prototype._pathComponentSelected):
(WebInspector.QuickConsole.prototype._debuggerActiveCallFrameDidChange):
Changes to the state of the inspector that may require the UI to update.
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow):
Evaluate in the context selected in the QuickConsole.
2013-03-17 Joseph Pecoraro <pecoraro@apple.com>
Create an ExecutionContextList class.
<rdar://problem/10809363> PARITY (WebKit Web Inspector): UI for evaluating in different windows / frames from the console is missing
There may be many ExecutionContexts for a page, one for each isolated
world in the frame. Store each context for a frame in an ExecutionContext
and provide an accessor for the one that is the page context.
This also converges on the name "pageExecutionContext" instead of
"mainExecutionContext" for the special context of the page.
Reviewed by Dean Jackson.
* UserInterface/Main.html:
* UserInterface/ExecutionContextList.js: Added.
(WebInspector.ExecutionContextList):
(WebInspector.ExecutionContextList.prototype.get pageExecutionContext):
(WebInspector.ExecutionContextList.prototype.get contexts):
(WebInspector.ExecutionContextList.prototype.add):
(WebInspector.ExecutionContextList.prototype.clear):
ExecutionContextList holds a list of contexts and has a quick
accessor for the page execution context.
* UserInterface/Frame.js:
(WebInspector.Frame):
(WebInspector.Frame.prototype.get pageExecutionContext):
(WebInspector.Frame.prototype.get executionContextList):
(WebInspector.Frame.prototype.clearExecutionContexts):
(WebInspector.Frame.prototype.addExecutionContext):
Updated to use an ExecutionContextList.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree):
(WebInspector.DOMTree.prototype.requestRootDOMNode):
(WebInspector.DOMTree.prototype._requestRootDOMNode):
(WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
Updated from mainExecutionContext to pageExecutionContext.
2013-03-16 Timothy Hatcher <timothy@apple.com>
Move the debugger controls from the quick console to the debugger sidebar.
Also dynamically add and remove the call stack section so it isn't an eyesore
when you are not paused.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DebuggerSidebarPanel.css: Added.
(.sidebar > .panel.debugger > .content):
(.sidebar > .panel.debugger > .navigation-bar):
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerPauseResumeButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOverButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerStepIntoButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerStepOutButtonClicked):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
(WebInspector.DebuggerSidebarPanel.prototype.deselectCallStackContentTreeElements): Added.
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
* UserInterface/Main.html:
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype._toggleOrFocus):
2013-03-16 Timothy Hatcher <timothy@apple.com>
Make the toolbar labels look better in window mode.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/Toolbar.css:
(body:not(.docked) .toolbar .item.button > .label): Apply antialiased only to the labels
so we don't affect text in the dashboard. Also add a stroke to make the text heavier.
2013-03-16 Timothy Hatcher <timothy@apple.com>
Make toolbar items layout and collapse better at narrow window sizes.
<rdar://problem/13189092> Toolbar items can be laid out on top of each other with narrow window
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonToolbarItem.css:
(.toolbar.collapsed .item.button > .label): Removed. We only use icon-only now.
* UserInterface/DashboardView.css:
(.toolbar.collapsed .dashboard): Added. Collapses when there is no room.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayout): Call customUpdateLayout() if it exists.
* UserInterface/Toolbar.css:
(.toolbar .item-section:not(.center)): Removed min-width and made flex be 1.
(.toolbar .item-section.left): Added right margin to prevent touching.
(.toolbar .item-section.center): Make flex be 2 so it can be a different width.
(.toolbar .item-section.right): Added a left margin to prevent touching.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.set displayMode): Revert the forced icon-only mode.
(WebInspector.Toolbar.prototype.customUpdateLayout.computeItemWidths): Added.
(WebInspector.Toolbar.prototype.customUpdateLayout.computeSectionWidths): Added.
(WebInspector.Toolbar.prototype.customUpdateLayout): Added.
Computes each section individually for overflow. If any section overflow switch to icon-only
mode when in horizontal-label mode. If any section overflows after that then collapse the
toolbar, which only hides the Dashboard right now.
2013-03-16 Timothy Hatcher <timothy@apple.com>
Make the labels in the Instruments sidebar be 11px instead of 10px.
Reviewed by Joseph Pecoraro.
* UserInterface/NavigationSidebarPanel.css:
Removed a rule that was making the font-size 10px. Only the Instruments
sidebar triggered this rule.
2013-03-16 Timothy Hatcher <timothy@apple.com>
Break-up the generation of images and delay the generation of
active images so the initial page load is faster.
<rdar://problem/13436334> Web Inspector takes about 3s to activate
Reviewed by Joseph Pecoraro.
* UserInterface/ImageUtilities.js:
(.generateImages.generateActiveImages): Added.
(.generateImages): Set a tiemout to call generateActiveImages.
(._generateImages.generateActiveImages): Added.
(._generateImages): Set a tiemout to call generateActiveImages.
2013-03-15 Timothy Hatcher <timothy@apple.com>
Sort resources by domain before sorting alphabetically by name.
This was suggested by someone on Twitter. It allows local resources to bubble
to the top and external resources (analytic scripts, etc.) to come later.
Reviewed by Joseph Pecoraro.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement):
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
(WebInspector.GeneralTreeElement.prototype.set subtitle):
Fallback to "" for mainTitle and subtitle.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.compareResourceTreeElements):
Sort resources by domain (subtitle) before sorting by name (mainTitle).
2013-03-15 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-03-14 Timothy Hatcher <timothy@apple.com>
Display em-dashes instead of "0" for resources size and time to make it clear
the values are not known yet.
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.js:
(WebInspector.DashboardView.prototype.set time):
(WebInspector.DashboardView.prototype.set resourcesSize):
2013-03-14 Timothy Hatcher <timothy@apple.com>
Remove references to bottomUpHead. We can build the bottom-up tree locally.
The bottomUpHead is being removed from the protocol by https://webkit.org/b/112351.
Also remove references to TopDownTreeFactory and BottomUpTreeFactory with is dead code.
Reviewed by Joseph Pecoraro.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.prototype.get bottomUpProfileDataGridTree):
2013-03-14 Timothy Hatcher <timothy@apple.com>
Always specify overflow-x when specifying overflow-y.
Not specifying overflow-x causes it to be auto and can show scrollbars for wide content.
Also use auto instead of scroll in a few places to prevent scroll bars from always being
visible when the system prefers non-overlay scrollbars.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content):
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .data-container):
* UserInterface/LogContentView.css:
(.console-messages):
* UserInterface/Popover.css:
(.popover > .container):
2013-03-14 Timothy Hatcher <timothy@apple.com>
Remove the memory placeholder in the toolbar dashboard now that we deferred that feature.
This also evenly distributes the items for a better layout in all modes.
<rdar://problem/13237747> Dashboard items are not evenly distributed
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DashboardView.css:
Overhauled the styles to use flex layout in all cases.
* UserInterface/DashboardView.js:
(WebInspector.DashboardView):
Removed memory and split resources into resourceCount and resourcesSize.
(WebInspector.DashboardView.prototype.set logs):
(WebInspector.DashboardView.prototype.set issues):
(WebInspector.DashboardView.prototype.set errors):
(WebInspector.DashboardView.prototype.set resourcesCount):
Call _formatPossibleLargeNumber and set the outlet.
(WebInspector.DashboardView.prototype.set resourcesSize):
Set the resourcesSize outlet instead of calling _updateResourcesOutlet.
(WebInspector.DashboardView.prototype._formatPossibleLargeNumber):
Added. This is a better approach to dealing with large numbers than ellipsis.
(WebInspector.DashboardView.prototype._appendElementForNamedItem):
Removed the double div. It is no longer needed to truncate since all the outlets
can't really go larger than 6 characters now.
(WebInspector.DashboardView.prototype._networkItemWasClicked):
Renamed from _timeWasClicked so resourcesSize can use it.
* UserInterface/Images/Weight.svg: Added.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Mark DOM node styles as needing refreshed when an ancestor changes pseudo classes or any attributes change.
<rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager): Add event listeners for all nodes.
(WebInspector.CSSStyleManager.prototype._nodePseudoClassesDidChange): Added.
(WebInspector.CSSStyleManager.prototype._nodeAttributesDidChange): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Remove event listeners on the single node.
(WebInspector.DOMNodeStyles.prototype.pseudoClassesDidChange): Added.
(WebInspector.DOMNodeStyles.prototype.attributeDidChange): Added.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Always refresh the DOM node styles when visibility changes for the sidebar or separate panels.
<rdar://problem/13412234> REGRESSION: Style details sidebar does not update when ancestor nodes change
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange):
Call markAsNeedsRefresh instead of the removed refreshIfNeeded.
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel):
(WebInspector.StyleDetailsPanel.prototype.shown):
(WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
(WebInspector.StyleDetailsPanel.prototype._refreshNodeStyles): Added.
(WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
(WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
Remove the concept of having a separate needs refresh flag. Instead we just call refresh on the DOMNodeStyles
and wait for the Refreshed event. This way we always get the latest styles when first showing the panel.
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13421555> Source code links should always show the original location
Location links will now show the original location normally, and
display a mapped / formatted display location in italics when hovered,
but only if such a location exists.
Reviewed by Timothy Hatcher.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Main.js:
(WebInspector.createSourceCodeLocationLink):
Use the SourceCodeLocation helpers to keep the contents live.
* UserInterface/Main.css:
(.display-location):
Make display locations italic.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.tooltipString):
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationTooltip):
(WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
Different handlers to keep a tooltip or element property live.
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13418338> Show / Hide Shadow DOM should not change the selected node, or select the earliest ancestor
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeOutline.js:
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13418332> Remove or selectively show "Show Shadow DOM" context menu, there is a nav bar button
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
Improve JavaScript pretty printing of "finally"
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
Provide a SourceCodeLocation helper that keeps an element text up to date.
Reviewed by Timothy Hatcher.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.setAndKeepElementDisplayLocationStringUpToDate):
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
Let WebInspector.createSourceCodeLocationLink create a goToArrow
Reviewed by Timothy Hatcher.
This allows LayoutTimelineDataGridNode to use createSourceCodeLocationLink
and not remove its children.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Main.js:
(.updateLinkDisplayStrings):
(WebInspector.createSourceCodeLocationLink):
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
WebInspector.createSourceCodeLocationLink use SourceCodeLocation's full power
Reviewed by Timothy Hatcher.
When a link is created with a source code location we can show the real
location (mapped location, formatted location, original location) and
update the link and tooltip when things change.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
Switch to from createSourceCodeLink to createSourceCodeLocationLink.
* UserInterface/Main.js:
(WebInspector.createSourceCodeLocationLink):
Update link text and tooltip when the location changes.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype._locationString):
Use SourceCode.displayName and handle source codes without URLs if needed.
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13386143> REGRESSION (CodeMirror): Jump to line / reveal line should reveal closer to the middle of the editor never the top or bottom if possible
If revealLine is called with a line outside the visible set of lines
in the editor then scroll the editor to make that line the center.
This also behaves as expected for lines the start / end of a document.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.shown):
In order for cm.getScrollInfo() values to be valid after an editor is
reattached to the DOM Hierarchy we have to call refresh, and because of
the way CodeMirror works (coalescing changes in operations) the
getScrollInfo is only valid after the refresh operation. So remove the
wrapping operation here.
(WebInspector.TextEditor.prototype.set formatted):
If you pretty print a document do not send a change event and
cause the value to be sent to the backend. The frontend style
sidebar expects line and column numbers for the original
unformatted document.
(WebInspector.TextEditor.prototype.revealAndHighlightLine):
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditor.prototype._scrollIntoViewCentered):
(WebInspector.TextEditor.prototype._prettyPrint):
In revealLine or prettyPrint when we move the selection make a decision
whether or not to scroll the editor to put that line in the center.
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
Update CodeMirror to ToT (v3.1+) which includes some JavaScript language and selection fixes
<rdar://problem/13396332> CodeMirror: Selection on lines that wrap more than once is incorrect
Rubber-stamped by Timothy Hatcher.
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/javascript.js:
2013-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13410237> REGRESSION: Editing CSS resources no longer works (it is read-only)
Reviewed by Ricky Mondello.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set readOnly):
2013-03-14 Antoine Quint <graouts@apple.com>
<rdar://problem/13410257> Display the reason why a layer is composited
Retrieve the reason why the selected layer in the layer tree sidebar
panel is composited and display them in a popover anchored to the
selected data grid node, removing the popover when the inspector
loses focus or the data grid node is no longer selected.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
Add new strings used to display the various compositing reasons.
* UserInterface/InspectorBackendCommands.js:
Add new LayerTree.reasonsForCompositingLayer() protocol method.
* UserInterface/LayerTreeManager.js:
(WebInspector.LayerTreeManager.prototype.reasonsForCompositingLayer):
Wrapper for the new LayerTree.reasonsForCompositingLayer() protocol
method.
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree-popover):
(.layer-tree-popover p):
(.layer-tree-popover ul):
(.layer-tree-popover li):
Styles for the content displayed in a popover to show the compositing
reasons for the selected layer.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
On top of highlighting the appropriate region in the canvas for the
selected layer, also show a popover with the reasons why it was
composited or remove the popover if there are no selected layers.
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
Show the popover for the selected data grid node.
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
Hide the popover.
(WebInspector.LayerTreeSidebarPanel.prototype._showPopoverForSelectedNode):
(WebInspector.LayerTreeSidebarPanel.prototype._hidePopover):
(WebInspector.LayerTreeSidebarPanel.prototype.):
(WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):
Show a popover listing the compositing reasons for the selected layer
anchored to the selected data grid node. The content of the popover
is provided after the call to the agent to retrieve the reasons for
compositing has returned.
* UserInterface/Popover.css:
(.popover):
(.popover.arrow-up):
(.popover.arrow-right):
(.popover.arrow-down):
(.popover.arrow-left):
* UserInterface/Popover.js:
(WebInspector.Popover.prototype.area):
(WebInspector.Popover.prototype.present):
(WebInspector.Popover.prototype._bestMetricsForEdge):
Miscellaneous enhancements for better popover behavior where we correctly
round up the metrics for the hosted content, ensure we interrupt a dismiss
animation when presenting the popover again, and change the sizing behavior
to take into account the various padding metrics applied as a result of
picking a given edge.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Don't wait until DOMContentLoaded to do non-UI initialization when loading the Web Inspector.
Part of: <rdar://problem/13412219> REGRESSION: Opening the Web Inspector takes 5s
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorAdditions.js:
Moved extra MIME-type registration here.
* UserInterface/Main.html:
Added a inline script to call WebInspector.loaded(). This needs to be outside of Main.js so it
comes after the scripts added via document.write when Main.js is a combined file.
* UserInterface/Main.js:
(WebInspector.loaded): Added. Moved code from contentLoaded.
(WebInspector.contentLoaded): Moved code to loaded.
(WebInspector._windowResized): Call _contentBrowserSizeDidChange to avoid registering for resize twice.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Add selected images for UserInputResult.pdf and UserInputPromptPrevious.pdf.
Reviewed by Joseph Pecoraro.
* UserInterface/Images/UserInputPromptPreviousSelected.pdf: Added.
* UserInterface/Images/UserInputResultSelected.pdf: Added.
* UserInterface/LogContentView.css:
(.console-messages:focus .console-item.selected .console-user-command-result.console-log-level::before):
(.console-messages:focus .console-item.selected .console-user-command::before):
2013-03-13 Timothy Hatcher <timothy@apple.com>
Make copy work in the split console.
<rdar://problem/13411428> Copy does not work if the console is in split view
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector._focusedContentView): Added.
(WebInspector._beforecopy): Structure more like _copy. Use _focusedContentView.
(WebInspector._copy): Use _focusedContentView.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Remove old focus tracking code in EditingSupport.js and start tracking currentFocusElement
and previousFocusElement in Main.js's _focusChanged handler.
Reviewed by Joseph Pecoraro.
* UserInterface/EditingSupport.js:
(WebInspector.startEditing.cleanUpAfterEditing): Use restoreFocusFromElement().
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt.prototype.focus): Use focus().
* UserInterface/Main.js:
(WebInspector.restoreFocusFromElement): Added.
(WebInspector._focusChanged): Set currentFocusElement and previousFocusElement.
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.prototype._startEditing): Use focus().
2013-03-13 Timothy Hatcher <timothy@apple.com>
Fix some things with the new console selection behavior.
* Makes sure all disclosure triangles and text are white when the row selection is blue.
* Makes sure all disclosure triangles and text are normal when the row selection is gray.
* Fixes a bug where click would cause the row to jump between top and bottom reveal instead of
toggling a clicked disclosure triangle.
* Only expand recursively if the Option key is pressed. This matches the TreeOutline code.
* Collapse recursively if the option key is pressed.
* Better aligns the disclosure triangles with DOM tree nodes.
Reviewed by Antoine Quint.
* UserInterface/LogContentView.css:
(.console-messages):
(.console-item.selected):
(.console-messages:focus .console-item.selected *):
(.console-group-title::before):
(.console-messages:focus .console-item.selected .console-group-title::before):
(.console-messages:focus .console-group.collapsed .console-item.selected .console-group-title::before):
(.console-messages:focus .console-item.selected .section .header .title):
(.console-message-url):
(.console-messages:focus .console-item.selected .section .header::before):
(.console-messages:focus .console-item.selected .section.expanded .header::before):
(.console-messages:focus .console-item.selected .properties-tree li.parent::before):
(.console-messages:focus .console-item.selected .properties-tree li.parent.expanded::before):
(.outline-disclosure li.parent::before):
(.console-messages:focus .console-item.selected .outline-disclosure li.parent::before):
(.console-messages:focus .console-item.selected .outline-disclosure li.parent.expanded::before):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mousedown):
Use focus() instead of setCurrentFocusElement. The setCurrentFocusElement function is legacy and
should be removed someday.
(WebInspector.LogContentView.prototype._updateMessagesSelection):
Don't call _ensureMessageIsVisible if the message was already selected from the start.
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
Only expand or collapse recursively if the Option key is pressed.
2013-03-13 Timothy Hatcher <timothy@apple.com>
Tweak the New Rule behavior in the Style details sidebar.
Makes sure to scroll to reveal the section when it is focused. Also use appropriateSelectorFor
instead of displayNameForNode to generate better selectors.
Reviewed by Antoine Quint.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRule): Use appropriateSelectorFor.
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.scrollToFocusedSection): Added.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Call scrollToFocusedSection on a timeout.
2013-03-13 Antoine Quint <graouts@apple.com>
Make the "Memory" outlet at the bottom of the layer tree
sidebar panel align to the right as expected.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeSidebarPanel.css:
(.layer-tree.panel .layers-memory-label):
2013-03-13 Antoine Quint <graouts@apple.com>
<rdar://problem/13410203> Correctly identify layers for generated and reflected content
We now correctly identify layers as reflected content and/or generated
content with a more appropriate name in the "child layers" data grid.
Additionally, we highlight the bounds of the layer on the page to
clearly identify what this reflection or generated content is on the
canvas.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
New localized string used to identify reflections layers.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightRect):
New method wrapping DOMAgent.highlightRect().
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
Further qualify the layer by adding either the ::before or ::after
pseudo-class for layers that are associated to generated content as
well as a localized "Reflection for" prefix for reflected layers.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
Check what type of layer is now selected and call the new
DOMTreeManager.highlightRect() method in case we're dealing with a
reflection or generated layer.
2013-03-13 Antoine Quint <graouts@apple.com>
<rdar://problem/13209485> Layer Tree sidebar should respect "show-shadow-dom" setting
The layer tree sidebar panel data grid now respects the
"show-shadow-dom" setting.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
Track changes for the "show-shadow-dom" setting.
(WebInspector.LayerTreeSidebarPanel.prototype.refresh):
Keep track of the unfiltered set of child layers returned when calling
into the LayerTreeAgent such that we can reuse this unfiltered list
of child layers layer as the "show-shadow-dom" setting changes.
(WebInspector.LayerTreeSidebarPanel.prototype._showShadowDOMSettingChanged):
Update the display such that the new setting is taken into account.
(WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
Filter the list of child layers to take into account the
"show-shadow-dom" setting. We also keep track of the layer for
the current node in the new "_layerForNode" property such that
it may be used to call into this method again when we need to
update the shadow DOM filter without querying the backend again.
2013-03-13 Antoine Quint <graouts@apple.com>
<rdar://problem/13409543> Adopt new LayerTreeAgent protocol
We remove all code related to the previous LayerTreeAgent protocol where
we'd use the LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
methods which have now been replaced by a single method to provide the
layers in the scope of a given DOM subtree with LayerTree.layersForNode().
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
Remove the strings related to composited layers since the protocol now
only provides composited layers.
* UserInterface/InspectorBackendCommands.js:
Remove the old LayerTree.getLayerTree() and LayerTree.nodeIdForLayerId()
protocol methods and add the new LayerTree.layersForNode() method.
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.get layer):
New public accessor for the "_layer" property such that the
LayerTreeSidebarPanel may access properties of the selected data grid
node's layer.
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
Remove the check for a valid node since the protocol ensures that layers
now have a valid nodeId pushed to the front-end. We're also removing the
redundant "layerData" property by just letting the layer be accessible
via a public accessor.
(WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
Use the "_layer" property to find out the nodeId rather than the removed
"layerData" property.
* UserInterface/LayerTreeManager.js:
(WebInspector.LayerTreeManager):
Remove the hard-coded disabling of the LayerTree features in the front-end
and instead use a real run-time check for availability of the LayerTreeAgent.
We also remove some ivars we no longer use.
(WebInspector.LayerTreeManager.prototype.layerTreeMutations):
Complete rewrite of the method to account for the richer set of
information exposed by the new protocol. We now have to take into account
much more than just layer ids to indentify mutations, node ids should also
be taken into account to check if a layer for the same node has appeared
with a new layer id (as it may have been destroyed and recreated for a
content update). We also need to take into account generated content and
reflections, which may have pseudo element ids.
(WebInspector.LayerTreeManager.prototype.layersForNode):
New wrapper for the new LayerTreeAgent.layersForNode() protocol method.
(WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
We no longer obtain the layer tree upon a change, we merely dispatch
an event indicating that the layer tree has changed.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
Remove the setting to only show composited layers since the protocol now
only returns composited layers.
(WebInspector.LayerTreeSidebarPanel.prototype.refresh):
Retrieve layers from the agent and update our display with the result.
(WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange):
Mark that we need a refresh following a change in the layer tree.
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
No longer show the "Composited" row since all layers are now composited.
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
No longer build the "only show composited layers" checkbox.
(WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
(WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
Use the now-public "layer" property on the LayerTreeDataGridNode to
look up layer information for sorting.
(WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers):
Keep track of the new child layers in a "_childLayers" property.
(WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
Remove the checks for composited since all layers are now composited.
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
(WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics):
Update to use new properties on layer objects per the change in protocol.
2013-03-13 Antoine Quint <graouts@apple.com>
<rdar://problem/12886275> Selecting errors in the console doesn't select the error and the filename
In order to be able to provide custom content to the clipboard for console messages,
we must also allow selection of console messages in a different way than via text
selection. In this patch, we make the list of messages selectable, supporting the
selection types one would expect from a desktop application. I go into the details
of what features exactly are implemented in the per-method discussion below.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommand.js:
(WebInspector.ConsoleCommand.prototype.toClipboardString):
Adopt the protocol to provide a custom clipboard string in the form of
"> theJSCommand();".
* UserInterface/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult.prototype.toClipboardString):
Adopt the protocol to provide a custom clipboard string in the form of
"< theCommandResult".
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.addMessage):
Wrap individual messages in a group within a wrapper element with a "console-item"
CSS class. These elements are used to apply a "selected" or "filtered-out" class and
to draw the full-width borders on the items.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
Refactor to use new _shouldDumpStackTrace() method.
(WebInspector.ConsoleMessageImpl.prototype._shouldDumpStackTrace):
New method to share logic once used only in _formatMessage() with
toClipboardString() as well.
(WebInspector.ConsoleMessageImpl.prototype.toString):
Refactor to use new "levelString" property.
(WebInspector.ConsoleMessageImpl.prototype.get levelString):
New accessor to share logic once used only in toString() with toClipboardString()
as well.
(WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
Adopt the protocol to provide a custom clipboard string where we log the level,
message text, url, line number and optionally the stack frames.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
Return the cloned message so that we may manipulate it from call sites (ie. in
LogContentView.prototype._messageAdded()).
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Fix a
missing semi-colon.
* UserInterface/LogContentView.css:
(.console-messages):
Remove useless properties.
(.console-item):
Basic style for all console item wrappers, draw a 1px bottom border.
(.console-item.selected):
Background color for selected items when the container doesn't have focus (gray).
(.console-messages:focus .console-item.selected):
Background color for selected items when the container has focus (blue).
(.console-messages:focus .console-item.selected *):
Make all text in selected items white.
(.console-item.selected .console-group-title::before):
Use a white triangle for selected items.
(.console-group.collapsed .console-item.selected .console-group-title::before):
Use a white triangle for selected items.
(.console-item.selected .console-error-level .section .header .title):
Ensure text is white in selected items.
(.console-item.selected .console-debug-level .console-message-text):
Ensure text is white in selected items.
(.auto-complete-text, .editing .auto-complete-text):
Remove useless property.
(.console-item.selected .outline-disclosure li.parent::before):
Use a white triangle for selected items.
(.console-item.selected .outline-disclosure li.parent.expanded::before):
Use a white triangle for selected items.
(.console-item.filtered-out):
Remove all filtered-out items from layout.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
New ivars to track the current nesting level and the list of all selected message
elements. We also start tracking a series of keyboard and mouse events on the
messages container to implement multiple selection of message elements.
(WebInspector.LogContentView.prototype.updateLayout):
Override this ContentView method to track the height of the messages container
in order to update the scroll position of the container as we ensure the visibility
of selected items.
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
Manually nest the messages hosted in wrappers and keep track of the nesting level
as groups are opened and closed. We also clear all focusable children there as new
content may have been added with markup using the "tabindex" attributes.
(WebInspector.LogContentView.prototype.handleCopyEvent):
Provide custom content to the clipboard based on the clipboard text of each message
in the selected messages list in DOM order.
(WebInspector.LogContentView.prototype._messageAdded):
Ensure newly added messages are filtered out in case they don't match the selected
filters in the scope bar.
(WebInspector.LogContentView.prototype._mousedown):
Event handler for the "mousedown" event on the messages container. We ignore user
interaction if we would otherwise show a contextual menu, and ensure the messages
container has focus otherwise. In case we're getting focus now and we already had
selected elements, we go no further. Otherwise, we figure out which message was
under the mouse pointer and track that we should prevent a "click" event from being
dispatched in case the message was not yet selected. This ensures that we don't
collapse/expand an outline and select at the same time. We then update the message
selection state and track further mouse interaction. If we detect we didn't click on
a message, ie. the empty area of the messages container, we clear the selection list.
(WebInspector.LogContentView.prototype._mousemove):
Get the message element under the mouse pointer, if any, and update the messages
selection list so that we select messages from the first element we moused down
on to this one.
(WebInspector.LogContentView.prototype._mouseup):
Stop tracking any further "mousemove" and "mouseup" events as the selection-by-mouse
interaction draws to an end.
(WebInspector.LogContentView.prototype._click):
Prevent the propagation of "click" events if we established in the "mousedown" event
handler that we should have.
(WebInspector.LogContentView.prototype.handleEvent):
Router for mouse "mousemove" and "mouseup" events.
(WebInspector.LogContentView.prototype._updateMessagesSelection):
Method that updates the selected state of the provided message based on whether
we're allowing multiple selection (Cmd+click) and range selection
(Shift+click/arrow-up/arrow-down).
(WebInspector.LogContentView.prototype._ensureMessageIsVisible):
Scrolls the messages container as necessary to reveal the provided message. We avoid
getting metrics from CSS as much as possible by using the positiong of the message
directly after the provided one since we can get that information via
_positionForMessage() without triggering a style recalc. In the case where we want to
ensure the last message is visible, we have no other resort but to query its height.
(WebInspector.LogContentView.prototype._positionForMessage):
Get the position of the given message in the coordinate system established by the
messages container.
(WebInspector.LogContentView.prototype._isMessageVisible):
Indicates whether the provided message is visible (ie. not filtered-out or within a
collapsed group).
(WebInspector.LogContentView.prototype._isMessageSelected):
Indicates whether the provided message is selected.
(WebInspector.LogContentView.prototype._selectAllMessages):
Selects all visible messages.
(WebInspector.LogContentView.prototype._allMessages):
All the messages in the messages container as an Array.
(WebInspector.LogContentView.prototype._allVisibleMessages):
All visible messages in the messages container as an Array.
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
Filter messages as the selected filters in the scope bar have changed.
(WebInspector.LogContentView.prototype._filterMessages):
Filter the messages based on scope bar filters selection. We ensure commands and
results are always visible, no matter what filters are selected.
(WebInspector.LogContentView.prototype._didFocus):
Track that the messages container is focused.
(WebInspector.LogContentView.prototype._didBlur):
Track that the messages container is not focused.
(WebInspector.LogContentView.prototype._keyDown):
Event handler for the "keydown" event, used to route to the more specific handlers.
(WebInspector.LogContentView.prototype._commandAWasPressed):
Event handler for Cmd+A key combination, selects all visible messages.
(WebInspector.LogContentView.prototype._escapeWasPressed):
Event handler for the Esc. key being pressed, clears the selection if there are
any selected messages, otherwise moving focus to the command prompt.
(WebInspector.LogContentView.prototype._upArrowWasPressed):
Event handler for the up arrow key being pressed, selects the message above, or add
it to the selection list if the shift key is selected.
(WebInspector.LogContentView.prototype._downArrowWasPressed):
Event handler for the down arrow key being pressed, selects the message below, or add
it to the selection list if the shift key is selected.
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
Event handler for the left arrow key veing pressed, collapses the current group or
message with stack trace. Otherwise, does nothing.
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
Event handler for the right arrow key veing pressed, expands the current group or
message with stack trace. Otherwise, does nothing.
(WebInspector.LogContentView.prototype._previousMessage):
Traverses the list of visible messages until we find a message located prior to
the provided message.
(WebInspector.LogContentView.prototype._nextMessage):
Traverses the list of visible messages until we find a message located after to the
provided message.
(WebInspector.LogContentView.prototype._clearFocusableChildren):
Remove the "tabindex" attribute on all elements located within the messages container
to ensure no element can steal focus away from the messages container and mess with our
handling of keyboard events.
2013-03-12 Timothy Hatcher <timothy@apple.com>
Don't truncate the suggestions menu when it gets close to the right edge.
Restore a line that was removed that we needed after all to get the right behavior.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/CompletionSuggestionsView.js:
(WebInspector.CompletionSuggestionsView.prototype.show): Update width after maximumWidth changes.
2013-03-12 Timothy Hatcher <timothy@apple.com>
Prevent style text from shifting as properties are marked with checkboxes.
This marks blanks lines in editable styles with a placeholder that is the same
size as the checkbox. When a checkbox is added the placeholder is removed. That
switch keeps the text in the same position and looks superb!
This also forces checkboxes to be visible when the editor has focus, not just hovered.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .checkbox-placeholder): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Added all
param so we don't clear placeholder in all cases, only when doing a reset.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Call
_removeCheckboxPlaceholder.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Call
_markBlankLinesWithCheckboxPlaceholder.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._markBlankLinesWithCheckboxPlaceholder): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._removeCheckboxPlaceholder): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call
_markBlankLinesWithCheckboxPlaceholder and pass true for _clearTextMarkers's all param.
2013-03-12 Timothy Hatcher <timothy@apple.com>
Improve the load time of the Web Inspector by loading localizedString.js sooner.
Reviewed by Joseph Pecoraro.
* UserInterface/LoadLocalizedStrings.js: Added.
* UserInterface/Main.html: Include LoadLocalizedStrings.js before Main.js.
* UserInterface/Main.js: Don't dynamically load localizedString.js.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Disable auto completion inside comments.
<rdar://problem/13387317>
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Return early inside comments.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Don't highlight autocompletion items on hover. Only highlight them when active.
<rdar://problem/13387350> CSS autocompletion can be confusing if mouse cursor is hidden and hovering completion menu
Reviewed by Joseph Pecoraro.
* UserInterface/CompletionSuggestionsView.css:
(.completion-suggestions-container:not(:active) > .item.selected,
.completion-suggestions-container > .item:active): Renamed from being hover to active.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Workaround <rdar://problem/13392441> so Images and Fonts don't get cut off at the top.
We can get the expected result by using margin: 0 auto until the behavior of -webkit-align-items
is hashed out more.
Reviewed by Joseph Pecoraro.
* UserInterface/FontResourceContentView.css:
(.content-view.resource.font): Remove -webkit-align-items: center and use margin: 0 auto.
(.content-view.resource.font .preview): Change 13px to 15px to be less arbitrary.
* UserInterface/ImageResourceContentView.css:
(.content-view.resource.image): Ditto.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Make SVG fonts work in the Web Inspector.
<rdar://problem/13392056> SVG fonts are not rendered when selected
Reviewed by Jon Lee.
* UserInterface/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.contentAvailable): Supply format("svg") when we
know we are loading an SVG font. This seems to be required for SVG fonts.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Don't allow setting a rule's selector to an empty string.
<rdar://problem/13387384> When editing a selector to be the empty string, nothing is committed - UI should reflect that
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > .selector:empty): Added.
(.style-declaration-section > .header > .selector:empty::before): Added.
* UserInterface/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._commitSelector): Call refresh if the selector is empty.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Ignore Shift-Tab in CodeMirror instances since it does unexpected things.
<rdar://problem/13387373> CSS editor typing Shift+Tab adds weird pre-indent
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorAdditions.js:
(ignoreKey): Added.
2013-03-11 Timothy Hatcher <timothy@apple.com>
Improve the wrapping of the pseudo class checkboxes.
Also make sure the scroll logic handles the different heights possible.
<rdar://problem/13383635> Pseudo class checkboxes should wrap better with narrow sidebar (never 3x1 & 1x1)
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content > .pseudo-classes): Switch to flex layout.
(.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group): Added.
(.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label): Split the margin on each side.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Create group elements of up to two labels each.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Call _updateNoForcedPseudoClassesScrollOffset.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Ditto.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._updateNoForcedPseudoClassesScrollOffset): Update the height.
2013-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11720808> REGRESSION (Safari 6): Conditional breakpoints UI missing
Add back conditional breakpoints UI. The UI is modeled after Xcode's
"Edit Breakpoint" context menu and popover UI.
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get condition):
(WebInspector.Breakpoint.prototype.set condition):
(WebInspector.Breakpoint.prototype.get info):
Give a breakpoint a condition, mutators, and save the condition in
the breakpoint info.
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
Add a context menu item for "Edit Breakpoint".
(WebInspector.Breakpoint.prototype._popoverToggleCheckboxChanged):
(WebInspector.Breakpoint.prototype._popoverConditionInputChanged):
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
Generate the popover content and show the popover.
* UserInterface/Breakpoint.css: Added.
(.popover .edit-breakpoint-popover-content):
(.popover .edit-breakpoint-popover-content > label.toggle):
(.popover .edit-breakpoint-popover-content > table):
(.popover .edit-breakpoint-popover-content > table > tr > th):
(.popover .edit-breakpoint-popover-content > table > tr > td):
(#edit-breakpoint-popover-condition):
Styles for the edit breakpoint popover.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
Pass the breakpoint element in the display so that if a popover needs
to be shown, we have the bounds of an element to show it for.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.isBreakpointEditable):
Never allow setting a condition on the special breakpoints.
(WebInspector.DebuggerManager.prototype._breakpointConditionDidChange):
(WebInspector.DebuggerManager.prototype._breakpointConditionDidChange.breakpointRemoved):
To set the condition delete the old breakpoint and set a new breakpoint
with the new condition. The WebInspector.Breakpoint will get an updated id.
* UserInterface/Main.html:
* Localizations/en.lproj/localizedStrings.js:
Include new files and strings.
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
Add a "Select Output" button to PrettyPrinting tools.
The new button make copying the entire output easier. Useful for saving
before and after contents to see changes. Also update the formatter and
clean up some style issues.
Unreviewed tools change.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/index.html:
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
Pretty printing: Don't try to be smart about unary +/-.
This was causing some simple expressions like "1+1" or "foo+1" to
become "1 +1" and "foo +1" instead of the expected "1 + 1" and
"foo + 1". The most common unary expressions negative numbers,
are parsed as a single token by CodeMirror anyways, so drop the
special case in the formatter.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
Remove the special case that tried to handle unary +/-.
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
Update the PrettyPrinting Tool with new formatter changes.
Unreviewed tools change.
* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/Formatter.js:
(Formatter.prototype._handleToken):
(Formatter.prototype._handleEmptyLine):
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
Pretty Printing: switch from startsWith to regex matching for tokens
This addresses a review comment that using startsWith for checking
token types is brittle and we should check the entire string. The
performance impact was negligible on JavaScript and minor on CSS,
so it is worth making the change to make the code less brittle.
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/Formatter.js:
(Formatter.prototype._handleToken):
(Formatter.prototype._handleEmptyLine):
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
Add Pretty Printing Debug Page to WebInspector/Tools/PrettyPrinting
The pretty printing files in the Inspector can be run independently of
the Inspector. The only requirements are CodeMirror, its modes, and a
few Utility functions. This provides a separate tool that makes it
easier to debug and benchmark pretty printing without needing to run
the entire inspector. By default it includes some debug information
that will speed up debugging and make making improvements easier.
Rubber-stamped by Timothy Hatcher.
* Tools/PrettyPrinting/CodeMirrorFormatters.js: Added.
* Tools/PrettyPrinting/Formatter.js: Added.
* Tools/PrettyPrinting/FormatterContentBuilder.js: Added.
* Tools/PrettyPrinting/codemirror.css: Added.
* Tools/PrettyPrinting/codemirror.js: Added.
* Tools/PrettyPrinting/css.js: Added.
* Tools/PrettyPrinting/javascript.js: Added.
CodeMirror and WebInspector pretty printing files copied with only
minor tweaks (debugging code).
* Tools/PrettyPrinting/populate/apple.css: Added.
* Tools/PrettyPrinting/populate/jquery.min.js: Added.
Useful JavaScript and CSS content to populate the editor with. The
contents are decent stress tests for coverage and benchmarking.
jQuery is already in Safari for other tools, and apple.com's CSS
is Apple source. These files are just included as test data.
* Tools/PrettyPrinting/index.html: Added.
Driver. Includes an editor, some buttons, and outputs results.
2013-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13375942> Pretty printing: Search results highlight wrong text range and highlight wrong line
Provide a SourceCodeTextRange. This contains start and end SourceCodeLocation
objects and uses those to provide raw, formatted, and mapped (display)
WebInspector.TextRanges and events when the range bounds change.
Search results coming from the backend have the original content and so
include raw text range information. When we jump to the source code we
will want to reveal and highlight the formatted line.
Reviewed by Timothy Hatcher.
* UserInterface/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject):
(WebInspector.DOMSearchMatchObject.prototype.get sourceCodeTextRange):
* UserInterface/Main.html:
* UserInterface/ResourceSearchMatchObject.js:
(WebInspector.ResourceSearchMatchObject):
(WebInspector.ResourceSearchMatchObject.prototype.get sourceCodeTextRange):
Switch these to create and hold a SourceCodeTextRange.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeTextRange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
When selecting a SearchMatchObject reveal and select the formatted range.
It may be jarring to the user to see a search result for something and
jump to the mapped (display) location which may not contain the search term.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement):
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle):
Be aware that the represented SearchMatchObject has a sourceCodeTextRange
now. But we are provided line content from the original resource, so in
highlighting the search string use the original resource's text range.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.createSourceCodeTextRange):
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.createSourceCodeTextRange):
Helpers for creating a SourceCodeTextRange by providing an unformatted
TextRange in the given resource. Automatically takes care of SourceMaps.
* UserInterface/SourceCodeTextRange.js: Added.
(WebInspector.SourceCodeTextRange):
(WebInspector.SourceCodeTextRange.prototype.get sourceCode):
(WebInspector.SourceCodeTextRange.prototype.get textRange):
(WebInspector.SourceCodeTextRange.prototype.get formattedTextRange):
(WebInspector.SourceCodeTextRange.prototype.get displaySourceCode):
(WebInspector.SourceCodeTextRange.prototype.get displayTextRange):
(WebInspector.SourceCodeTextRange.prototype._startAndEndLocationsInSameMappedResource):
(WebInspector.SourceCodeTextRange.prototype._sourceCodeLocationChanged):
SourceCodeTextRange matching SourceCodeLocation's semantics.
2013-03-09 Timothy Hatcher <timothy@apple.com>
Don't flash red strikethrough when actively editing a style.
<rdar://problem/13385762>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .editing-line .css-style-declaration-property.invalid): Renamed.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._clearRemoveEditingLineClassesTimeout): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClasses.removeEditingLineClasses): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._removeEditingLineClassesSoon): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Add EditingLineStyleClassName to the changed line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateProperties): Call _removeEditingLineClassesSoon.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _removeEditingLineClasses.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): Don't add line CompletionPendingStyleClassName.
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Remove call to _removePendingCompletionLineStyleClass.
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): Ditto.
(WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass): Removed.
2013-03-09 Timothy Hatcher <timothy@apple.com>
Prevent CSS autocompletion from interfering with the undo/redo history.
We now remove any changes we programmatically do from the undo history.
And before undo or redo we make sure to hide the completions so the editor
is back to the state that matches the history.
<rdar://problem/13384296> CSS Autocompletion causes unexpected Undo behavior
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController): Hook up _handleHideKey to the standard
undo and redo shortcuts. Also hook up select all so it goes through instead of being
blocked by _handleCursorActivity.
(WebInspector.CodeMirrorCompletionController.prototype.get _currentReplacementText): Added.
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): Call
_removeLastChangeFromHistory after replaceRange.
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update): Added.
Replace the prefix with the full completion text. Don't call _removeLastChangeFromHistory.
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint): Call update.
(WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory): Added.
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): Call
_removeLastChangeFromHistory after each replaceRange.
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition): Call
_removeCompletionHint before getting the cursor so any cursor changes are done first.
(WebInspector.CodeMirrorCompletionController.prototype._handleHideKey): Added. Hide the completions
and pass through to other the standard handlers.
2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12463631> REGRESSION: Subframes don't show the DOM tree
Reviewed by Timothy Hatcher.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree):
(WebInspector.DOMTree.prototype.requestRootDOMNode):
(WebInspector.DOMTree.prototype._requestRootDOMNodeInternal):
(WebInspector.DOMTree.prototype._frameMainResourceDidChange):
(WebInspector.DOMTree.prototype._frameExecutionContextChanged):
If we are a subframe we must wait for a context execution identifier
to do the RuntimeAgent.evaluate to get the document. So we may need
to wait for it. Switch to invoke and clarify we use frameId for
iOS 6 backwards compatibility.
* UserInterface/ExecutionContext.js: Added.
(WebInspector.ExecutionContext):
(WebInspector.ExecutionContext.supported):
(WebInspector.ExecutionContext.prototype.get id):
(WebInspector.ExecutionContext.prototype.get name):
(WebInspector.ExecutionContext.prototype.get isPageContext):
(WebInspector.ExecutionContext.prototype.get frame):
WebInspector.Object class for Runtime.ExecutionContextDescription type.
This was unavailable in iOS 6, so add a static "supported" function.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.initialize):
(WebInspector.Frame.prototype.commitProvisionalLoad):
Clear executino contexts on initialize, navigating, and detaching (manager).
(WebInspector.Frame.prototype.get mainExecutionContext):
(WebInspector.Frame.prototype.get executionContexts):
(WebInspector.Frame.prototype.clearExecutionContexts):
(WebInspector.Frame.prototype.addExecutionContext):
A frame may have multiple execution contexts. One for each world. We consider
the first execution context we receive for a frame to be the main one.
(WebInspector.Frame.prototype.get executionContextIdentifier):
Backwards compatible execution context identifier. Null if not yet resolved.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidDetach):
When detaching a page, clear the execution contexts.
(WebInspector.FrameResourceManager.prototype.executionContextCreated):
Set the execution context on a frame if provided.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Register a "Runtime" domain observer and enable it when it is available.
* UserInterface/RuntimeObserver.js: Added.
(WebInspector.RuntimeObserver):
(WebInspector.RuntimeObserver.prototype.executionContextCreated):
Add a new Observer for "Runtime" domain events.
2013-03-08 Timothy Hatcher <timothy@apple.com>
<rdar://problem/13381025> REGRESSION (Safari 6): Bottom-up profiling option missing
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Images/BottomUpTree.pdf: Added.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.prototype.get navigationItems): Added. Return percent
and bottom up item.
(WebInspector.JavaScriptProfileView.prototype._toggleBottomUpView): Added. Flip the setting
and call _changeView.
(WebInspector.JavaScriptProfileView.prototype._changeView): Check _showTreeBottomUpSetting.
Removing reference to old viewSelectElement property.
2013-03-08 Timothy Hatcher <timothy@apple.com>
Make the "H" key toggle the visibility of the selected DOM element.
<rdar://problem/13352674> PARITY (WebKit Web Inspector): Shortcut to hide/show DOM elements while inspecting
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline): Create the keyboard shortcut.
(WebInspector.DOMTreeOutline.prototype._hideElement.toggleProperties): Added.
(WebInspector.DOMTreeOutline.prototype._hideElement): Added.
2013-03-08 Timothy Hatcher <timothy@apple.com>
Always fire the Refreshed event for DOMNodeStyles.
Not firing Refreshed made it hard to listen for when it was safe to use the properties.
If you call refresh, you expect Refreshed to always fire. But it would only fire if there
was a significant change. Now it always fires and passes a flag whether it was significant.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.propertyForName): Drive by: don't consider
pending properties if we can't create or are not editable.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Keep track on if we
found a significant change since the last time we fired the Refreshed event. Only recompute
if it was significant if we aren't already marked as significant. Pass significantChange along
with the Refreshed event and always fire it.
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Added significantChange param. Only
do a rebuild if it was significant.
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh): Set _forceSignificantChange.
(WebInspector.StyleDetailsPanel.prototype.refresh): Added significantChange param.
(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Pass along
significantChange to refresh, taking into consideration _forceSignificantChange.
(WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Pass along significantChange
from the event to _refreshPreservingScrollPosition.
2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13372615> REGRESSION: theverge.com shows 2 duplicate "rs.js" Extra Script resources
The URLs passed in scriptParsed messages appears to not match up properly
with the Resource URL. Testing on theverge.com we can get script URLs
that are encoded where the resource URL is decoded, and we can get script
URLs that have a hash where the resource URL does not have a hash. Provide
a generic resourceForScript lookup.
Reviewed by Timothy Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceForScript):
Walk the frame tree looking for a resource with the same URL as
a script. Check the with fragment encoded and decoded script URL,
an without fragment encoded and decoded script URL.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.scriptsForURL):
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
* UserInterface/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
When we have a script, use the resourceForScript instead of resourceForURL.
* UserInterface/Utilities.js:
(removeURLFragment): helper fro removing URL fragment.
2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13371011> Misclassified resources if you open the inspector while the page is loading
When the Web Inspector is opened during a page load it gets a list of
all resources from the backend via getResourceTree. We assume that the
resources in that tree are completed loads. We may later discover that
some of those resources are actively loading, and that other actively
loading resources are not in that list. We can detect both of these
cases by receiving a receiveResponse message. Handle it appropriately
so that a WebInspector.Script can always find a WebInspector.Resource.
Otherwise, the Script would show its own tree element under "Extra
Scripts" in the sidebar.
Reviewed by Timothy Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
When we don't have an identifier but we find a Resource by URL, then we should
update the Resource to still be loading. If we don't have a Resource at all we
should create one, it is currently loading.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
We can assert again. We always expect to have a Resource by the time we get a
didFinishLoading or didFailLoading message. If we don't then this could be
an extreme edge case (like a dataReceived without a receivedResponse).
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.revertMarkAsFinished):
Revert the finished and finished timestamp properties. When a
finishLoading or didFailLoading message comes in the states will
be updated again.
2013-03-08 Joseph Pecoraro <pecoraro@apple.com>
ASSERT: FrameResourceManager.prototype.frameDidNavigate: console.assert(frame)
Fix a typo. A WebInspector.Resource has a parentFrame, not a frame accessor.
Reviewed by Timothy Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
2013-03-08 Timothy Hatcher <timothy@apple.com>
Fix the font smoothing in the Web Inspector.
This is needed after making the Web Inspector WKView use tiled drawing since our WKView is transparent.
<rdar://problem/12922185> REGRESSION: Text in the Web Inspector is not sub-pixel anti-aliased anymore
Reviewed by Joseph Pecoraro.
* UserInterface/Main.css:
(body): Add -webkit-font-smoothing: subpixel-antialiased to force sub-pixel in our transparent WebView.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .empty-content-placeholder > .message): Remove -webkit-font-smoothing: antialiased.
2013-03-07 Timothy Hatcher <timothy@apple.com>
Don't scroll the Style details sidebar if the pseudo class checkboxes are not present.
This applies when inspecting an iOS 6 device or simulator.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset): Return 0
if we can't for pseudo classes.
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset): Ditto.
2013-03-07 Timothy Hatcher <timothy@apple.com>
Display applied media queries in the new Style details sidebar.
<rdar://problem/13376129>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .label): Renamed from .inherited-label.
(.sidebar > .panel.details.css-style .rules .label .go-to-link): Added.
(.sidebar > .panel.details.css-style .rules .label + .style-declaration-section): Added.
(.sidebar > .panel.details.css-style .rules .new-rule): Tweaked opacity to better match .label.
(.sidebar > .panel.details.css-style .rules .new-rule:hover): Ditto.
(.sidebar > .panel.details.css-style .rules .new-rule:active): Ditto.
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.mediaListsEqual): Added.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.filteredMediaList): Added.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Only include the media list if it is
different from the previous media list shown.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.isEqual): Added.
2013-03-07 Timothy Hatcher <timothy@apple.com>
Fix a typo in the Dashboard tooltips.
<rdar://problem/13365669> [WebInspector] typo in source - "click to show to the" should be "click to show the"
Reviewed by Ricky Mondello.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DashboardView.js:
(WebInspector.DashboardView): Removed "to" from two tooltips.
2013-03-07 Timothy Hatcher <timothy@apple.com>
Fix the word wrapping for long origins that are links.
Also fixes the location and wrapping of the read-only lock icon.
<rdar://problem/13365935> Long CSS resource names causes poor line wrapping in Style sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationSection.css:
(.style-declaration-section.locked > .header::before): Changed from after so the lock sticks
to the top of the section as intended instead of on the last line. Add a left margin to prevent
the origin from touching the icon.
(.style-declaration-section > .header > .origin): Remove display: inline-block and vertical-align.
Added word-wrap: break-word and white-space: nowrap to prevent breaking the built-in origins among
multiple lines.
(.style-declaration-section > .header > .origin a): Added. Set white-space to normal to allow it
to break along multiple lines.
2013-03-07 Timothy Hatcher <timothy@apple.com>
Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
An earlier change made it work for editable styles, this makes it work for read-only styles.
<rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
Reviewed by Ricky Mondello.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor.read-only > .CodeMirror pre):
2013-03-07 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-03-07 Timothy Hatcher <timothy@apple.com>
Add Array.lastValue and start using it.
Reviewed by Antoine Quint.
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.get lastChild):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._updateChildren):
(WebInspector.DOMTreeElement.prototype.moveToNextAttributeIfNeeded):
(WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype.sortNodes):
(WebInspector.DataGridNode.prototype.traversePreviousNode):
* UserInterface/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.removeLastNewline):
(FormatterContentBuilder.prototype._addFormattedLineEnding):
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent):
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype._sendMessageToBackend):
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.prototype._completionsReady):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.update):
* UserInterface/Utilities.js:
2013-03-07 Timothy Hatcher <timothy@apple.com>
Use Array.contains instead of indexOf.
Reviewed by Antoine Quint.
* UserInterface/Branch.js:
(WebInspector.Branch.prototype.addRevision):
* UserInterface/CSSRule.js:
* UserInterface/CSSStyleDeclaration.js:
* UserInterface/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
* UserInterface/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView):
* UserInterface/DOMNode.js:
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
* UserInterface/DOMTreeElement.js:
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.addClassName):
(WebInspector.GeneralTreeElement.prototype.removeClassName):
* UserInterface/LayerTreeManager.js:
(WebInspector.LayerTreeManager.prototype.var):
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype._findNavigationItem):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.findSidebarPanel):
2013-03-07 Timothy Hatcher <timothy@apple.com>
Don't ignore user agent rules when forced pseudo classes change.
Normally the Refreshed event is not fired only when user agent rules change, due to a bug
in WebCore. However, we need to fire it when the forced pseudo classes change since there
are base rules for most of the pseudo classes that need to show up in the sidebar.
Reviewed by Antoine Quint.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Don't check for
user agent rules if _includeUserAgentRulesOnNextRefresh is true.
(WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added includeUserAgentRules.
Set _includeUserAgentRulesOnNextRefresh if includeUserAgentRules is true.
(WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Pass true to _markAsNeedsRefresh.
2013-03-06 Timothy Hatcher <timothy@apple.com>
Add checkboxes that allow forcing pseudo classes in the Style details sidebar.
The checkboxes are scrolled off the top if there are no forced pseudo classes.
When there are forced classes the checkboxes are initially visible. Also we can
only scroll them away when there is enough content to scroll.
<rdar://problem/13143555> Add the ability to toggle forced CSS pseudo-classes from style sidebar
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/CSSStyleDeclarationSection.css:
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content > .pseudo-classes):
(.sidebar > .panel.details.css-style > .content > .pseudo-classes > label):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.addEventListeners):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.removeEventListeners):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _initialScrollOffset):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._updatePseudoClassCheckboxes):
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.get _initialScrollOffset):
(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition):
* UserInterface/Utilities.js:
(Array.prototype.contains): Added.
2013-03-06 Timothy Hatcher <timothy@apple.com>
Remove more dead code from CSSStyleManager that I missed.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.parseRuleArrayPayload): Removed.
2013-03-06 Timothy Hatcher <timothy@apple.com>
Add missing image Images/Locked.pdf.
<rdar://problem/13355862>
* UserInterface/Images/Locked.pdf: Added.
2013-03-05 Timothy Hatcher <timothy@apple.com>
Add support for adding new rules in the Style details sidebar.
<rdar://problem/11326086> REGRESSION (Safari 6): Can't add new selectors / rules
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDeclarationSection.css:
(div:not(.style-declaration-section) + .style-declaration-section): Added. Generic
rule to add a shadow on the top when something is between sections.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addRule): Added.
(WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Include Inspector
styles. Also collect user and user agent styles into one array.
* UserInterface/Images/Plus.pdf: Added.
* UserInterface/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .rules .new-rule): Added.
(.sidebar > .panel.details.css-style .rules .new-rule img): Added.
(.sidebar > .panel.details.css-style .rules .new-rule:hover): Added.
(.sidebar > .panel.details.css-style .rules .new-rule:active): Added.
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection): Focus the new
inspector rule when it is added.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Create a New Rule button.
(WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked): Added.
2013-03-05 Timothy Hatcher <timothy@apple.com>
Remove dead code from CSSStyleManager.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
Remove old code and the copyright that went with the code. None of the remaining
code came from the original open source file.
2013-03-04 Timothy Hatcher <timothy@apple.com>
Always insert a space after ":" when pretty printing in the Style details sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.get synthesizedText): Added.
(WebInspector.CSSProperty.prototype.get text): Factored into synthesizedText.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use synthesizedText.
Using CSSProperty.text still uses the original text which might not have a space after ":".
2013-03-04 Timothy Hatcher <timothy@apple.com>
Skip invalid properties when marking overridden properties.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Check for not valid and continue early.
2013-03-04 Timothy Hatcher <timothy@apple.com>
Flag properties that have other vendor keywords in the value so they are not crossed out in red.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword): Check propertyValueHasOtherVendorKeyword too.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.propertyValueHasOtherVendorKeyword): Added.
2013-03-04 Timothy Hatcher <timothy@apple.com>
Indent wrapped lines by 2 extra spaces to better break up long lines in the details sidebar.
<rdar://problem/13310983> Long styles that wrap are hard to read in new Style details sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror pre): Tweak the padding and text-indent.
2013-03-04 Timothy Hatcher <timothy@apple.com>
Add CodeMirrorCompletionController and start using it in CSSStyleDeclarationTextEditor.
This restores auto complete to the Style details sidebar and also paves the way for using
CodeMirror for the console prompt.
<rdar://problem/13304962> REGRESSION: Style property autocomplete missing from the Style details sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .completion-pending .css-style-declaration-property.invalid):
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.completionControllerCompletionsHidden):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype):
* UserInterface/CodeMirrorCompletionController.css: Added.
(.CodeMirror .CodeMirror-lines .completion-hint):
* UserInterface/CodeMirrorCompletionController.js: Added.
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.get delegate):
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
(WebInspector.CodeMirrorCompletionController.prototype.isShowingCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.close):
(WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
(WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsClickedCompletion):
(WebInspector.CodeMirrorCompletionController.prototype._hasPendingCompletion):
(WebInspector.CodeMirrorCompletionController.prototype._notifyCompletionsHiddenSoon):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass.removePendingStyleClass):
(WebInspector.CodeMirrorCompletionController.prototype._removePendingCompletionLineStyleClass):
(WebInspector.CodeMirrorCompletionController.prototype.isStopCharacter):
(WebInspector.CodeMirrorCompletionController.prototype.isOpenBracketCharacter):
(WebInspector.CodeMirrorCompletionController.prototype.isCloseBracketCharacter):
(WebInspector.CodeMirrorCompletionController.prototype.matchingBracketCharacter):
(WebInspector.CodeMirrorCompletionController.prototype._scanStringForExpression):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
(WebInspector.CodeMirrorCompletionController.prototype._handleUpKey):
(WebInspector.CodeMirrorCompletionController.prototype._handleDownKey):
(WebInspector.CodeMirrorCompletionController.prototype._handleRightOrEnterKey):
(WebInspector.CodeMirrorCompletionController.prototype._handleEscapeKey):
(WebInspector.CodeMirrorCompletionController.prototype._handleTabKey):
(WebInspector.CodeMirrorCompletionController.prototype._handleChange):
(WebInspector.CodeMirrorCompletionController.prototype._handleCursorActivity):
(WebInspector.CodeMirrorCompletionController.prototype._handleHideAction):
* UserInterface/CompletionSuggestionsView.css: Added.
(.completion-suggestions):
(.completion-suggestions > .completion-suggestions-container):
(.completion-suggestions-container > .item):
(.completion-suggestions-container > .item:hover):
* UserInterface/CompletionSuggestionsView.js: Added.
(WebInspector.CompletionSuggestionsView):
(WebInspector.CompletionSuggestionsView.prototype.get delegate):
(WebInspector.CompletionSuggestionsView.prototype.get visible):
(WebInspector.CompletionSuggestionsView.prototype.get selectedIndex):
(WebInspector.CompletionSuggestionsView.prototype.set selectedIndex):
(WebInspector.CompletionSuggestionsView.prototype.selectNext):
(WebInspector.CompletionSuggestionsView.prototype.selectPrevious):
(WebInspector.CompletionSuggestionsView.prototype.isHandlingClickEvent):
(WebInspector.CompletionSuggestionsView.prototype.show):
(WebInspector.CompletionSuggestionsView.prototype.hide):
(WebInspector.CompletionSuggestionsView.prototype.update):
(WebInspector.CompletionSuggestionsView.prototype.get _selectedItemElement):
(WebInspector.CompletionSuggestionsView.prototype._mouseDown):
(WebInspector.CompletionSuggestionsView.prototype._mouseUp):
(WebInspector.CompletionSuggestionsView.prototype._itemClicked):
* UserInterface/Main.html:
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Disable some features while column debugging is broken
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
To prevent broken behavior and a poor experience with breakpoints and
debugging but still allow for pretty-printing disable some features
related to columns. We can revert this change later and test more when
the underlying issue is fixed.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
Instead of jumping to the display location, jump to the original location.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
Don't autoformat if we're being debugged.
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
If we are going to be debugged unformat.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
Disallow setting breakpoints in formatted content.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Update CodeMirror to ToT (v3.1+) which includes some important performance fixes
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Reviewed by Timothy Hatcher.
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/javascript.js:
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Set the FormatterSourceMap on both Resource and Script like SourceMaps
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Most source code text editors are for Resources, like external scripts.
However the backend identifies call frames with Script line and column
information. So the Script needs to know about the Resource's formatter.
We register for events in case the execution line changes on the fly.
This could happen if a breakpoint is hit on page load of a script that
is auto formatted. When the page loads, the breakpoint is hit and the
call frame is created with the original location and no formatter. When
the script Resource is shown it gets formatted, the associated Script
gets the formatter and the active call frame location updates its
display location. In that case the text editor for the Resource may
need to update its display of the execution line number.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.close):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameSourceCodeLocationChanged):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Update Display Strings in Breakpoint and CallFrame TreeElements
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
If a breakpoint is on a column, show line:column. If the breakpoint is
in a formatted view, set the subtitle to the original location. If a
call frame is in a formatted source, include the original location in
the tooltip.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.originalLocationString):
(WebInspector.SourceCodeLocation.prototype.displayLocationString):
(WebInspector.SourceCodeLocation.prototype._locationString):
Provide generic file:line:column string support.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype._updateTitles):
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Update strings where appropriate.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Automatically pretty print files that look like they are minified.
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Update breakpoint handling for formatted content
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
TextEditor and SourceCodeTextEditor both have a map that stores breakpoint
information for editor lineNumber and columnNumber. For editors it makes
the most sense to keep these maps consistent with the formatted state of
the editor.
Terminology with this in mind "editor line info" is always the line and
column information for the current state of the editor. If the editor
is formatted, this is a formatted line and column of the sourceCode.
if the editor is not formatted this is the original line and column of
the sourceCode.
A tricky part here is that with a FormatterSourceMap is that it may map
a simple line:0 to a more accurate line:#. For example setting the
breakpoint on a pretty printed source code with leading whitespace, the
accurate location will not be column 0 but instead be the column # of
the first character on that line. When this happens we need to make sure
that both the SourceCodeTextEditor and TextEditor have stored the more
accurate location in their maps.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._unformattedLineInfoForEditorLineInfo):
Given an editor line info, this gives us the original line info depending on
if the text editor is formatted or not.
(WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
Given a SourceCodeLocation this gives us a line info for the text editor depending
on if the text editor is formatted or not. SourceCodeLocation already handles this.
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
When a breakpoint moves, we'll need to update our tables removing the old
location and setting the new location. SourceCodeLocation gives us the old
and new formatted location which handles if the text editor is formatted or not.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
If the text editor is formatted, be sure to remove a breakpoint with the
unformatted, original location because we're dealing with the backend.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
When the TextEditor sends a delegate up to the SourceCodeTextEditor about
a breakpoint being added, it waits for a response to put into its table.
Use this as an opportunity to provide the accurate resolved location.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
When the TextEditor sends a delegate up to the SourceCodeTextEditor about
a breakpoint being moved, it has already put an entry into its table at
line + column 0. We update that entry via updateBreakpointLineAndColumn.
(WebInspector.SourceCodeTextEditor.prototype.textEditorFormattingDidChange):
After pretty printing the editor's value was completely changed. Some
breakpoints may have moved, some might not have. Ignore the DisplayLocation
change events when setting the formatter on the SourceCode and update all
the breakpoint map locations for ourself and the underlying TextEditor.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.updateBreakpointLineAndColumn):
(WebInspector.TextEditor.prototype._gutterMouseDown):
Update or set breakpoint info entires with accurante line and column info.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Pretty print and incorporate the formatted location into the SourceCodeLocation display location
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
When a SourceCodeTextEditor formats a SourceCode it produces a
FormatterSourceMap and sets it on the SourceCode. All SourceCodeLocations
associated with that SourceCode can update their display location.
If a location is already listening for DisplayLocation change events
it will just work (BreakPointTreeElements, CallFrameTreeElements).
SourceCodeLocation now has 3 sets of values and a display value:
- [public] sourceCode, lineNumber, columnNumber
- raw original sourceCode and values
- useful for interaction with the backend
- [public] formattedLineNumber, formattedColumnNumber
- for the original sourceCode
- if the sourceCode has a formatter, these are the formatted values
- if the sourceCode doesn't have a formatter, these are the same as the raw values
- useful for TextEditors that are showing content + gutters for formatted source
- [private] mappedResource, mappedLineNumber, mappedColumnNumber
- if the sourceCode has a sourceMap, this is the mapped location of the raw
values into a SourceMapResource line and column
- if the sourceCode doesn't have a sourceMap these are null, NaN, NaN
- useful for a display location, since it is the author's original pre-generated source
- [public] displayResource, displayLineNumber, displayColumnNumber
- if there is a mapped location use that
- if there is a formatted location use that
- otherwise use the raw original location
- useful for anyone who wants to display a location
Most users of SourceCodeLocation should only care about the display
values and should register for DisplayLocation change events to know
when to update.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get formatterSourceMap):
(WebInspector.TextEditor.prototype._prettyPrint):
Run the formatter. Update selection. Update search. Notify delegate.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView):
(WebInspector.ScriptContentView.prototype._textEditorFormattingDidChange):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype._textEditorFormattingDidChange):
Update the pretty print button's activated state when formatting changes to match the TextEditor.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
The TextEditor changed formatting and updated its FormatterSourceMap. Set
the FormatterSourceMap on the SourceCode itself.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.get formatterSourceMap):
(WebInspector.SourceCode.prototype.set formatterSourceMap):
A SourceCode may have a formatter source map when the TextEditor for it
was pretty printed. Store that on the SourceCode so SourceCodeLocation
objects know where to find it, and send an event when it changes.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype.get formattedLineNumber):
(WebInspector.SourceCodeLocation.prototype.get formattedColumnNumber):
(WebInspector.SourceCodeLocation.prototype._resolveFormattedLocation):
Formatted location when the SourceCode is pretty printed. Original otherwise.
(WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
(WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
Mapped location, fallback to formatted, fallback to raw original.
(WebInspector.SourceCodeLocation.prototype.hasFormattedLocation):
(WebInspector.SourceCodeLocation.prototype.hasDifferentDisplayLocation):
Helpful accessors for those that might be interested.
(WebInspector.SourceCodeLocation.prototype._sourceCodeFormatterDidChange):
When the SourceCode's formatter source map changed resolve our re-resolve
our locations and fire an event if needed.
(WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
Make the code simpler and handle formatted location changes.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Add a pretty print button to text content views
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get navigationItems):
Be sure to update navigation items when a FrameContentView changes
content views (Source Code and DOM Tree), because the different views
might have different navigation items.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.get navigationItems):
(WebInspector.ScriptContentView.prototype._contentDidPopulate):
(WebInspector.ScriptContentView.prototype._togglePrettyPrint):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get navigationItems):
(WebInspector.TextResourceContentView.prototype._contentDidPopulate):
(WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
Add a pretty print button to Script and TextResource content views.
Disabled initially, and enabled when content populates and the
TextEditor supports formatting
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set readOnly):
(WebInspector.TextEditor.prototype.get formatted):
(WebInspector.TextEditor.prototype.set formatted):
(WebInspector.TextEditor.prototype._updateCodeMirrorReadOnly):
Currently, mark the editor as readyOnly immediately when it is formatted.
This may change in the future.
(WebInspector.TextEditor.prototype.hasFormatter):
(WebInspector.TextEditor.prototype.canBeFormatted):
Accessor for whether the TextEditor can be formatted.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.canBeFormatted):
Don't allow SourceMapResources to be formatted. This is to simplify
later changes a bit. We can do this later in the future if we want.
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
Fire an event when content populates.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
FormatterSourceMap to convert between original and formatted locations
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Add FormatterSourceMap class. This is nearly identical to OpenSource's
FormatterSourceMapping, which does the same thing. This provides
conversions in either direction between an original and formatted line
and column number. It requires the original and formatted line endings
and a mapping, all data the the ContentBuilder has.
Reviewed by Timothy Hatcher.
* UserInterface/FormatterSourceMap.js: Added.
(WebInspector.FormatterSourceMap):
(WebInspector.FormatterSourceMap.fromBuilder):
(WebInspector.FormatterSourceMap.prototype.originalToFormatted):
(WebInspector.FormatterSourceMap.prototype.formattedToOriginal):
(WebInspector.FormatterSourceMap.prototype._locationToPosition):
(WebInspector.FormatterSourceMap.prototype._positionToLocation):
(WebInspector.FormatterSourceMap.prototype._convertPosition):
* UserInterface/Main.html:
* UserInterface/Utilities.js:
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
CSS Pretty Printer
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
Reviewed by Timothy Hatcher.
* UserInterface/CodeMirrorFormatters.js:
(CodeMirror["css mode"].shouldHaveSpaceBeforeToken):
(CodeMirror["css mode"].shouldHaveSpaceAfterLastToken):
(CodeMirror["css mode"].newlinesAfterToken):
(CodeMirror["css mode"].removeLastNewline):
(CodeMirror["css mode"].indentAfterToken):
(CodeMirror["css mode"].newlineBeforeToken):
(CodeMirror["css mode"].dedentBeforeToken):
(CodeMirror["css mode"].modifyStateForToken):
The general goals are:
- spaces after ',' in selector lists
- spaces after ':' between properties and values
- newlines after '{', '}', and ';', with 2 newlines between blocks
- newlines after ',' in long selector lists "a,b,..,z {}"
- indent after '{' and dedent before '}'
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
Formatter, ContentBuilder, and JavaScript Pretty Printer
<rdar://problem/11219771> REGRESSION (Safari 6): Can't pretty-print JavaScript
This patch adds a Formatter driver class, a ContentBuilder class that
builds both the formatted string and line ending markers needed for a
source mapping, and JavaScript CodeMirror extensions for pretty printing.
The Formatter and FormatterContentBuilder classes are not WebInspector
prefixed. Their only dependency is CodeMirror and the CodeMirror modes.
They are standalone, and could be moved to a Worker if needed.
The Formatter class takes a tokenizer (in our case a CodeMirror object)
and a builder object. Call format() on a range to tokenize over that
range and populate the builder for that range. The Formatter assumes
the CodeMirror object has the appropriate pretty printing extensions.
The ContentBuilder class manages line endings the resulting string, and
all things whitespace related in the output string (such as collapsing
whitespace, and indentation).
The CodeMirror pretty printing extensions are very primitive. For each
token CodeMirror outputs the mode for that token is asked if we should
add a space before or after, add newlines before or after, indent or
dedent, retroactively remove the last newline, or updating private state.
Most of the time whitespace is already required languages, so whitespace
only really needs to be added where it is optional and would be prettier.
One simple example is "}else{" versus "} else {". The mode doesn't need
to worry about collapsing whitespace. It just suggests where whitespace
goes and the Formatter + ContentBuilder takes care of the rest.
Reviewed by Timothy Hatcher.
* UserInterface/Formatter.js: Added.
(Formatter):
(Formatter.prototype.format):
A StringStream is considered to be one line. So split the content over
the given range into lines, and tokenize over the lines. There are hooks
for handling tokens, empty lines, and line endings.
(Formatter.prototype._handleToken):
Ask the mode how to pretty print the current token.
(Formatter.prototype._handleEmptyLine):
Preserve newlines in multi-line comments. If this is an empty line in
a comment, force the builder to add a new line.
(Formatter.prototype._handleLineEnding):
Notify the builder that of an original line ending.
* UserInterface/FormatterContentBuilder.js: Added.
(FormatterContentBuilder):
(FormatterContentBuilder.prototype.get originalContent):
(FormatterContentBuilder.prototype.get formattedContent):
(FormatterContentBuilder.prototype.get mapping):
(FormatterContentBuilder.prototype.get originalLineEndings):
(FormatterContentBuilder.prototype.get formattedLineEndings):
(FormatterContentBuilder.prototype.setOriginalContent):
Results of a formatting run. Everything needed for a SourceMap.
(FormatterContentBuilder.prototype.appendToken):
(FormatterContentBuilder.prototype.appendSpace):
(FormatterContentBuilder.prototype.appendNewline):
(FormatterContentBuilder.prototype.removeLastNewline):
(FormatterContentBuilder.prototype.indent):
(FormatterContentBuilder.prototype.dedent):
(FormatterContentBuilder.prototype.addOriginalLineEnding):
(FormatterContentBuilder.prototype.finish):
Public interface is simple.
(FormatterContentBuilder.prototype._popNewLine):
(FormatterContentBuilder.prototype._append):
Handle growing / shrinking the content + content length at the same time.
(FormatterContentBuilder.prototype._appendIndent):
Indentation is stored in a cache to avoid recomputing often. However,
the cache stops at 20, if there is an indentation greater than 20 we
compose it in chunks.
(FormatterContentBuilder.prototype._addMappingIfNeeded):
Add a mapping for each token originalPosition and formattedPosition.
(FormatterContentBuilder.prototype._addFormattedLineEnding):
Keep track of formatted content line endings.
* UserInterface/CodeMirrorFormatters.js: Added.
(CodeMirror["javascript mode"].shouldHaveSpaceBeforeToken):
(CodeMirror["javascript mode"].shouldHaveSpaceAfterLastToken):
(CodeMirror["javascript mode"].newlinesAfterToken):
(CodeMirror["javascript mode"].removeLastNewline):
(CodeMirror["javascript mode"].indentAfterToken):
(CodeMirror["javascript mode"].newlineBeforeToken):
(CodeMirror["javascript mode"].dedentBeforeToken):
The general goal with these hooks are:
- spaces before and after most operators (not unary)
- spaces around keywords
- newlines after '{', '}', and ';'
- newlines after ',' when inside an object context
- indent after '{' and dedent before '}'
* UserInterface/Main.html:
Add new files.
2013-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13331470> REGRESSION: Inspector debugger continue button is a pause icon when it should be an arrow
Reviewed by Timothy Hatcher.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set image):
This was appending a new child image element each time instead of
replacing the existing image. Remove the old children on changes.
2013-03-04 Antoine Quint <graouts@apple.com>
<rdar://problem/13331811> Web Inspector: remove existing LayerTreeAgent protocol APIs (111251)
Deactivate the layer tree sidebar panel until the new API
lands in WebCore and we can update the Internal code to use
this API.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeManager.js:
(WebInspector.LayerTreeManager):
* UserInterface/LayerTreeObserver.js:
(WebInspector.LayerTreeObserver.prototype.layerTreeDidChange):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode):
2013-03-01 Timothy Hatcher <timothy@apple.com>
Update the Style details sidebar when when pseudo classes are forced or media queries change.
<rdar://problem/13328298>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Call mediaQueryResultDidChange on each DOMNodeStyles.
Removed the event since it wasn't used anymore.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.setPseudoClassEnabled): Fire the event after the agent actually does the change.
(WebInspector.DOMNode.prototype.setPseudoClassEnabled.changed): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Added listener for EnabledPseudoClassesChanged.
(WebInspector.DOMNodeStyles.prototype.mediaQueryResultDidChange): Added. Call _markAsNeedsRefresh.
(WebInspector.DOMNodeStyles.prototype._markAsNeedsRefresh): Added.
(WebInspector.DOMNodeStyles.prototype._pseudoClassesDidChange): Added. Call _markAsNeedsRefresh.
(WebInspector.DOMNodeStyles.prototype._attributesDidChange): Use _markAsNeedsRefresh.
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules): Ditto.
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ditto.
2013-03-01 Timothy Hatcher <timothy@apple.com>
Changes are committed to frequently since updating to CodeMirror 3.1.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): The origin for user input
changed from "input" to "+input". And there is now "+delete". Internally CodeMirror just looks for
the "+" prefix to decide if the change should coalesce in undo history. We should do the same.
2013-03-01 Timothy Hatcher <timothy@apple.com>
Fix style editing after an Inspector protocol change for how SourceRange is sent.
<rdar://problem/13324015> Style editing in the new Style details sidebar is broken after r144434
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
Added styleSheetTextRange and styleDeclarationTextRange.
(WebInspector.CSSProperty.prototype.update): Ditto. Delete _styleDeclarationTextRange if it isn't
given so it can be recomputed.
(WebInspector.CSSProperty.prototype.get styleSheetTextRange): Added.
(WebInspector.CSSProperty.prototype.get styleDeclarationTextRange): Added. Compute if missing.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration): Removed startStyleSheetTextPosition and endStyleSheetTextPosition.
Added styleSheetTextRange.
(WebInspector.CSSStyleDeclaration.prototype.update): Ditto.
(WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Look for styleDeclarationTextRange.
(WebInspector.CSSStyleDeclaration.prototype.get styleSheetTextRange): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Don't add
checkboxes for properties if the editor is read-only.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Use styleDeclarationTextRange.
Don't add checkboxes for comments if the editor is read-only.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Use styleSheetTextRange.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeStyleText): Use styleSheetTextRange.
(WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Use styleSheetTextRange.
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Update comment.
(WebInspector.DOMNodeStyles.prototype._parseSourceRangePayload): Added. Helper.
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Use _parseSourceRangePayload.
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Ditto.
* UserInterface/TextRange.js:
(WebInspector.TextRange): Allow 4 or 2 argument construction. One for lines and columns, the other for offsets.
(WebInspector.TextRange.prototype.get startLine): Added.
(WebInspector.TextRange.prototype.get startColumn): Added.
(WebInspector.TextRange.prototype.get endLine): Added.
(WebInspector.TextRange.prototype.get endColumn): Added.
(WebInspector.TextRange.prototype.get startOffset): Added.
(WebInspector.TextRange.prototype.get endOffset): Added.
(WebInspector.TextRange.prototype.resolveLinesAndColumns): Added.
(WebInspector.TextRange.prototype.resolveLinesAndColumns.countNewLineCharacters): Added.
(WebInspector.TextRange.prototype.resolveOffsets): Added.
2013-02-28 Timothy Hatcher <timothy@apple.com>
Switch from post-processing for the style pretty printer to fully synthesized content.
Inserting a newline between the semicolon and the next property was causing the newline
to be inserted between the next property and its checkbox. This is controllable via the
insertLeft option on bookmarks in CodeMirror; however, that causes typed text to go on
the left of the checkbox.
Switching to the synthesized code path is cleaner and simpler.
<rdar://problem/13314682> Styles on Twitter.com have checkboxes at the end of the property
instead of beginning
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Renamed lineCount()
to countNewLineCharacters() since it conflicts with the lineCount variable.
2013-02-28 Timothy Hatcher <timothy@apple.com>
Don't disable property checkboxes after click to prevent a subtle flash.
<rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Don't set disabled.
Remove assert for range since it might have been removed already.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
2013-02-28 Timothy Hatcher <timothy@apple.com>
Use CodeMirror 3.1's new getAllMarks() instead of tracking them ourselves.
Also fix an assert that would fire if we reused a text marker that was removed.
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor): Remove _textMarkers.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Stop using _textMarkers.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Ditto.
Also only reuse a marker if it is still in the document.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Stop using _textMarkers.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Ditto.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Remove a flash of the color swatch when toggling a property.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Add lineNumber
parameter to update only that line. Also skip colors that are already marked.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Call _createColorSwatches.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Ditto.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Set __markedColor
to true so we know it is a color. Remove an unused class name.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Pretty print the style text if there are more properties than there are lines.
There are a few style rules on apple.com that are multiple lines with 5-10
properties per line. These were avoiding the pretty printing because the line
count was greater than one.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.update): Clear _visibleProperties.
(WebInspector.CSSStyleDeclaration.prototype.get visibleProperties): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): Add an
option to only iterate over the visible properties. Also pass along if this is the last
property to the callback.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Pass true to
_iterateOverProperties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Pretty print if the
visible property count is greater than the line count.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Fix the text selection color in the style
This is fallout from upgrading to CodeMirror 3.1.
<rdar://problem/13307885> REGRESSION: Selection color in CodeMirror editors is always showing as gray unfocused
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Fixed the selector
to look for CodeMirror-focused on the .CodeMirror element.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror.CodeMirror-focused .CodeMirror-selected): Ditto.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Don't do a full refresh of the Style details sidebar unless the included style declarations
actually did change.
Firing the DOMNodeStyles refreshed event cause the DOM to be rebuilt and that interrupts typing
and causes the checkboxes to flash.
<rdar://problem/13306506> CSS rule box flashes checkboxes and crossed-out text during editing
<rdar://problem/13306813> Typing very fast drops characters when editing in the Style details sidebar
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh): Removed dontFireRefreshedEvent parameter. We now
smartly detect if the event needs to fire.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Remove dontFireRefreshedEvent.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Iterate over the styles and
check if any were added or removed from the last refresh.
(WebInspector.DOMNodeStyles.prototype.attributeChanged): Stop passing true to refresh().
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Ditto.
2013-02-27 Timothy Hatcher <timothy@apple.com>
WebInspector.CSSProperty.Event.OverriddenStatusChanged is firing too much.
In the workaround that landed in r48890, we delayed the fetch for inline and computed styles.
This caused the OverriddenStatusChanged event to fire because the coalesce delay timed out
while waiting for the inline style to come over the wire.
Now we fetch them immediately again and if matched styles fails we make the inline and computed
style callbacks bail before parsing their results. Failing is an edge case that might be fixed
on the backend soon, so throwing the results away isn't that expensive. This also improves
refresh performance in the common case.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh): Initialize matchedStylesFailed to false.
(WebInspector.DOMNodeStyles.prototype.fetchedMatchedStyles): Set matchedStylesFailed.
(WebInspector.DOMNodeStyles.prototype.fetchedInlineStyles): Return early if matchedStylesFailed.
(WebInspector.DOMNodeStyles.prototype.fetchedComputedStyle): Ditto.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Properties are not updated when overridden status changes.
This is fallout from upgrading to CodeMirror 3.1.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
The cm property moved to the new doc property of TextMarker.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Pretty print the style text if there are multiple properties on only one line.
This helps cases like apple.com and nytimes.com where minified or single line
rules are the norm.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Loop over
the properties that have markers and add newlines after them.
2013-02-27 Timothy Hatcher <timothy@apple.com>
Make color swatches show up for user agent styles, and other styles that don't have text.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged): Return early if the style isn't
editable. This still can be called when readOnly is set because clicking on a color swatch modifies the text.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Broke color matching out into
_createColorSwatches. Added nonatomic support to avoid nesting operations.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Call _createColorSwatches in synthesized
case when there isn't style text.
2013-02-27 Antoine Quint <graouts@apple.com>
<rdar://problem/13218172> Make hover state for dashboard icons more pronounced
Add a thin border around dashboard items on hover and make it slightly
more pronounced when the item is also being clicked.
Reviewed by Joseph Pecoraro.
* UserInterface/DashboardView.css:
(.dashboard > .item):
(.dashboard > .item.enabled:hover):
(.dashboard > .item.enabled:active):
(.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard > .item):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
2013-02-27 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.0.2 to 3.1.
Rubber-stamped by Jeff Miller.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused): Use the wrapper
element since the classname moved from the scroller element.
* UserInterface/External/CodeMirror/codemirror.css: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/htmlmixed.js: Updated.
* UserInterface/External/CodeMirror/javascript.js: Updated.
* UserInterface/External/CodeMirror/matchbrackets.js: Updated.
* UserInterface/External/CodeMirror/searchcursor.js: Updated.
2013-02-26 Timothy Hatcher <timothy@apple.com>
Add support to CodeMirror for incrementing and decrementing numbers.
The key binding are:
* Option-Up: +1
* Shift-Option-Up: +10
* Option-PageUp: +10
* Shift-Option-PageUp: +100
* Option-Down: -1
* Shift-Option-Down: -10
* Option-PageDown: -10
* Shift-Alt-PageDown: -100
When altering by 1 or -1 any numbers between 1 and -1 will be altered
by 0.1 or -0.1 instead.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorAdditions.js:
(alterNumber): Added. Hooked up via the default key map that extends the
Mac keybindings. This means all instances of CodeMirror get this support.
2013-02-26 Timothy Hatcher <timothy@apple.com>
Add color swatches next to color strings.
<rdar://problem/7206272>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch): Added.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch > span): Added.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:hover > span): Added.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .color-swatch:active > span): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Search for colors
and add swatches next to them.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked): Added. Replace the
text with the next color format.
* UserInterface/Color.js:
(WebInspector.Color.prototype.nextFormat): Added. Helper to pick the next format.
2013-02-26 Timothy Hatcher <timothy@apple.com>
Add checkboxes next to property names and commented out properties.
Unchecking will comment out the property and checking the box next to a property comment
will uncomment it and make it live again.
<rdar://problem/7206272>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor.read-only > .CodeMirror pre): Added. Indent the text the same amount
as if there were checkboxes.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
(.css-style-text-editor:hover > .CodeMirror .CodeMirror-lines input[type=checkbox]): Added.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Look for comments
that look like properties and add checkboxes in front of them.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
Create checkbox marker for properties or update the existing one.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers): Delete __checkboxMarker.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCheckboxChanged): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged): Added.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Set the read-only style class
so the text of read-only styles is indented the same amount as if there were checkboxes.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Implement the Rules details style panel.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDeclarationSection.css: Added.
(.style-declaration-section):
(.style-declaration-section + .style-declaration-section):
(.style-declaration-section.last-in-group):
(.style-declaration-section.last-in-group + .style-declaration-section):
(.style-declaration-section.last-in-group + .style-declaration-section:last-child):
(.style-declaration-section:last-child):
(.style-declaration-section > .header):
(.style-declaration-section > .header > .icon):
(.style-declaration-section > .header > .selector):
(.style-declaration-section > .header > .selector:focus):
(.style-declaration-section.selector-locked > .header > .selector):
(.style-declaration-section.locked > .header::after):
(.style-declaration-section > .header > .selector > .matched):
(.style-declaration-section > .header > .origin):
(.style-declaration-section > .header > .origin > .go-to-link):
* UserInterface/CSSStyleDeclarationSection.js: Added.
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.get element):
(WebInspector.CSSStyleDeclarationSection.prototype.get style):
(WebInspector.CSSStyleDeclarationSection.prototype.get lastInGroup):
(WebInspector.CSSStyleDeclarationSection.prototype.set lastInGroup):
(WebInspector.CSSStyleDeclarationSection.prototype.get focused):
(WebInspector.CSSStyleDeclarationSection.prototype.focus):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype.updateLayout):
(WebInspector.CSSStyleDeclarationSection.prototype._commitSelector):
* UserInterface/Images/StyleRuleAuthor.pdf: Added.
* UserInterface/Images/StyleRuleInherited.pdf: Added.
* UserInterface/Images/StyleRuleInheritedElement.pdf: Added.
* UserInterface/Images/StyleRuleInspector.pdf: Added.
* UserInterface/Images/StyleRuleUser.pdf: Added.
* UserInterface/Images/StyleRuleUserAgent.pdf: Added.
* UserInterface/Main.html: Included new files.
* UserInterface/RulesStyleDetailsPanel.css: Added.
(.sidebar > .panel.details.css-style .rules .inherited-label):
(.sidebar > .panel.details.css-style .rules .inherited-label + .style-declaration-section):
* UserInterface/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
(WebInspector.RulesStyleDetailsPanel.prototype.shown):
(WebInspector.RulesStyleDetailsPanel.prototype.hidden):
(WebInspector.RulesStyleDetailsPanel.prototype.widthDidChange):
* UserInterface/StyleRuleIcons.css: Added.
(.author-style-rule-icon .icon):
(.user-style-rule-icon .icon):
(.user-agent-style-rule-icon .icon):
(.inspector-style-rule-icon .icon):
(.inherited-style-rule-icon .icon):
(.inherited-element-style-rule-icon .icon):
2013-02-25 Timothy Hatcher <timothy@apple.com>
Implement the Computed details style panel.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel):
(WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
(WebInspector.ComputedStyleDetailsPanel.prototype.shown):
(WebInspector.ComputedStyleDetailsPanel.prototype.widthDidChange):
(WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
2013-02-25 Timothy Hatcher <timothy@apple.com>
Add CSSStyleDeclarationTextEditor.
This class implements a rich text editor for style text. It will reflect the assigned CSSStyleDeclaration.
Edits will be applied to the page and property parse errors or overridden status will be highlighted.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclarationTextEditor.css: Added.
(.css-style-text-editor):
(.css-style-text-editor > .CodeMirror):
(.css-style-text-editor > .CodeMirror *):
(.css-style-text-editor > .CodeMirror-scroll):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines):
(.css-style-text-editor > .CodeMirror pre):
(.css-style-text-editor > .CodeMirror .CodeMirror-selected):
(.css-style-text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected):
(.css-style-text-editor > .CodeMirror .CodeMirror-cursor):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.overridden):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.invalid):
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .css-style-declaration-property.not-inherited):
* UserInterface/CSSStyleDeclarationTextEditor.js: Added.
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get element):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get delegate):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set delegate):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set style):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get focused):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get alwaysShowPropertyNames):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set alwaysShowPropertyNames):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get showsImplicitProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set showsImplicitProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.get sortProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.set sortProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.focus):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.refresh):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.updateLayout):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.shown):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.hidden):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._formatedContent):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._commitChanges):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkerForPropertyIfNeeded):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._clearTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties.sortProperty):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyOverriddenStatusChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertiesChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._styleOffsetToCodeMirrorPosition):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update.else.lineCount):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent):
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/Main.html:
2013-02-25 Timothy Hatcher <timothy@apple.com>
Implement the Metrics details style panel.
Converts BoxModelDetailsSectionRow to use the new CSS model. Removes code needed to
work with the old CSS model.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow):
(WebInspector.BoxModelDetailsSectionRow.prototype.get nodeStyles):
(WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
(WebInspector.BoxModelDetailsSectionRow.prototype._refresh):
(WebInspector.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
(WebInspector.BoxModelDetailsSectionRow.prototype._highlightDOMNode):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
(WebInspector.BoxModelDetailsSectionRow.prototype._startEditing):
(WebInspector.BoxModelDetailsSectionRow.prototype._alteredFloatNumber): Added. Copied from the now
removed CSSPropertyPrompt class.
(WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown):
(WebInspector.BoxModelDetailsSectionRow.prototype._editingCancelled):
(WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
* UserInterface/MetricsStyleDetailsPanel.js:
(WebInspector.MetricsStyleDetailsPanel):
(WebInspector.MetricsStyleDetailsPanel.prototype.refresh):
2013-02-25 Timothy Hatcher <timothy@apple.com>
Remember the scroll position when refreshing the style detail panels.
Reviewed by Joseph Pecoraro.
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded): Call _refreshPreservingScrollPosition
instead refresh.
(WebInspector.StyleDetailsPanel.prototype._refreshPreservingScrollPosition): Added. Only remember the
scroll position if the previous node is the same as this one.
(WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed): Call _refreshPreservingScrollPosition
instead refresh.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Tell SidebarPanel and StyleDetailsPanel when the width of the Sidebar changes.
This will be needed to update CodeMirror on the size change.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.visibilityDidChange): Added. Tell the selected
panel to refresh if needed.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.widthDidChange): Added. Tell the selected panel
that the width changed.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set width): Call widthDidChange on the sidebar panel.
(WebInspector.Sidebar.prototype.set collapsed): Ditto.
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.widthDidChange): Added stub.
* UserInterface/StyleDetailsPanel.js:
(WebInspector.StyleDetailsPanel.prototype.widthDidChange): Added stub.
2013-02-21 Timothy Hatcher <timothy@apple.com>
Add start implementation for each of the three Style detail panels.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style):
(.sidebar > .panel.details.css-style > .navigation-bar):
(.sidebar > .panel.details.css-style > .content):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
* UserInterface/ComputedStyleDetailsPanel.js: Added.
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.get needsRefresh): Added.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector._updateStickyPostionStyles):
* UserInterface/MetricsStyleDetailsPanel.js: Added.
(WebInspector.MetricsStyleDetailsPanel):
* UserInterface/RulesStyleDetailsPanel.js: Added.
(WebInspector.RulesStyleDetailsPanel):
* UserInterface/StyleDetailsPanel.js: Added.
(WebInspector.StyleDetailsPanel):
(WebInspector.StyleDetailsPanel.prototype.get element):
(WebInspector.StyleDetailsPanel.prototype.get navigationItem):
(WebInspector.StyleDetailsPanel.prototype.get nodeStyles):
(WebInspector.StyleDetailsPanel.prototype.shown):
(WebInspector.StyleDetailsPanel.prototype.hidden):
(WebInspector.StyleDetailsPanel.prototype.markAsNeedsRefresh):
(WebInspector.StyleDetailsPanel.prototype.refreshIfNeeded):
(WebInspector.StyleDetailsPanel.prototype.refresh):
(WebInspector.StyleDetailsPanel.prototype._nodeStylesRefreshed):
(WebInspector.StyleDetailsPanel.prototype._nodeStylesNeedsRefreshed):
2013-02-21 Timothy Hatcher <timothy@apple.com>
Add start of new implementation of CSSStyleDetailsSidebarPanel.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.css-style): Added. Empty for now.
* UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
* UserInterface/Images/NavigationItemBrushAndRuler.pdf: Added.
2013-02-21 Timothy Hatcher <timothy@apple.com>
Remove CSSStyleDetailsSidebarPanel and friends in preparation for a new implementation.
<rdar://problem/7206272&12526319>
Rubber-stamped by Joseph Pecoraro.
* UserInterface/CSSPropertyPrompt.js: Removed.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Removed.
* UserInterface/CSSStyleDetailsSidebarPanel.js: Removed.
* UserInterface/ComputedStylePropertiesSection.js: Removed.
* UserInterface/Main.html: Removed files except CSSStyleDetailsSidebarPanel.{js,css}.
* UserInterface/OldCSSMedia.js: Removed.
* UserInterface/OldCSSProperty.js: Removed.
* UserInterface/OldCSSRule.js: Removed.
* UserInterface/OldCSSStyleDeclaration.js: Removed.
* UserInterface/StylePropertiesSection.js: Removed.
* UserInterface/StylePropertyTreeElement.js: Removed.
2013-02-21 Timothy Hatcher <timothy@apple.com>
Remove AppearanceDetailsSidebarPanel in preparation for it being merged with Style details.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/AppearanceDetailsSidebarPanel.js: Removed.
* UserInterface/Main.html: Removed AppearanceDetailsSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Removed AppearanceDetailsSidebarPanel.
2013-02-21 Timothy Hatcher <timothy@apple.com>
Add support for text only navigation buttons.
This will be used by the navigation bar in the new Styles sidebar.
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only): Added.
(.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
Use -webkit-calc in the background-position to work with variable widths.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem):
(WebInspector.ButtonNavigationItem.prototype.get label):
(WebInspector.ButtonNavigationItem.prototype.set label):
(WebInspector.ButtonNavigationItem.prototype.set image):
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button:not(.text-only)): Added :not(.text-only) to allow
variable based on text length.
(.navigation-bar.collapsed .item.radio.button:not(.text-only)): Ditto.
(.navigation-bar .item.radio.button.selected): Use -webkit-calc in the background-position
to work with variable widths.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Don't try to commit changes before we have new text positions.
We need to keep the startStyleSheetTextPosition and endStyleSheetTextPosition up-to-date.
If we don't have the correct positions then we can corrupt the stylesheet the next time
the user makes an edit.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Initialize _stylesNeedingTextCommited to [].
(WebInspector.DOMNodeStyles.prototype.refresh): Call changeStyleText for the next style
object that needs changed.
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Set _needsRefresh to true.
(WebInspector.DOMNodeStyles.prototype.changeStyleText): If we need a refresh then it is not safe
to make the edits now. Store the text and remember the style so we can commit it after the next refresh.
(WebInspector.DOMNodeStyles.prototype.changePropertyText): Set _needsRefresh to true.
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Call refresh to get updated positions and
computed style info.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Always try to update the resource when a stylesheet changes.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.styleSheetChanged): Always call _updateResourceContent. This
was preventing resource updates when the stylesheet changed because of a sidebar text edit. Checking the result
of noteContentDidChange was to prevent updating the resource content if the change originated from a resource edit.
However, we will soon allow text edits from the sidebar and the check was preventing resources from being updated.
The new check in the content setter of SourceCodeRevision prevents updating resources when they haven't changed.
* UserInterface/SourceCodeRevision.js:
(WebInspector.SourceCodeRevision.prototype.set content): Return early if the content is the same.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Fix typo that was preventing refresh of DOMNodeStyles.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): The property is ownerStyleSheet, not parentStyleSheet.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Workaround a bug where matched rules is empty for stylesheets with imported stylesheets.
If matched rules is empty (rare because of user agent stylesheet rules) then WebCore might
be waiting for an @import rule to load. Check again after a delay until we get some results or timeout.
We shouldn't need to poll like this, https://webkit.org/b/110750 tracks this problem.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh): Removed map clearing and call to CSSAgent.getInlineStylesForNode
and CSSAgent.getComputedStyleForNode. We only want to fetch those if fetchedMatchedStyles succeeds.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Schedule another refresh attempt and
return early if the match is empty. Moved the map clearing here after the early return. Call CSSAgent.getInlineStylesForNode.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call CSSAgent.getComputedStyleForNode.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Don't reuse a pending property if it is already used.
This was happening when parsing an edit that had multiple properties with the same name.
The last property to be parsed was picking the same pending property and preventing
all properties from being represented with the right value, etc.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Only pick a pending property
if the index is NaN.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Prevent firing change events in more places when nothing has changed.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.update.delayed): Don't fire the event if there is text and it hasn't changed.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Only fire Refreshed if !dontFireRefreshedEvent.
(WebInspector.DOMNodeStyles.prototype.changeStyleText.attributeChanged): Pass true to refresh().
(WebInspector.DOMNodeStyles.prototype.changeStyleText.contentDidChange): Added. Call refresh().
(WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Listen for content change.
(WebInspector.DOMNodeStyles.prototype._attributesDidChange): Ignore if _ignoreNextStyleAttributeDidChangeEvent
is set and the attribute is "style".
2013-02-22 Timothy Hatcher <timothy@apple.com>
Minimize the number of times the OverriddenStatusChanged is fired for properties.
When updating styles, DOMNodeStyles will sometimes temporarily change overridden
to false only to later change it back to true when it finds the effective property
in a later style in the cascade. To minimize churn we coalesce these changes and
only fire the event if the value is different after a delay.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update): Use the setter for overridden
if we want to fire events.
(WebInspector.CSSProperty.prototype.set overridden.delayed): Added.
(WebInspector.CSSProperty.prototype.set overridden): Coalesce changes and
only fire the event if the end result differs.
2013-02-22 Timothy Hatcher <timothy@apple.com>
Delay firing the PropertiesChanged event so DOMNodeStyles has a chance
to mark overridden and associated properties.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.update.delayed): Added. Fire the event here.
(WebInspector.CSSStyleDeclaration.prototype.update): Set a timeout and call delayed.
2013-02-22 Timothy Hatcher <timothy@apple.com>
Consider the properties as enabled for computed style declarations.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.get enabled): Check for CSSStyleDeclaration.Type.Computed.
2013-02-22 Timothy Hatcher <timothy@apple.com>
Add support for checking if a property has another vendor prefix.
This will be used to style those properties differently instead of marking
them as completely invalid. Also fix a regex error in canonicalNameForPropertyName.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update): Delete _hasOtherVendorPrefix.
(WebInspector.CSSProperty.prototype.hasOtherVendorPrefix): Added.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.propertyNameHasOtherVendorPrefix): Added.
(WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Fix the regex
to check the beginning of the string.
2013-02-25 Timothy Hatcher <timothy@apple.com>
Add effectivePropertyForName to DOMNodeStyles.
Also mark the longhand properties as effective if the shorthand property is the effective property.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.effectivePropertyForName): Added.
(WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Pass _propertyNameToEffectivePropertyMap
to _associateRelatedProperties.
(WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Set propertyNameToEffectiveProperty
for the longhand if the related shorthand is effective.
2013-02-21 Timothy Hatcher <timothy@apple.com>
Don't try to add or remove a CSSProperty if the index is wrong.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.add): Return early if index is not NaN.
(WebInspector.CSSProperty.prototype.remove): Return early if index is NaN.
2013-02-22 Timothy Hatcher <timothy@apple.com>
Mark DOMNodesStyles as needing refresh if attributes change on the node.
Also fix a leak with the CSSStyleSheet.Event.ContentDidChange listener.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.Event.AttributeModified): Added.
(WebInspector.DOMNode.Event.AttributeRemoved): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Listen for AttributeModified and AttributeRemoved events.
Stop listening for CSSStyleSheet.Event.ContentDidChange globally to avoid a leak.
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Listen for
CSSStyleSheet.Event.ContentDidChange on the stylesheet object here.
(WebInspector.DOMNodeStyles.prototype._parseRulePayload): Ditto.
(WebInspector.DOMNodeStyles.prototype._attributesDidChange): Added. Mark as needing
refresh and fire the NeedsRefresh event.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._attributeModified): Fire the event on DOMNode too.
(WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
2013-02-22 Timothy Hatcher <timothy@apple.com>
Fix some event listener leaks related to the DOM content view.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.closed): Call close on the DOMTreeOutline.
Use the new version of removeEventListener by passing null for type and listener.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.close): Added. Call close on the DOMTreeUpdater.
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype.close): Added. Call removeEventListener.
* UserInterface/Object.js:
(WebInspector.Object.addEventListener): Prevent registering multiple times.
(WebInspector.Object.removeEventListener): Handle a null eventType by looping over all
the registered types. Delete _listeners if the map is empty.
2013-02-20 Timothy Hatcher <timothy@apple.com>
Avoid a crash when changing the text of an inline style.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.attributeChanged): Set the style attribute
on the node when the style is an inline style.
2013-02-20 Timothy Hatcher <timothy@apple.com>
Return early in the CSSProperty and CSSStyleDeclaration setters if the value does not change.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.set text): Return early.
(WebInspector.CSSProperty.prototype.set name): Ditto.
(WebInspector.CSSProperty.prototype.set value): Ditto.
(WebInspector.CSSProperty.prototype.set priority): Ditto.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.set text): Return early.
2013-02-20 Timothy Hatcher <timothy@apple.com>
Properly parse CSSProperty.status and handle when it is missing.
The Inspector.json documentation was incorrect about this, and has been
fixed in r143465.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty): Added anonymous parameter.
(WebInspector.CSSProperty.prototype.update): Ditto.
(WebInspector.CSSProperty.prototype.get anonymous): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Set anonymous
to true when status is "style". Also default to "style" when status is missing.
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Skip anonymous
properties.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Correct and simplify overridden property marking.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.isActive): Removed.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Only
use the propertyNameToEffectiveProperty map to accomplish what we needed
three maps for before. Only enabled is checked, instead of the old isActive
function. The isActive function was skipping already overridden properties,
so repeat calls to _markOverriddenProperties would not work correctly.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Store all properties for inherited styles.
We need all properties so we can allow editing inherited styles while
not removing the non-inherited properties when the edits are applied.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get inherited):
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
2013-02-19 Timothy Hatcher <timothy@apple.com>
Properly handle repeat occurrences of the same rule.
A rule might match multiple times if the selector is generic and matches
ancestors and has inherited properties.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
2013-02-19 Timothy Hatcher <timothy@apple.com>
Add matchedSelectors and matchedSelectorText to CSSRule.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSRule.js:
(WebInspector.CSSRule.prototype.update): Delete _matchedSelectors and _matchedSelectorText.
(WebInspector.CSSRule.prototype.get matchedSelectors): Added.
(WebInspector.CSSRule.prototype.get matchedSelectorText): Added.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Add editable getter to CSSRule.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSRule.js:
(WebInspector.CSSRule.prototype.get editable): Added.
(WebInspector.CSSRule.prototype.set selectorText): Return early if not editable
or if the selectors already match.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.get editable): Check the rule's editable
property too.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Add orderedStyles to DOMNodeStyles.
This will allow the UI to easily display the styles in the right order.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Added _orderedStyles.
(WebInspector.DOMNodeStyles.prototype.get orderedStyles): Added.
(WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Store orderedStyles
on the DOMNodeStyles object and the pseudo element objects.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Store matched rules in reverse order so the most specific rule is first, not last.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
Iterate in reverse order to match the cascade order.
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged): Fix a typo.
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Ditto.
(WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
Iterate in normal order now that they stored in reverse order.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Fix parsing of pseudo styles and inherited inline styles.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Properly
iterate of the pseudoElementRulesPayload array. Also fix the arguments passed
to _parseStyleDeclarationPayload. The first argument was 'this', back when
it was using call().
2013-02-19 Timothy Hatcher <timothy@apple.com>
Store the relevant node on CSSStyleDeclaration.
The node is useful for inherited styles so we can jump to the
element the styles are inherited from.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.prototype.get node): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange):
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
2013-02-25 Timothy Hatcher <timothy@apple.com>
Make copy work if there is a CodeMirror editor focused in the sidebar.
The content view was stealing the copy event and preventing the editor from putting
anything on the pasteboard. We were also having a focus issue where the console or
other editor was staying focused after clicking the DOM tree.
Reviewed by Joseph Pecoraro.
* UserInterface/EditingSupport.js:
(WebInspector.isEventTargetAnEditableField): Correct the check to include CodeMirror
and also only count text input types.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added focus event listener.
(WebInspector._focusChanged): Added. Make a caret selection inside the focused element.
This is needed (at least) to remove caret from console when focus is moved.
(WebInspector._copy): Only pass along the copy event if the target isn't an editable field.
2013-02-19 Timothy Hatcher <timothy@apple.com>
Don't allow text selection in data grid rows.
The row selection conflicts with the text range selection.
Reviewed by Joseph Pecoraro.
* UserInterface/DataGrid.css:
(.data-grid td): Removed -webkit-user-select: text.
2013-02-26 Antoine Quint <graouts@apple.com>
<rdar://problem/13265166> Remote inspecting an iOS 6.1 device never has the dashboard timer stop
Previous to iOS7, we don't get a frameId reported for timeline events. We fallback to using the
page's loadEventFired event and message the timelineManager to use the reported timestamp
as the _loadEventTime in case it hadn't already been set.
Reviewed by Timothy Hatcher.
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.prototype.loadEventFired):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.pageDidLoad):
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11978845> Pressing delete on a file should delete all breakpoints
Allow TreeOutlines to handle keyboard events on TreeElements if the
TreeElement hasn't already handled the event. This will allow the
breakpoint outline to handle delete keys pressed on resources.
Likewise, allow TreeOutlines to handle context menus on TreeElements
that don't specifically have a context menu handler. This will allow
the breakpoint outline to show a context menu for resources.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsBeneathTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._removeAllBreakpoints):
(WebInspector.DebuggerSidebarPanel.prototype._toggleAllBreakpoints):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype.removeAllResourceBreakpoints):
(WebInspector.DebuggerSidebarPanel.prototype.toggleAllResourceBreakpoints):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
Setup ondelete and oncontextmenu handlers on the breakpoint tree outline.
The delete action deletes all breakpoints in that resource. The content
menu action provides a choice to delete or toggle all breakpoints.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
Reorder and rename the context menus to more closely match Xcode.
* UserInterface/TreeOutline.js:
(TreeOutline.prototype._treeKeyDown):
Send common key events up to the tree outline if it implements them.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler):
(WebInspector.GeneralTreeElement.prototype.onattach):
Bind a TreeOutline context menu to the individual GeneralTreeElements if the
specific GeneralTreeElement does not have a context menu handler.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13299163> Give Breakpoint Tree Elements Context Menus to Delete and Toggle
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
(WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint):
(WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint):
Offer context menu items to remove and toggle the breakpoint, if possible.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Update remaining SourceCodeLocation constructors.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame):
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Update CallFrame displays for SourceMap display locations.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Use the display (mapped) location when available. Multiple editors
may show the execution line, the original and mapped editors.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype):
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Add isEmptyObject instead of doing Object.keys(foo).length
In benchmarks of empty, small, and large objects isEmptyObject
performed better then checking the length of Object.keys. Especially
for large objects.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._associateRelatedProperties):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
* UserInterface/RemoteObject.js:
(WebInspector.LocalJSONObject.prototype.get hasChildren):
* UserInterface/ResourceDetailsSidebarPanel.js:
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
(WebInspector.TextEditor.prototype):
* UserInterface/Utilities.js:
(isEmptyObject):
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Get Breakpoints Working with SourceMaps - Line + Column Breakpoint Support.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Previously breakpoints could only appear in a single SourceCodeTextEditor, and
only one could be placed on a line. After this patch:
- Breakpoints may show up in multiple editors at the original and mapped locations.
- Breakpoints effective locations may be on columns. If you set a breakpoint on
a line in a mapped resource, it may map back to a non-0 column in the original.
- Multiple breakpoints may be set on a line. If you set a breakpoint on a few
lines in a mapped resource, they may all map back to the same line in the original
but just have different column offsets.
Breakpoints are still set and saved with their original SourceMapLocation locations.
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
When looking up breakpoints for a source code, associate them with the source code
at the same time by setting the Breakpoint's SourceCodeLocation's sourceCode. The
breakpoints for a SourceMapResource are only those in the originator that have
a display location inside the mapped resource.
(WebInspector.DebuggerManager.prototype.reset):
Disassociate breakpoints on reset, by clearing the SourceCodeLocation's sourceCode.
(WebInspector.DebuggerManager.prototype._breakpointSourceCodeLocationDidChange):
Dispatch a new BreakpointMoved event. There were already existing events for
BreakpointAdded and Removed but not Moved. We add this for convenience, there
are currently no users though, they all watch the breakpoints source code location.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.setBreakpointInfoForLineAndColumn):
(WebInspector.TextEditor.prototype._addBreakpointToLineAndColumnWithInfo):
(WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
Update setBreakpointInfo to include line + column numbers.
(WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
(WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
Updating breakpoint style now handles multi-breakpoints. For multi-breakpoints
we only style it as disabled if all breakpoints on that line are disabled.
Likewise for resolved.
(WebInspector.TextEditor.prototype._allColumnBreakpointInfoForLine):
(WebInspector.TextEditor.prototype._setColumnBreakpointInfoForLine):
Now that a line may have multiple column breakpoints, this is a bulk
getter and setter used during breakpoint dragging to set the breakpoint
infos on a line.
(WebInspector.TextEditor.prototype._gutterMouseDown):
(WebInspector.TextEditor.prototype._documentMouseMoved):
(WebInspector.TextEditor.prototype._documentMouseUp):
Do nothing if clicking on a multi-breakpoint. Otherwise, when dragging
remember the original breakpoints line and column information. While the
drag is happening, we are already updating our internal line + column
information, so in mouse up when notifying delegates we can ignore their
setBreakpointInfo calls.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber):
(.text-editor > .CodeMirror .has-breakpoint.multiple-breakpoints .CodeMirror-linenumber::before):
Styles for a line with multiple breakpoints. We show a centered white
ellipsis and hide the line number.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.close):
Now that breakpoints can be added in one editor and affect a different editor
we must listen for breakpoint added and move (via it's source code location).
Register for the events in the constructor and clear in close.
(WebInspector.SourceCodeTextEditor.prototype._editorLineInfoForSourceCodeLocation):
SourceCodeTextEditors for original resources show their content with original line
numbers. For mapped resources show their content with display line numbers. So
whenever we have a sourceCodeLocation, we use this to convert it to the "editor"
line info, which is just the line + column number for this editor + TextEditor.
(WebInspector.SourceCodeTextEditor.prototype._breakpointForEditorLineInfo):
(WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo):
(WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo):
Update addBreakpoint and removeBreakpoint for line + column, instead of just line.
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus):
(WebInspector.SourceCodeTextEditor.prototype._breakpointAdded):
(WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved):
When breakpoints are added, removed update our map, and pass that information
on to the underlying TextEditor.
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointLocation):
When a breakpoint moves, we need to lookup the breakpoint from its old location.
The old location is different depending on if we are the editor for the original
or mapped resource. So work out the correct old location, and pass that
information and the underlying TextEditor.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
When the TextEditor modifies a breakpoint, we must update our maps for that
breakpoint. When we tell the DebuggerManager about the updates, we will
expect some events to fire to update other editors that might be interested
in that breakpoint. We can ignore those events ourselves, because we
just made the change.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Sort Breakpoints in the Debugger Sidebar
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Reviewed by Timothy Hatcher.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
(WebInspector.DebuggerSidebarPanel.prototype._compareBreakpointTreeElements):
Sort BreakpointsTreeElements (children of Resources) by Line #.
Sort top level tree elements by title, always placing the special breakpoints at the top.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Give BreakpointTreeElements a ContextMenu to Reveal Original Resource.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
Given a context menu, add a show original resource menu item.
* UserInterface/TreeOutline.js:
(TreeElement.prototype._detach):
Add an ondetach event to balance onattach.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.ondetach):
Manage adding and removing a contextmenu event listener for oncontextmenu.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
Show a ContextMenu with the Breakpoint's menu items.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Make Breakpoint to use a SourceCodeLocation. Update its BreakpointTreeElement display.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
This is the start of modifying Breakpoints to use SourceCodeLocation.
There are remaining users (SourceCodeTextEditor) which will be addressed
in a following patch. This updates Breakpoint and its display in the sidebar.
Reviewed by Timothy Hatcher.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get sourceCodeLocation):
(WebInspector.Breakpoint.prototype.get info):
Update the constructor and serialization to use SourceCodeLocations,
which includes a line number and column number.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype._updateTitles):
(WebInspector.BreakpointTreeElement.prototype._updateStatus):
BreakpointTreeElements always display the display line + column. They
show the original location as a subtitle.
(WebInspector.BreakpointTreeElement.prototype._breakpointDisplayLocationDidChange):
When the breakpoint's display location changes update our titles.
However, if the breakpoint actually changed resources, then prepare
for removal. The sidebar will detect this and create a new tree element.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.didSetBreakpoint):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
Set breakpoints with the breakpoints line + column information.
* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
Simplify now that the breakpoint's SourceCodeLocation already has the
original SourceCode. Also, create SourceMapResourceTreeElements as needed.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved):
(WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement):
Refactor breakpoint removal code so it can be shared.
(WebInspector.DebuggerSidebarPanel.prototype._breakpointDisplayLocationDidChange):
If a breakpoint changes resources remove the old breakpoint tree element
and add a new one with the new location.
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
Show the display location.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Make Find banner when viewing a SourceMapResource work.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
A SourceMapResource can display its content in a SourceCodeTextEditor just
like regular resources. However, it does not use the backend to search
it's contents, because its contents are all loaded by the frontend. Give
customPerformSearch a return value saying whether or not it was handled.
If not handled, we fall back to CodeMirror's text search, which works fine.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.performSearch):
If the customPerformSearch returns false, then the custom search did
not handle the search, and we fallback to the default CodeMirror search.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Make SourceCodeLocation provide raw and mapped locations.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
SourceCodeLocation automatically provide original (raw) and mapped (display)
source code locations. It's API requires that it be constructed with the raw
source code and location information, which is automated by using
SourceCode.prototype.createSourceCodeLocation, passing a lineNumber and
columnNumber for the source code that you're invoking the method on.
All uses of SourceCodeLocation will be audited and updated in later patches,
this patch includes just the core SourceCodeLocation uses.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeLocation):
(WebInspector.ResourceSidebarPanel.prototype.showOriginalSourceCodeLocation):
By default, when showing any location we want to show it's display location,
which will be the source map resource if there is one, otherwise the raw resource.
If needed, there is a way to explicitly show the original source code location.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.createSourceCodeLocation):
Default implementation, just use the given line and column number.
* UserInterface/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.createSourceCodeLocation):
Mapped resource. Reverse lookup the raw line and column. Adjust if
needed for inline <script> offsets. And construct the SourceCodeLocation
with the raw values.
* UserInterface/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation):
(WebInspector.SourceCodeLocation.prototype.get sourceCode):
(WebInspector.SourceCodeLocation.prototype.get lineNumber):
(WebInspector.SourceCodeLocation.prototype.get columnNumber):
This is the raw location data.
(WebInspector.SourceCodeLocation.prototype.hasMappedLocation):
(WebInspector.SourceCodeLocation.prototype.get displaySourceCode):
(WebInspector.SourceCodeLocation.prototype.get displayLineNumber):
(WebInspector.SourceCodeLocation.prototype.get displayColumnNumber):
If we have a mapped location, use that. Otherwise use the raw location.
(WebInspector.SourceCodeLocation.prototype.update):
If a user of a SourceCodeLocation wants to update the location there
are restrictions. The updated location must be either the raw resource
or the mapped resource. SourceCodeLocation then does the rest, and
updates its internal values and dispatches events appropriately.
(WebInspector.SourceCodeLocation.prototype.set sourceCode):
There are cases where the inspector (Breakpoints) which may want to keep
around a line/column SourceCodeLocation but without an associated
SourceCode. Setting the source code to null will make this a dumb
location, and setting it to a source code will update appropriately.
(WebInspector.SourceCodeLocation.prototype._resetMappedLocation):
(WebInspector.SourceCodeLocation.prototype._setMappedLocation):
(WebInspector.SourceCodeLocation.prototype._resolveMappedLocation):
We lazily resolve the mapped location when needed. In cases where
a SourceCodeLocation is created from a SourceMapResource the mapped
location is already known and can be set directly.
(WebInspector.SourceCodeLocation.prototype._makeChangeAndDispatchChangeEventIfNeeded):
Clients of SourceCodeLocation may want to update their display if
a source map was added and a new better location is available. We
provide events for any change, or just display location changes.
(WebInspector.SourceCodeLocation.prototype._sourceCodeSourceMapAdded):
Whenever the raw resource adds a source map check if there was a
display location change.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Show SourceMapResources in the Resources Sidebar
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
SourceMapResources are added to the Resources Sidebar as children
of the originator Resource. So if a Script has a SourceMap with
multiple inputs, there will be a disclosure triangle by the Script
and you can see the original resources for that Script.
Since both Resources and Scripts can have SourceMapChildren this
patch refactors both of those TreeElement classes to extend from a
common SourceCodeTreeElement class that manages the new
SourceMapResourceTreeElement children.
FrameTreeElements, special subclasses of ResourceTreeElements and
thus SourceCodeTreeElements handle their own source map resource
children. This is so that SourceMapResources for <script>s in the
frame are placed along with that frame's same typed resources.
SourceMapResources that are scripts will be in the Scripts folder,
or no folder if the frame has only a few resources.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
A TreeOutline must opt-in to displaying source map tree elements
for resources. We only show source map children of resources in the
main resource tree outline. We will not show them in the search
results tree outline or breakpoints tree outline.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.callFirstAncestorFunction):
Move this code from ResourceTreeElement to General. It is useful.
* UserInterface/SourceCodeTreeElement.js: Added.
(WebInspector.SourceCodeTreeElement):
(WebInspector.SourceCodeTreeElement.prototype.updateSourceMapResources):
(WebInspector.SourceCodeTreeElement.prototype.onattach):
(WebInspector.SourceCodeTreeElement.prototype.onpopulate):
(WebInspector.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
(WebInspector.SourceCodeTreeElement.prototype._updateSourceCode):
Common superclass for Script and Resource TreeElements. This manages the
child source map resources. Sorts them, and replaces them when they change.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement):
(WebInspector.ResourceTreeElement.compareResourceTreeElements): Common comparison.
(WebInspector.ResourceTreeElement.prototype._updateResource):
(WebInspector.ResourceTreeElement.prototype._updateTitles):
(WebInspector.ResourceTreeElement.prototype._typeDidChange):
* UserInterface/ScriptTreeElement.js:
(WebInspector.ScriptTreeElement):
Refactor as subclasses of SourceCodeTreeElement.
* UserInterface/SourceMapResourceTreeElement.js: Added.
(WebInspector.SourceMapResourceTreeElement):
(WebInspector.SourceMapResourceTreeElement.prototype.onattach):
(WebInspector.SourceMapResourceTreeElement.prototype._updateTitles):
A SourceMapResourceTreeElement is very simple. It adds a style class to
get unique icons, lazy loads on attach, and since it doesn't have a
parent frame it uses it's originator's host to display a subtitle if
it is loaded from a different origin.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.updateSourceMapResources):
(WebInspector.FrameTreeElement.prototype.onattach):
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._updateParentStatus):
(WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject):
(WebInspector.FrameTreeElement.prototype._insertResourceTreeElement):
Handle our own SourceMapResource children in onpopulate and addTreeElement paths.
* UserInterface/Main.html:
* UserInterface/ResourceIcons.css:
(.source-map-resource.resource-icon .icon):
(.source-map-resource.resource-icon.resource-type-script .icon):
* UserInterface/Images/ClippingGeneric.png: Added.
* UserInterface/Images/ClippingGeneric@2x.png: Added.
Add new files, images, and styles to trigger the images.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Download SourceMaps and create SourceMapResources.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
Reviewed by Timothy Hatcher.
* UserInterface/SourceMap.js:
(WebInspector.SourceMap):
(WebInspector.SourceMap.prototype.get originalSourceCode):
(WebInspector.SourceMap.prototype.get resources):
(WebInspector.SourceMap.prototype.addResource):
(WebInspector.SourceMap.prototype.resourceForURL):
Give a SourceMap references to the SourceCode that originally requested
it, and the SourceMapResources created for the input sources.
* UserInterface/SourceMapResource.js: Added.
(WebInspector.SourceMapResource):
(WebInspector.SourceMapResource.prototype.get sourceMap):
A SourceMapResource is a Resource subclass with no loading information.
It has a reference to the SourceMap that it belongs to.
(WebInspector.SourceMapResource.prototype.canRequestContentFromBackend):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
The content is loaded on demand. Normal requests for SourceCode content
goes through SourceCode.prototype.requestContent. Since the content is
loaded on demand, the type and data are filled in after content is
requested, and we fire normal Resource events, like Type changed.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.markAsFinished):
Don't request content if we can't / shouldn't request content from the
backend. Normally resources load their content as soon as they finish
loading. However SourceMapResources load their content and then mark
as finished. Without this we would get a harmless assert.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.get sourceMaps):
(WebInspector.SourceCode.prototype.addSourceMap):
Any SourceCode resource can have a set of source maps. In the common case,
a Script will have a single source map. However a Document resource map
have multiple sourceMaps for different inline <script> sections.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.scriptParsed):
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.scriptDidParse):
The SourceMap resource's url comes in from scriptDidParse. Pass it on
eventually to the Script constructor.
* UserInterface/Script.js:
(WebInspector.Script):
If we have a source map URL, load and parse the source map.
* UserInterface/SourceMapManager.js: Added.
(WebInspector.SourceMapManager):
(WebInspector.SourceMapManager.prototype.sourceMapForURL):
(WebInspector.SourceMapManager.prototype.downloadSourceMap):
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
(WebInspector.SourceMapManager.prototype._loadAndParseFailed):
(WebInspector.SourceMapManager.prototype._loadAndParseSucceeded):
(WebInspector.SourceMapManager.prototype._mainResourceDidChange):
A global set of SourceMaps by url. This prevents multiple downloads of
the same source map. The map is cleared on main resource changes.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Add new files and instantiate the new manager singleton.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Add parts of SourceMap.js from OpenSource.
<rdar://problem/11735116> PARITY (WebKit Web Inspector): Missing Source Map support
This parses a v3 SourceMap file. The spec is linked at the top.
SourceMap.js comes from OpenSource's frontend/SourceMap.js.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/SourceMap.js: Added.
(WebInspector.SourceMap):
(WebInspector.SourceMap.prototype.sources):
(WebInspector.SourceMap.prototype.sourceContent):
(WebInspector.SourceMap.prototype._parseMappingPayload):
(WebInspector.SourceMap.prototype._parseSections):
(WebInspector.SourceMap.prototype._parseMap):
(WebInspector.SourceMap.prototype._isSeparator):
(WebInspector.SourceMap.prototype._decodeVLQ):
(WebInspector.SourceMap.StringCharIterator):
(WebInspector.SourceMap.StringCharIterator.prototype.next):
(WebInspector.SourceMap.StringCharIterator.prototype.peek):
(WebInspector.SourceMap.StringCharIterator.prototype.hasNext):
(WebInspector.PositionBasedSourceMap):
(WebInspector.PositionBasedSourceMap.prototype.findEntry):
(WebInspector.PositionBasedSourceMap.prototype.findEntryReversed):
(WebInspector.PositionBasedSourceMap.prototype._parseMap):
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Only allow left clicks on the gutter / dragging breakpoints.
Reviewed by Ricky Mondello.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype):
Bail if the mouse down button is not the left button.
2013-02-26 Joseph Pecoraro <pecoraro@apple.com>
Remove unused ContextMenu soft menu code.
Rubber-stamped by Ricky Mondello.
* UserInterface/ContextMenu.js:
2013-02-21 Joseph Pecoraro <pecoraro@apple.com>
Standardize on "Event" not "Events". There were a few outliers.
Reviewed by Brian Weinstein.
* UserInterface/DatabaseContentView.js:
(WebInspector.DatabaseContentView.prototype._queryFinished):
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype):
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.prototype.applySuggestion):
(WebInspector.TextPrompt.prototype.acceptSuggestion):
2013-02-19 Jeff Miller <jeffm@apple.com>
Regenerate localizedStrings.js after recent changes.
* Localizations/en.lproj/localizedStrings.js:
Regenerated.
2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13232839> Show Error Console (Option+Cmd+C) should always put keyboard focus in the console
The keyboard shortcut already existed, but if used to open the inspector
the focus was getting stolen away by other elements with tabindex and
the DOM Tree. Fix this so focus is not stolen away. As an added bonus
the console now keeps its focus across page reloads and navigations.
Reviewed by Antoine Quint.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
When the keyboard shortcut is triggered, focus the quick console. If
the page is still loading, we will need to focus again because other
elements with tabindex may steal focus away from the console prompt.
* UserInterface/Main.js:
(WebInspector.isConsoleFocused):
Global accessor for whether or not the console is focused.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.shown):
When showing a the DOMTreeOutline, never steal focus from the console.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode):
When the root dom node changes and we reveal and select an element,
never steal focus from the console.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.setVisible):
Provide an optional omitFocus parameter to pass on. It already exists below.
2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
Move .indeterminate-progress-spinner from resources only to all content views.
ScriptContentViews also use spinners, and they were not getting the
proper styling if you were fast enough to see it!
Reviewed by Brian Weinstein.
* UserInterface/ContentView.css: Renamed from WebInspector/UserInterface/ResourceContentView.css.
(.content-view > .indeterminate-progress-spinner):
* UserInterface/Main.html:
2013-02-18 Joseph Pecoraro <pecoraro@apple.com>
Hide the Image Size section for Image resources if the load failed.
Reviewed by Brian Weinstein.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
Don't show an empty image size section if the image failed to load.
2013-02-16 Joseph Pecoraro <pecoraro@apple.com>
Accidentally added some code referencing SourceMapResource before it was added.
Unreviewed cleanup.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
2013-02-18 Antoine Quint <graouts@apple.com>
<rdar://problem/13180267> REGRESSION: Reload button is no longer visible in the Web Inspector
Make the ResourceTreeElement's "status" property a reload button in case we're
dealing with the main resource of the main frame.
Reviewed by Joseph Pecoraro.
* UserInterface/Images/Reload.pdf: Removed.
* UserInterface/Images/Reload.svg: Added.
* UserInterface/Images/ReloadSelected.svg: Added.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/ResourceTreeElement.css:
(.item.resource-type-document > .status > .reload-button):
(.item.resource-type-document.selected > .status > .reload-button):
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.get reloadButton):
(WebInspector.ResourceTreeElement.prototype._updateResource):
(WebInspector.ResourceTreeElement.prototype._updateStatus):
(WebInspector.ResourceTreeElement.prototype._reloadPageClicked):
2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
Double clicking the disclosure triangle for a TreeElement should not
trigger the ondblclick for the element.
This will be more possible once we add SourceMaps, but it is currently
possible right now with the Main Resource's disclosure triangle.
Reviewed by Dean Jackson.
* UserInterface/TreeOutline.js:
(TreeElement.treeElementDoubleClicked):
2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
We don't need to check the entire string when we mean to check just the
first character. Convert an indexOf to charAt(0).
Reviewed by Timothy Hatcher.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13226395> Multiline console.asserts in ResourceSidebarPanel.js not getting stripped
Reviewed by Timothy Hatcher.
* Scripts/remove-console-asserts.pl:
For safety, keep the script reading line by line and warn if there is
a console.assert that was not stripped. This almost always means the
assert spanned multiple lines.
* UserInterface/ResourceSidebarPanel.js:
Converted multi-line asserts to a single line.
2013-02-15 Joseph Pecoraro <pecoraro@apple.com>
Manually running remove-console-asserts.pl was failing on rename.
Change instead to File::move from the File::copy module and
report errors if they happen.
Reviewed by Timothy Hatcher.
* Scripts/remove-console-asserts.pl:
2013-02-15 Timothy Hatcher <timothy@apple.com>
Fix exceptions caused by my earlier InspectorBackendCommands change.
Unreviewed.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Call
updateDOMStorage instead of domStorageUpdated.
(WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Ditto.
(WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Ditto.
(WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Ditto.
2013-02-15 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-02-15 Timothy Hatcher <timothy@apple.com>
Update InspectorBackendCommands.js for the latest protocol changes.
Reviewed by Antoine Quint.
* UserInterface/CSSObserver.js:
(WebInspector.CSSObserver.prototype.styleSheetAdded): Added.
(WebInspector.CSSObserver.prototype.styleSheetRemoved): Added.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._deleteCallback): Pass both domain and url.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Renamed from domStorageUpdated.
(WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared): Added.
(WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved): Added.
(WebInspector.DOMStorageObserver.prototype.domStorageItemAdded): Added.
(WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated): Added.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightDOMNode): Use invoke since the argument
order changed and objectId is an optional argument we don't use.
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype.reportProtocolError): Log the whole error, not just the message.
* UserInterface/InspectorBackendCommands.js: Updated from OpenSource r142992.
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.detached): Added.
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.prototype.javascriptDialogOpening): Added.
(WebInspector.PageObserver.prototype.javascriptDialogClosed): Added.
(WebInspector.PageObserver.prototype.scriptsEnabled): Added.
2013-02-15 Antoine Quint <graouts@apple.com>
<rdar://problem/13207008> Allow toggling showing shadow trees with a button in the DOM Tree navigation bar
We do a few things in this patch:
1. We move the existing compositing borders navigation item from
FrameContentView to DOMTreeContentView.
2. We add a new navigation item on DOMTreeContentView to toggle
shadow tree DOM nodes.
3. We make ClusterContentView return its current content view's
navigation items in the navigationItems accessor since otherwise
the DOMTreeContentView navigation items wouldn't get picked up.
4. We add a new event to notify when a ContentView's navigation
items have changed so that they may be picked up by the ContentBrowser.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get navigationItems):
(WebInspector.ClusterContentView.prototype._currentContentViewDidChange):
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._contentViewNavigationItemsDidChange):
* UserInterface/ContentView.js:
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype.get navigationItems):
(WebInspector.DOMTreeContentView.prototype.shown):
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked):
(WebInspector.DOMTreeContentView.prototype._toggleCompositingBorders):
(WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
(WebInspector.DOMTreeContentView.prototype._showShadowDOMSettingChanged):
(WebInspector.DOMTreeContentView.prototype._toggleShowsShadowDOMSetting):
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.shown):
(WebInspector.FrameContentView.prototype._pathComponentSelected):
* UserInterface/Images/ShadowDOM.pdf: Added.
2013-02-15 Antoine Quint <graouts@apple.com>
<rdar://problem/13026376> Layers sidebar panel should show layers associated with any descendant node
Use the DOM hierarchy to compile a list of layers associated with any
descendant of the node passed to LayerTreeManager's layersForNode()
method.
Reviewed by Timothy Hatcher.
* UserInterface/LayerTreeManager.js:
(WebInspector.LayerTreeManager.prototype.get flatLayerTree): New getter
to make it much easier to debug issues with the LayerTreeManager so we
get the flat list of all known layers from the console.
(WebInspector.LayerTreeManager.prototype.layersForNode):
(WebInspector.LayerTreeManager.prototype.):
(WebInspector.LayerTreeManager.prototype._flattenedLayerTree):
(WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds):
(WebInspector.LayerTreeManager.prototype._layersForDescendantsOfNode):
2013-02-15 Antoine Quint <graouts@apple.com>
<rdar://problem/13223597> Dashboard resources size may be only partial
Wait until we've gotten an event indicating we're loading the main
resource to start tracking sizes.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._mainResourceDidChange):
(WebInspector.DashboardManager.prototype._startUpdatingTime):
2013-02-15 Antoine Quint <graouts@apple.com>
<rdar://problem/13217869> Dashboard: LCD timer does not update when going back/forward
Don't forget to kill any previously running timer when a new page loads
and reset the time reported in the dashboard to 0 before starting the
new timer.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager.prototype._mainResourceDidChange):
2013-02-15 Antoine Quint <graouts@apple.com>
<rdar://problem/13207017> Nodes hosted in shadow trees should not be disregarded when "show-shadow-dom" setting is off
We used to only deal with the "show-shadow-dom" setting as immutable and
would simply not create DOMNodes for payloads with shadow roots in case
the setting was false (the default). However, we would run in a situation
where the backend could push nodes that were part of a shadow tree,
regardless of the setting, and the parentId for the node would not be
referenced in the DOMTreeManager's _idToDOMNode map which would eventually
yield an error when handling setChildNodes payloads and break any further
DOM interaction in the inspector. This kind of case happened quite often
when the LayerTreeManager would get composted layers that were part of
an <input> element, <video> element, etc.
We now switch to a system where the "show-shadow-dom" setting can be changed
at any time and we reflect the correct state in the DOMTreeOutline. Since
the DOMTreeOutline bases its representation on the data represented by
DOMNode instances, we make the "firstChild", "lastChild", "previousSibling",
"nextSibling" and "children" properties getters and dynamically check whether
child nodes hosted in shadow roots should be ignored.
We only build the filtered children list in the case where we shouldn't
show shadow roots and we've identified through a call to _renumber() that
the filtered list needed updating. The filtered list is then cached until
the next time it needs updating.
We also make the "childNodeCount" property use a getter / setter as it was
being accessed using the ivar from outside the DOMNode class and it would
not reflect whether shadow roots should be reported as children.
Then, we move the setting to be a shared setting on the global WebInspector
object and track changes to it, updating all nodes in the DOMTreeOutline
when the change happens.
Further fixes will ensure we refresh the layer tree when the setting changes,
and teach the LayerTreeManager to ignore layers attached to nodes in shadow
roots when the setting is to hide shadow nodes. Another fix will be to provide
a button to toggle that setting in the DOM tree's navigation bar in lieu of
a contextual menu item.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.get firstChild):
(WebInspector.DOMNode.prototype.get lastChild):
(WebInspector.DOMNode.prototype.get nextSibling):
(WebInspector.DOMNode.prototype.get previousSibling):
(WebInspector.DOMNode.prototype.get childNodeCount):
(WebInspector.DOMNode.prototype.set childNodeCount):
(WebInspector.DOMNode.prototype.hasChildNodes):
(WebInspector.DOMNode.prototype.hasShadowRoots):
(WebInspector.DOMNode.prototype._insertChild):
(WebInspector.DOMNode.prototype._removeChild):
(WebInspector.DOMNode.prototype._setChildrenPayload):
(WebInspector.DOMNode.prototype._renumber):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.handleLoadAllChildren):
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._childNodeCountUpdated):
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
(WebInspector.DOMTreeOutline.prototype._showShadowDOMSettingChanged):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2013-02-14 Timothy Hatcher <timothy@apple.com>
Switch to the new flexbox model for significantly faster layout times.
<rdar://problem/13206930> REGRESSION: Layout time in the Web Inspector
is 1.21x longer compared to Safari 6
Reviewed by Simon Fraser.
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Make sure to absolute position
the element when measuring in the body to avoid flexbox layout.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayout instead
of updateLayoutSoon. Delaying the layout causes a visual flash of wrapped items.
* UserInterface/ButtonToolbarItem.css: Replaced -webkit-box with -webkit-flex.
Replaced -webkit-box-flex with -webkit-flex. Replaced -webkit-box-orient: vertical
with -webkit-flex-direction: column. Replaced -webkit-box-orient: horizontal with
-webkit-flex-direction: row. Replaced -webkit-box-align: center with -webkit-align-items: center.
Replaced -webkit-box-pack: center with -webkit-justify-content: center. Replaced
-webkit-box-pack: start with -webkit-justify-content: flex-start. Replaced -webkit-box-pack: end
with -webkit-justify-content: flex-end.
* UserInterface/ContentBrowser.css: Ditto.
* UserInterface/ControlToolbarItem.css: Ditto.
* UserInterface/DashboardView.css: Ditto.
* UserInterface/FilterBar.css: Ditto.
* UserInterface/FlexibleSpaceNavigationItem.css: Ditto.
* UserInterface/FontResourceContentView.css: Ditto.
* UserInterface/ImageResourceContentView.css: Ditto.
* UserInterface/LayerTreeSidebarPanel.css: Ditto.
* UserInterface/Main.css: Ditto.
* UserInterface/NavigationSidebarPanel.css: Ditto.
* UserInterface/Popover.css: Ditto.
* UserInterface/QuickConsole.css: Ditto.
* UserInterface/ResourceSidebarPanel.css: Ditto.
* UserInterface/Toolbar.css: Ditto.
* UserInterface/HierarchicalPathComponent.css: Ditto.
Plus added min-width: 0 in a couple places to get proper shrinking.
* UserInterface/NavigationBar.css: Ditto.
Plus added -webkit-flex-wrap: wrap in a couple places to get proper measuring in JavaScript.
2013-02-14 Antoine Quint <graouts@apple.com>
<rdar://problem/13200858> Popovers can draw their background twice
Since the canvas context may be the very same context across
presentations of the popover, ensure that we restore the default
state after we're done drawing so that the previous clip path
is removed.
We also clear the drawing region so that we don't get remnants
of the previously drawn frame in case the frame size is the same
as for the previous popover presentation.
Reviewed by Timothy Hatcher.
* UserInterface/Popover.js:
(WebInspector.Popover.prototype._drawBackground):
2013-02-14 Antoine Quint <graouts@apple.com>
<rdar://problem/13192982> Debugger popovers should line-up arrow to match hovered token
Use the token's bounds rather than the expression's bounds
to present the popover.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._checkHoveredToken):
2013-02-14 Antoine Quint <graouts@apple.com>
<rdar://problem/13209159> Dashboard load timer starts over when recording in the Timeline manually
Instead of starting the timer upon starting recording the timeline, use the
WebInspector.Frame.Event.MainResourceDidChange event to track load of the
main frame only since it's the load of the main frame that we're showing
the time for in the dashboard.
Reviewed by Timothy Hatcher.
* UserInterface/DashboardManager.js:
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._mainResourceDidChange):
2013-02-13 Timothy Hatcher <timothy@apple.com>
Don't fire WebInspector.QuickConsole.Event.DidResize if nothing changed.
Part of: <rdar://problem/12745890> Autocomplete slows down my typing in the Web Inspector console while debugging
Reviewed by Antoine Quint.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._updateSize): Only change the style and fire the event
if the height of the toolbar or element changed.
2013-02-12 Timothy Hatcher <timothy@apple.com>
Speed up selection of deeply nested DOM nodes.
<rdar://problem/13201584> UI updates after selecting elements is very slow
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Remove a offsetWidth
from a loop that also sets style info.
2013-02-12 Timothy Hatcher <timothy@apple.com>
Treat an empty URL for frames as "about:blank" for the special empty page.
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._createFrame):
2013-02-13 Antoine Quint <graouts@apple.com>
<rdar://problem/13193125> Debugger popovers don't appear for boolean values
Don't forget to handle boolean values for the debugger popover.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
2013-02-12 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
Reviewed by Cody Krieger.
* Localizations/en.lproj/localizedStrings.js:
Updated by the script.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add support for computed style.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.set text): Return early if not editable.
(WebInspector.CSSProperty.prototype.set name): Ditto.
(WebInspector.CSSProperty.prototype.get canonicalName): Use CSSStyleManager.canonicalNameForPropertyName.
(WebInspector.CSSProperty.prototype.set value): Return early if not editable.
(WebInspector.CSSProperty.prototype.set priority): Ditto.
(WebInspector.CSSProperty.prototype.set enabled): Ditto.
(WebInspector.CSSProperty.prototype.add): Ditto.
(WebInspector.CSSProperty.prototype.remove): Ditto.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.prototype.get editable): Added.
(WebInspector.CSSStyleDeclaration.prototype.update): Store the property in a map if we aren't editable.
(WebInspector.CSSStyleDeclaration.prototype.addProperty): Return early if not editable.
(WebInspector.CSSStyleDeclaration.prototype.removeProperty): Ditto.
(WebInspector.CSSStyleDeclaration.prototype.propertyForName): Use property map if not editable.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.canonicalNameForPropertyName): Added. Moved from CSSProperty.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle): Added. Moved the finish here.
(WebInspector.DOMNodeStyles.prototype.get computedStyle): Added.
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Handle NaN index better.
(WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Use an external effective property map for
the main element styles.
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Use an external effective property map
if one is passed in.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add support for editing rules, styles and properties.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.set index): Added.
(WebInspector.CSSProperty.prototype.update): Delete the pending properties.
(WebInspector.CSSProperty.prototype.get text): Use the getters to get the pending values.
(WebInspector.CSSProperty.prototype.set text): Added.
(WebInspector.CSSProperty.prototype.get name): Return _pendingName if index is NaN.
(WebInspector.CSSProperty.prototype.set name): Added.
(WebInspector.CSSProperty.prototype.get value): Return _pendingValue if index is NaN.
(WebInspector.CSSProperty.prototype.set value): Added.
(WebInspector.CSSProperty.prototype.get important): Use priority getter.
(WebInspector.CSSProperty.prototype.set important): Added.
(WebInspector.CSSProperty.prototype.get priority): Return _pendingPriority if index is NaN.
(WebInspector.CSSProperty.prototype.set priority): Added.
(WebInspector.CSSProperty.prototype.get enabled): Check ownerStyle and index too.
(WebInspector.CSSProperty.prototype.set enabled): Added.
(WebInspector.CSSProperty.prototype.add): Added.
(WebInspector.CSSProperty.prototype.remove): Added.
(WebInspector.CSSProperty.prototype._updatePropertySoon): Added.
(WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Added.
(WebInspector.CSSProperty.prototype._cancelPendingUpdate): Added.
* UserInterface/CSSRule.js:
(WebInspector.CSSRule.prototype.set selectorText): Added.
(WebInspector.CSSRule.prototype.set selectors): Added.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.prototype.update): Don't set ownerStyle to null anymore
since we reuse properties and want them associated still.
(WebInspector.CSSStyleDeclaration.prototype.set text): Added.
(WebInspector.CSSStyleDeclaration.prototype.get pendingProperties): Added.
(WebInspector.CSSStyleDeclaration.prototype.propertyForName): Added.
(WebInspector.CSSStyleDeclaration.prototype.propertyForName.findMatch): Added.
(WebInspector.CSSStyleDeclaration.prototype.addProperty): Added.
(WebInspector.CSSStyleDeclaration.prototype.removeProperty): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.ruleSelectorChanged): Added.
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector): Added.
(WebInspector.DOMNodeStyles.prototype.changeStyleText): Added.
(WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Added.
(WebInspector.DOMNodeStyles.prototype.changeProperty): Added.
(WebInspector.DOMNodeStyles.prototype.changePropertyText): Added.
(WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Added.
(WebInspector.DOMNodeStyles.prototype.addProperty): Added.
(WebInspector.DOMNodeStyles.prototype.removeProperty): Added.
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Added.
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload): Reuse pending properties.
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Ignore stylesheets we know
we just changed.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Mark overridden properties and associate shorthand to longhand properties.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get canonicalName): Added.
(WebInspector.CSSProperty.prototype.get canonicalName.canonicalPropertyName): Added.
(WebInspector.CSSProperty.prototype.set overridden): Added.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Call _updateStyleCascade.
(WebInspector.DOMNodeStyles.prototype._updateStyleCascade): Added.
(WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder): Added.
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties): Added.
(WebInspector.DOMNodeStyles.prototype._associateRelatedProperties): Added.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Parse inherited rules, pseudo elements, inline style and attribute styles.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles): Added maps and properties.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles): Parse pseudoElementRulesPayload
and inheritedRulesPayload.
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles): Parse inlineStylePayload and
attributesStylePayload.
(WebInspector.DOMNodeStyles.prototype.get inheritedRules): Added.
(WebInspector.DOMNodeStyles.prototype.get inlineStyle): Added.
(WebInspector.DOMNodeStyles.prototype.get attributesStyle): Added.
(WebInspector.DOMNodeStyles.prototype.get pseudoElements): Added.
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange): Check inherited,
inline, attributes and pseudo elements.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add WebInspector.CSSStyleDeclaration and WebInspector.CSSProperty and have DOMNodeStyles parse and create them.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js: Added.
(WebInspector.CSSProperty):
(WebInspector.CSSProperty.prototype.get ownerStyle):
(WebInspector.CSSProperty.prototype.set ownerStyle):
(WebInspector.CSSProperty.prototype.get index):
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get text):
(WebInspector.CSSProperty.prototype.get name):
(WebInspector.CSSProperty.prototype.get value):
(WebInspector.CSSProperty.prototype.get important):
(WebInspector.CSSProperty.prototype.get priority):
(WebInspector.CSSProperty.prototype.get enabled):
(WebInspector.CSSProperty.prototype.get overridden):
(WebInspector.CSSProperty.prototype.get implicit):
(WebInspector.CSSProperty.prototype.get valid):
(WebInspector.CSSProperty.prototype.get startStyleSheetTextPosition):
(WebInspector.CSSProperty.prototype.get endStyleSheetTextPosition):
(WebInspector.CSSProperty.prototype.get relatedShorthandProperty):
(WebInspector.CSSProperty.prototype.set relatedShorthandProperty):
(WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
(WebInspector.CSSProperty.prototype.addRelatedLonghandProperty):
(WebInspector.CSSProperty.prototype.clearRelatedLonghandProperties):
(WebInspector.CSSProperty.prototype.isActive):
* UserInterface/CSSStyleDeclaration.js: Added.
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.prototype.get id):
(WebInspector.CSSStyleDeclaration.prototype.get ownerStyleSheet):
(WebInspector.CSSStyleDeclaration.prototype.get type):
(WebInspector.CSSStyleDeclaration.prototype.get inherited):
(WebInspector.CSSStyleDeclaration.prototype.update):
(WebInspector.CSSStyleDeclaration.prototype.get ownerRule):
(WebInspector.CSSStyleDeclaration.prototype.set ownerRule):
(WebInspector.CSSStyleDeclaration.prototype.get text):
(WebInspector.CSSStyleDeclaration.prototype.get properties):
(WebInspector.CSSStyleDeclaration.prototype.get startStyleSheetTextPosition):
(WebInspector.CSSStyleDeclaration.prototype.get endStyleSheetTextPosition):
(WebInspector.CSSStyleDeclaration.prototype.get nodeStyles):
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles):
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload):
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
* UserInterface/Main.html:
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add WebInspector.CSSRule and WebInspector.CSSMedia and have DOMNodeStyles parse and create them.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSMedia.js: Added.
(WebInspector.CSSMedia):
(WebInspector.CSSMedia.prototype.get type):
(WebInspector.CSSMedia.prototype.get text):
(WebInspector.CSSMedia.prototype.get sourceCodeLocation):
* UserInterface/CSSRule.js: Added.
(WebInspector.CSSRule):
(WebInspector.CSSRule.prototype.get id):
(WebInspector.CSSRule.prototype.get ownerStyleSheet):
(WebInspector.CSSRule.prototype.update):
(WebInspector.CSSRule.prototype.get type):
(WebInspector.CSSRule.prototype.get sourceCodeLocation):
(WebInspector.CSSRule.prototype.get selectorText):
(WebInspector.CSSRule.prototype.get selectors):
(WebInspector.CSSRule.prototype.get matchedSelectorIndices):
(WebInspector.CSSRule.prototype.get style):
(WebInspector.CSSRule.prototype.get mediaList):
(WebInspector.CSSRule.prototype.get nodeStyles):
* UserInterface/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.get matchedRules):
(WebInspector.DOMNodeStyles.prototype._identifierToString):
(WebInspector.DOMNodeStyles.prototype._createSourceCodeLocation):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.markAsNeedsRefresh):
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange.checkRules):
(WebInspector.DOMNodeStyles.prototype._styleSheetContentDidChange):
* UserInterface/Main.html:
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DOMNodeStyles, a new class to inspect and manage styles for a node.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager): Added _nodeStylesMap.
(WebInspector.CSSStyleManager.prototype.stylesForNode): Added.
(WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Clear _nodeStylesMap.
* UserInterface/DOMNodeStyles.js: Added.
(WebInspector.DOMNodeStyles):
(WebInspector.DOMNodeStyles.prototype.get node):
(WebInspector.DOMNodeStyles.prototype.refreshIfNeeded):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh):
* UserInterface/Main.html: Added DOMNodeStyles.js.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Add WebInspector.CSSStyleSheet and start using it.
This replaces a collection of maps and content updating functions in CSSStyleManager
with a proper SourceCode subclass that manages its info, content and works with branches.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow): Listen for the change event on CSSStyleSheet.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Ditto.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager): Added event listeners for resources.
(WebInspector.CSSStyleManager.prototype.styleSheetForIdentifier): Added.
(WebInspector.CSSStyleManager.prototype.styleSheetChanged): Call noteContentDidChange and
_updateResourceContent.
(WebInspector.CSSStyleManager.prototype._mainResourceDidChange): Added. Clear the maps when the
main frame navigates.
(WebInspector.CSSStyleManager.prototype._resourceAdded): Added. Call _clearStyleSheetsForResource.
(WebInspector.CSSStyleManager.prototype._resourceTypeDidChange): Ditto.
(WebInspector.CSSStyleManager.prototype._clearStyleSheetsForResource): Added.
(WebInspector.CSSStyleManager.prototype._frameURLMapKey): Added.
(WebInspector.CSSStyleManager.prototype._lookupStyleSheetForResource.syleSheetsFetched): Use
_styleSheetFrameURLMap instead of _styleSheetInfoMap.
(WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Removed.
(WebInspector.CSSStyleManager.prototype._lookupStyleSheet): Updated function names.
(WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Ditto.
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetFound):
Use SourceCodeRevision to update the stylesheet content.
(WebInspector.CSSStyleManager.prototype._updateResourceContent): Added.
(WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent): Added.
(WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady): Added.
(WebInspector.CSSStyleManager.prototype._updateResourceContent.applyStyleSheetChanges): Added.
* UserInterface/CSSStyleSheet.js: Added.
(WebInspector.CSSStyleSheet):
(WebInspector.CSSStyleSheet.resetUniqueDisplayNameNumbers):
(WebInspector.CSSStyleSheet.prototype.get id):
(WebInspector.CSSStyleSheet.prototype.get parentFrame):
(WebInspector.CSSStyleSheet.prototype.get url):
(WebInspector.CSSStyleSheet.prototype.get urlComponents):
(WebInspector.CSSStyleSheet.prototype.get displayName):
(WebInspector.CSSStyleSheet.prototype.updateInfo):
(WebInspector.CSSStyleSheet.prototype.get revisionForRequestedContent):
(WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange.contentDidChange):
(WebInspector.CSSStyleSheet.prototype.handleCurrentRevisionContentChange):
(WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend):
(WebInspector.CSSStyleSheet.prototype.requestContentFromBackend):
(WebInspector.CSSStyleSheet.prototype.noteContentDidChange):
* UserInterface/Main.html: Added CSSStyleSheet.js.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.revisionContentDidChange): Call handleCurrentRevisionContentChange.
(WebInspector.SourceCode.prototype.handleCurrentRevisionContentChange): Added.
(WebInspector.SourceCode.prototype.get revisionForRequestedContent): Added.
(WebInspector.SourceCode.prototype.markContentAsStale): Added.
(WebInspector.SourceCode.prototype._processContent): Use revisionForRequestedContent.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Remove noteStyleSheetChanged and use the styleSheetChanged backend event.
The backend already tells us when a stylesheet changes, so we should use it
instead of trying to fire the event when we think it should.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSObserver.js:
(WebInspector.CSSObserver.prototype.styleSheetChanged): Call CSSStyleManager.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged): Moved to the top.
(WebInspector.CSSStyleManager.prototype.styleSheetChanged): Added.
(WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Removed.
* UserInterface/OldCSSProperty.js:
(WebInspector.OldCSSProperty.prototype.callback): Removed call to noteStyleSheetChanged.
(WebInspector.OldCSSProperty.prototype.setText): Ditto.
(WebInspector.OldCSSProperty.prototype.setDisabled): Ditto.
* UserInterface/OldCSSStyleDeclaration.js:
(WebInspector.OldCSSStyleDeclaration.prototype.insertPropertyAt): Removed call to noteStyleSheetChanged.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Create mappings between shorthand and longhand property names.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions): Create the mappings.
(WebInspector.CSSCompletions.prototype.longhandsForShorthand): Added.
(WebInspector.CSSCompletions.prototype.shorthandsForLonghand): Added.
2013-02-11 Timothy Hatcher <timothy@apple.com>
Rename current CSS model classes to have "Old" prefixes.
This is in preparation for a new and improved CSS model classes.
<rdar://problem/7206272&12526319>
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.parseRuleArrayPayload):
(WebInspector.CSSStyleManager.prototype.):
(WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
(WebInspector.CSSStyleManager.prototype.getComputedStyleAsync):
(WebInspector.CSSStyleManager.prototype.getInlineStylesAsync):
* UserInterface/Main.html:
* UserInterface/OldCSSMedia.js: Renamed from WebInspector/UserInterface/CSSMedia.js.
* UserInterface/OldCSSProperty.js: Renamed from WebInspector/UserInterface/CSSProperty.js.
* UserInterface/OldCSSRule.js: Renamed from WebInspector/UserInterface/CSSRule.js.
* UserInterface/OldCSSStyleDeclaration.js: Renamed from WebInspector/UserInterface/CSSStyleDeclaration.js.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection):
(WebInspector.StylePropertiesSection.prototype.onpopulate):
2013-02-12 Antoine Quint <graouts@apple.com>
<rdar://problem/11053300> Profile recording button falsely indicates "recording" if started and then page navigates or refreshes
We now correctly keep the recording state across a page reload,
only resetting it, as well as removing any previous profile, when
we navigate away from the current page.
To do so, we alert the sidebar panel when a profile is interrupted
such that any old tree item for this profile is pruned and the
state of the profile recording button is updated to match that of
the profiler. Additionally, when the main frame is refreshed, we
attempt to resume profiling by looking for existing, though stale,
profile objects, and creating a new one as needed. In cases where
we navigate to a new frame, the "Cleared" event is dispatched and
the sidebar panel empties itself.
Finally, we ensure that the number set for the profile's title
reflects the current list of profiles of this type and that any
selected CSS profile's content view is hidden if the profile list
is cleared.
Note that profiles that were recorded prior to the current load
will show an empty content view unless they had also been selected
prior to a subsequent load. This is a known issue and will be fixed
with a followup task.
Reviewed by Timothy Hatcher.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
(WebInspector.InstrumentSidebarPanel.prototype._profilingInterrupted):
(WebInspector.InstrumentSidebarPanel.prototype._titleForProfile):
(WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.initialize):
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile):
(WebInspector.ProfileManager.prototype._mainResourceDidChange):
(WebInspector.ProfileManager.prototype._checkForInterruptions):
(WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
2013-02-12 Antoine Quint <graouts@apple.com>
<rdar://problem/13171934> Control+click on toolbar doesn't bring up toolbar context menu items
Don't do any custom handling of mousedown events on the toolbar if
the control key was pressed.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector._toolbarMouseDown):
2013-02-11 Antoine Quint <graouts@apple.com>
<rdar://problem/10854712> REGRESSION (Safari 6): It's hard to see at a glance if a page has any JS/HTML errors/warnings
We add a new DashboardManager singleton which taps into events exposed
by other managers and classes in order to monitor resources, timeline
records and console messages and display the respective counts in a
DashboardView. The DashboardView knows how to lay itself out in the
various toolbar modes and lets the user jump to various parts of the
inspector upon clicking its outlets, while providing useful information
as the user hovers over the item with the mouse.
Reviewed by Timothy Hatcher and Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DashboardManager.js: Added.
(WebInspector.DashboardManager):
(WebInspector.DashboardManager.prototype._resourceWasAdded):
(WebInspector.DashboardManager.prototype._resourcesWereCleared):
(WebInspector.DashboardManager.prototype._frameWasAdded):
(WebInspector.DashboardManager.prototype._resourceSizeDidChange):
(WebInspector.DashboardManager.prototype._timelineRecordingStarted):
(WebInspector.DashboardManager.prototype._updateTime):
(WebInspector.DashboardManager.prototype._consoleMessageAdded):
(WebInspector.DashboardManager.prototype._consoleMessageWasRepeated):
(WebInspector.DashboardManager.prototype._incrementConsoleMessageType):
(WebInspector.DashboardManager.prototype._consoleWasCleared):
* UserInterface/DashboardView.css: Added.
(.dashboard):
(.dashboard > .item):
(.dashboard > .item > *):
(.dashboard > .item > img):
(.dashboard > .item.enabled > img):
(.dashboard > .item.enabled:hover > img):
(.dashboard > .item > div):
(.dashboard > .item.issues > div > div):
(.dashboard > .item.enabled > div):
(.dashboard > .item.enabled:hover > div):
(.dashboard > .resources > img):
(.dashboard > .time > img):
(.dashboard > .logs > img):
(.dashboard > .memory > img):
(.dashboard > .errors > img):
(.dashboard > .errors.enabled > img):
(.dashboard > .errors.enabled:hover > img):
(.dashboard > .errors.enabled > div):
(.dashboard > .errors.enabled:hover > div):
(.dashboard > .issues > img):
(.dashboard > .issues.enabled > img):
(.dashboard > .issues.enabled:hover > img):
(.dashboard > .issues.enabled > div):
(.dashboard > .issues.enabled:hover > div):
(.toolbar.normal-size.icon-and-label-horizontal > .item-section > .dashboard):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .item):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .time):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
(.toolbar.small-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .item):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .resources):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .time):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .logs):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .memory):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .errors):
(.toolbar.normal-size.icon-and-label-vertical > .item-section > .dashboard > .issues):
* UserInterface/DashboardView.js: Added.
(WebInspector.DashboardView):
(WebInspector.DashboardView.prototype.get logs):
(WebInspector.DashboardView.prototype.set logs):
(WebInspector.DashboardView.prototype.get issues):
(WebInspector.DashboardView.prototype.set issues):
(WebInspector.DashboardView.prototype.get errors):
(WebInspector.DashboardView.prototype.set errors):
(WebInspector.DashboardView.prototype.set memory):
(WebInspector.DashboardView.prototype.set time):
(WebInspector.DashboardView.prototype.get resourcesCount):
(WebInspector.DashboardView.prototype.set resourcesCount):
(WebInspector.DashboardView.prototype.get resourcesSize):
(WebInspector.DashboardView.prototype.set resourcesSize):
(WebInspector.DashboardView.prototype._appendElementForNamedItem):
(WebInspector.DashboardView.prototype._itemWasClicked):
(WebInspector.DashboardView.prototype._resourcesWasClicked):
(WebInspector.DashboardView.prototype._timeWasClicked):
(WebInspector.DashboardView.prototype._consoleItemWasClicked):
(WebInspector.DashboardView.prototype._updateResourcesOutlet):
(WebInspector.DashboardView.prototype._setItemEnabled):
* UserInterface/Images/Errors.svg: Added.
* UserInterface/Images/ErrorsEnabled.svg: Added.
* UserInterface/Images/Issues.svg: Added.
* UserInterface/Images/IssuesEnabled.svg: Added.
* UserInterface/Images/Logs.svg: Added.
* UserInterface/Images/Memory.svg: Added.
* UserInterface/Images/Resources.svg: Added.
* UserInterface/Images/Time.svg: Added.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.increaseSize):
2013-02-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13184288> REGRESSION: Undo / Redo no longer works in QuickConsole
Reviewed by Timothy Hatcher.
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut):
(WebInspector.KeyboardShortcut._handleKeyDown):
(WebInspector.KeyboardShortcut.prototype.get implicitlyPreventsDefault):
(WebInspector.KeyboardShortcut.prototype.set implicitlyPreventsDefault):
By default keyboard shortcuts prevent default. Allow the KeyboardShortcut
to opt out of implicitly preventing default. That way a keyboard shortcut
can be added that does not prevent default.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
The undo and redo keyboard shortcuts will not implicitly prevent default.
(WebInspector._undoKeyboardShortcut):
(WebInspector._redoKeyboardShortcut):
Do not trigger WebInspector.undo or redo if the key event triggered
while in a text field. Instead let the event bubble to get default
text editing behavior.
2013-02-08 Timothy Hatcher <timothy@apple.com>
Only record the load event time for the main frame.
Reviewed by Antoine Quint.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Check the frameId against the
mainFrame's id before setting _loadEventTime.
2013-02-07 Timothy Hatcher <timothy@apple.com>
Make CSS autocompletion work again when editing a property.
<rdar://problem/13058573> REGRESSION: CSS autocompletion broken after OpenSource r123612
Reviewed by Joseph Pecoraro.
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions): Support the change in format of values.
2013-02-07 Antoine Quint <graouts@apple.com>
<rdar://problem/13162142> Contextual menu items on the toolbar are missing
Pass the event when creating a ContextMenu object instead on calling show().
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype._handleContextMenuEvent):
2013-02-07 Joseph Pecoraro <pecoraro@apple.com>
Merge OpenSource r116305 to fix TextPrompt event listener and style leaks.
Reviewed by Timothy Hatcher.
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.prototype.detach):
2013-02-05 Antoine Quint <graouts@apple.com>
<rdar://problem/11007445> PARITY (WebKit Web Inspector): Support Undo/Redo for DOM changes
Wire up Cmd+Z and Cmd+Shift+Z keyboard shortcuts to call DOMAgent's
undo() and redo() methods while marking DOM and CSS editing tasks
as undoable via the DOMAgent's markUndoableState() method.
Reviewed by Timothy Hatcher.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.callback):
(WebInspector.CSSProperty.prototype.setText):
(WebInspector.CSSProperty.prototype.setDisabled):
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.):
(WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier):
(WebInspector.CSSStyleManager.prototype.callback):
(WebInspector.CSSStyleManager.prototype.setRuleSelector):
(WebInspector.CSSStyleManager.prototype.addRule):
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.setNodeName):
(WebInspector.DOMNode.prototype.setNodeValue):
(WebInspector.DOMNode.prototype.setAttribute):
(WebInspector.DOMNode.prototype.setAttributeValue):
(WebInspector.DOMNode.prototype.):
(WebInspector.DOMNode.prototype.removeAttribute):
(WebInspector.DOMNode.prototype.setOuterHTML):
(WebInspector.DOMNode.prototype.removeNode):
(WebInspector.DOMNode.prototype.moveTo):
(WebInspector.DOMNode.prototype.setPseudoClassEnabled):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.undo):
(WebInspector.redo):
2013-02-05 Antoine Quint <graouts@apple.com>
<rdar://problem/11133526> PARITY (WebKit Web Inspector): Ability to force pseudo state for an element is missing
In order to show submenu items in contextual menus in the Web Inspector, we update ContextMenu.js
to be the latest from OpenSource and update the way we use this API in our code so that the event
is provided at construction time rather than when calling the .show() method.
We also have to update the RWI-specific front-end host in order to recognize the new "subMenu"
contextual menu item type and handle its items to show as a submenu item in the NSMenu we
create.
Then, we allow the possibility to enforce certain pseudo-classes on a DOMNode, which triggers
a new event that the style and appearance panels listen to in order to refresh their display
and account for any style changes that may result from a pseudo-class being forced.
Finally, we add new menu items to the contextual menu of a DOM node in the inspector's DOM
tree to allow to "Force CSS Pseudo-Classes".
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/ContextMenu.js:
(WebInspector.ContextMenuItem):
(WebInspector.ContextMenuItem.prototype.id):
(WebInspector.ContextMenuItem.prototype.type):
(WebInspector.ContextMenuItem.prototype.isEnabled):
(WebInspector.ContextMenuItem.prototype.setEnabled):
(WebInspector.ContextMenuItem.prototype._buildDescriptor):
(WebInspector.ContextSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype.appendSeparator):
(WebInspector.ContextSubMenuItem.prototype._pushItem):
(WebInspector.ContextSubMenuItem.prototype.isEmpty):
(WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
(WebInspector.ContextMenu):
(WebInspector.ContextMenu.prototype.nextId):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype.showSoftMenu):
(WebInspector.ContextMenu.prototype._setHandler):
(WebInspector.ContextMenu.prototype._buildDescriptor):
(WebInspector.ContextMenu.prototype._itemSelected):
(WebInspector.ContextMenu.prototype.appendApplicableItems):
(WebInspector.ContextMenu.Provider):
(WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
(WebInspector.ContextMenu.registerProvider):
* UserInterface/DOMNode.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.isXMLNode):
(WebInspector.DOMNode.prototype.get enabledPseudoClasses):
(WebInspector.DOMNode.prototype.setPseudoClassEnabled):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
(WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems.string_appeared_here.forEach):
(WebInspector.DOMTreeElement.prototype._populateForcedPseudoStateItems):
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
(WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
* UserInterface/Utilities.js:
2013-02-04 Jessie Berlin <jberlin@apple.com>
Ran update-safari-localizable-strings.
* Localizations/en.lproj/localizedStrings.js:
2013-02-04 Antoine Quint <graouts@apple.com>
<rdar://problem/13042270> Debugger should be smarter about hovered tokens
When notifying that we're hovering a new token, keep going through
previous tokens on the same line to find other expressions and .
so that a full property chain can be resolved. The result is now
stored in a new "fullExpression" property on the "hoveredToken" object.
Additionally, the bounds of the token are now those of the full expression
such that highlight is correct and the highlight-related APIs have been
renamed to work within the context of an expression and not a token.
While this patch doesn't handle expressions across several lines, it gets
us to parity with what the OpenSource Web Inspector knows how to handle.
Reviewed by Joseph Pecoraro.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.highlightHoveredExpression):
(WebInspector.TextEditor.prototype.removeHighlightOnHoveredExpression):
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
(WebInspector.TextEditor.prototype._checkHoveredToken):
2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13137010> Console toggle split / full-height button is showing the wrong direction
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.shown):
(WebInspector.LogContentView.prototype._toggleSplit):
Always update the toggle button whenever the log content view is shown.
* UserInterface/Main.js:
(WebInspector.toggleSplitConsole):
This no longer needs to return true or false, so clean it up.
2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/13137050> Clicking Console button in main toolbar should always toggle the console, even if no back history
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.toggleConsoleView):
When toggling and there is no history, open the source code for the main resource.
2013-02-01 Timothy Hatcher <timothy@apple.com>
Add the ability to resize the split console.
Part of: <rdar://problem/13118771> Unify the quick console and full console
Reviewed by Joseph Pecoraro.
* UserInterface/Main.css:
(#split-content-browser > .navigation-bar): Use row-resize cursor.
(#split-content-browser > .navigation-bar .item:not(.flexible-space)): Use default cursor.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added height setting and event listener. Call _updateSplitConsoleHeight.
(WebInspector._updateSplitConsoleHeight): Added.
(WebInspector._consoleResizerMouseDown): Added.
(WebInspector._consoleResizerMouseDown.dockedResizerDrag): Added.
(WebInspector._consoleResizerMouseDown.dockedResizerDragEnd): Added.
2013-01-30 Timothy Hatcher <timothy@apple.com>
Gut the old Quick Console except the prompt and make the Console view use the Quick Console prompt.
Part of: <rdar://problem/13118771> Unify the quick console and full console
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Use the quick console prompt. Don't append a <br> now that the prompt
isn't in the view.
(WebInspector.LogContentView.prototype.didAppendConsoleMessage): Added.
(WebInspector.LogContentView.prototype.promptDidChangeHeight): Added.
* UserInterface/QuickConsole.css: Removed unused rules.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.updateLayout): Just call _updateSize.
(WebInspector.QuickConsole.prototype._updateSize): Added.
(WebInspector.QuickConsole.prototype._toggleOrFocus): Call WebInspector.toggleConsoleView.
2013-01-30 Timothy Hatcher <timothy@apple.com>
Add the ability to show a second content browser at the bottom for the console view.
Part of: <rdar://problem/13118771> Unify the quick console and full console
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.get element): Added.
* UserInterface/Images/SplitToggleDown.pdf: Added.
* UserInterface/Images/SplitToggleUp.pdf: Added.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole): Use toggleConsoleView instead.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Create a navigation item for toggling the split.
(WebInspector.LogContentView.prototype.get navigationItems): Include the new item.
(WebInspector.LogContentView.prototype._toggleSplit): Added.
* UserInterface/Main.css:
(#split-content-browser): Added.
* UserInterface/Main.html: Added #split-content-browser element.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create settings and the split content browser.
(WebInspector.prefersUsingSplitConsole): Added.
(WebInspector.isShowingSplitConsole): Added.
(WebInspector.toggleSplitConsole): Added.
(WebInspector.showSplitConsole): Added.
(WebInspector.hideSplitConsole): Added.
(WebInspector.showFullHeightConsole): Added.
(WebInspector.isShowingConsoleView): Added.
(WebInspector.showConsoleView): Call showSplitConsole or showFullHeightConsole.
(WebInspector.toggleConsoleView): Added.
(WebInspector._contentBrowserCurrentContentViewDidChange): Added. Update the console
button activated state.
2013-02-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12808694> Enter and Shift+Enter should search forward and backwards
Reviewed by Antoine Quint.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner):
Initialize new member variables.
(WebInspector.FindBanner.prototype._inputFieldKeyDown):
(WebInspector.FindBanner.prototype._inputFieldKeyUp):
Track when the shift key is down inside the search field. Also track
when the enter key is pressed to trigger the input's "search" event.
We only want to respect shift when the user hits enter to search.
(WebInspector.FindBanner.prototype._inputFieldSearch):
If the search value stayed the same, and there are search results,
and the user hit enter, then search forwards or backwards.
2013-01-31 Antoine Quint <graouts@apple.com>
Followup fixes after <rdar://problem/11279186> REGRESSION (Safari 6): Timeline
view missing type filters. Addresses the good feedback from JoePeck.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
* UserInterface/TimelinesContentView.js:
2013-01-31 Antoine Quint <graouts@apple.com>
<rdar://problem/13085826> Add stubs for new Page protocol events (frameStartedLoading, etc.)
WebCore added a bunch of Page events in http://trac.webkit.org/changeset/140649. We're
registering them and providing stub handlers until we actually do something with them.
This removes some annoying errors in the Inception console output.
Reviewed by Timothy Hatcher.
* UserInterface/InspectorBackendCommands.js:
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.prototype.frameDetached):
(WebInspector.PageObserver.prototype.frameStartedLoading):
(WebInspector.PageObserver.prototype.frameStoppedLoading):
(WebInspector.PageObserver.prototype.frameScheduledNavigation):
(WebInspector.PageObserver.prototype.frameClearedScheduledNavigation):
2013-01-31 Antoine Quint <graouts@apple.com>
Followup fix to <rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages.
* UserInterface/ProfileView.js:
(WebInspector.ProfileView):
2013-01-30 Antoine Quint <graouts@apple.com>
<rdar://problem/13115633> JavaScript profiles percentage values don't have the "%" symbol in them
Ensure we add the "%" symbol to values reported in the JS profile data
grid when percents are used.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.get data):
2013-01-30 Antoine Quint <graouts@apple.com>
<rdar://problem/13101516> REGRESSION: JavaScript profile recorded from Web Inspector UI never finishes
Two changes made in WebCore broke our support for JavaScript profiling. The first introduced by
http://trac.webkit.org/changeset/126580 was that ProfilerAgent.getProfileHeaders() needed to be
called for any addProfileHeader event to be dispatched to the front-end. The second issue was
introduced by http://trac.webkit.org/changeset/139998 which changed the backend API in a non-
backward-compatible way so that ProfilerAgent.getProfile() was split in two methods:
getCPUProfile() and getHeapSnapshot().
This patch simply adds a call to ProfilerAgent.getProfileHeaders() as soon as the ProfilerAgent
is enabled and also changes the backend we register and call to get the profile to use the
most current WebCore API.
Reviewed by Timothy Hatcher.
* UserInterface/InspectorBackendCommands.js:
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView):
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager):
2013-01-29 Timothy Hatcher <timothy@apple.com>
Stop showing "undefined" and empty scope bar items in the Timeline view.
<rdar://problem/13109468>
Reviewed by Joseph Pecoraro.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._makeColumnScopeBar): Check the type of the value,
not the type of the key.
2013-01-29 Antoine Quint <graouts@apple.com>
<rdar://problem/11279186> REGRESSION (Safari 6): Timeline view missing type filters
We now add a ScopeBar above the data grid shown for the currently selected record
type as the data grid is hovered. The filtered type is set by adding a .scopeBar
property on the column descriptor and the filtering code is ready to be able to
deal with multiple filterable types per data grid if/when we decide to do this.
However, the UI code only knows how to handle one filterable column per data grid
as it stands. The scope bar showing above the data grid fits snuggly where the timeline
would usually show and has a 10px invisible padding at the top to ensure the user
doesn't mouse out of it too easily.
The hot path _updatePendingRecordsWithNewBounds was updated to filter the pending
records taking into account the current filters, and a new _refreshAllRecordsForCurrentDataGrid
method was added to deal with changes of filters, which takes a less optimized and
more brutal path.
Reviewed by Timothy Hatcher.
* UserInterface/ScopeBar.js:
(WebInspector.ScopeBar.prototype.get defaultItem):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid > .navigation-bar-container):
(.content-view.timelines > .data-grid:hover > .navigation-bar-container):
(.content-view.timelines > .data-grid > .navigation-bar-container > .navigation-bar):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
(WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
(WebInspector.TimelinesContentView.prototype._makeColumnScopeBar):
(WebInspector.TimelinesContentView.prototype._dataGridFiltersDidChange):
(WebInspector.TimelinesContentView.prototype._refreshAllRecordsForCurrentDataGrid):
(WebInspector.TimelinesContentView.prototype.filterableValueForRecordAndIdentifier):
(WebInspector.TimelinesContentView.prototype._filterRecordsWithType):
2013-01-29 Antoine Quint <graouts@apple.com>
<rdar://problem/10981607> REGRESSION (Safari 6): CSS and JavaScript profiles need a visible way to toggle between absolute times and percentages
Refactoring the CSSSelectorProfileView and JavaScriptProfileView classes to both
inherit from the new ProfileView class which provide a navigation bar item to
toggle how times are displayed (absolute times vs. a percentage) via a % icon.
This was also the chance to simplify the settings used in the JavaScriptProfileView
which used three different settings for the self, total and average columns. Now these
columns shared the same setting.
Note that part of this patch is speculative due to <rdar://problem/13101516> REGRESSION:
Profile recorded from Web Inspector UI never finishes.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView):
(WebInspector.CSSSelectorProfileView.prototype.toggleTimeDisplay):
(WebInspector.CSSSelectorProfileView.prototype._sortProfile):
* UserInterface/Images/Percent.pdf: Added.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.profileCallback):
(WebInspector.JavaScriptProfileView):
(WebInspector.JavaScriptProfileView.prototype.toggleTimeDisplay):
* UserInterface/Main.html:
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.get data):
* UserInterface/ProfileView.js: Added.
(WebInspector.ProfileView):
(WebInspector.ProfileView.prototype.get navigationItems):
(WebInspector.ProfileView.prototype.get profile):
(WebInspector.ProfileView.prototype.set profile):
(WebInspector.ProfileView.prototype.toggleTimeDisplay):
2013-01-26 Timothy Hatcher <timothy@apple.com>
Update CodeMirror to from 3.0 to 3.0.2.
https://github.com/marijnh/CodeMirror/compare/v3.0...v3.02
Reviewed by Ricky Mondello.
* UserInterface/External/CodeMirror/LICENSE: Updated.
* UserInterface/External/CodeMirror/codemirror.css: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/css.js: Updated.
* UserInterface/External/CodeMirror/javascript.js: Updated.
* UserInterface/External/CodeMirror/runmode.js: Updated.
* UserInterface/External/CodeMirror/searchcursor.js: Updated.
* UserInterface/External/CodeMirror/xml.js: Updated.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror pre): Dropped the ":not(.CodeMirror-cursor)".
Since CodeMirror-cursor is now a div.
2013-01-25 Timothy Hatcher <timothy@apple.com>
Account for a difference in how frames load about:blank.
There was a change in how about:blank frame loads are reported over the Inspector
protocol that was causing a far reaching exception to break parts of the Inspector.
<rdar://problem/13067806> REGRESSION: Timeline fail to record anything in some cases
Reviewed by Antoine Quint.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): If the frame isn't known, then
create a new resource which will make a new frame. Mark is as loaded at the end too since we don't
expect any more events about the load finishing for these frames.
2013-01-24 Timothy Hatcher <timothy@apple.com>
Reduce the number layouts and style recalculations when switching views or updating
the navigation bar when the selection changes.
<rdar://problem/12975185> 30 second hang inspecting scrolling perf results page
<rdar://problem/11349044> Changing element selection in the Web Inspector hangs
for ~2s because JavaScript forces 27 layouts
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components): Use updateLayoutSoon.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.insertNavigationItem): Use updateLayoutSoon. Remove explicit
call to _updateStyle and set _needsStyleUpdated instead.
(WebInspector.NavigationBar.prototype.removeNavigationItem): Ditto.
(WebInspector.NavigationBar.prototype.updateLayoutSoon): Added.
(WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Added.
(WebInspector.NavigationBar.prototype.updateLayout): Clear _needsLayout. Call _updateStyle if
_needsStyleUpdated is true.
(WebInspector.NavigationBar.prototype._updateStyle): Clear _needsStyleUpdated.
* UserInterface/NavigationItem.js:
(WebInspector.NavigationItem.prototype.set hidden): Use updateLayoutSoon.
2013-01-24 Timothy Hatcher <timothy@apple.com>
Show the resource and line info in the Initiator column, next to the function name.
This helps further identify which file and line the event occurred on without needing
to hover for the tooltip.
Reviewed by Joseph Pecoraro.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Add a subtitle
element so the resource name is visible.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid td .subtitle::before): Added. Show a emdash
before the subtitle.
2013-01-23 Timothy Hatcher <timothy@apple.com>
Make editing CSS resources work and update the page live.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Implement the FIXME.
(WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiersForResource): Added.
(WebInspector.CSSStyleManager.prototype._lookupStyleSheetIdentifiers): Added.
(WebInspector.CSSStyleManager.prototype._setContentForStyleSheetIdentifier): Added.
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange): Added.
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges): Added.
(WebInspector.CSSStyleManager.prototype._resourceContentDidChange.applyStyleSheetChanges.styleSheetIdentifiersFound): Added.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.set currentRevision): Fire ContentDidChange event.
(WebInspector.SourceCode.prototype.revisionContentDidChange): Ditto.
(WebInspector.SourceCode.prototype._processContent): Ignore content change events for original content.
* UserInterface/SourceCodeRevision.js:
(WebInspector.SourceCodeRevision.prototype.set content): Call revisionContentDidChange on SourceCode.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Listen for change event.
(WebInspector.TextEditor.prototype.set string): Ignore change event when setting the string.
(WebInspector.TextEditor.prototype.get readOnly): Added.
(WebInspector.TextEditor.prototype.set readOnly): Added.
(WebInspector.TextEditor.prototype._contentChanged): Added.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Listen for SourceCode ContentDidChange event.
(WebInspector.TextResourceContentView.prototype.closed): Remove ContentDidChange event listener.
(WebInspector.TextResourceContentView.prototype._contentWillPopulate): Make editor writable for CSS.
(WebInspector.TextResourceContentView.prototype._sourceCodeContentDidChange): Added. Update editor content.
(WebInspector.TextResourceContentView.prototype._textEditorContentDidChange): Added. Update source code content.
2013-01-22 Timothy Hatcher <timothy@apple.com>
Clean up how CSSStyleManager tracks stylesheet changes.
Replaces _fireStyleSheetChanged with noteStyleSheetChanged and populates stylesheet
identifiers for later use.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* UserInterface/CSSProperty.js:
(WebInspector.CSSProperty.prototype.callback): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
(WebInspector.CSSProperty.prototype.setText): Ditto.
(WebInspector.CSSProperty.prototype.setDisabled): Ditto.
* UserInterface/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged): Added.
(WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.gotStyleSheetText): Added.
(WebInspector.CSSStyleManager.prototype.noteStyleSheetChanged.syleSheetsFetched): Added.
(WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): Added. Populate the identifier maps.
(WebInspector.CSSStyleManager.prototype.setRuleSelector): Use noteStyleSheetChanged instead of _fireStyleSheetChanged.
(WebInspector.CSSStyleManager.prototype.addRule): Ditto.
* UserInterface/CSSStyleSheet.js: Removed.
* UserInterface/Main.html: Removed CSSStyleSheet.js.
2013-01-22 Timothy Hatcher <timothy@apple.com>
Add a BranchManager class for tracking various branches.
There are two initial branches -- Original and Working Copy. Currently
the Working Copy is always the current branch, but this will be controllable
from the user interface at some point.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BranchManager.js: Added.
(WebInspector.BranchManager):
(WebInspector.BranchManager.prototype.get branches):
(WebInspector.BranchManager.prototype.get currentBranch):
(WebInspector.BranchManager.prototype.set currentBranch):
(WebInspector.BranchManager.prototype.createBranch):
(WebInspector.BranchManager.prototype.deleteBranch):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded): Instantiate BranchManager.
2013-01-22 Timothy Hatcher <timothy@apple.com>
Add a SourceCodeRevision class for recording changes to SourceCode objects.
Offloads the the content and contentIsBase64Encoded properties to SourceCodeRevision.
SourceCode now creates an original revision that holds the original content. In addition
to the original revision, there is a current revision that can be set to point to different
content based on the original.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* UserInterface/Branch.js:
(WebInspector.Branch.prototype.revisionForRepresentedObject): Added. Helper for finding or
creating a new revision for an object.
* UserInterface/Main.html:
* UserInterface/SourceCode.js:
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.get originalRevision): Added.
(WebInspector.SourceCode.prototype.get currentRevision): Added.
(WebInspector.SourceCode.prototype.set currentRevision): Added.
(WebInspector.SourceCode.prototype.get content): Use currentRevision.
(WebInspector.SourceCode.prototype.get contentIsBase64Encoded): Use currentRevision.
(WebInspector.SourceCode.prototype._processContent): Set originalRevision content.
* UserInterface/SourceCodeRevision.js: Added.
(WebInspector.SourceCodeRevision):
(WebInspector.SourceCodeRevision.prototype.get sourceCode):
(WebInspector.SourceCodeRevision.prototype.get content):
(WebInspector.SourceCodeRevision.prototype.set content):
(WebInspector.SourceCodeRevision.prototype.get contentIsBase64Encoded):
(WebInspector.SourceCodeRevision.prototype.set contentIsBase64Encoded):
(WebInspector.SourceCodeRevision.prototype.apply): Set currentRevision to point to this.
(WebInspector.SourceCodeRevision.prototype.revert): Set currentRevision to point to the original.
(WebInspector.SourceCodeRevision.prototype.copy): Copy the content and create a new SourceCodeRevision.
2013-01-22 Timothy Hatcher <timothy@apple.com>
Add a BranchManager class for tracking various branches.
There are two initial branches -- Original and Working Copy. Currently
the Working Copy is always the current branch, but this will be controllable
from the user interface at some point.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BranchManager.js: Added.
(WebInspector.BranchManager):
(WebInspector.BranchManager.prototype.get branches):
(WebInspector.BranchManager.prototype.get currentBranch):
(WebInspector.BranchManager.prototype.set currentBranch):
(WebInspector.BranchManager.prototype.createBranch):
(WebInspector.BranchManager.prototype.deleteBranch):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded): Instantiate BranchManager.
2013-01-22 Timothy Hatcher <timothy@apple.com>
Add a Branch and Revision class for tracking edits in the Inspector.
These classes are not used yet and will be used in subsequent changes.
A branch holds revisions that are differences from the original page.
Concrete revision subclasses will know the specifics about the edited
part of the page and how to apply or revert the change.
<rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Reviewed by Joseph Pecoraro.
* UserInterface/Branch.js: Added.
(WebInspector.Branch):
(WebInspector.Branch.prototype.get displayName):
(WebInspector.Branch.prototype.set displayName):
(WebInspector.Branch.prototype.get revisions):
(WebInspector.Branch.prototype.get locked):
(WebInspector.Branch.prototype.addRevision):
(WebInspector.Branch.prototype.removeRevision):
(WebInspector.Branch.prototype.reset):
(WebInspector.Branch.prototype.apply):
(WebInspector.Branch.prototype.revert):
(WebInspector.Branch.prototype.lock):
(WebInspector.Branch.prototype.unlock):
* UserInterface/Main.html:
* UserInterface/Revision.js: Added.
(WebInspector.Revision):
(WebInspector.Revision.prototype.apply):
(WebInspector.Revision.prototype.revert):
(WebInspector.Revision.prototype.copy):
2013-01-22 Timothy Hatcher <timothy@apple.com>
Move contentURL from SourceCode to Resource since _mimeType is
only available on Resource.
Reviewed by Antoine Quint.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get contentURL): Added.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.get contentURL): Removed.
2013-01-23 Antoine Quint <graouts@apple.com>
<rdar://problem/13069440> Switching away from debugger using keyboard shortcut retains popover on screen
Dismiss the popover upon hiding the debugger.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.hidden):
2013-01-23 Antoine Quint <graouts@apple.com>
<rdar://problem/13059630> Move debugger popover display support to SourceCodeTextEditor
Split code between TextEditor and SourceCodeTextEditor such that TextEditor handles all
the user interaction and the interfacing with CodeMirror and notifies subclasses using
the .tokenWasHovered() method and keeping the currently hovered token in .hoveredToken.
This token contains the bounds of the hovered token as well as its expression, type,
start and end characters information.
Reviewed by Timothy Hatcher.
* UserInterface/SourceCodeTextEditor.css:
(.popover .debugger-popover-content):
(.popover .expandable):
(.popover .debugger-popover-content .title):
(.popover .debugger-popover-content .body):
(.popover .debugger-popover-content.function .body):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered.populate):
(WebInspector.SourceCodeTextEditor.prototype.tokenWasHovered):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
(WebInspector.SourceCodeTextEditor.prototype.willDismissPopover):
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .hovered-token-highlight):
(@-webkit-keyframes text-editor-hovered-token-highlight-fadeout):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.startTrackingTokenHovering):
(WebInspector.TextEditor.prototype.stopTrackingTokenHovering):
(WebInspector.TextEditor.prototype.handleEvent):
(WebInspector.TextEditor.prototype.highlightHoveredToken):
(WebInspector.TextEditor.prototype.removeHighlightOnHoveredToken):
(WebInspector.TextEditor.prototype.tokenWasHovered):
(WebInspector.TextEditor.prototype._openClickedLinks):
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
(WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
(WebInspector.TextEditor.prototype._checkHoveredToken):
2013-01-22 Antoine Quint <graouts@apple.com>
<rdar://problem/13059425> Console filters should persist across sessions
Make ScopeBarItem save their selected state in a WebInspector.Setting that
we read from to set the initial state. This change requires consumers of the
ScopeBar class to ensure they don't just rely on selection change events
but also run an initial update to match selected ScopeBarItems upon creation,
so we update LogContentView to do this.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
* UserInterface/ScopeBar.js:
(WebInspector.ScopeBar):
(WebInspector.ScopeBar.prototype.get selectedItems):
(WebInspector.ScopeBar.prototype._populate):
(WebInspector.ScopeBar.prototype._itemSelectionDidChange):
* UserInterface/ScopeBarItem.js:
(WebInspector.ScopeBarItem):
(WebInspector.ScopeBarItem.prototype.get selected):
(WebInspector.ScopeBarItem.prototype.setSelected):
(WebInspector.ScopeBarItem.prototype._markElementSelected):
2013-01-22 Antoine Quint <graouts@apple.com>
<rdar://problem/11651957> REGRESSION (Safari 6): Does not show var value on hover in the debugger
Display a popover for any variable or function definition in the text editor
hovered long enough (500ms) during a debugging session. The popover contains
the expression as evaluated by the DebuggerAgent. Each value type has a specialized
display as borrowed from OpenSource code (from ObjectPopoverHelper) and adapted to fit
our coding style.
We do a fair bit of nifty work to avoid unwanted actions. For instance, we track mouseout
events to identify when the user mouses out of the editor so that we can reset the hover
state and avoid having whatever was the last hovered token show a popover even though we
may have exited the editor along the way. Additionally, we track the pressed state of the
mouse button to avoid having the popover show during a selection.
We're also making various enhancements to the Popover class to support the attachment of
popovers to tokens in the TextEditor as the debugger is paused. Here are the highlights:
- adopt UIKit-like terminology for present/dismiss methods.
- let consumers of the Popover API provide bounds instead of an element as a reference to
which the popover should be attached, removing the dependency on having an element to work with.
- make the popover's element private since it really needs not to be customised as presentation
is fully managed by the popover itself, however allow a `content` element to be provided to
the .present() method and letting the popover host it as needed.
- no longer remove the popover on window blur as OpenSource leaves it on display and it makes
debugging of the popover difficult.
- handle padding of the popover frame in code for computations of the tighter bounding box
as we can't have it done in CSS until we already know what edge we end up using for the popover.
- begin to offer a delegation protocol for popovers, right now willDismiss / didDismiss.
- horizontal and vertically align content that is smaller than the minimal bounds of the popover.
Reviewed by Joseph Pecoraro and Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/Popover.css:
(.popover):
(.popover > .container):
(.popover > .container.center):
(.popover.arrow-up > .container):
(.popover.arrow-right > .container):
(.popover.arrow-down > .container):
(.popover.arrow-left > .container):
* UserInterface/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.set frame):
(WebInspector.Popover.prototype.present):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._cssClassNameForEdge):
(WebInspector.Popover.prototype._bestFrameForEdge):
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .popover-highlight):
(@-webkit-keyframes text-editor-popover-highlight-fadeout):
(to):
(.popover .debugger-popover-content):
(.popover .expandable):
(.popover .debugger-popover-content .title):
(.popover .debugger-popover-content .body):
(.popover .debugger-popover-content.function .body):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype._openClickedLinks):
(WebInspector.TextEditor.prototype._debuggerDidPause):
(WebInspector.TextEditor.prototype._debuggerDidResume):
(WebInspector.TextEditor.prototype._debuggerActiveCallFrameDidChange):
(WebInspector.TextEditor.prototype.handleEvent):
(WebInspector.TextEditor.prototype._mouseMovedOverEditor):
(WebInspector.TextEditor.prototype._mouseMovedOutOfEditor):
(WebInspector.TextEditor.prototype._mouseButtonWasPressedOverEditor):
(WebInspector.TextEditor.prototype._mouseButtonWasReleasedOverEditor):
(WebInspector.TextEditor.prototype._windowLostFocus):
(WebInspector.TextEditor.prototype._tokenWasHovered):
(WebInspector.TextEditor.prototype._populateCallback):
(WebInspector.TextEditor.prototype._showPopover):
(WebInspector.TextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.TextEditor.prototype._showPopoverForFunction):
(WebInspector.TextEditor.prototype._showPopoverForObject):
(WebInspector.TextEditor.prototype._showPopoverForString):
(WebInspector.TextEditor.prototype._showPopoverForNumber):
(WebInspector.TextEditor.prototype.willDismissPopover):
2013-01-22 Antoine Quint <graouts@apple.com>
<rdar://problem/12243633> REGRESSION (Safari 6): Console missing type filters
Adding a new ScopeBar subclass of NavigationItem to allow the display of scope
options in a navigation bar. Use this new class in LogContentView to display
All / Errors / Warnings / Logs options in the right part of the view's navigation bar.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
* UserInterface/LogContentView.css:
(.console-messages.supress-logs .console-log-level):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype._clearLog):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange.toggle):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange):
* UserInterface/Main.html:
* UserInterface/ScopeBar.css: Added.
(.scope-bar):
(.scope-bar > li):
(.scope-bar > li:active):
(.scope-bar > li:hover):
(.scope-bar > li.selected):
* UserInterface/ScopeBar.js: Added.
(WebInspector.ScopeBar):
(WebInspector.ScopeBar.prototype.item):
(WebInspector.ScopeBar.prototype._populate):
(WebInspector.ScopeBar.prototype._itemSelectionDidChange):
* UserInterface/ScopeBarItem.js: Added.
(WebInspector.ScopeBarItem):
(WebInspector.ScopeBarItem.prototype.get element):
(WebInspector.ScopeBarItem.prototype.get selected):
(WebInspector.ScopeBarItem.prototype.set selected):
(WebInspector.ScopeBarItem.prototype.setSelected):
(WebInspector.ScopeBarItem.prototype._clicked):
2013-01-17 Antoine Quint <graouts@apple.com>
<rdar://problem/13006824> Provide a Popover class
Basic Popover class to allow the display of any HTML content within a popover.
The public API of this class is very simple. Use .showRelativeToElement(element, preferredEdge)
to display the popover pointing to the provided target element with the provided edge as the
preferred edge of the target element towards which the popover's arrow should point to.
The method will check whether it can honour the edge preference based on the available screen
real estate. As it stands, the popover will constrain its display to the entire Web Inspector
window, but it could easily be made to match a more constrained space with a new WebInspector.Rect
parameter or Element reference.
You can then use .close() to dismiss the popover with an animated transition, although the popover
will automatically dismiss itself upon user interaction initiated outside of the popover's bounds
or when the Web Inspector window is no longer focused.
Additionally, the necessary geometry functions for the Popover class is taken from iAd JS and adapted
here to fit with the Web Inspector coding style.
Reviewed by Joseph Pecoraro.
* UserInterface/Geometry.js: Added.
(WebInspector.Point):
(WebInspector.Point.fromEvent):
(WebInspector.Point.fromEventInElement):
(WebInspector.Point.prototype.toString):
(WebInspector.Point.prototype.copy):
(WebInspector.Point.prototype.equals):
(WebInspector.Size):
(WebInspector.Size.prototype.toString):
(WebInspector.Size.prototype.copy):
(WebInspector.Size.prototype.equals):
(WebInspector.Rect):
(WebInspector.Rect.rectFromClientRect):
(WebInspector.Rect.prototype.toString):
(WebInspector.Rect.prototype.copy):
(WebInspector.Rect.prototype.equals):
(WebInspector.Rect.prototype.inset):
(WebInspector.Rect.prototype.minX):
(WebInspector.Rect.prototype.minY):
(WebInspector.Rect.prototype.midX):
(WebInspector.Rect.prototype.midY):
(WebInspector.Rect.prototype.maxX):
(WebInspector.Rect.prototype.maxY):
(WebInspector.Rect.prototype.intersectionWithRect):
(WebInspector.EdgeInsets):
(WebInspector.EdgeInsets.prototype.equals):
(WebInspector.EdgeInsets.prototype.copy):
* UserInterface/Popover.css: Added.
(.popover):
(.popover.arrow-up):
(.popover.arrow-right):
(.popover.arrow-down):
(.popover.arrow-left):
(.popover.fade-out):
* UserInterface/Popover.js: Added.
(WebInspector.Popover):
(WebInspector.Popover.prototype.get element):
(WebInspector.Popover.prototype.get frame):
(WebInspector.Popover.prototype.set frame):
(WebInspector.Popover.prototype.area):
(WebInspector.Popover.prototype.showRelativeToElement):
(WebInspector.Popover.prototype.close):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._drawBackground):
(WebInspector.Popover.prototype._bestFrameForEdge):
(WebInspector.Popover.prototype._drawFrame):
2013-01-11 Antoine Quint <graouts@apple.com>
<rdar://problem/10015674> REGRESSION (Safari 5): Option-click on a disclosure triangle does not deep-expand a DOM subtree (66868)
Up to now, the TreeElement.prototype.expandRecursively() method would correctly
expand children recursively based on the provided depth, but would not wait to
perform this task until all child nodes had been populated, which means that this
would only work incrementally with one additional level of child nodes being shown
expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy.
In order to fix this, we rely on the newly added optional argument to DOMAgent's
requestChildNodes() method to provide the depth at which we want to retrieve children
of a given node (see http://trac.webkit.org/changeset/139429). The DOMAgent provides
a new .getSubtree() method that calls requestChildNodes() with the provided depth.
Then in DOMTreeElement, we subclass .expandRecursively() to first call DOMAgent's
new .getSubtree() method and then call the default implementation when all nodes
have been retrieved from the backend.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.):
(WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what
depth we want to retrieve children of a given node from the backend.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.expandRecursively): Override default implementation
to first obtain the deepest subtree for the current node so that deep expansion happens
as expected.
* UserInterface/InspectorBackendCommands.js: Register the new optional `depth` parameter
for DOMAgent's .requestChildNodes().
2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
Drive by style fix. Add super constructor call to CSSStyleManager.
Reviewed by Antoine Quint.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
No functional difference, but I just noticed a missing call.
2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12967231> extract-localizable-js-strings should warn about improper WebInspector.UIString uses
Reviewed by David Kilzer.
* Localizations/en.lproj/localizedStrings.js:
Add missing strings.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
Remove a comment containing a UIString call. This is not needed for Safari.
* UserInterface/DatabaseContentView.js:
(WebInspector.DatabaseContentView.prototype._queryError):
Use WebInspector.UIString("...").format syntax so the string is not missed.
2013-01-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12964366> LayerTreeSidebarPanel._buildLayerInfoSection is too clever for update-safari-localizable-string / extract-localizable-js-strings
Reviewed by David Kilzer.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
Ensure all WebInspector.UIString uses contain a string literal, which
is what extract-localizable-js-strings expects.
2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12961674> Resizing QuickConsole drawer may need to refresh CodeMirror editor for new visible size
The CodeMirror TextEditor only has DOM elements for visible lines, with
some buffer. It needs to be updated when the visible (scroll dimensions)
of its content area are updated. The content view's dimensions flex with
the size of the QuickConsole. So, when the QuickConsole resizes we
should update the layout of the content browser.
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._quickConsoleDidResize):
Observe when the quick console resizes and update the layout of the content browser.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
(WebInspector.QuickConsole.prototype._isResizing):
Whenever we resize we go through this method. Dispatch the resize event.
We may take the early path if we are resizing manually, in that case the
new height would have been set in the mouse handler.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.updateLayout):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.updateLayout):
In content views containing text editors be sure to pass update layout
on to the text editor to refresh the CodeMirror editor.
2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12961455> "No Style Properties" text in styles HTML Attributes sidebar should not be monospace
Adjust the styles for the sidebar so that things look a bit nicer.
Reviewed by Antoine Quint.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section):
Make the minimum size 17px. This makes the HTML attributes section not
look like there is extra padding at the bottom. This also reduces the
height of empty sections a bit, saving vertical space.
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.empty.syntax-highlighted):
The HTML Attributes section is .syntax-highlighted. Ignore the fonts it
sets and revert back to the normal details section font.
(.details-section > .content > .group > .row.properties:not(.empty)):
Remove extra padding on properties sections when its the empty message.
2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
Skip document nodes when searching.
Reviewed by Antoine Quint.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch):
2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12956057> REGRESSION: Cannot develop nodes in the DOM tree inspector for dynamically-generated content (106080)
Handle a null ownerDocument to avoid an error. This worked previously
because each backend message was dispatched individually via setInterval.
Now however, they are batched after a setTimeout so an earlier uncaught
exception can break / prevent handling of other messages in that batch.
Reviewed by Ricky Mondello.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
2013-01-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12959910> Uncaught Error in LayerTreeSidebar breaks all right sidebars
In SidebarPanel.prototype.hidden the parentSidebar might be null. In
those cases, LayerTreeSidebarPanel could cause an error that would
make changing the right sidebar impossible.
The error was happening if the sidebar panel was removed instead of
being hidden. Removed meaning the content view changes and the sidebar
panel is no longer relevant. Hidden meaning the user just switched
to a different sidebar panel.
The fix checks if parentSidebar exists when the panel is being hidden,
but we also make sure to remove our event listener if the parentSidebar
is being cleared with a new willRemove method.
Reviewed by Antoine Quint.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.removeSidebarPanel):
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.willRemove):
Give the sidebar panel an opportunity to handle the parentSidebar being cleared.
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype.shown):
Assert that there is a parent sidebar when we are shown.
(WebInspector.LayerTreeSidebarPanel.prototype.hidden):
If there is a parent sidebar and we are hidden, the user is just switching
sidebars, and we can remove the listener.
(WebInspector.LayerTreeSidebarPanel.prototype.willRemove):
If the parent sidebar is being cleared remove our listener, if it existed.
2013-01-05 Dan Bernstein <mitz@apple.com>
Updated localizable strings.
* Localizations/en.lproj/localizedStrings.js: Let update-safari-localizable-string
remove one entry and one empty line.
2012-12-20 Antoine Quint <graouts@apple.com>
Add missing localizedString that I forgot in the previous patch for
<rdar://problem/12908978> Layer Tree: resize data grid upon width change.
* Localizations/en.lproj/localizedStrings.js:
2012-12-19 Antoine Quint <graouts@apple.com>
<rdar://problem/12908978> Layer Tree: resize data grid upon width change
Listen to width change events on the parent sidebar as the layer tree panel
is shown, and do the opposite operation when it's hidden. Upon a width change,
call .autoSizeColumns() on the data grid so that the separators are correctly
positioned.
In this patch we also change the string used to show the paint count from
"Paint Count" to "Paints" which makes the data grid look much better.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype.shown):
(WebInspector.LayerTreeSidebarPanel.prototype.hidden):
(WebInspector.LayerTreeSidebarPanel.prototype._widthDidChange):
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
(WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
2012-12-19 Antoine Quint <graouts@apple.com>
<rdar://problem/12646424> Show redraw counts in layer tree inspector
Simply add a new "Paint Count" field in the layer info and data grid to display
the contents of the .paintCount property provided by the back-end, which had already
landed in WebCore with <rdar://problem/12882763>.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
* UserInterface/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
(WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection):
2012-12-19 Antoine Quint <graouts@apple.com>
<rdar://problem/12031104> Show which elements are layer-backed
This is the front-end part of the work started on the backend with
https://bugs.webkit.org/show_bug.cgi?id=103513. We now provide a
new details sidebar for the inspected element which lists the characteristics
of its backing RenderLayer (metrics, amount of memory used and whether it is
composited in hardware) and all child RenderLayers, with the option of only
showing layers composited in hardware. At the bottom of the pane, we also have
a status bar indicating the total number of layers for the selected node and
its descendants as well as the total amount of memory used.
The list of child layers allows the developer to select a node to see it
highlighted on the page, and to click an arrow icon to jump to the layer's
associated node in the DOM tree.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/InspectorBackendCommands.js:
* UserInterface/LayerTreeDataGridNode.js: Added. DataGridNode custom subclass for the type of data grid nodes
we show in the child layers data grid.
(WebInspector.LayerTreeDataGridNode):
(WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
(WebInspector.LayerTreeDataGridNode.prototype.set layer):
(WebInspector.LayerTreeDataGridNode.prototype._createNodeCellContent):
(WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/LayerTreeManager.js: Added.
(WebInspector.LayerTreeManager):
(WebInspector.LayerTreeManager.prototype.get supported):
(WebInspector.LayerTreeManager.prototype.layerTreeMutations): Obtain the complete
list of mutations between two flattened layer trees.
(WebInspector.LayerTreeManager.prototype.refreshLayerTree): Retrieve the current layer
tree from the backend, eventually triggering a layerTreeDidChange event as a result.
(WebInspector.LayerTreeManager.prototype.flattenedLayerTree):
(WebInspector.LayerTreeManager.prototype.):
(WebInspector.LayerTreeManager.prototype.layersForNode): Obtain the layer associated to
the provided node, if any, and a list of child layers, if any.
(WebInspector.LayerTreeManager.prototype.layerTreeDidChange):
(WebInspector.LayerTreeManager.prototype.var):
(WebInspector.LayerTreeManager.prototype._obtainNodeIdsForLayerIds): Obtain the node ids
for the provided layer ids from the backend.
* UserInterface/LayerTreeObserver.js: Added.
(WebInspector.LayerTreeObserver): Listen to "layerTreeDidChange" events triggered by the
LayerTreeAgent exposed by WebCore.
(WebInspector.LayerTreeObserver.prototype.layerTreeDidChange): Inform the layer tree manager
that the layer tree has changed.
* UserInterface/LayerTreeSidebarPanel.css: Added.
* UserInterface/LayerTreeSidebarPanel.js: Added.
(WebInspector.LayerTreeSidebarPanel):
(WebInspector.LayerTreeSidebarPanel.prototype.shown):
(WebInspector.LayerTreeSidebarPanel.prototype.hidden):
(WebInspector.LayerTreeSidebarPanel.prototype.refresh):
(WebInspector.LayerTreeSidebarPanel.prototype.supportsDOMNode): Element nodes only are supported.
(WebInspector.LayerTreeSidebarPanel.prototype._layerTreeDidChange): Event handler for the
"layerTreeDidChange" triggered by the layer tree manager.
(WebInspector.LayerTreeSidebarPanel.prototype._buildCheckbox): Build the checkbox controlling
the option to only show layers composited in hardware.
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection): Build the top section
containing information about the inspected node's layer, if any.
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection): Build the middle section
containing the data grid showing the list of child layers, if any.
(WebInspector.LayerTreeSidebarPanel.prototype._buildBottomBar): Build the status bar displayed
at the bottom showing the total number of layers for the inspected node and the amount of
memory used.
(WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid.comparator):
(WebInspector.LayerTreeSidebarPanel.prototype._sortDataGrid):
(WebInspector.LayerTreeSidebarPanel.prototype._selectedDataGridNodeChanged):
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridGainedFocus):
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridLostFocus):
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridWasClicked):
(WebInspector.LayerTreeSidebarPanel.prototype._highlightSelectedNode):
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGridFilter):
(WebInspector.LayerTreeSidebarPanel.prototype._updateDisplayWithLayers): Callback for the call
made to .layersForNode() on the manager, triggers an update of all of the information reported
in the panel.
(WebInspector.LayerTreeSidebarPanel.prototype._updateLayerInfoSection): Update only the top section.
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid): Update only the data grid.
(WebInspector.LayerTreeSidebarPanel.prototype._dataGridNodeForLayer): Generate a node for the data
grid for the provided layer.
(WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics): Update only the bottom status bar.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-12-04 Timothy Hatcher <timothy@apple.com>
Prevent lines from highlighting again if the user scrolls with a line highlighted.
This switches off of a webkitAnimationEnd event listener because the line element might
be removed if the user scrolls during the animation. In that case webkitAnimationEnd isn't
fired, and the line would highlight again the next time it scrolls into view.
Reviewed by Ricky Mondello.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.removeStyleClass): Removed event listener code.
(WebInspector.TextEditor.prototype.revealAndHighlightLine): Schedule a timeout instead
of an event listener.
2012-12-04 Timothy Hatcher <timothy@apple.com>
Delay revealing a line until visible and the line exists.
This regressed when we switched to CodeMirror.
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set string.update): Call _revealPendingLineIfPossible.
(WebInspector.TextEditor.prototype.shown.update): Call _revealPendingLineIfPossible.
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Store the line number
and requested range until visible and the line exists.
2012-12-03 Dean Jackson <dino@apple.com>
Followup on <rdar://problem/11492568> Show shadow DOM elements
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: New string for "Shadow Content".
* UserInterface/DOMNode.js:
(WebInspector.DOMNode): Only create the _shadowRoots if necessary.
(WebInspector.DOMNode.prototype.hasChildNodes): Test for existence of _shadowRoots.
(WebInspector.DOMNode.prototype.hasShadowRoots): Ditto.
(WebInspector.DOMNode.prototype._insertChild): Ditto.
(WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName): Handle Document Fragment in switch.
* UserInterface/DOMTreeElement.js: Use new UIString.
* UserInterface/DOMTreeElementPathComponent.js: Handle Document Fragment in switch.
(WebInspector.DOMTreeElementPathComponent):
2012-12-03 Dean Jackson <dino@apple.com>
Allow inspection of Shadow DOM elements in Web Inspector
<rdar://problem/11492568> Show shadow DOM elements
Reviewed by Tim Hatcher.
Add the Shadow DOM fragments to the DOM tree view. This allows
us to inspect things like HTML5 Media captions and controls.
Expose the setting via a checkbox in the context menu on the DOM
tree view (which requires a reload if changed). Luckily the
inspector protocol already provided all the Shadow DOM data so
this was purely a UI change.
* Localizations/en.lproj/localizedStrings.js: New menu item.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode): New parameter to constructor: "isInShadowTree".
(WebInspector.DOMNode.prototype.hasChildNodes): Check for shadow children too.
(WebInspector.DOMNode.prototype.hasShadowRoots): New method.
(WebInspector.DOMNode.prototype.isInShadowTree): New method.
(WebInspector.DOMNode.prototype._insertChild): Inherit the shadow state as constructing children.
(WebInspector.DOMNode.prototype._setChildrenPayload): Ditto.
* UserInterface/DOMObserver.js:
(WebInspector.DOMObserver.prototype.shadowRootPushed): Answer the protocol calls.
(WebInspector.DOMObserver.prototype.shadowRootPopped): Ditto.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildTagDOM): Document Fragments get a special style if they are shadow root elements.
(WebInspector.DOMTreeElement.prototype._singleTextChild): Return early if in shadow DOM.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._setDocument): Use new parameter when constructing DOMNode.
(WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype.populateContextMenu): Add a new checkbox to toggle the Shadow DOM visibility.
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._toggleShowShadowDOM):
* UserInterface/LogContentView.css:
(.webkit-html-fragment.shadow): New style for shadow root fragments.
2012-12-02 Timothy Hatcher <timothy@apple.com>
Linkify "src" and "href" attributes in HTML/SVG/XML resources.
This extends the XML tokenizer to change the style of the string following
"src" and "href" attributes into links.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorAdditions.js:
(tokenizeLinkString): Added.
(tokenizeEndOfLinkString): Added.
(extendedXMLToken): Added.
* UserInterface/SyntaxHighlightingDefaultTheme.css:
(.cm-s-default .cm-link): Added.
(.cm-s-default .cm-link:hover): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Added click event listener for _openClickedLinks.
(WebInspector.TextEditor.prototype._openClickedLinks): Added.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Use CodeMirror to syntax highlight strings used for the DOM tree.
Reviewed by Joseph Pecoraro.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.syntaxHighlightStringAsDocumentFragment): Use CodeMirror.runMode.
(WebInspector.syntaxHighlightStringAsDocumentFragment.appendText): Added. Create nodes based on the style.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Use WebInspector.CSSKeywordCompletions instead of WebInspector.SourceTokenizer to decide what
is a keyword in the Style details sidebar.
Reviewed by Jon Honeycutt.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle): Get the keywords.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Use the keywords
for the current property.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Hook up issues using CodeMirror.
Reviewed by Joseph Pecoraro.
* UserInterface/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .error): Renamed.
(.source-code.text-editor > .CodeMirror .warning): Renamed.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Moved issue population from here.
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): ... to here.
(WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Call _addIssue.
(WebInspector.SourceCodeTextEditor.prototype._addIssue): Renamed from _addIssueToLine. Use
addStyleClassToLine to add the styles.
(WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Merged with _addIssue.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.addStyleClassToLine): Added.
(WebInspector.TextEditor.prototype.removeStyleClassFromLine): Added.
(WebInspector.TextEditor.prototype.toggleStyleClassForLine): Added.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Hook up breakpoints using CodeMirror.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorAdditions.js: Added hasLineClass and toggleLineClass extensions.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Call setBreakpointInfoForLine
for each breakpoint.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Removed.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Removed delete here
since calling removeBreakpoint will fire an event that causes us to delete the breakpoint.
Deleting early was causing an assert in the event handler.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror .has-breakpoint:not(.breakpoint-disabled) .CodeMirror-linenumber): Added.
(.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before): Added.
(.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before): Added.
(.text-editor > .CodeMirror .breakpoint-disabled .CodeMirror-linenumber::before): Added.
(.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after): Added.
(.text-editor > .CodeMirror .execution-line pre): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Added "gutterClick" event listener.
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.set string.updateStyles): Update the execution line and breakpoints
now that we might have content for that line.
(WebInspector.TextEditor.prototype.get executionLineNumber):
(WebInspector.TextEditor.prototype.set executionLineNumber):
(WebInspector.TextEditor.prototype.setBreakpointInfoForLine):
(WebInspector.TextEditor.prototype._updateExecutionLine): Added.
(WebInspector.TextEditor.prototype._addBreakpointToLineWithInfo): Added.
(WebInspector.TextEditor.prototype._setBreakpointStylesOnLineWithInfo): Added.
(WebInspector.TextEditor.prototype._removeBreakpointFromLine.updateStyles): Added.
(WebInspector.TextEditor.prototype._removeBreakpointFromLine): Added.
(WebInspector.TextEditor.prototype._gutterMouseDown): Added.
(WebInspector.TextEditor.prototype._documentMouseMoved): Added.
(WebInspector.TextEditor.prototype._documentMouseUp): Added.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Hook up search using CodeMirror.
Reviewed by Joseph Pecoraro.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Move off of textContent and AttributedString.
Use addSearchResults instead of the individual addSearchResultRange.
* UserInterface/TextEditor.css:
(.text-editor .bouncy-highlight): Added.
(@-webkit-keyframes text-editor-bouncy): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.performSearch): Create a search cursor.
(WebInspector.TextEditor.prototype.performSearch.batchSearch): Use the search cursor to find matches in
the slow path. Stop using _textContent.
(WebInspector.TextEditor.prototype.addSearchResults): Renamed from addSearchResultRange.
(WebInspector.TextEditor.prototype.addSearchResults.markRanges): Added. Mark the ranges in a CodeMirror
operation to get better performance.
(WebInspector.TextEditor.prototype.searchCleared): Clear the marked text ranges.
(WebInspector.TextEditor.prototype.revealPreviousSearchResult): Call _revealSearchResult.
(WebInspector.TextEditor.prototype.revealNextSearchResult): Ditto.
(WebInspector.TextEditor.prototype.line): Added.
(WebInspector.TextEditor.prototype._revealSearchResult): Added.
(WebInspector.TextEditor.prototype._revealSearchResult.animationEnded): Added.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Hook up the basics of CodeMirror in TextEditor.
Reviewed by Joseph Pecoraro.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Removed.
* UserInterface/SyntaxHighlightingDefaultTheme.css: Added CodeMirror selectors.
* UserInterface/TextEditor.css:
(.text-editor > .CodeMirror): Added. Reset box-sizing to content-box.
(.text-editor > .CodeMirror *): Added. Ditto.
(.text-editor > .CodeMirror .CodeMirror-lines): Added.
(.text-editor > .CodeMirror pre): Added.
(.text-editor > .CodeMirror .CodeMirror-selected): Added.
(.text-editor > .CodeMirror .CodeMirror-focused .CodeMirror-selected): Added.
(.text-editor > .CodeMirror textarea): Added. Prevent pointer events to make right
click Inspect Element hit the line instead of the input area.
(.text-editor > .CodeMirror .CodeMirror-gutters): Added.
(.text-editor > .CodeMirror .CodeMirror-linenumber): Added.
(.text-editor > .CodeMirror .highlighted): Added.
(@-webkit-keyframes text-editor-highlight-fadeout):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get string):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype.get selectedTextRange):
(WebInspector.TextEditor.prototype.set selectedTextRange):
(WebInspector.TextEditor.prototype.get mimeType):
(WebInspector.TextEditor.prototype.set mimeType):
(WebInspector.TextEditor.prototype.revealLine): Set the cursor position and highlight the line.
(WebInspector.TextEditor.prototype.updateLayout): Call refresh to let CodeMirror know we might have changed size.
(WebInspector.TextEditor.prototype.shown): Ditto.
(WebInspector.TextEditor.prototype._textRangeFromCodeMirrorPosition): Added.
(WebInspector.TextEditor.prototype._codeMirrorPositionFromTextRange): Added.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Remove TextEditor implementation and supporting classes for syntax highlighting.
Rubber-stamped by Jon Honeycutt.
* UserInterface/AttributedString.js: Removed.
* UserInterface/CSSSourceTokenizer.js: Removed.
* UserInterface/HTMLSourceTokenizer.js: Removed.
* UserInterface/JavaScriptSourceTokenizer.js: Removed.
* UserInterface/Main.html: Removed deleted files.
* UserInterface/ScriptContentView.js:
* UserInterface/SourceTokenizer.js: Removed.
* UserInterface/SyntaxHighlighter.js: Removed.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.syntaxHighlightStringAsDocumentFragment): Cleared.
* UserInterface/TextContent.js: Removed.
* UserInterface/TextEditor.css: Removed most rules.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Cleared.
(WebInspector.TextEditor.prototype.get string): Cleared.
(WebInspector.TextEditor.prototype.set string): Cleared.
(WebInspector.TextEditor.prototype.get selectedTextRange): Cleared.
(WebInspector.TextEditor.prototype.set selectedTextRange): Cleared.
(WebInspector.TextEditor.prototype.get mimeType): Cleared.
(WebInspector.TextEditor.prototype.set mimeType): Cleared.
(WebInspector.TextEditor.prototype.get executionLineNumber): Cleared.
(WebInspector.TextEditor.prototype.set executionLineNumber): Cleared.
(WebInspector.TextEditor.prototype.performSearch.batchSearch): Cleared.
(WebInspector.TextEditor.prototype.performSearch): Cleared.
(WebInspector.TextEditor.prototype.addSearchResultRange): Cleared.
(WebInspector.TextEditor.prototype.searchCleared): Cleared.
(WebInspector.TextEditor.prototype.revealPreviousSearchResult): Cleared.
(WebInspector.TextEditor.prototype.revealNextSearchResult): Cleared.
(WebInspector.TextEditor.prototype.revealLine): Cleared.
(WebInspector.TextEditor.prototype.updateLayout): Cleared.
(WebInspector.TextEditor.prototype.shown): Cleared.
(WebInspector.TextEditor.prototype.hidden): Cleared.
(WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Cleared.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get scrollableElements): Removed.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Extend CodeMirror to allow syntax highlighting styles based on the mode.
By default CodeMirror defines syntax highlighting styles based on token
only and shared styles between modes. This limiting and does not match
what we have done in the Web Inspector. So this modifies the XML, CSS
and JavaScript modes to supply two styles for each token. One for the
token and one with the mode name.
Reviewed by Joseph Pecoraro.
* UserInterface/CodeMirrorAdditions.js: Added.
* UserInterface/Main.html: Included CodeMirrorAdditions.js.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Define extra MIME-types for CodeMirror's syntax highlighting modes.
Reviewed by Jon Honeycutt.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Define extra MIME-types for XML, HTML, SVG,
JSON and JavaScript.
2012-11-30 Timothy Hatcher <timothy@apple.com>
Update CodeMirror from 3.0 beta 2 to 3.0 release candidate 2.
Rubber-stamped by Jon Honeycutt.
* UserInterface/External/CodeMirror/codemirror.css: Updated.
* UserInterface/External/CodeMirror/codemirror.js: Updated.
* UserInterface/External/CodeMirror/htmlmixed.js: Updated.
* UserInterface/External/CodeMirror/javascript.js: Updated.
* UserInterface/External/CodeMirror/matchbrackets.js: Updated.
* UserInterface/External/CodeMirror/xml.js: Updated.
2012-11-22 Timothy Hatcher <timothy@apple.com>
Fix a perl script error that was preventing resources from being
copied on production builds.
Perl thought the [\t ] that followed $tagExpression meant that
tagExpression should be @tagExpression.
* Scripts/combine-resources.pl:
(concatinateFiles): Split the replacementExpression string into parts
and concat it to prevent this. Fix a typo too.
2012-11-18 Timothy Hatcher <timothy@apple.com>
Include CodeMirror in the Web Inspector.
This also teaches the scripts we use to copy the CodeMirror resources and skip them
when we concatenate our scripts/styles.
Rubber-stamped by Antoine Quint.
* Scripts/combine-resources.pl:
(concatinateFiles): Skip External files. Smartly replace the first concatenated file's tag
so we don't mix the order of style and script loading.
* Scripts/copy-user-interface-resources.sh:
* UserInterface/Main.html: Included CodeMirror files.
2012-11-18 Timothy Hatcher <timothy@apple.com>
Add CodeMirror to the Web Inspector.
Open Source Software use approved by Joyce Chow on 11/16/2012.
Part of: <rdar://problem/3143094> Edit-mode for resources (local substation of resources) (16440)
Rubber-stamped by Antoine Quint.
* UserInterface/External/CodeMirror/LICENSE: Added.
* UserInterface/External/CodeMirror/codemirror.css: Added.
* UserInterface/External/CodeMirror/codemirror.js: Added.
* UserInterface/External/CodeMirror/css.js: Added.
* UserInterface/External/CodeMirror/htmlmixed.js: Added.
* UserInterface/External/CodeMirror/javascript.js: Added.
* UserInterface/External/CodeMirror/matchbrackets.js: Added.
* UserInterface/External/CodeMirror/overlay.js: Added.
* UserInterface/External/CodeMirror/runmode.js: Added.
* UserInterface/External/CodeMirror/searchcursor.js: Added.
* UserInterface/External/CodeMirror/xml.js: Added.
2012-11-17 Timothy Hatcher <timothy@apple.com>
Hide the toolbar labels if there isn't enough room to show them.
Reviewed by Brady Eidson.
* UserInterface/ButtonToolbarItem.css:
(.toolbar.collapsed .item.button > .label): Added.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added event listener for window resize.
(WebInspector._windowResized): Added. Update the toolbar layout.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.set displayMode): Update the toolbar layout.
(WebInspector.Toolbar.prototype.set sizeMode): Ditto.
2012-11-17 Timothy Hatcher <timothy@apple.com>
Keep toolbar items in constant positions as items are added or removed.
This keeps centered items in the center and adds the items on the right in reverse
order since right most items are more stable as context changes. Also vertically stack
the close and undock button if the toolbar is tall enough to fit them.
Reviewed by Dan Bernstein.
* UserInterface/ControlToolbarItem.css:
(.toolbar .item.control):
(.toolbar.small-size .item.control):
(.toolbar.icon-only .item.control):
(.toolbar .item.control:hover):
(.toolbar .item.control:active):
* UserInterface/Main.js:
(WebInspector.contentLoaded): Use addToolbarItem instead of addNavigationItem. Add the
detail sidebar items in reverse order.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.addNavigationItem): Added parentElement argument.
(WebInspector.NavigationBar.prototype.insertNavigationItem): Added parentElement argument.
Use the nextSibling only if it is in the same parent element.
(WebInspector.NavigationBar.prototype.removeNavigationItem): Use remove to remove the element.
* UserInterface/Toolbar.css:
(.toolbar .control-section): Added.
(.toolbar.label-only .control-section): Added.
(.toolbar .item-section): Added.
(.toolbar .item-section:not(.center)): Added.
(.toolbar .item-section.left): Added.
(.toolbar .item-section.center): Added.
(.toolbar .item-section.right): Added.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar): Create the four sections.
(WebInspector.Toolbar.prototype.addToolbarItem): Added.
* UserInterface/Utilities.js:
(Element.prototype.remove): Added only if the engine does not have it. This is needed
for iAd Producer, which uses an older WebKit.
2012-11-17 Timothy Hatcher <timothy@apple.com>
Change ".navigation-bar > .item" and ".toolbar > .item" selectors into ".navigation-bar .item"
and ".toolbar .item" so we can have intermediary elements between the bar and item.
Reviewed by Dan Bernstein.
* UserInterface/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar .item.button):
(.navigation-bar .item.button > .glyph):
(body.window-inactive .navigation-bar .item.button:not(.suppress-emboss) > .glyph):
(.navigation-bar .item.button.disabled > .glyph):
(body.window-inactive .navigation-bar .item.button.disabled:not(.suppress-emboss) > .glyph):
(.navigation-bar .item.button.suppress-emboss > .glyph):
(.navigation-bar .item.button.suppress-emboss:active > .glyph):
(.navigation-bar .item.button.suppress-emboss.disabled > .glyph):
(.navigation-bar .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.generateStyleText):
* UserInterface/ButtonToolbarItem.css:
(.toolbar .item.button):
(.toolbar.icon-and-label-vertical .item.button):
(.toolbar.icon-and-label-horizontal .item.button):
(.toolbar .item.button > .glyph):
(.toolbar.small-size .item.button > .glyph):
(.toolbar.label-only .item.button > .glyph):
(.toolbar .item.button > .label):
(.toolbar.label-only .item.activate.button.activated > .label):
(.toolbar.icon-and-label-horizontal .item.button > .label):
* UserInterface/ControlToolbarItem.css:
(.toolbar .item.control):
(.toolbar .item.control:hover):
(.toolbar .item.control:active):
(.toolbar .item.control > .glyph):
(body.window-inactive .toolbar .item.control):
(body.window-inactive .toolbar .item.control.disabled):
* UserInterface/DividerNavigationItem.css:
(.navigation-bar .item.divider):
* UserInterface/FlexibleSpaceNavigationItem.css:
(.toolbar .item.flexible-space):
* UserInterface/NavigationBar.css:
(.navigation-bar .item):
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button):
(.navigation-bar.collapsed .item.radio.button):
(.navigation-bar .item.radio.button.selected):
(.navigation-bar.collapsed .item.radio.button.selected):
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
* UserInterface/Toolbar.css:
(.toolbar .control-section):
2012-11-17 Timothy Hatcher <timothy@apple.com>
Make the close and undock buttons in the docked Web Inspector better match
the style of the undock button and the iTunes 11 mini-player controls.
Reviewed by Dan Bernstein.
* UserInterface/ControlToolbarItem.css:
(.toolbar > .item.control): 50% opacity.
(.toolbar > .item.control:hover): Added. 90% opacity.
(.toolbar > .item.control:active): Added. 100% opacity.
(body.window-inactive .toolbar > .item.control): 35% opacity.
(.toolbar > .item.control.disabled): 35% opacity.
(body.window-inactive .toolbar > .item.control.disabled): 20% opacity.
* UserInterface/Images/Undock.pdf: Rounded the corners a bit.
2012-11-16 Timothy Hatcher <timothy@apple.com>
Renamed the Breakpoint sidebar to Debugger and give it a new icon.
Also removed unused images from previous sidebar panels.
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DebuggerSidebarPanel.js: Renamed from WebInspector/UserInterface/BreakpointSidebarPanel.js.
(WebInspector.DebuggerSidebarPanel): Updated the keyboard shortcut to be Control-3.
* UserInterface/Images/NavigationItemBreakpoint.pdf: Removed.
* UserInterface/Images/NavigationItemBug.pdf: Added.
* UserInterface/Images/NavigationItemFunction.pdf: Removed.
* UserInterface/Images/NavigationItemThreads.pdf: Removed.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Updated the keyboard shortcut to be Control-2.
* UserInterface/Main.html: Renamed BreakpointSidebarPanel to DebuggerSidebarPanel.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Ditto.
(WebInspector._debuggerDidPause): Ditto.
2012-11-16 Timothy Hatcher <timothy@apple.com>
Merge the Debug sidebar panel into Breakpoints sidebar panel.
Reviewed by Brian Weinstein.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Added CallFramesDidChange event listener. Create the content tree
outline and section for the Call Stack.
(WebInspector.BreakpointSidebarPanel.prototype._debuggerCallFramesDidChange): Added.
(WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Support CallFrameTreeElement.
* UserInterface/DebugSidebarPanel.js: Removed.
* UserInterface/Main.html: Removed DebugSidebarPanel.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Removed DebugSidebarPanel.
(WebInspector._debuggerDidPause): Show the BreakpointSidebarPanel instead.
2012-11-16 Timothy Hatcher <timothy@apple.com>
Place breakpoints into a section in preparation of merging the Debug and Breakpoints sidebars.
Reviewed by Brian Weinstein.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Store contentTreeOutline as _breakpointsContentTreeOutline.
Make a DetailsSection and put the content tree in its only row.
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use _breakpointsContentTreeOutline.
(WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Ditto.
(WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Ditto.
2012-11-13 Timothy Hatcher <timothy@apple.com>
Make dragging the Web Inspector window in the toolbar move the window.
<rdar://problem/12688599> Should be able to drag to move Web Inspector window from empty parts of toolbar
Reviewed by Ricky Mondello.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Changed mousedown event listener to _toolbarMouseDown.
(WebInspector._toolbarMouseDown): Added. Call _moveWindowMouseDown or _dockedResizerMouseDown.
(WebInspector._moveWindowMouseDown): Added.
(WebInspector._moveWindowMouseDown.toolbarDrag): Added.
(WebInspector._moveWindowMouseDown.toolbarDragEnd): Added.
2012-11-13 Jeff Miller <jeffm@apple.com>
Regenerated localizedStrings.js, which was out-of-date.
* Localizations/en.lproj/localizedStrings.js:
2012-11-13 Timothy Hatcher <timothy@apple.com>
Disable sub-pixel antialiasing in the Web Inspector toolbar when in window mode.
This portion of the window has no background (showing the window chrome). So text rendered
here does not look good when sub-pixel antialiased.
Reviewed by Antoine Quint.
* UserInterface/Toolbar.css:
(body:not(.docked) .toolbar): Added. Set -webkit-font-smoothing: antialiased.
2012-11-12 Timothy Hatcher <timothy@apple.com>
Don't show the dock button in the toolbar now that it is in the window title bar.
Reviewed by Antoine Quint.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setDockingUnavailable): Empty stub now.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Changed the dock toggle into an undock button.
(WebInspector.updateDockedState): Removed use of dockToggleButtonNavigationItem.
Removed call to _updateDockToggleButtonVisibility.
(WebInspector.setDockingUnavailable): Removed.
(WebInspector._updateDockToggleButtonVisibility): Removed.
(WebInspector._undock): Renamed from _toggleDockedState. Only undock now.
(WebInspector._updateDockNavigationItems): Update undockButtonNavigationItem too.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Give WebInspector.ContentBrowser the ability to not have back and forward buttons.
This will be used for the ContentBrowser in the quick console area.
Reviewed by Antoine Quint.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Added disableBackForward argument. Don't create the buttons
or keyboard shortcuts if disableBackForward is true.
(WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Return early if the buttons
don't exist and there is nothing to update.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Fix some flashing while scrolling the Web Inspector when docked.
When docked the toolbar isn't transparent, so we can have a background
on the body which fixes the flashing. This isn't an issue in when undocked.
This also isn't an issue with accelerated composting, which we should turn
on for the Inspector in <rdar://problem/12676223>.
Reviewed by Anders Carlsson.
* UserInterface/Main.css:
(body.docked): Set the background-color to white.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Fix an exception that was causing the Web Inspector to fail when trying to debug a script.
The fact that we don't know about a script in a call frame is really a deeper bug. But this
at least makes things gracefully keep working. The deeper issue is <rdar://problem/12679475>.
<rdar://problem/12676344> Web Inspector gets stuck trying to debug an exception
Reviewed by Dean Jackson.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Continue if the SourceCodeLocation
ended up being null. This prevents an exception later.
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Return null if
the script was not found.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Remove the Log navigation sidebar.
Create a single LogContentView to be shown for the console. Previous sessions are now shown
inline like the quick console (with a divider between them).
The ultimate goal here is to merge the quick console and the full height console.
Reviewed by Dean Jackson.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole): Call WebInspector.showConsoleView.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Add event listeners that were in LogSidebarPanel.
(WebInspector.LogContentView.prototype.shown): Removed disabled check.
(WebInspector.LogContentView.prototype._sessionsCleared): Added.
(WebInspector.LogContentView.prototype._sessionStarted): Added.
(WebInspector.LogContentView.prototype._messageAdded): Added.
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated): Added.
(WebInspector.LogContentView.prototype._handleContextMenuEvent): Removed disabled check.
(WebInspector.LogContentView.prototype._activeLogCleared): Ditto.
(WebInspector.LogContentView.prototype._clearLog): Ditto.
* UserInterface/LogSidebarPanel.js: Removed.
* UserInterface/LogTreeElement.js:
(WebInspector.LogTreeElement): Change "Current Log" to "Console".
* UserInterface/Main.html: Removed LogSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Removed LogSidebarPanel use. Create a Console toolbar button.
Handle the last content cookie for the console.
(WebInspector.sidebarPanelForRepresentedObject): Return null for the console.
(WebInspector.contentBrowserTreeElementForRepresentedObject): Return the special tree element
for the console.
(WebInspector.showConsoleView): Added.
(WebInspector._updateCurrentContentViewCookie): Set a special cookie for the console view.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Add reload and inspect toolbar buttons.
<rdar://problem/11187904> REGRESSION (Safari 6): Inspect node button should always be available
Reviewed by Dean Jackson.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Removed _inspectModeButtonNavigationItem.
(WebInspector.FrameContentView.prototype.get navigationItems): Ditto.
* UserInterface/Images/Reload.pdf: Added.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create the reload and inspect toolbar buttons.
(WebInspector._inspectModeStateChanged): Added.
(WebInspector._toggleInspectMode): Added.
(WebInspector._reloadPageClicked): Added.
2012-11-11 Timothy Hatcher <timothy@apple.com>
Use sticky positioning for the section headers in the Details sidebar.
To make this work I had to dynamically generate style rules based on the
current height of the toolbar (now that it is dynamic). Kind of gross, but
the end result is really nice!
While I was at it I bumped the height of the headers to 23px to match the
other bars. That way when they are at the top everything lines up nicely.
<rdar://problem/12611547> Consider using sticky positioning for sidebar section headers
Reviewed by Dean Jackson.
* UserInterface/DetailsSection.css:
(.details-section > .header): Bump the height and padding up.
* UserInterface/Main.js:
(WebInspector.updateDockedState): Call _updateStickyPostionStyles.
(WebInspector._updateStickyPostionStyles): Added.
(WebInspector._toolbarDisplayModeDidChange): Call _updateStickyPostionStyles.
(WebInspector._toolbarSizeModeDidChange): Ditto.
* UserInterface/Utilities.js:
(Element.prototype.totalOffsetLeft): Use getBoundingClientRect for better results.
(Element.prototype.totalOffsetTop): Ditto.
2012-11-10 Timothy Hatcher <timothy@apple.com>
Don't deselect the selected row when refreshing the Network data grid.
This preserves selection during refreshes that happen while loading the page.
It also prevents notifying that the selectionPathComponents changed which causes
the details sidebar to refresh and hide because there was no selection.
<rdar://problem/12603744> Details sidebar auto-closes while trying to read it on a loading page
Reviewed by Dean Jackson.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Return early if _ignoreSelectionEvent.
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds): Save and restore the
selectedNode if it was refreshed.
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Set _ignoreSelectionEvent while
updating the data grid.
2012-11-10 Timothy Hatcher <timothy@apple.com>
Don't crossfade the indeterminate progress spinner.
<rdar://problem/12676407> Web Inspector shouldn't cross-fade its "discrete" spinner
Reviewed by Dan Bernstein.
* UserInterface/IndeterminateProgressSpinner.css:
(.indeterminate-progress-spinner): Use -webkit-animation-timing-function: step-start.
2012-11-10 Timothy Hatcher <timothy@apple.com>
Prevent the details sidebar from ever being shown empty.
This removes the setting to auto hide when empty and always hides when empty.
Reviewed by Antoine Quint.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Removed _detailsSidebarAutoHideWhenEmptySetting and start the
details sidebar out in the collapsed state.
(WebInspector._sidebarCollapsedStateDidChange): Don't remember the collapsed state if
_ignoreDetailsSidebarPanelCollapsedEvent is set. This is for ignoring programatic changes.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Removed _detailsSidebarAutoHideWhenEmptySetting.
2012-11-10 Timothy Hatcher <timothy@apple.com>
Don't draw a background on the toolbar when the window is inactive.
We want to show through to the window chrome in this case too.
Reviewed by Dan Bernstein.
* UserInterface/Toolbar.css:
(body.window-inactive .toolbar): Removed background-image.
2012-11-10 Timothy Hatcher <timothy@apple.com>
Move the time bar to the bottom so the sidebar elements align with the timelines again.
Now that the sidebars don't have a navigation bar, everything is shifted higher in the sidebar.
This caused a misalignment in the timeline view. The best solution is to move the time bar to the
bottom so the timeline overviews line up with the tree elements in the sidebar again. The Profiles
sidebar header does not align with the data grid header anymore, but that does not matter as much.
Maybe later we can add a summary or zoom slider to sidebar, shifting Profiles down again.
To make the time bar not be as distracting the background is now white and the markers fade out.
The fade points in the direction of the graph, up for the overview and down for the network graph.
This prevents the lines from touching since the two time bars are now next to each other.
Reviewed by Ricky Mondello.
* UserInterface/NetworkDataGrid.css:
(.network-timeline-decorations > .header):
(.network-timeline-decorations > .header > .divider):
(.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
(.network-timeline-decorations > .header > .divider > .label):
* UserInterface/TimelineDecorations.css:
(.timeline-decorations > .header):
(.timeline-decorations > .header > .divider):
(.timeline-decorations > .header > .divider:last-child):
(.timeline-decorations > .header > .divider > .label):
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview):
* UserInterface/Toolbar.css:
2012-11-10 Timothy Hatcher <timothy@apple.com>
Merge the Storage sidebar into the Resources sidebar.
Most of this is just copied from StorageSidebarPanel with trivial tweaks to work
inside of ResourceSidebarPanel.
Reviewed by Antoine Quint.
* UserInterface/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.inspect):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.sidebarPanelForRepresentedObject):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView):
(WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking):
(WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected):
(WebInspector.ResourceSidebarPanel.prototype._checkStorageTreeElementAgainstPendingContentViewCookie):
(WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasInspected):
(WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._databaseWasInspected):
(WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded):
(WebInspector.ResourceSidebarPanel.prototype._frameManifestRemoved):
(WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):
(WebInspector.ResourceSidebarPanel.prototype._addStorageChild):
(WebInspector.ResourceSidebarPanel.prototype._storageCleared):
* UserInterface/StorageSidebarPanel.js: Removed.
2012-11-09 Timothy Hatcher <timothy@apple.com>
Remove the Issues sidebar.
It might come back in some form in the new Debugger sidebar if there is demand.
But it has proven to not be that helpful in its current form.
Reviewed by Antoine Quint.
* UserInterface/IssueIcons.css: Removed.
* UserInterface/IssueSidebarPanel.js: Removed.
* UserInterface/IssueTreeElement.js: Removed.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-11-09 Timothy Hatcher <timothy@apple.com>
Add placeholders to all the search and filter fields in the navigation sidebars.
<rdar://problem/11113717> Two search-related fields in the Search sidebar is confusing
Reviewed by Dan Bernstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel):
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel):
* UserInterface/FilterBar.js:
(WebInspector.FilterBar.prototype.get placeholder): Added.
(WebInspector.FilterBar.prototype.set placeholder): Added.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
2012-11-09 Timothy Hatcher <timothy@apple.com>
Merge the Search sidebar into the Resources sidebar.
Most of this is just copied from SearchSidebarPanel with trivial tweaks to work
inside of ResourceSidebarPanel.
Rubber-stamped by Antoine Quint.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/ResourceSidebarPanel.css: Added.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.get contentTreeOutlineToAutoPrune):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch):
(WebInspector.ResourceSidebarPanel.prototype._searchFieldChanged):
(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForResource):
(WebInspector.ResourceSidebarPanel.prototype._focusSearchField):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
* UserInterface/SearchSidebarPanel.css: Removed.
* UserInterface/SearchSidebarPanel.js: Removed.
2012-11-09 Timothy Hatcher <timothy@apple.com>
Allow setting the contentTreeOutline of a WebInspector.NavigationSidebarPanel.
This will allow one sidebar to manage multiple content trees, so we can merge
Resources and Search into one.
Reviewed by Antoine Quint.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Use createContentTreeOutline.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Use .element.
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Added.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Added.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline): Added.
(WebInspector.NavigationSidebarPanel.prototype.show): Use contentTreeOutlineElement.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Use the
new contentTreeOutlineToAutoPrune property.
* UserInterface/TreeOutline.js:
(TreeOutline): Set .element for public use.
2012-11-09 Nathan de Vries <ndevries@apple.com>
Fix for <rdar://problem/11498628> Can inadvertently copy part of the UI
when attempting to copy the Full URL of a resource
Ensure that when a value in the details side pane is triple-tapped to
select the whole value, the label from the following row is not included
in the selection.
The table-cell selection issue will be addressed properly in
<rdar://problem/12668870> Triple-clicking text within a <div> set to
"display: table-cell" selects text outside the cell
Reviewed by Timothy Hatcher.
* UserInterface/DetailsSectionSimpleRow.js:
(WebInspector.DetailsSectionSimpleRow): Add a click handler to the value
cell and adjust the selection range on triple-click if it extends beyond
the cell.
2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12526413> Compositing borders button does not work for iOS 6 (should be suppressed or dimmed)
Reviewed by Jon Honeycutt.
Disable the toggle compositing borders navigation button when debugging
an iOS 6 device, which doesn't have backend support for it.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype._toggleCompositingBorders):
(WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
Reviewed by Timothy Hatcher.
In production builds be sure to copy over resources that are
dynamically loaded in the frontend, and aren't explicitly loaded
by Main.html.
* Scripts/copy-user-interface-resources.sh:
2012-11-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12462428> Make the Safari Curie Web Inspector compatible with iOS 6
Reviewed by Timothy Hatcher.
In this change the inspector frontend will load a backend commands file
that is exactly compatible with the backend it is communicating with.
When loading the frontend for a remote session the RWI frontend host
can suggest a more specific InspectorBackendCommands file to load.
For non-remote session, or non-legacy remote session
the default InspectorBackendCommands.js file is loaded.
This approach has some benefits:
- loading the exact set of backend commands allows backend feature
detection by simply checking if the "BackendAgent.<method>" exists.
Therefore you immediately get errors if you use a backend agent
method without feature detecting it.
- by having Legacy InspectorBackendCommands files checked in it is
easier to see exactly what an older version of iOS supported and
when functions were added / removed.
And drawbacks:
- if a protocol message changes in some way (renamed params, gains or
loses params, reorders params, changes to multiple methods, etc) we
may need to do extra work to ensure compatibility with older devices.
Like we've already seen with Database SQL handling.
Timothy Hatcher already addressed all of the iOS 6 protocol changes so far.
* UserInterface/LoadInspectorBackendCommands.js: Added.
Load either the default InspectorBackendCommands.js or the one exposed
by InspectorFrontendHost.inspectorBackendCommandsURL() in remote sessions.
* UserInterface/Main.html:
Remove InspectorBackendLegacyCommands, add in LoadInspectorBackendCommands.
* UserInterface/InspectorBackendLegacyCommands.js: Removed.
* UserInterface/Legacy/6.0/InspectorBackendCommands.js: Added.
This is the complete InspectorBackendCommands supported by iOS 6.
2012-11-08 Timothy Hatcher <timothy@apple.com>
Fix an exception that started happening in the Web Inspector, that broke everything.
Revision 133862 of WebCore started looking for InspectorFrontendAPI.dispatchMessageAsync.
So we need to implement thta method to make things work again. There are a few other
methods that needed added to InspectorFrontendAPI too.
Reviewed by Antoine Quint.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.contextMenuItemSelected): Added.
(InspectorFrontendAPI.contextMenuCleared): Added.
(InspectorFrontendAPI.dispatchMessageAsync): Added.
(InspectorFrontendAPI.dispatchMessage): Added.
2012-11-08 Timothy Hatcher <timothy@apple.com>
Default to horizontal labels and small icons for the toolbar when docked.
This also remembers the toolbar modes for docked and undocked if the user changes them.
Reviewed by Ricky Mondello.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Listen for the new toolbar events and create the settings.
(WebInspector.updateDockedState): Change the modes using the settings based on docked state.
(WebInspector._toolbarDisplayModeDidChange): Added. Store the mode in the setting.
(WebInspector._toolbarSizeModeDidChange): Added. Ditto.
* UserInterface/Toolbar.js:
(WebInspector.Toolbar.prototype.set displayMode): Fire the DisplayModeDidChange event.
(WebInspector.Toolbar.prototype.set sizeMode): Fire the SizeModeDidChange event.
2012-11-08 Timothy Hatcher <timothy@apple.com>
Fix an exception that was preventing console expression from evaluating.
This exposed a deeper issue where we were not using the origin property for DOM storage
objects and still looking for the host property.
There also seems to be a backend issue where local storage is showing up twice.
https://bugs.webkit.org/show_bug.cgi?id=101643
<rdar://problem/12656188> Can't evaluate expressions in the console on this npr.org page
Reviewed by Ricky Mondello.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.addDOMStorage): Look for origin and parse
the host out of it since our code still expects the host.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle): Assert
that the mainTitle is not empty/null/undefined. Handle it anyway just in case.
2012-11-08 Timothy Hatcher <timothy@apple.com>
Update the Web Inspector strings for all the string changes in the last few revisions.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* Localizations/en.lproj/localizedStrings.js: Updated.
2012-11-08 Timothy Hatcher <timothy@apple.com>
Add the sidebar panel toolbar items and dock controls to the toolbar.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateDockToggleButtonVisibility):
(WebInspector._updateDockNavigationItems):
(WebInspector._contentBrowserRepresentedObjectsDidChange):
2012-11-08 Timothy Hatcher <timothy@apple.com>
Remove the toggle sidebar buttons and keyboard shortcuts.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._navigationSidebarPanelSelected):
2012-11-08 Timothy Hatcher <timothy@apple.com>
Don't have sidebars manage and display a NavigationBar anymore.
This removes the navigation bar from Sidebar and makes each SidebarPanel have a toolbar item instead.
To work with the toolbar item the display names and tooltips have been tweaked. The toolbar items
are not used in the toolbar yet.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel):
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel):
* UserInterface/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel):
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.shown):
(WebInspector.NavigationSidebarPanel.prototype.hidden):
(WebInspector.NavigationSidebarPanel.prototype._updateToolbarItemVisibility):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
* UserInterface/Sidebar.css:
(.sidebar > .panel):
(.sidebar.right):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype.addSidebarPanel):
(WebInspector.Sidebar.prototype.removeSidebarPanel):
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get minimumWidth):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.get toolbarItem):
(WebInspector.SidebarPanel.prototype.get visible):
(WebInspector.SidebarPanel.prototype.hide):
(WebInspector.SidebarPanel.prototype.toggle):
(WebInspector.SidebarPanel.prototype.added):
(WebInspector.SidebarPanel.prototype.removed):
(WebInspector.SidebarPanel.prototype.hidden):
(WebInspector.SidebarPanel.prototype.visibilityDidChange):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
2012-11-08 Timothy Hatcher <timothy@apple.com>
Rename the QuickConsole toolbar style class so it does not conflict with the new Toolbar class.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* UserInterface/QuickConsole.css:
(.quick-console > .quick-console-toolbar):
(.quick-console > .quick-console-toolbar > .text-prompt):
(.quick-console > .quick-console-toolbar > .navigation-bar-container):
(.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar-spacer):
(.quick-console > .quick-console-toolbar > .navigation-bar-container > .navigation-bar):
(.quick-console > .quick-console-toolbar.scroll-divider):
(.quick-console > .quick-console-toolbar > .text-prompt > .javascript-prompt):
* UserInterface/QuickConsole.js:
2012-11-08 Timothy Hatcher <timothy@apple.com>
Add a toolbar class and toolbar item classes to the Web Inspector.
The toolbar and item inherits most of the functionality from the existing NavigationBar and ButtonNavigationItem.
This also makes the toolbar be the resize area when docked. No items are added to the toolbar yet.
Part of:
<rdar://problem/10947541> Navigation bar buttons are too small
<rdar://problem/12294575> Navigation bar button icons are difficult to identify
<rdar://problem/12589291> Navigation bar buttons are unlabeled
Reviewed by Ricky Mondello.
* UserInterface/ActivateButtonToolbarItem.js: Added.
(WebInspector.ActivateButtonToolbarItem):
(WebInspector.ActivateButtonToolbarItem.prototype.get label):
(WebInspector.ActivateButtonToolbarItem.prototype.set label):
* UserInterface/ButtonToolbarItem.css: Added.
(.toolbar > .item.button):
(.toolbar.icon-and-label-vertical > .item.button):
(.toolbar.icon-and-label-horizontal > .item.button):
(.toolbar > .item.button > .glyph):
(.toolbar.small-size > .item.button > .glyph):
(.toolbar.label-only > .item.button > .glyph):
(.toolbar > .item.button > .label):
(.toolbar.label-only > .item.activate.button.activated > .label):
(.toolbar.icon-and-label-horizontal > .item.button > .label):
(.toolbar.icon-only > .item.button > .label):
(body.window-inactive .toolbar > .item.button):
(.toolbar > .item.button.disabled):
(body.window-inactive .toolbar > .item.button.disabled):
* UserInterface/ButtonToolbarItem.js: Added.
(WebInspector.ButtonToolbarItem):
(WebInspector.ButtonToolbarItem.prototype.get label):
(WebInspector.ButtonToolbarItem.prototype.set label):
* UserInterface/ControlToolbarItem.css: Added.
(.toolbar > .item.control):
(.toolbar.icon-and-label-vertical > .item.control):
(.toolbar > .item.control:not(.hidden) + .item.control):
(.toolbar > .item.control > .glyph):
(body.window-inactive .toolbar > .item.control > .glyph):
(.toolbar > .item.control.disabled > .glyph):
(body.window-inactive .toolbar > .item.control.disabled > .glyph):
* UserInterface/ControlToolbarItem.js: Added.
(WebInspector.ControlToolbarItem):
* UserInterface/Main.css:
(body):
(#toolbar):
(body.docked #toolbar):
(body.docked #toolbar .item:not(.flexible-space)):
(#main):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._reloadPageIgnoringCache):
(WebInspector._copy):
* UserInterface/ToggleControlToolbarItem.js: Added.
(WebInspector.ToggleControlToolbarItem):
* UserInterface/Toolbar.css: Added.
(.toolbar):
(.toolbar.icon-and-label-vertical):
(.toolbar.icon-and-label-vertical.small-size):
(.toolbar.icon-only):
(.toolbar.label-only):
(body.docked .toolbar):
(body.window-inactive .toolbar):
(.toolbar > .item):
* UserInterface/Toolbar.js: Added.
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.get displayMode):
(WebInspector.Toolbar.prototype.set displayMode):
(WebInspector.Toolbar.prototype.get sizeMode):
(WebInspector.Toolbar.prototype.set sizeMode):
(WebInspector.Toolbar.prototype._handleContextMenuEvent):
(WebInspector.Toolbar.prototype._changeDisplayMode):
(WebInspector.Toolbar.prototype._toggleSmallIcons):
2012-11-07 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector correctly reflect the docked state again.
The query parameter changed in r133393. The front-end needs to look for the
new dockSide parameter instead of docked.
Reviewed by Jon Honeycutt.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Look for dockSide === "bottom".
2012-11-05 Timothy Hatcher <timothy@apple.com>
Change the point to inspect button icon from a hand to a crosshair.
Reviewed by Dan Bernstein.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Use Crosshair.pdf instead of Hand.pdf.
* UserInterface/Images/Crosshair.pdf: Added.
* UserInterface/Images/Hand.pdf: Removed.
2012-11-04 Timothy Hatcher <timothy@apple.com>
Fix the line numbers in the JavaScript & Events timeline; make them 0-based.
The rest of the Web Inspector expects 0-based line numbers. But the line numbers in the
JavaScript & Events timeline come in 1-based. We were displaying them correctly before,
but clicking the go-to arrow would instead highlight the next line in the source.
Reviewed by Joseph Pecoraro.
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Correctly display the now
0-based line number. Also add the line number to the tooltip to match what we do elsewhere.
(WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Only pass the lineNumber if it
isn't the first line.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Subtract 1 from the line numbers
coming in over the protocol before using them elsewhere in the Inspector.
2012-11-04 Timothy Hatcher <timothy@apple.com>
Rename ContentView.keepElementsScrolledToTheBottom to ContentView.shouldKeepElementsScrolledToBottom.
Reviewed by Dan Bernstein.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get shouldKeepElementsScrolledToBottom):
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.get shouldKeepElementsScrolledToBottom):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.get shouldKeepElementsScrolledToBottom):
2012-11-04 Timothy Hatcher <timothy@apple.com>
Save and restore the timeline scroll positions when going back and forth between views.
Reviewed by Dan Bernstein and Joseph Pecoraro.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Save and restore
the scroll position when swapping the DataGrids.
(WebInspector.TimelinesContentView.prototype.get scrollableElements): Added.
(WebInspector.TimelinesContentView.prototype.get keepElementsScrolledToTheBottom): Added.
2012-11-04 Timothy Hatcher <timothy@apple.com>
Show the Initiator for the layout and style events in the Layout and Rendering timeline.
This removes the Area column to make room.
<rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
Reviewed by Ricky Mondello and Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CallFrame.js:
(WebInspector.CallFrame): Added nativeCode parameter. Allow more null parameters in asserts.
(WebInspector.CallFrame.prototype.get nativeCode): Ditto.
* UserInterface/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent): Removed "area" and added
"initiatorCallFrame" support.
* UserInterface/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord): Added callFrames parameter.
(WebInspector.LayoutTimelineRecord.prototype.get callFrames): Added.
(WebInspector.LayoutTimelineRecord.prototype.get initiatorCallFrame): Added.
* UserInterface/Main.js:
(WebInspector.createSourceCodeLocationLink): Added helper.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Build CallFrames from the
record stack trace.
(WebInspector.TimelineManager.prototype._callFramesFromPayload): Added.
(WebInspector.TimelineManager.prototype._callFramesFromPayload.createCallFrame): Added.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid td .subtitle): Added.
(.content-view.timelines > .data-grid:focus tr.selected td .subtitle): Added.
(.content-view.timelines > .data-grid td .icon): Simplified selector to work with any column.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Added Initiator column.
(WebInspector.TimelinesContentView.prototype._sortComparator): Added support for comparing CallFrame.
2012-11-03 Timothy Hatcher <timothy@apple.com>
Rename ScriptLocation to SourceCodeLocation so it can be reused for more generic stack traces.
Rubber-stamped by Dan Bernstein.
* UserInterface/CallFrame.js:
(WebInspector.CallFrame):
(WebInspector.CallFrame.prototype.get sourceCodeLocation):
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel.prototype._treeElementSelected):
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload):
* UserInterface/Main.html:
* UserInterface/SourceCodeLocation.js: Renamed from WebInspector/UserInterface/ScriptLocation.js.
(WebInspector.SourceCodeLocation):
(WebInspector.SourceCodeLocation.prototype.get sourceCode):
(WebInspector.SourceCodeLocation.prototype.get lineNumber):
(WebInspector.SourceCodeLocation.prototype.get columnNumber):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange):
(WebInspector.SourceCodeTextEditor.prototype._matchesSourceCodeLocation):
2012-11-03 Timothy Hatcher <timothy@apple.com>
Start showing "Invalidate Styles" and "Invalidate Layout" in the Layout and Rendering timeline.
These records will be the one showing the initiator (back trace) information.
Part of: <rdar://problem/10935408> PARITY (WebKit Web Inspector): Add initiator information to the timeline
data grids (e.g. JS stacks for RecalcStyle, Layout and Painting)
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord.EventType.displayName): Support InvalidateStyles and InvalidateLayout.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle "ScheduleStyleRecalculation"
and "InvalidateLayout" and create records for them.
2012-11-03 Timothy Hatcher <timothy@apple.com>
Round width and height in the metrics sidebar to the nearest hundredth.
Width and height were missed when the other metrics started to be rounded. This also fixes
editing by using the unrounded value instead of keeping the tilde. Also append "px" when
updating the style if there is a decimal value.
Reviewed by Joseph Pecoraro.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Added. Moved from
the createBoxPartElement function.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement): Use createElement.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Renamed
from getContentAreaWidthPx. Use createElement.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Renamed
from getContentAreaHeightPx. Use createElement.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use createContentAreaWidthElement
and createContentAreaHeightElement instead.
(WebInspector.BoxModelDetailsSectionRow.prototype._startEditing): If the target element has a title use
it as the editing value since the current text is likely truncated/rounded.
(WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput): Account for decimals values.
2012-11-03 Timothy Hatcher <timothy@apple.com>
Clear the quick console when navigating to another page.
When reloading the same page we insert a divider.
<rdar://problem/11194811> Quick Console does not clear on navigation/refresh
Reviewed by Joseph Pecoraro.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup): Added newSession parameter and style class.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Removed group creation and call startNewSession.
(WebInspector.JavaScriptLogViewController.prototype.clear): Call startNewSession passing true.
(WebInspector.JavaScriptLogViewController.prototype.startNewSession): Added. Moved parts
from clear and the constructor.
* UserInterface/LogContentView.css:
(.console-messages > .console-group:last-of-type .console-user-command): Added.
(.console-message, .console-user-command): Removed border-bottom.
(.console-message:not(:last-child), .console-user-command:not(:last-child)): Added.
(.console-group:not(:first-child)): Added.
(.console-group.new-session): Added.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._activeLogCleared): Check isWaitingForResult
to make sure this was the console that requested the clear.
* UserInterface/QuickConsole.css:
(.quick-console > .toolbar): Added shadow to look like a border on the toolbar. This
is needed now that the last console message does not have a bottom-border.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.didClearMessages): Clear _lastMessage and _lastMessageIgnored.
(WebInspector.QuickConsole.prototype._activeLogCleared): Check isWaitingForResult
to make sure this was the console that requested the clear.
(WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
(WebInspector.QuickConsole.prototype._logsCleared): Added.
(WebInspector.QuickConsole.prototype._sessionStarted): Added.
2012-10-31 Timothy Hatcher <timothy@apple.com>
Don't show 'undefined' in the console after sending the clear() command.
Reviewed by Ada Chan.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Set _cleared to true.
(WebInspector.JavaScriptLogViewController.prototype.clear): Ditto.
(WebInspector.JavaScriptLogViewController.prototype.printResult): Return early if _cleared.
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _cleared to false.
2012-10-31 Timothy Hatcher <timothy@apple.com>
Allow independently clearing either the log view or the quick console.
This fixes up the clearing process and mostly decouples it from LogManager.
The ActiveLogCleared event is now only used to honor the clear() command.
This also adds the Clear Log context menu item to the Quick Console.
Reviewed by Antoine Quint.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.clear): Focus the prompt
and call the new didClearMessages delegate function.
(WebInspector.JavaScriptLogViewController.prototype._requestClearMessages): Removed.
(WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call clear
instead of _requestClearMessages.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.didClearMessages): Added. Tell LogManager.
(WebInspector.LogContentView.prototype._activeLogCleared): Only clear this log if
it is being used at the time.
(WebInspector.LogContentView.prototype._clearLog): Call clear instead of requestClearMessages.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype.didClearMessages): Added.
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Set _cleared to false.
(WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added Clear Log
context menu item.
(WebInspector.QuickConsole.prototype._clearLog): Added.
(WebInspector.QuickConsole.prototype._activeLogCleared): Only clear this log if it is
being used at the time. Move code from here to didClearMessages.
(WebInspector.QuickConsole.prototype._messageAdded): Even if we show the message,
remember it in case we get an updated repeat count later.
(WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated):
2012-10-31 Timothy Hatcher <timothy@apple.com>
Add an option to make the Quick Console only show messages while actively debugging.
This adds a context menu item to toggle the option. When "Always Show Console Messages"
is unchecked then console messages will only show when evaluating and expression or
stepping through code in the debugger. The default is to always show messages.
<rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.isWaitingForResult): Added.
(WebInspector.JavaScriptLogViewController.prototype._appendCommand): Set _waitingForResult.
(WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Clear _waitingForResult.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Added event listeners for the contextmenu event.
(WebInspector.QuickConsole.prototype._viewContainerHandleContextMenuEvent): Added. Create and
show the context menu with the new option.
(WebInspector.QuickConsole.prototype._toggleAlwaysShowConsoleMessages): Added. Toggle the setting.
(WebInspector.QuickConsole.prototype._activeLogCleared): Clear the ignored emssage.
(WebInspector.QuickConsole.prototype._shouldAddNewMessage): Added.
(WebInspector.QuickConsole.prototype._messageAdded): Check _shouldAddNewMessage before appending.
Squirrel away the ignored message incase we need to show it later.
(WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Check _shouldAddNewMessage.
Appended the squirreled away the ignored message first.
2012-10-30 Timothy Hatcher <timothy@apple.com>
Remember and restore the console history between page reloads and Web Inspector sessions.
<rdar://problem/11343640> REGRESSION (Safari 6): Log panel console history of commands
(up/down arrows) lost after page navigation
Reviewed by Brian Weinstein.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Create the setting and initialize the prompt.
(WebInspector.JavaScriptLogViewController.prototype.printResult): Update the history setting
with the last 30 commands.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Pass a history setting identifier.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Ditto.
2012-10-30 Timothy Hatcher <timothy@apple.com>
Echo console messages to the Web Inspector's quick console.
<rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
Reviewed by Ada Chan.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Listen for MessageAdded and PreviousMessageRepeatCountUpdated.
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage): Only auto expand and scroll down
for result messages.
(WebInspector.QuickConsole.prototype._messageAdded): Added. Call through.
(WebInspector.QuickConsole.prototype._previousMessageRepeatCountUpdated): Added. Call through.
2012-10-30 Timothy Hatcher <timothy@apple.com>
Make JavaScriptLogViewController keep track of the previous message and repeat counts.
Part of: <rdar://problem/11194915> REGRESSION (Safari 6): Console messages are not echoed to Quick Console
Reviewed by Ada Chan.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Don't store _messages, it wasn't used. Added _previousMessage
and _repeatCountWasInterrupted.
(WebInspector.JavaScriptLogViewController.prototype.clear): Reset _previousMessage and _repeatCountWasInterrupted.
(WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage): Clone the message since there might be
multiple clients using the message, and since the message has a DOM element it can't be two places at once.
(WebInspector.JavaScriptLogViewController.prototype.updatePreviousMessageRepeatCount): Added. Moved from LogManager.
(WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true to _appendConsoleMessage to set the
_repeatCountWasInterrupted flag and not set _previousMessage.
(WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult): Ditto.
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Set _repeatCountWasInterrupted and only
set _previousMessage when repeatCountWasInterrupted is false. Don't store _messages, it wasn't used.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.updatePreviousMessageRepeatCount): Added. Call through.
* UserInterface/LogManager.js:
(WebInspector.LogManager): Remove initialize call.
(WebInspector.LogManager.prototype.initialize): Removed. Not needed.
(WebInspector.LogManager.prototype.messageWasAdded): Dispatch the message in an object, not as data directly.
Assert the message was not used directly, it should be cloned.
(WebInspector.LogManager.prototype.messagesCleared): Removed call to initialize.
(WebInspector.LogManager.prototype.messageRepeatCountUpdated): MOved to JavaScriptLogViewController.
Fire PreviousMessageRepeatCountUpdated event instead.
(WebInspector.LogManager.prototype._mainResourceDidChange): Removed initialize call.
(WebInspector.LogManager.prototype._addMessage): Removed.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Added event listener for PreviousMessageRepeatCountUpdated.
(WebInspector.LogSidebarPanel.prototype._messageAdded): Get message off data object. Update comment.
(WebInspector.LogSidebarPanel.prototype._previousMessageRepeatCountUpdated): Added. Call through to current view.
2012-10-30 Timothy Hatcher <timothy@apple.com>
Change the icons for Debug, Storage and Log navigators.
This also renamed Debug Navigator to Call Stack Navigator and moved
it and Issue to the end of the list since they are not always visible.
I updated the keyboard shortcut numbers to match the new order.
For better balance, I updated the Breakpoint and Issue icons.
To help clarify these navigation items I added "Navigator" or "Details"
to the tooltips, so they are no longer just singular word tooltips.
<rdar://problem/11991020> Debug icon is unintuitive, consider a new icon
<rdar://problem/12598939> Storage icon is unintuitive, consider a new icon
<rdar://problem/12596756> Log icon is unintuitive, consider a new icon
Reviewed by Conrad Shultz.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel):
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel):
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel):
* UserInterface/Images/NavigationItemBreakpoint.pdf: Changed.
* UserInterface/Images/NavigationItemFunction.pdf: Added.
* UserInterface/Images/NavigationItemLog.pdf: Changed.
* UserInterface/Images/NavigationItemStorage.pdf: Changed.
* UserInterface/Images/NavigationItemWarning.pdf: Changed.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel):
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
2012-10-28 Mark Rowe <mrowe@apple.com>
Remove references to unsupported OS and Xcode versions.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* WebInspectorUI.xcodeproj/project.pbxproj: Remove reference to CompilerVersion.xcconfig.
2012-10-29 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector's clear() command work in the console again.
<rdar://problem/11007383> REGRESSION (Safari 6): Should be able to clear current console log via clear() command
Reviewed by Ada Chan.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messagesCleared): Call LogManager.messagesCleared.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded): Added comment about ConsoleObserver.
(WebInspector.LogManager.prototype.messagesCleared): Added. Moved from requestClearMessages.
(WebInspector.LogManager.prototype.messageRepeatCountUpdated): Added comment about ConsoleObserver.
(WebInspector.LogManager.prototype.requestClearMessages): Removed clearing since that happens
in messagesCleared now in response to the request.
2012-10-29 Timothy Hatcher <timothy@apple.com>
Allow resizing the docked Web Inspector from any empty space in the navigation bars.
<rdar://problem/11964849> REGRESSION (Safari 6): Resizing the docked Web Inspector is not easy
Reviewed by Ada Chan.
* UserInterface/Main.css:
(body.docked #details-sidebar > .navigation-bar): Show row-resize cursor.
(body.docked #details-sidebar > .navigation-bar .item:not(.flexible-space)): Reset the cursor to default.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Add event listeners to the navigation bars.
2012-10-28 Timothy Hatcher <timothy@apple.com>
Use a specific icon for application cache manifests instead of the generic document icon.
<rdar://problem/11427380> In Storage navigator Application Cache icon should be better than a generic document icon
Reviewed by Ricky Mondello.
* UserInterface/ApplicationCacheIcons.css:
(.application-cache-manifest .icon): Use the new icons.
* UserInterface/Images/ApplicationCacheManifest.png: Added.
* UserInterface/Images/ApplicationCacheManifest@2x.png: Added.
2012-10-28 Joseph Pecoraro <pecoraro@apple.com>
Make radio navigation buttons only switch for the left mouse button.
<rdar://problem/11795081> Right-clicking navigator icons produces unexpected results
Reviewed by Timothy Hatcher.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype._mouseDown): Return early if event.button !== 0.
(WebInspector.NavigationBar.prototype._mouseMoved): Assert event.button !== 0.
(WebInspector.NavigationBar.prototype._mouseUp): Ditto.
2012-10-27 Timothy Hatcher <timothy@apple.com>
Make the network timeline bars and callouts HiDPI compliant.
<rdar://problem/10643175> Timeline pills/callouts should be made HiDPI compliant
Reviewed by Sam Weinig.
* UserInterface/Images/NetworkBarBlue.png: Added.
* UserInterface/Images/NetworkBarBlue@2x.png: Added.
* UserInterface/Images/NetworkBarGray.png: Added.
* UserInterface/Images/NetworkBarGray@2x.png: Added.
* UserInterface/Images/NetworkBarGreen.png: Added.
* UserInterface/Images/NetworkBarGreen@2x.png: Added.
* UserInterface/Images/NetworkBarLabelCalloutLeft.pdf: Added.
* UserInterface/Images/NetworkBarLabelCalloutRight.pdf: Added.
* UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.pdf: Added.
* UserInterface/Images/NetworkBarLabelCalloutWhiteRight.pdf: Added.
* UserInterface/Images/NetworkBarOrange.png: Added.
* UserInterface/Images/NetworkBarOrange@2x.png: Added.
* UserInterface/Images/NetworkBarPurple.png: Added.
* UserInterface/Images/NetworkBarPurple@2x.png: Added.
* UserInterface/Images/NetworkBarRed.png: Added.
* UserInterface/Images/NetworkBarRed@2x.png: Added.
* UserInterface/Images/NetworkBarWhiteFlat.png: Added.
* UserInterface/Images/NetworkBarWhiteFlat@2x.png: Added.
* UserInterface/Images/NetworkBarYellow.png: Added.
* UserInterface/Images/NetworkBarYellow@2x.png: Added.
* UserInterface/Images/NetworkHollowBarBlue.png: Added.
* UserInterface/Images/NetworkHollowBarBlue@2x.png: Added.
* UserInterface/Images/NetworkHollowBarGray.png: Added.
* UserInterface/Images/NetworkHollowBarGray@2x.png: Added.
* UserInterface/Images/NetworkHollowBarGreen.png: Added.
* UserInterface/Images/NetworkHollowBarGreen@2x.png: Added.
* UserInterface/Images/NetworkHollowBarOrange.png: Added.
* UserInterface/Images/NetworkHollowBarOrange@2x.png: Added.
* UserInterface/Images/NetworkHollowBarPurple.png: Added.
* UserInterface/Images/NetworkHollowBarPurple@2x.png: Added.
* UserInterface/Images/NetworkHollowBarRed.png: Added.
* UserInterface/Images/NetworkHollowBarRed@2x.png: Added.
* UserInterface/Images/NetworkHollowBarYellow.png: Added.
* UserInterface/Images/NetworkHollowBarYellow@2x.png: Added.
* UserInterface/Images/graphLabelCalloutLeft.png: Removed.
* UserInterface/Images/graphLabelCalloutLeftWhite.png: Removed.
* UserInterface/Images/graphLabelCalloutRight.png: Removed.
* UserInterface/Images/graphLabelCalloutRightWhite.png: Removed.
* UserInterface/Images/timelineHollowPillBlue.png: Removed.
* UserInterface/Images/timelineHollowPillGray.png: Removed.
* UserInterface/Images/timelineHollowPillGreen.png: Removed.
* UserInterface/Images/timelineHollowPillOrange.png: Removed.
* UserInterface/Images/timelineHollowPillPurple.png: Removed.
* UserInterface/Images/timelineHollowPillRed.png: Removed.
* UserInterface/Images/timelineHollowPillYellow.png: Removed.
* UserInterface/Images/timelinePillBlue.png: Removed.
* UserInterface/Images/timelinePillGray.png: Removed.
* UserInterface/Images/timelinePillGreen.png: Removed.
* UserInterface/Images/timelinePillOrange.png: Removed.
* UserInterface/Images/timelinePillPurple.png: Removed.
* UserInterface/Images/timelinePillRed.png: Removed.
* UserInterface/Images/timelinePillWhiteFlat.png: Removed.
* UserInterface/Images/timelinePillYellow.png: Removed.
* UserInterface/NetworkTimeline.css:
(.network-graph-label.before):
(.network-graph-label.before::after):
(.network-graph-label.after):
(.network-graph-label.after::before):
(.network-graph-bar):
(.resource-cached .network-graph-bar):
(.network-resource-type-document .network-graph-bar):
(.network-resource-type-document.resource-cached .network-graph-bar):
(.network-resource-type-stylesheet .network-graph-bar):
(.network-resource-type-stylesheet.resource-cached .network-graph-bar):
(.network-resource-type-image .network-graph-bar):
(.network-resource-type-image.resource-cached .network-graph-bar):
(.network-resource-type-font .network-graph-bar):
(.network-resource-type-font.resource-cached .network-graph-bar):
(.network-resource-type-script .network-graph-bar):
(.network-resource-type-script.resource-cached .network-graph-bar):
(.network-resource-type-xhr .network-graph-bar):
(.network-resource-type-xhr.resource-cached .network-graph-bar):
(.network-resource-type-other .network-graph-bar):
(.network-resource-type-other.resource-cached .network-graph-bar):
(.data-grid:focus tr.selected .network-graph-bar):
(.data-grid:focus tr.selected .resource-cached .network-graph-bar):
(.data-grid:focus tr.selected .network-graph-label.before::after):
(.data-grid:focus tr.selected .network-graph-label.after::before):
2012-10-26 Timothy Hatcher <timothy@apple.com>
Clear the issue navigator sidebar when the active log is cleared.
Reviewed by Ada Chan.
* UserInterface/IssueManager.js:
(WebInspector.IssueManager): Listen for the ActiveLogCleared event.
(WebInspector.IssueManager.prototype.initialize): Dispatch the Cleared event.
(WebInspector.IssueManager.prototype._activeLogCleared): Added. Call initialize.
(WebInspector.IssueManager.prototype._mainResourceDidChange): Just call initialize
since it now dispatches the Cleared event.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create logManager before issueManager so IssueManager
can listen for the ActiveLogCleared event.
2012-10-26 Timothy Hatcher <timothy@apple.com>
Clean up LogContentView and make clearing the console have straightforward code path.
The icon for the trashcan was also 1px too low and not embossed.
Reviewed by Brian Weinstein.
* UserInterface/Images/NavigationItemTrash.pdf: Updated.
* UserInterface/LogContentView.css:
(.console-messages): Changed from #console-messages.
(.console-messages a): Ditto.
(.console-messages a:hover): Ditto.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Don't set ids on elements. Remove unused className.
Directly listen for the ActiveLogCleared event. Remove true from the end of the
ButtonNavigationItem for the clear button to make it embossed.
(WebInspector.LogContentView.prototype.disable): Set _disabled. Also disable the clear
button and add a FIXME.
(WebInspector.LogContentView.prototype.consoleCleared): Removed. Replaced by _activeLogCleared.
(WebInspector.LogContentView.prototype.closed): Added.
(WebInspector.LogContentView.prototype.didAppendConsoleMessage): Removed. Stop firing
and event no one listens for.
(WebInspector.LogContentView.prototype._handleContextMenuEvent): Use _clearLog. Don't
add the context menu item for disabled logs.
(WebInspector.LogContentView.prototype._requestClearMessages): Removed. Replaced by _clearLog.
(WebInspector.LogContentView.prototype._activeLogCleared): Added.
(WebInspector.LogContentView.prototype._clearLog): Call WebInspector.logManager.requestClearMessages
and wait for the ActiveLogCleared event.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Removed ActiveLogCleared event listener.
(WebInspector.LogSidebarPanel.prototype._activeLogCleared): Removed.
2012-10-26 Timothy Hatcher <timothy@apple.com>
Update all of the generated icons in the Web Inspector when the device pixel ratio changes.
<rdar://problem/12579083> Update generated images as the window moves between 1x and 2x screens
Reviewed by Ricky Mondello.
* UserInterface/ImageUtilities.js:
(generateColoredImagesForCSS): Added matchMedia listener.
(generateColoredImagesForCSS.generateImages): Renamed from imageLoaded.
(generateEmbossedImages): Added matchMedia listener.
(generateEmbossedImages._generateImages): Renamed from _imageLoaded.
2012-10-25 Timothy Hatcher <timothy@apple.com>
Make ImageUtilities.js in Web Inspector webkitGetImageDataHD and webkitGetImageDataHD.
Since the 2x canvas approach was no longer working we now only generate one canvas that
matches the device pixel ratio. This does not properly update as the Web Inspector
changes screens, and that is tracked by <rdar://problem/12579083>.
The icons are still blurry in HiDPI, and that is tracked by <rdar://problem/12574189>.
<rdar://problem/12579056> Update ImageUtilities.js to properly work in HIDPI
Reviewed by Antoine Quint.
* UserInterface/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Remove 2x selectors.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Ditto.
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Remove 2x selectors and media queries.
* UserInterface/DOMTreeOutline.css: Ditto.
* UserInterface/DataGrid.css: Ditto.
* UserInterface/DetailsSection.css: Ditto.
* UserInterface/LogContentView.css: Ditto.
* UserInterface/Main.css: Ditto.
* UserInterface/NavigationSidebarPanel.css: Ditto.
* UserInterface/Section.css: Ditto.
* UserInterface/TimelinesContentView.css: Ditto.
* UserInterface/ImageUtilities.js:
(generateColoredImage): Use webkitGetImageDataHD and webkitPutImageDataHD.
(generateColoredImagesForCSS): Stop generating 2x versions.
(generateEmbossedImages): Stop generating 2x versions. Use webkitGetImageDataHD and
webkitPutImageDataHD.
2012-10-25 Korhan Bircan <kbircan@apple.com>
Fix for "<rdar://problem/12120092> REGRESSION (Safari 6): No button to clear the Log view or Quick Console".
Reviewed by Timothy Hatcher.
There's no "Clear Console" button in the log content view and we only support Command-K shortcut
to clear the console. This is a missing feature that has been mentioned a few times on Twitter
and Stack Overflow. This patch adds a "Clear Console" button in the navigation bar where we think
is a good place for discoverability.
We can likely do the same for the Quick Console once we decide where the best place to put the
button is.
* Localizations/en.lproj/localizedStrings.js: Regenerated after adding the tooltip.
* UserInterface/Images/NavigationItemTrash.pdf: Added.
* UserInterface/LogContentView.js:
Added a navigation item button with a trashcan icon for clearing the console log.
Renamed context menu tooltip from "Clear Console" to "Clear Log" for consistency.
2012-10-25 Timothy Hatcher <timothy@apple.com>
Correct the blurriness of the Close, Dock and Undock navigation items in the Web Inspector.
<rdar://problem/12573816> Close, Dock and Undock navigation items are blurry
Reviewed by Dan Bernstein.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype._generateImages): Pass _imageHeight instead of _imageWidth again.
2012-10-25 Timothy Hatcher <timothy@apple.com>
Darken the blue used for Web Inspector active navigation items to have better contrast.
This also adds a slight glow to simulate that these buttons have a blue light.
Reviewed by Antoine Quint.
* UserInterface/ImageUtilities.js:
(._createEmbossedCanvasImage): Tweak the colors and add a glow.
2012-10-24 Timothy Hatcher <timothy@apple.com>
Hide empty navigation sidebars in the Web Inspector until they have content.
This hides Issues, Debug and Storage if they are empty. This frees up the navigation
bar and makes it less intimidating in most cases.
<rdar://problem/12569339> Empty navigation sidebars should be hidden until they have content.
Rubber-stamped by Antoine Quint.
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Pass true
to showEmptyContentPlaceholder to indicate the navigation item should be hidden too.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
* UserInterface/NavigationItem.js:
(WebInspector.NavigationItem.prototype.set hidden): Update layout os items expand and collapse
as the space available changes.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Start the navigation bar out as hidden if auto-hiding.
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Call
_updateNavigationItemVisibility after setting _hideNavigationItemWhenEmpty.
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Ditto.
(WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Call
_updateNavigationItemVisibility.
(WebInspector.NavigationSidebarPanel.prototype.shown): Force navigation item visible.
(WebInspector.NavigationSidebarPanel.prototype.hidden): Added. Call _updateNavigationItemVisibility.
(WebInspector.NavigationSidebarPanel.prototype._updateNavigationItemVisibility): Added.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel): Pass true to NavigationSidebarPanel for auto-hiding.
2012-10-24 Timothy Hatcher <timothy@apple.com>
Make Command-Shift-C toggle the "point to inspect" mode.
This shortcut originates from Firebug and is also available in Chrome. To make this work
I had to make DOMTreeManager keep track of the state and fire an event when it changed.
That way the global shortcut could toggle the mode even if there isn't a FrameContentView.
This also allows all the FrameContentViews to keep in sync with the global switch.
<rdar://problem/6275138> Inspect clicked element needs a keyboard shortcut
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.inspectElement): Fire InspectModeStateChanged.
(WebInspector.DOMTreeManager.prototype.get inspectModeEnabled): Added.
(WebInspector.DOMTreeManager.prototype.set inspectModeEnabled.callback): Added.
Handle the error case and fire InspectModeStateChanged.
(WebInspector.DOMTreeManager.prototype.set inspectModeEnabled): Changed from
setInspectModeEnabled into a setter. Use an internal callback.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get navigationItems): Renamed _nodeSearchActivateButtonNavigationItem
to _inspectModeButtonNavigationItem.
(WebInspector.FrameContentView.prototype.shown): Removed call to _setNodeSearchEnabled.
(WebInspector.FrameContentView.prototype._inspectModeStateChanged): Renamed from _setNodeSearchEnabled.
(WebInspector.FrameContentView.prototype._toggleNodeSearch): Toggle WebInspector.domTreeManager.inspectModeEnabled
and listen for the event instead of a callback.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a shortcut for inspect mode.
(WebInspector._toggleInspectMode): Added.
2012-10-24 Timothy Hatcher <timothy@apple.com>
Make it easy to have different tooltips for toggle buttons in the Web Inspector.
Also tweak the wording of the hand button in an attempt to keep it clear and terse.
Reviewed by Jeff Miller.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem): Take an activatedToolTip param in addition to
defaultToolTip and store them.
(WebInspector.ActivateButtonNavigationItem.prototype.get defaultToolTip): Added.
(WebInspector.ActivateButtonNavigationItem.prototype.get activatedToolTip): Added.
(WebInspector.ActivateButtonNavigationItem.prototype.set activated): Switch the tooltips.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Pass in alternate tooltips for the navigation items.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Setup the tooltips when the navigation items are created.
(WebInspector.updateDockedState): Remove toolTip manipulation.
(WebInspector._sidebarCollapsedStateDidChange): Ditto.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Setup the tooltips when the navigation items are created.
(WebInspector.QuickConsole.prototype.set collapsed): Remove toolTip manipulation.
(WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
(WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
* UserInterface/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem):Take an alternateToolTip param in addition to
defaultToolTip and store them.
(WebInspector.ToggleButtonNavigationItem.prototype.get defaultToolTip): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.get alternateToolTip): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Switch the tooltips.
2012-10-25 Antoine Quint <graouts@apple.com>
Customise the word-wrapping behaviour to break even when there is no space in the text
typed into the console (W3C spec at http://www.w3.org/TR/css3-text/#overflow-wrap)
<rdar://problem/12331949> Quick console text overlaps debugging controls
Reviewed by Timothy Hatcher.
* UserInterface/JavaScriptTextPrompt.css:
(.javascript-prompt):
2012-10-24 Antoine Quint <graouts@apple.com>
Add the "active-focus" state as a shared state for all button navigation items and use that state as well
as the "focus" state regardless of keyboard focus.
<rdar://problem/11742049> Web Inspector navigation bar buttons need a more noticeable selected state
Reviewed by Timothy Hatcher.
* UserInterface/ActivateButtonNavigationItem.js: Stop using custom states and use the shared states defined in
ButtonNavigationItem.
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
* UserInterface/ButtonNavigationItem.js: Add the "active-focus" from ActivateButtonNavigationItem.
* UserInterface/RadioButtonNavigationItem.js: Use the "focus" state even when we're not using keyboard focus
and use the "active-focus" state when we're pressing the button as well.
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
2012-10-23 Timothy Hatcher <timothy@apple.com>
Make "Inspect Element" and the inspect() console API switch the sidebar to match the content view.
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.inspect): Select the resourceSidebarPanel or
the storageSidebarPanel depending on the type of object being inspected.
2012-10-23 Timothy Hatcher <timothy@apple.com>
Fix event listener links and make them work with anonymous scripts.
<rdar://problem/12557978> REGRESSION: Event listener function links are displayed as
numbers and don't work
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.reset): Call Script.resetUniqueDisplayNameNumbers. This
way the anonymous scripts scripts start back at 1 when you reload or load a new page.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): In the past scriptId
could be a URL. Now it is always a script identifier. So try looking up the resource by URL
if a script can't be found directly. Use WebInspector.createSourceCodeLink.
* UserInterface/Main.css:
(.go-to-link): Added cursor: pointer for cases when the link has no href.
* UserInterface/Main.js:
(WebInspector.createSourceCodeLink): Added.
(WebInspector.createSourceCodeLink.showSourceCode): Added.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get displayName): Added.
* UserInterface/Script.js:
(WebInspector.Script.resetUniqueDisplayNameNumbers): Added.
(WebInspector.Script.prototype.get displayName): Added.
* UserInterface/ScriptTreeElement.js:
(WebInspector.ScriptTreeElement): Use the displayName getter for mainTitle.
* UserInterface/SourceCode.js:
(WebInspector.SourceCode.prototype.get displayName): Added.
2012-10-22 Timothy Hatcher <timothy@apple.com>
Make docking/undocking the Web Inspector work again.
<rdar://problem/12554785> REGRESSION (r132045): Docking/undocking does not work
Reviewed by Dan Bernstein.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setAttachedWindow): Removed.
(InspectorFrontendAPI.setDockSide): Added.
* UserInterface/Main.js:
(WebInspector._toggleDockedState): Use InspectorFrontendHost.requestSetDockSide.
2012-10-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/12540519> Should be able to copy text from datagrid easier
Reviewed by Timothy Hatcher.
Have a DataGrid handle a copy event if the last selection was in the
DataGrid and it has a selected row. Also add a "Copy Row" context menu.
* Localizations/en.lproj/localizedStrings.js:
Add "Copy Row" context menu string.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
Add "Copy Row" context menu item if the node is selectable.
(WebInspector.DataGrid.prototype._copyTextForDataGridNode):
Return a tab separated list of values. This uses the original data from
which the node is created. In some cases, like the instrument navigator's
datagrids, this may not match the final DataGrid row's content.
(WebInspector.DataGrid.prototype._beforeCopy):
(WebInspector.DataGrid.prototype._copy):
Allow copy when the event is inside the datagrid, there is no range
selection, and we have a selected row.
(WebInspector.DataGrid.prototype._copyRow):
Directly copy an individual row.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
Remove useCapture from the main document's beforecopy handler.
2012-10-22 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector fast!
Use a timeout instead of an interval to prevent being capped on the time between protocol messages.
Only one timeout is created and the whole queue is dispatched when the timer fires. This prevents
creating potentially hundreds of timers that were all firing at the same time.
<rdar://problem/11759145> REGRESSION (Safari 6): console.log() exhibits extremely long delay (slow)
when many javascript files have just been loaded
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector.dispatchNextQueuedMessageFromBackend): Removed interval code.
(WebInspector.dispatchMessageFromBackend): Use setTimeout instead of setInterval. Updated the comment
and removed the reentrancy part, which isn't possible since the backend also has a queue with a timer.
2012-10-22 Timothy Hatcher <timothy@apple.com>
Make WebInspector.JavaScriptLogViewController be responsible for scrolling to the bottom,
since it can check before new messages are added to know if a scroll is needed.
This fixes a bug where we were not auto scrolling down if you were at the bottom.
<rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
Reviewed by John Sullivan.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Store element as _element.
(WebInspector.JavaScriptLogViewController.prototype.isScrolledToBottom): Added.
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom.delayedWork): Added.
Do the actual scroll here.
(WebInspector.JavaScriptLogViewController.prototype.scrollToBottom): Added. Don't scroll
immediately so we are not causing excessive layouts.
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage): Remember if we
were scrolled to the bottom before appending the message. This was the bug, before the delegate
didAppendConsoleMessage was checking and that was after the content was appended and we were
never scrolled to the bottom at that point.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage): Don't try to scroll, it is
now handled by JavaScriptLogViewController.
(WebInspector.LogContentView.prototype._isScrollIntoViewScheduled): Removed.
(WebInspector.LogContentView.prototype._scheduleScrollIntoView): Removed.
(WebInspector.LogContentView.prototype._immediatelyScrollIntoView): Removed.
(WebInspector.LogContentView.prototype._cancelScheduledScrollIntoView): Removed.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._isScrolledToBottom): Call through to JavaScriptLogViewController.
(WebInspector.QuickConsole.prototype._scrollToBottom): Ditto.
2012-10-22 Timothy Hatcher <timothy@apple.com>
Make WebInspector.JavaScriptLogViewController create the top WebInspector.ConsoleGroup.
JavaScriptLogViewController now takes the parent element so it controls more of the DOM. This will
be needed to control the scroll state instead of having LogContentView and QuickConsole do it.
Part of: <rdar://problem/12049983> REGRESSION (Safari 6): Console doesn't autoscroll when it should
Reviewed by John Sullivan.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Don't take in a ConsoleGroup, create it internally.
Insert or append the ConsoleGroup into the parentElement.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Don't make the ConsoleGroup, just get it from _logViewController.
Create and assign this.prompt first so it is in the DOM before making the _logViewController.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Don't make the ConsoleGroup.
2012-10-21 Timothy Hatcher <timothy@apple.com>
Prevent the scroll position from changing when rebuilding the styles sidebar.
<rdar://problem/12544009> The Styles details sidebar scrolls to the top after editing a property
Reviewed by Dan Bernstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Save and restore scrollTop.
2012-10-20 Timothy Hatcher <timothy@apple.com>
Add an "Inherited Styles" section to the Style details sidebar.
<rdar://problem/11981468> REGRESSION (Safari 6): Inspector does not show Inherited Style Rules
Reviewed by Ricky Mondello.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section.inherited .properties .inherited): Added.
Hides non-iherited properties for inherited rules.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Create and add the Inherited Styles section.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
Pass styleRule.isInherited instead of always passing false.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createRuleGroups): Added.
Factored out of createMatchedRuleGroups for reuse by inherited rules.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups):
Use the factored out createRuleGroups function.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Append inherited rules
to inheritedStyleRules for later use. Walk the inheritedStyleRules and create the sections and groups.
* UserInterface/DetailsSection.css:
(.details-section > .header): Reduce right padding, it was too wide.
(.details-section > .header > .node-link, .details-section > .header > .go-to-arrow): Added.
Float right to position the arrow on the right side of the title.
(.details-section > .header .go-to-arrow): Added. Adjust the size and margin to better fit the header.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Changed "show-inherited" to just "inherited". This reduces the
confusion with the computed style "show-inherited" class.
2012-10-20 Timothy Hatcher <timothy@apple.com>
Make the console log stay active when navigating to a new page if one was showing.
<rdar://problem/12542303> DOM Tree forces itself visible when navigating to a new page while looking at a Log
Reviewed by Ricky Mondello.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype._mainResourceDidChange): Only send SessionStarted or Cleared,
not both. This way listeners of Cleared can start the new session with some context.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._startSession): Added. Factored out of _sessionStarted.
Honor the forceActiveContentView parameter when deciding to show the content view.
(WebInspector.LogSidebarPanel.prototype._sessionStarted): Call _startSession.
(WebInspector.LogSidebarPanel.prototype._logsCleared): Remember if we were showing a log before
closing all the logs. Call _startSession can force the content view to be active if we were
showing a log before.
2012-10-20 Timothy Hatcher <timothy@apple.com>
Make Encoded and Transfer Size update when the values change during page load.
Renamed Encoded Size to Transfer Size to avoid confusion in cases where it isn't encoded. Also
the value includes the response headers size, which is the only size when showing a 304. This
is consistent with the title of the Transferred column in the Network Timeline.
<rdar://problem/12542122> Encoded and Decoded Size doesn't update in the Resource details sidebar
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get transferSize): Move the 304 check before the cached
check since we mark 304 loads as cached now, but there still was network transfer of headers.
(WebInspector.Resource.prototype.updateForResponse): Fire TransferSizeDidChange for 304 and
if we have a Content-Length.
(WebInspector.Resource.prototype.increaseSize): Fire TransferSizeDidChange if we don't have
a _transferSize and it isn't a 304 or Content-Length is missing.
(WebInspector.Resource.prototype.markAsCached): Fire TransferSizeDidChange when not a 304.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Renamed "Encoded Size" to "Transfer Size".
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for SizeDidChange and
TransferSizeDidChange events.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshDecodedSize and
_refreshTransferSize.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Use emDash
in more places. Removed valueForSize and updating of size rows.
(WebInspector.ResourceDetailsSidebarPanel.prototype._valueForSize): Added.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshDecodedSize): Added.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshTransferSize): Added.
2012-10-19 Timothy Hatcher <timothy@apple.com>
Make the Scope Chain details sidebar update when continuing in a loop.
<rdar://problem/11828667> REGRESSION (Safari 6): Variables do not update when continuing in a loop
Reviewed by Joseph Pecoraro.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Don't return early if the line
number didn't change. The execution state still could have changed.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set executionLineNumber): Only return early if there isn't a line
number and that isn't changing. Still dispatch the event even if the number didn't change. The execution
state still could have changed.
2012-10-19 Timothy Hatcher <timothy@apple.com>
Better support for complex Content-Types in the Post Data section.
This change splits out the charset and boundary info from the Content-Type and
displays that info on separate rows. It also handles zero size data since the
backend does not send data if there are any files present.
Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.simple.data > .value): Added.
* UserInterface/DetailsSectionSimpleRow.js:
(WebInspector.DetailsSectionSimpleRow.prototype.set value): Set the data class name
if the value does not have any spaces for good word breaking. This will allow breaking
on every character, which looks better for the boundary post data string.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Parse
the content type into MIME-type and the boundary and/or charset.
2012-10-19 Timothy Hatcher <timothy@apple.com>
Add the first part of showing POST data: simple data in the Resource details sidebar.
Part of: <rdar://problem/6716080> REGRESSION (Safari 6): Missing POST request data
Reviewed by Dean Jackson.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Removed optional parameters
when making a Resource.
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along postData.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for postData.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added parameter for postData.
Pass along postData to Resource constructor.
(WebInspector.FrameResourceManager.prototype._createFrame): Removed optional parameters
when making a Resource.
(WebInspector.FrameResourceManager.prototype._createResource): Ditto.
* UserInterface/Resource.js:
(WebInspector.Resource): Added postData parameter. Store the _postData.
(WebInspector.Resource.prototype.get postData): Added.
(WebInspector.Resource.prototype.get postDataContentType): Added.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Create _postDataSection. Don't show _queryParametersSection
by default, it is now added or removed in _refreshURL.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshPostDataSection.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Show and hide the query
parameters section based on the query string.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshPostDataSection): Added.
2012-10-19 Timothy Hatcher <timothy@apple.com>
Support text/x-javascript and other MIME-types as scripts.
The code was also throwing an exception for unknown MIME-types, which was causing
the view displaying the Resource to not show anything. Now we just log an error
and return null so plain text will be shown for unknown types.
<rdar://problem/11961403> REGRESSION (Safari 6): XHR response is blank for some
sites (including store.apple.com)
Reviewed by Antoine Quint.
* UserInterface/Resource.js:
(WebInspector.Resource.Type._mimeTypeMap): Added application/x-json and variants.
* UserInterface/SourceTokenizer.js:
(WebInspector.SourceTokenizer): Added application/x-json and variants. Changed a throw
into a console.error with a return of null.
2012-10-19 Timothy Hatcher <timothy@apple.com>
Properly clear the special script folders after a reload so old scripts don't stay around.
<rdar://problem/11329600> REGRESSION (Safari 6): Special scripts duplicate for each reload
Reviewed by Antoine Quint.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Set each folder to null so they will be
recreated instead of reused the next time there is a script to show.
=2012-10-18 Timothy Hatcher <timothy@apple.com>
Fix an issue where the Inspector would show duplicate broken resources if you opened it
while the page was still loading.
<rdar://problem/11328818> Broken resources if you open the inspector while the page is loading
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Add a comment
about why we might not have a resource.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Don't try to make a
resource here since we missed the resourceRequestWillBeSent call. It just caused duplicate resources
and broken ones too. Add a comment and return early.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Add a comment about why we
might not have a resource. Removed an assert.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
2012-10-18 Joseph Pecoraro <pecoraro@apple.com>
Add missing color aware CSS properties.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
2012-10-18 Joseph Pecoraro <pecoraro@apple.com>
In cases where the search term is a CSS Selector or XPath query and
not a textual match we were not adding a sidebar entry. In such cases
add a sidebar entry and highlight the entire title.
<rdar://problem/12522494> Searching "link[href]" in search navigator has missing sidebar items
Reviewed by Timothy Hatcher.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults):
First check for partial highlights in textual matches. If none were
found, this is a Selector or XPath match, and we highlight it entirely.
2012-10-18 Timothy Hatcher <timothy@apple.com>
Harden the Web Inspector a bit with a Content Security Policy header.
By default only load content from 'self'. Allow external loading of images, media and
fonts; because large resources are not sent over the inspector protocol. Allow inline
styles and eval for scripts.
Reviewed by Joseph Pecoraro.
* UserInterface/Main.html:
2012-10-17 Timothy Hatcher <timothy@apple.com>
Improve error reporting for Inspector protocol errors.
Reviewed by Dean Jackson.
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype.reportProtocolError): Log the message of the error
object, not the error object itself.
2012-10-17 Antoine Quint <graouts@apple.com>
We now display a new section in the resource details sidebar panel for the image size when we're inspecting
an image resource. To facilitate this, we add a new .getImageSize() method on Resource which creates an
<img> element to load the base64 version of the image as it was loaded and use the loaded element to query
the intrinsic image metrics.
<rdar://problem/11247288> REGRESSION (Safari 6): Width and height size info for image resources is missing
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.markAsFailed):
(WebInspector.Resource.prototype.getImageSize.imageDidLoad):
(WebInspector.Resource.prototype.getImageSize):
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
2012-10-16 Mark Rowe <mrowe@apple.com>
Add a configuration setting to control whether resources in the
Web Inspector framework are combined and minified.
Reviewed by Timothy Hatcher.
This allows non-Production builds to enable this functionality if desired.
* Configurations/WebInspectorFramework.xcconfig:
* Scripts/copy-user-interface-resources.sh:
2012-10-16 Timothy Hatcher <timothy@apple.com>
Fix an exception and properly deactivate the node search button after a node is inspected.
<rdar://problem/12507181> Remnant mention of .nodeSearchActivateButtonNavigationItem in Main.js
Reviewed by Ricky Mondello.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Added DOMNodeWasInspected event listener.
(WebInspector.FrameContentView.prototype._domNodeWasInspected): Added. Deactivate the node search button.
* UserInterface/Main.js:
(WebInspector._domNodeWasInspected): Always call InspectorFrontendHost.bringToFront(). This is good
for the Inspect Element context menu item in windowed mode too.
2012-10-16 Timothy Hatcher <timothy@apple.com>
Fix the dock buttons in the Web Inspector navigation bar when opening the Inspector with the left sidebar hidden.
<rdar://problem/12509577> REGRESSION: Dock navigation items are in the wrong place if the
Inspector is opened with the left sidebar hidden
Reviewed by Ricky Mondello.
* UserInterface/Main.js:
(WebInspector._updateDockNavigationItems): Only do this work if needed by checking if the close button is not
in the right place. This function can be called multiple times, and the concat can cause the items to be
inserted into the leftNavigationItems array multiple times.
2012-10-16 Antoine Quint <graouts@apple.com>
Adding decoded and encoded sizes as a new group in the Request & Response panel in
the resource details sidebar panel. To make the reported sizes more legible, we also
make a small change in Number.bytesToString() such that we have a space between the
value and the unit, just like what the Get Info panel does in the Finder.
<rdar://problem/12508215> Add decoded and encoded sizes to Request & Response panel
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse.valueForSize):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse):
* UserInterface/Utilities.js:
(Number.string_appeared_here.value):
2012-10-16 Antoine Quint <graouts@apple.com>
We add a new method to sync the state of the compositing borders button to the WebCore page settings
when a frame content view is shown in the Web Inspector UI. We also add a new backend command to complement
the OpenSource patch for https://bugs.webkit.org/show_bug.cgi?id=99458 which is also out for review.
<rdar://problem/12498181> "Show compositing borders" button is not activated when inspector is re-opened
Reviewed by Timothy Hatcher.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.shown):
(WebInspector.FrameContentView.prototype._toggleCompositingBorders):
(WebInspector.FrameContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
* UserInterface/InspectorBackendCommands.js:
2012-10-16 Antoine Quint <graouts@apple.com>
Add a new .highlight() method on TextEditorChunk which applies a simple CSS
animation to the HTML element for the text chunk, and call this method in
TextEditor's revealLine() method. Since the CSS class we're applying is only
meant to be transitory, we remove the CSS class name upon completion of the
animation.
<rdar://problem/12349298> REGRESSION (Safari 6): When clicking a file/line link
in the console the line is not highlighted in the source
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.css:
(.text-editor-text-chunk.highlighted):
(@-webkit-keyframes fadeout):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditorTextChunk.prototype.updateContent):
(WebInspector.TextEditorTextChunk.prototype.highlight):
2012-10-15 Timothy Hatcher <timothy@apple.com>
Fix an exception in ContentBrowser._updateContentViewNavigationItems that was causing resource to not be cleared.
<rdar://problem/12501269> REGRESSION: Reloading or loading a new page does not clear previous resources
Reviewed by Antoine Quint.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): The currentContentView can be
null when this is called. In that case just clear _currentContentViewNavigationItems and return early.
2012-10-15 Timothy Hatcher <timothy@apple.com>
Remove extra line breaks before color values when copying from the style sidebar.
<rdar://problem/12506099> When copying style rule sets from the sidebar,
line breaks are inserted in the middle of each line
Reviewed by Simon Fraser.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .swatch): Improve spacing and alignment since
having swatch-inner as an inline-block affects layout slightly.
(.sidebar > .panel.details.css-style .swatch-inner): Change display from block to
inline-block. This fixes the bug by making WebKit not insert a newline for the block.
2012-10-15 Timothy Hatcher <timothy@apple.com>
Treat SVG main resources as documents and syntax highlight them using the HTML tokenizer.
SVG subresources are still treated as images and preview as such. This matches how the
WebKit Web Inspector treats SVGs.
<rdar://problem/11332688> REGRESSION (Safari 6): Source code view shows SVG image instead of source
Reviewed by Ada Chan and Dan Bernstein.
* UserInterface/Resource.js:
(WebInspector.Resource.Type._mimeTypeMap): Added image/svg+xml
* UserInterface/SourceTokenizer.js:
(WebInspector.SourceTokenizer): Use HTMLSourceTokenizer for image/svg+xml.
2012-10-14 Jeff Miller <jeffm@apple.com>
Regenerate localizedStrings.js after r45263.
* Localizations/en.lproj/localizedStrings.js:
Regenerated.
2012-10-13 Timothy Hatcher <timothy@apple.com>
Avoid direct manipulation of the ContentBrowser and Sidebar navigation bars in Main.js.
<rdar://problem/12494193> Main.js should not modify the navigationBars directly
Reviewed by Antoine Quint.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Added _leftNavigationItems and _rightNavigationItems.
(WebInspector.ContentBrowser.prototype.get leftNavigationItems): Added.
(WebInspector.ContentBrowser.prototype.set leftNavigationItems): Added.
(WebInspector.ContentBrowser.prototype.get rightNavigationItems): Added.
(WebInspector.ContentBrowser.prototype.set rightNavigationItems): Added.
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems): Fix a
FIXME when calculating the insertionIndex by using _rightNavigationItems.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Use leftNavigationItems and rightNavigationItems
instead of direct manipulation of the navigation bar.
(WebInspector._updateDockNavigationItems): Ditto.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.insertNavigationItem): Remove the item if it
is already in another NavigationBar.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar): Added _leftNavigationItems and _rightNavigationItems.
(WebInspector.Sidebar.prototype.insertSidebarPanel): Don't use addNavigationItem
since that would go after the right items.
(WebInspector.Sidebar.prototype.get leftNavigationItems): Added.
(WebInspector.Sidebar.prototype.set leftNavigationItems): Added.
(WebInspector.Sidebar.prototype.get rightNavigationItems): Added.
(WebInspector.Sidebar.prototype.set rightNavigationItems): Added.
2012-10-13 Antoine Quint <graouts@apple.com>
We add a new navigation item to the FrameContentView to toggle composition debug options using
the page's settings. To facilitate that, we added a new method in InspectorPageAgent to allow
to tap into WebCore and change those settings. That work is covered by an OpenSource patch for
https://bugs.webkit.org/show_bug.cgi?id=99253.
<rdar://problem/10358004> Would like ability to turn layer borders on/off via the Web Inspector
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get navigationItems):
(WebInspector.FrameContentView.prototype.shown):
(WebInspector.FrameContentView.prototype._toggleNodeSearch):
(WebInspector.FrameContentView.prototype._toggleCompositingBorders):
* UserInterface/Images/NavigationItemLayers.pdf: Added.
* UserInterface/InspectorBackendCommands.js:
2012-10-12 Antoine Quint <graouts@apple.com>
We remove the code that manages the display of the "node inspection by selection" toggle navigation
item from Main.js and let the ContentBrowser add and remove navigation items registered on the ContentView
instance made the current content view.
<rdar://problem/12487959> Let content views provide navigation items to the content browser.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems.var):
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange):
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get navigationItems):
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.get navigationItems):
(WebInspector.FrameContentView.prototype.shown):
(WebInspector.FrameContentView.prototype._pathComponentSelected):
(WebInspector.FrameContentView.prototype._setNodeSearchEnabled):
(WebInspector.FrameContentView.prototype._toggleNodeSearch):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-10-12 Timothy Hatcher <timothy@apple.com>
Update the CSSKeywordCompletions.InheritedProperties list.
<rdar://problem/12371756> Computed -webkit-font-smoothing should appear in Inspector
Rubber-stamped by Brian Weinstein.
* UserInterface/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.InheritedProperties): Updated from CSSProperty::isInheritedProperty
from WebCore. The old list was from an old CSS 2.1 list.
2012-10-12 Timothy Hatcher <timothy@apple.com>
Don't overdraw the DataGrid sort indicator each time a DataGrid is created.
<rdar://problem/12488653> DataGrid sort indicator keeps getting darker
Reviewed by John Sullivan.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Store _generatedSortIndicatorImages
on the WebInspector.DataGrid constructor so it only generates the images once. Use a solid color for the
arrows. The previous color was too light now that it isn't overdrawing.
2012-10-11 Timothy Hatcher <timothy@apple.com>
Show the HTTP method, cached and HTTP status code/text in the Resource details sidebar.
This fixes two cases where the resource was not marked as cached; when loaded from the
disk cache and when there is a 304 response.
<rdar://problem/11256645> REGRESSION (Safari 6): No HTTP method shown
Reviewed by Ricky Mondello.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the method.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null
for the request method.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Mark as cached
when loaded from the disk cache.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Pass along the method.
* UserInterface/Resource.js:
(WebInspector.Resource): Added requestMethod and store it.
(WebInspector.Resource.prototype.get requestMethod): Added.
(WebInspector.Resource.prototype.updateForResponse): Renamed ResponseHeadersDidChange event to
ResponseReceived since it represents more than headers.
(WebInspector.Resource.prototype.markAsCached): Fire CacheStatusDidChange event.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Create new rows and section.
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Listen for new events.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call _refreshRequestAndResponse
instead of _refreshResponseHeaders.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestAndResponse): Added.
Update the new section and also call _refreshResponseHeaders.
2012-10-11 Antoine Quint <graouts@apple.com>
Identify floating value and display a rounded value to the 100th in the box model
section with a thumbnail showing the full value. Here are screenshots of before
after applying this patch for margins with a floating value.
<rdar://problem/12478166> Box Model section can show values overlapping their label
Reviewed by Timothy Hatcher.
* UserInterface/BoxModelDetailsSectionRow.js
2012-10-11 Antoine Quint <graouts@apple.com>
Make headers in the details section use an ellipsis overflow style.
<rdar://problem/12478151> Class names in the list of inherited classes in the Node
sidebar can overflow
Reviewed by Timothy Hatcher.
* UserInterface/DetailsSection.css
2012-10-10 Timothy Hatcher <timothy@apple.com>
Prevent searches from breaking links in the Source Code view of the Web Inspector.
This changes how the syntax highlighter appends tokens and search results. The token
elements are now created in whole before processing the inner text and search results.
Before the DOM would end up being flatter, but it caused multiple links to be created
if a search result was in the middle. The links were broken too because it only knew
about the fragment of the text and it resolved the absolute URL on that.
<rdar://problem/12461082> Searching in Safari's Web Inspector breaks links in source
Reviewed by Joseph Pecoraro.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.createSyntaxHighlightedDocumentFragment):
(WebInspector.createSyntaxHighlightedDocumentFragment.createTextNode):
(WebInspector.createSyntaxHighlightedDocumentFragment.appendText):
(WebInspector.createSyntaxHighlightedDocumentFragment.appendToken):
2012-10-10 Timothy Hatcher <timothy@apple.com>
Make DOM storage refresh on update when inspecting iOS 6 devices.
<rdar://problem/12472491> REGRESSION: DOM Storage does not refresh when inspecting iOS 6
Reviewed by Brian Weinstein.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added. Call domStorageUpdated.
* UserInterface/InspectorBackendLegacyCommands.js: Registered DOMStorage.updateDOMStorage event.
2012-10-10 Timothy Hatcher <timothy@apple.com>
Make database inspection work with Curie and keep it backwards compatible with iOS 6.
<rdar://problem/12463671> REGRESSION: Database inspection is broken
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DatabaseObject.js:
(WebInspector.DatabaseObject.prototype.executeSQL): Set expectsResultObject on the callback.
(WebInspector.DatabaseObject.prototype.executeSQL.queryCallback): Added.
(WebInspector.DatabaseObject.prototype.executeSQL.callback): Reworked for compatibility
by using the result object.
* UserInterface/DatabaseObserver.js:
(WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Added.
(WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Added.
* UserInterface/InspectorBackend.js:
(InspectorBackendClass.prototype.dispatch): See if the callback needs the result
object by checking for expectsResultObject.
* UserInterface/InspectorBackendLegacyCommands.js: Added.
* UserInterface/Main.html: Included InspectorBackendLegacyCommands.js.
2012-10-09 Timothy Hatcher <timothy@apple.com>
When using "Inspect Element", select the Style details sidebar panel if one of the DOM
details sidebar panels isn't already selected.
<rdar://problem/12239441> REGRESSION (Safari 6): "Inspect Element" shows Resource
details instead of useful Style details
Reviewed by John Sullivan.
* UserInterface/Main.js:
(WebInspector._domNodeWasInspected): Set this.detailsSidebar.selectedSidebarPanel
to this.cssStyleDetailsSidebarPanel if the current sidebar ins't an instance of
the WebInspector.DOMDetailsSidebarPanel prototype.
2012-10-09 Timothy Hatcher <timothy@apple.com>
Make the Style details sidebar work again after recent protocol changes.
This change makes the Web Inspector work with Curie's Inspector protocol as well
as maintaining backwards compatibility with iOS 6.
<rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
Reviewed by Ricky Mondello.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Removed forcedPseudoClasses
from the call to getComputedStyleAsync, because it was always ignored.
* UserInterface/CSSRule.js:
(WebInspector.CSSRule): Support selectorList and selectorText.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Removed
forcedPseudoClasses from the calls to getComputedStyleAsync and getMatchedStylesAsync.
Fallback to empty array for matchedCSSRules.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.parseRuleArrayPayload): The protocol had just an array of
rules, now it is an array of matches that have a 'rule' property. Support both.
(WebInspector.CSSStyleManager.prototype.forcedPseudoClasses): Removed.
(WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync): Removed forcedPseudoClasses
parameter. The protocol used 'rules' as a property, now it is 'matches'. Support both.
Use invoke() when calling CSSAgent.getMatchedStylesForNode since forcedPseudoClasses was removed
as an parameter, and invoke uses parameter names instead of parameter order.
(WebInspector.CSSStyleManager.prototype.getComputedStyleAsync): Removed forcedPseudoClasses
parameter. Use invoke() here too.
2012-10-09 Timothy Hatcher <timothy@apple.com>
Update InspectorBackendCommands.js to r130785 of the Inspector protocol.
<rdar://problem/12463786>
Some features need to be updated to work with these changes:
<rdar://problem/12281730> REGRESSION (r129470): Nothing is showing in the Style sidebar
<rdar://problem/12463671> REGRESSION: Database inspection is broken
<rdar://problem/12463631> REGRESSION: Subframes don't show the correct DOM (always the main frame's DOM)
Reviewed by Ricky Mondello.
* UserInterface/CSSObserver.js:
(WebInspector.CSSObserver.prototype.namedFlowCreated): Added stub.
(WebInspector.CSSObserver.prototype.namedFlowRemoved): Added stub.
(WebInspector.CSSObserver.prototype.regionLayoutUpdated): Added stub.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Removed.
* UserInterface/DatabaseObserver.js:
(WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Removed.
(WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Removed.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.scriptParsed): Added sourceMapURL and hasSourceURL arguments.
* UserInterface/InspectorBackendCommands.js: Updated to r130785.
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.didCreateWorker): Removed.
(WebInspector.InspectorObserver.prototype.didDestroyWorker): Removed.
2012-10-04 Mark Rowe <mrowe@apple.com>
Take Xcode's suggestions for changes to our internal Xcode projects.
Rubber-stamped by John Sullivan.
Xcode 4.5 suggests enabling several new warnings in most of our projects. While doing this
I also noticed and removed a number of obsolete configuration settings, and upgraded the
project format for the few projects that were not using the latest version.
* Configurations/Base.xcconfig:
* WebInspectorUI.xcodeproj/project.pbxproj:
2012-09-13 Timothy Hatcher <timothy@apple.com>
Collapse the Computed Style section by default.
We do remember the state, but lets help people along here and collapse it by default.
<rdar://problem/12294479>
Reviewed by Cody Krieger and Mark Rowe.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Pass true when making the _computedStyleSection
to make it collapse by default.
2012-08-27 Timothy Hatcher <timothy@apple.com>
Use -webkit-image-set for border-image instead of media queries in the Web Inspector.
Reviewed by Dan Bernstein.
* UserInterface/TextEditor.css:
(.text-editor > .gutter > .line-number > .breakpoint): Use -webkit-image-set.
(.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Ditto.
(.text-editor > .gutter > .line-number.execution-line::after): Ditto.
* UserInterface/TimelineOverview.css:
(.timeline-overview > .timeline .bar): Combine two rules with identical selectors.
(.timeline-overview > .timeline.timeline-record-type-network .bar): Use -webkit-image-set.
(.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
(.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
2012-08-27 Timothy Hatcher <timothy@apple.com>
Make the JavaScript & Events timeline pills render correctly in HiDPI.
<rdar://problem/12183848> JavaScript timeline pill broken in HiDPI
Reviewed by Dan Bernstein.
* UserInterface/TimelineOverview.css:
(.timeline-overview > .timeline.timeline-record-type-script .bar): Changed from
.timeline-overview > .timeline.timeline-record-type-script > .bar.
2012-08-15 Joseph Pecoraro <pecoraro@apple.com>
Add iOS inheritable properties to the inspector to match
CSSProperty::isInheritedProperty.
Reviewed by Brian Weinstein.
* UserInterface/CSSKeywordCompletions.js:
2012-08-16 Timothy Hatcher <timothy@apple.com>
Save and restore the text selection when modifying the DOM representation of the text.
<rdar://problem/12059199> Selection is lost when scrolling in the source code view
Reviewed by Darin Adler.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set selectedTextRange): Return early if null is passed.
This allow the callers to avoid a null check.
(WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks):
Save at the beginning the text selection, and restore it at the end.
(WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Ditto.
2012-08-14 Timothy Hatcher <timothy@apple.com>
Make the "Show Error Console" and "Show Page Source" menu items also change the selected navigator
to match the view showing in the content browser.
<rdar://problem/12058796> Web Inspector comes up in an inconsistent state, always showing the console
Reviewed by Brian Weinstein.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole): Select the Log sidebar.
(InspectorFrontendAPI.showMainResourceForFrame): Select the Resource sidebar.
2012-08-03 Timothy Hatcher <timothy@apple.com>
Disable pause on exception by default.
Developers are confused that pause on uncaught exceptions is enabled by default.
<rdar://problem/12025998>
Reviewed by Jessie Berlin.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager): Change true to false for the "break-on-all-uncaught-exceptions"
setting default value.
2012-08-01 Timothy Hatcher <timothy@apple.com>
Update CSSKeywordCompletions.js.
<rdar://problem/12008709>
Reviewed by Brian Weinstein.
* UserInterface/CSSKeywordCompletions.js: Merge r124016 from WebKit.
2012-08-01 Timothy Hatcher <timothy@apple.com>
DOMStorageObserver.updateDOMStorage should be DOMStorageObserver.domStorageUpdated.
"updateDOMStorage" was renamed to "domStorageUpdated" in WebKit r118349. We need to support
the old and new name for backwards compatibility.
<rdar://problem/12008490>
Reviewed by Brian Weinstein.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Added comment. Call domStorageUpdated.
(WebInspector.DOMStorageObserver.prototype.domStorageUpdated): Added. Does what updateDOMStorage did.
2012-07-31 Timothy Hatcher <timothy@apple.com>
Show the file and line number instead of a go-to arrow for style rules and event listeners.
<rdar://problem/11347946> REGRESSION (New Web Inspector): Inspector does not show filename/line number for CSS rules
Reviewed by John Sullivan.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section .header .title .media a): Added !important to color. Renamed from .subtitle.
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.simple > .label): Remove duplicate padding property, set padding-left to be 6px.
(.details-section > .content > .group > .row.simple > .value): Set padding-right to be 6px.
(.details-section > .content > .group > .row.properties): Make left and right padding equal.
* UserInterface/EventListenerSectionGroup.css:
(.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow): Removed.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use WebInspector.createResourceLink.
* UserInterface/Main.css:
(.go-to-link): Added.
(.go-to-link:not(.dont-float)): Added.
* UserInterface/Main.js:
(WebInspector.createResourceLink): Added.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Use WebInspector.createResourceLink.
(WebInspector.StylePropertiesSection.prototype._linkify): Removed.
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use WebInspector.createResourceLink.
2012-07-28 Timothy Hatcher <timothy@apple.com>
Make reloading while viewing a resource in the Web Inspector show the main resource.
This keeps you looking at resources instead of dumping you into a log or timeline view.
This was only an issue if you had viewed a log or timeline before viewing a resource.
<rdar://problem/11981540> Reloading while viewing a resource sometimes switches to the Log or Timeline
Reviewed by John Sullivan.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Remember if the current view was one
that we care about before closing them.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Show the main frame since
there is no content view showing or we were showing a resource before.
2012-07-28 Timothy Hatcher <timothy@apple.com>
Make selection of a navigator in the Web Inspector show the last selected content view from that navigator.
This makes switching between different content quicker, especially for the Resource, Instrument and Log
navigators which have default initial selections.
<rdar://problem/10854727> Selecting the Log sidebar should select a log by default
Reviewed by John Sullivan.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Make the Network Requests timeline selected by default.
(WebInspector.InstrumentSidebarPanel.prototype.shown):
(WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Deselect any tree element
in the main content tree outline to prevent two selections in the sidebar.
(WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Deselect any tree element in the timelines
tree outline to prevent two selections in the sidebar.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the Current Log tree element by default the first time.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Move some settings above this.navigationSidebar.selectedSidebarPanel to prevent
an exception from accessing them before they are set. This was triggered by the new code in NavigationSidebarPanel.shown.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.shown): Reselect the selected tree element to cause the content view
to be shown as well.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select the main frame tree element by default.
2012-07-26 Timothy Hatcher <timothy@apple.com>
Make searching source code via the find banner fast again.
<rdar://problem/11955081> REGRESSION (New Web Inspector): Searching large resources via Find Banner is dramatically slower than Safari 5
Reviewed by John Sullivan.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch): Added. Uses the backend agents to do a quick search pass before doing
the inner-line matches.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get currentSearchQuery): Added. Needed by SourceCodeTextEditor.customPerformSearch.
(WebInspector.TextEditor.prototype.performSearch): Use searchCleared to fully clear the previous results.
(WebInspector.TextEditor.prototype.performSearch.batchSearch): Use addSearchResultRange for adding a new result.
(WebInspector.TextEditor.prototype.addSearchResultRange): Added. Factored out of performSearch.batchSearch. Calls _updateLineForSearchResultMatchSoon.
(WebInspector.TextEditor.prototype.searchCleared): Clear _pendingSearchResultLineNumbers.
(WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon): Added. Helper for batching line updates.
(WebInspector.TextEditor.prototype._updateLineForSearchResultMatchSoon.delayedWork): Added. Factored out of performSearch.batchSearch.
2012-07-11 Mark Rowe <mrowe@apple.com>
Build against the latest SDK when targeting older OS X versions.
The deployment target is already set to the version that we're targeting, and it's that setting
which determines which functionality from the SDK is available to us.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2012-06-18 Timothy Hatcher <timothy@apple.com>
Fix an exception when viewing a JavaScript profile with milliseconds instead of percentages.
<rdar://problem/11691663> REGRESSION (New Web Inspector): Exception when viewing JavaScript Profile, making profiles unusable
Reviewed by Brian Weinstein.
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds): Pass true for the last argument of Number.secondsToString.
2012-06-16 Timothy Hatcher <timothy@apple.com>
Show Resource details for the selected row in Network requests.
<rdar://problem/11683757>
Reviewed by Joseph Pecoraro.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.select): Fire the WebInspector.DataGrid.Event.SelectedNodeChanged event.
(WebInspector.DataGridNode.prototype.deselect): Ditto.
* UserInterface/Main.html: Include ResourceTimelineDataGridNodePathComponent.js.
* UserInterface/ResourceTimelineDataGridNodePathComponent.js: Added.
(WebInspector.ResourceTimelineDataGridNodePathComponent):
(WebInspector.ResourceTimelineDataGridNodePathComponent.prototyp.get resourceTimelineDataGridNode):
(WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get previousSibling):
(WebInspector.ResourceTimelineDataGridNodePathComponent.prototype.get nextSibling):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Add WebInspector.DataGrid.Event.SelectedNodeChanged listener.
(WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Include a ResourceTimelineDataGridNodePathComponent
if the selected node is a ResourceTimelineDataGridNode.
(WebInspector.TimelinesContentView.prototype._dataGridNodePathComponentSelected): Added. Reveal and select the node.
(WebInspector.TimelinesContentView.prototype._selectedNodeChanged): Dispatch WebInspector.ContentView.Event.SelectionPathComponentsDidChange.
2012-06-09 Timothy Hatcher <timothy@apple.com>
Switch the Web Inspector over to use tab-size for the source code view.
<rdar://problem/11633291> Use tab-size CSS property in the Web Inspector instead of an inline-block
Reviewed by Dan Bernstein.
* UserInterface/SyntaxHighlighter.js:
(WebInspector.SyntaxHighlighter.CharacterTokens): Removed \t.
* UserInterface/SyntaxHighlightingDefaultTheme.css:
(.syntax-highlighted): Added tab-size: 4.
(.syntax-highlighted .tab): Removed.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.createSyntaxHighlightedDocumentFragment): Removed tab token support.
2012-06-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11613940> DataGrid column collapser button should have a tooltip
Reviewed by Darin Adler and Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
(WebInspector.DataGrid.prototype._collapserButtonCollapseColumnsToolTip):
(WebInspector.DataGrid.prototype._collapserButtonExpandColumnsToolTip):
2012-05-30 Joseph Pecoraro <pecoraro@apple.com>
Workaround for: <rdar://problem/11536832> Cannot access content view from Instruments navigator if name of file is truncated
Implement a workaround so that go-to arrows still work in situations
where text boxes incorrectly prevent them from being clickable.
Giving the arrows a z-index always makes them work.
Reviewed by Timothy hatcher.
* UserInterface/Main.css:
(.go-to-arrow):
2012-05-25 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11538965> Breakpoint callframe tooltips show wrong line number
ScriptLocation lineNumber is 0-based. Convert to 1-based for display.
Reviewed by Timothy Hatcher.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
2012-05-24 Timothy Hatcher <timothy@apple.com>
Make the WebInspector.framework build 32/64-bit universal to match WebKit.
Since WebKit links against the WebInspector framework, they need to support
the same architectures. Otherwise, the framework fails to load when soft
linking and the resources aren't found, which causes an exception/crash.
<rdar://problem/11373948> Crash opening the Web Inspector in 32-bit apps
Reviewed by Joseph Pecoraro.
* Configurations/Base.xcconfig: Set VALID_ARCHS to ARCHS_STANDARD_32_64_BIT.
* Configurations/DebugRelease.xcconfig: Set ARCHS to ARCHS_STANDARD_32_64_BIT.
2012-05-23 Timothy Hatcher <timothy@apple.com>
Fix some occasional assertions and an exception that happens in CSSStyleDetailsSidebarPanel.
These can happen if there is an error from the protocol when fetching the CSS rules. Now when
this happens the sidebar will not show stale data.
<rdar://problem/11516416>
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Added fallback values.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Ditto.
2012-05-22 Timothy Hatcher <timothy@apple.com>
Fix a regression that would cause resource content to overlap when reloading.
<rdar://problem/11509620> REGRESSION (r42994): Overlapping content views when navigating
Reviewed by Kevin Decker.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Use oldCurrentContentView
in the loop. The currentContentView variable is not declared until after the loop, so using currentContentView
is just comparing to undefined at this point.
2012-05-21 Timothy Hatcher <timothy@apple.com>
Fixes an uncaught exception in WebInspector.ContentBrowser._currentContentViewDidChange.
This event fires when all content views are closed and there is no longer a current view.
The code under this listener was not properly null checking the content view.
<rdar://problem/11467085> ContentBrowser has uncaught exception on reload needs to handle null currentContentView
Reviewed by Oliver Hunt.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added null check for representedObject.
(WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added null check for contentView.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added null check for currentContentView.
2012-05-16 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11468003> REGRESSION: Error log messages contains wrong line number in jump link
The Log messages coming from the backend contain the expected, file and 1-based
line number. In the Safari inspector _linkifyLocation was adjusting this to 0-based
and using the 0-based line number as the display text. The OpenSource inspector's
linkifier uses WebInspector.formatLinkText for display text which adds back the 1.
The Safari inspector does not have that. We can just display the correct line number.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation):
2012-05-11 Timothy Hatcher <timothy@apple.com>
Fix an issue where the DOM Tree and Source Code would overlap.
<rdar://problem/11329121> REGRESSION (r42567): Overlapping display DOM Tree and Source Code
Reviewed by Joseph Pecoraro.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentView): Remove assert and call to _removeContentViewElement.
The content view is already guaranteed to be removed. The _disassociateFromContentView function now does the assert.
(WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Return early if it is the same index. Fire the
CurrentContentViewDidChange event here since _showContentView no longer fires it.
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Remove call to _removeContentViewElement.
Only call _showContentView and fire the CurrentContentViewDidChange event if the content view actually changed.
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Remove call to _removeContentViewElement.
Fire the CurrentContentViewDidChange event here since _showContentView no longer fires it.
(WebInspector.ContentViewContainer.prototype.shown): Call _showContentView instead of _prepareContentViewToShow.
(WebInspector.ContentViewContainer.prototype.hidden): Call _hideContentView instead of _prepareContentViewToShow.
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added assert for visible.
(WebInspector.ContentViewContainer.prototype._showContentView): Added assert for visible. Removed event dispatch.
(WebInspector.ContentViewContainer.prototype._hideContentView): Added assert for visible.
2012-05-10 Timothy Hatcher <timothy@apple.com>
Timer events in the WebInspector should show where they were scheduled from.
Depends on: https://webkit.org/b/86173
<rdar://problem/11427463>
Reviewed by John Sullivan.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process TimerFire when the corresponding
EvaluateScript or FunctionCall record is encountered so we can gather the resource and line number.
2012-05-10 Timothy Hatcher <timothy@apple.com>
Use a static copy of InspectorBackend.js and InspectorBackendCommands.js.
This fixes a build failure since WebCore renamed the file we were coping.
For compatibility reasons we should use a static copy of the InspectorBackend instead
of copying the latest version from WebCore during the build. Using a stable version of
the InspectorBackend guarantees a constant API for the front-end and protocol level
changes in WebCore are compatible with older versions of the InspectorBackend.
<rdar://problem/11426912>
* Scripts/copy-user-interface-resources.sh: Removed copy commands from derived sources.
* UserInterface/InspectorBackend.js: Copied from OpenSource r116449.
* UserInterface/InspectorBackendCommands.js: Ditto.
* WebInspectorUI.xcodeproj/project.pbxproj: Removed build phase to copy from WebCore.
2012-04-26 Timothy Hatcher <timothy@apple.com>
Update the Web Inspector to work with recent protocol changes.
<rdar://problem/11329835>
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Pass undefined for the args parameter of callFunction.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Ditto.
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt.prototype.evalInInspectedWindow): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
Pass doNotPauseOnExceptionsAndMuteConsole to evaluateOnCallFrame.
(WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated): Pass undefined for the args parameter of callFunctionJSON.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.requestWillBeSent): Removed stackTrace parameter.
* UserInterface/RemoteObject.js:
(WebInspector.RemoteObject.prototype.setPropertyValue): Renamed doNotPauseOnExceptions to doNotPauseOnExceptionsAndMuteConsole.
Pass true for doNotPauseOnExceptionsAndMuteConsole in RuntimeAgent.callFunctionOn.
(WebInspector.RemoteObject.prototype.callFunction): Added args parameter and pass it along. Pass true for doNotPauseOnExceptionsAndMuteConsole.
(WebInspector.RemoteObject.prototype.callFunctionJSON): Ditto.
2012-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11287053> ApplicationCache sorting Resource column is broken
The items being sorted in the data grid are ApplicationCacheResources
from the Inspector protocol. Those resources do not have a "name"
property. Only "url", "size", and "type".
Reviewed by Jon Honeycutt.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._populateDataGrid):
2012-04-20 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11287121> REGRESSION: Inspector window should move to front when you hit a breakpoint
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector._debuggerDidPause):
2012-04-18 Timothy Hatcher <timothy@apple.com>
Fix an regression where issues were replacing the content view when they should be inline.
This also fixes an regression where issue lines were not highlighting because the style class
was not being applied, 'undefined' was.
<rdar://problem/11180526> REGRESSION (r41932-r41943): ResourceContentView was only showing
an error message and not content
Reviewed by Brian Weinstein.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Only add issue event listener and issues if !managesOwnIssues.
(WebInspector.ResourceContentView.prototype.closed): Remove issue event listener only if !managesOwnIssues.
(WebInspector.ResourceContentView.prototype._issueWasAdded): Assert !managesOwnIssues.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Use the connect object for the style classes.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.get managesOwnIssues): Added. Return true.
2012-04-16 Timothy Hatcher <timothy@apple.com>
Save and restore the scroll position for content views when hiding and showing.
<rdar://problem/11184241> REGRESSION (New Web Inspector): Console log view scroll offset
does not follow most recent messages
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.get scrollableElements): Added.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.shown): Call shown directly on the _contentViewContainer.
(WebInspector.ClusterContentView.prototype.hidden): Ditto for hidden.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get visible): Use a simple boolean.
(WebInspector.ContentView.prototype.set visible): Ditto.
(WebInspector.ContentView.prototype.get scrollableElements): Added stub.
(WebInspector.ContentView.prototype.get keepElementsScrolledToTheBottom): Added stub.
* UserInterface/ContentViewContainer.css:
(.content-view-container > .content-view): Removed. Using display: none was pointless since the
element is removed from the DOM. This prevented saving scroll positions.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.shown): Added. Calls _prepareContentViewToShow.
(WebInspector.ContentViewContainer.prototype.hidden): Added. Calls _prepareContentViewToHide.
(WebInspector.ContentViewContainer.prototype._saveScrollPositionsForContentView): Added.
(WebInspector.ContentViewContainer.prototype._restoreScrollPositionsForContentView): Added.
(WebInspector.ContentViewContainer.prototype._showContentView): Calls _prepareContentViewToShow.
(WebInspector.ContentViewContainer.prototype._prepareContentViewToShow): Added. Calls
_restoreScrollPositionsForContentView in addition to the work _showContentView did.
(WebInspector.ContentViewContainer.prototype._hideContentView): Calls _prepareContentViewToHide.
(WebInspector.ContentViewContainer.prototype._prepareContentViewToHide): Added. Calls
_saveScrollPositionsForContentView in addition to the work _hideContentView did.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.get scrollableElements): Added.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get scrollableElements): Added.
* UserInterface/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype.get scrollableElements): Added.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Removed _scrolledToBottom.
(WebInspector.LogContentView.prototype.consoleCleared): Removed _scrolledToBottom.
(WebInspector.LogContentView.prototype.hidden): Removed call to storeScrollPositions.
(WebInspector.LogContentView.prototype.get scrollableElements): Added.
(WebInspector.LogContentView.prototype.get keepElementsScrolledToTheBottom): Added.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView.prototype.get scrollableElements): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.get contentContainerElement): Added.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get scrollableElements): Added.
2012-04-14 Timothy Hatcher <timothy@apple.com>
Add support for searching the DOM tree with the Find Banner.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
code view (no Find banner is present)
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get supportsSearch): Added. Return true.
(WebInspector.DOMTreeContentView.prototype.get numberOfSearchResults): Added.
(WebInspector.DOMTreeContentView.prototype.performSearch): Added. Clear previous results and call
DOMAgent.performSearch.
(WebInspector.DOMTreeContentView.prototype.performSearch.searchResultsReady): Store the identifier and
fire the NumberOfSearchResultsDidChange event.
(WebInspector.DOMTreeContentView.prototype.searchCleared): Added. Clear the result and state.
(WebInspector.DOMTreeContentView.prototype.revealPreviousSearchResult): Added. Call _revealSearchResult.
(WebInspector.DOMTreeContentView.prototype.revealNextSearchResult): Added. Ditto.
(WebInspector.DOMTreeContentView.prototype._revealSearchResult): Added. Call DOMAgent.getSearchResults.
(WebInspector.DOMTreeContentView.prototype._revealSearchResult.revealResult): Select the DOM node.
2012-04-14 Timothy Hatcher <timothy@apple.com>
Show the yellow bouncy when highlighting the current search result.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
code view (no Find banner is present)
Reviewed by Dan Bernstein.
* UserInterface/TextEditor.css:
(.text-editor .bouncy-highlight): Added.
(@-webkit-keyframes bouncy): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._revealSearchResultTextRange): Create and add the bouncy element,
positioned to line up with the search result element.
2012-04-13 Timothy Hatcher <timothy@apple.com>
Support searching via the find banner on text resources and scripts.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and source
code view (no Find banner is present)
Reviewed by Joseph Pecoraro.
* UserInterface/ScriptContentView.js:
(WebInspector.ScriptContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
(WebInspector.ScriptContentView.prototype.get supportsSearch): Return true.
(WebInspector.ScriptContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
(WebInspector.ScriptContentView.prototype.performSearch): Ditto.
(WebInspector.ScriptContentView.prototype.searchCleared): Ditto.
(WebInspector.ScriptContentView.prototype.revealPreviousSearchResult): Ditto.
(WebInspector.ScriptContentView.prototype.revealNextSearchResult): Ditto.
(WebInspector.ScriptContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
* UserInterface/SyntaxHighlighter.js:
* UserInterface/SyntaxHighlightingDefaultTheme.css:
(.supports-find-banner.showing-find-banner .syntax-highlighted .search-result): Added.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Added parameter for search result. Append the search-result
class when needed. Fixes the quoting for links now that the attribute range can be split by a search result.
(WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Changed to work with enumerateAttributes instead of enumerateAttribute.
Check for the search result attribute. Call createTokenElement for search results.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.get numberOfSearchResults): Added.
(WebInspector.TextEditor.prototype.performSearch): Added. Iterate over the lines in batches to prevent blocking too long.
(WebInspector.TextEditor.prototype.performSearch.reportNumberOfSearchResultsDidChange):
(WebInspector.TextEditor.prototype.performSearch.batchSearch): Loop over lines and perform a regex to find matches.
(WebInspector.TextEditor.prototype.searchCleared): Added. Clear the results and remove the attribute from the lines.
(WebInspector.TextEditor.prototype.revealPreviousSearchResult): Added. Decrement the index and call _revealSearchResultTextRange.
(WebInspector.TextEditor.prototype.revealNextSearchResult): Added. Increment the index and call _revealSearchResultTextRange.
(WebInspector.TextEditor.prototype._revealSearchResultTextRange): Added. Helper for revealPreviousSearchResult and revealNextSearchResult.
(WebInspector.TextEditor.prototype._removeSearchResultStyles): Added. Query for all the search results and remove the style.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Add event listener for TextEditor.Event.NumberOfSearchResultsDidChange.
(WebInspector.TextResourceContentView.prototype.get supportsSearch): Return true.
(WebInspector.TextResourceContentView.prototype.get numberOfSearchResults): Forward to _textEditor.
(WebInspector.TextResourceContentView.prototype.performSearch): Ditto.
(WebInspector.TextResourceContentView.prototype.searchCleared): Ditto.
(WebInspector.TextResourceContentView.prototype.revealPreviousSearchResult): Ditto.
(WebInspector.TextResourceContentView.prototype.revealNextSearchResult): Ditto.
(WebInspector.TextResourceContentView.prototype._numberOfSearchResultsDidChange): Added. Fire ContentView.Event.NumberOfSearchResultsDidChange.
2012-04-13 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for next and previous search results.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree
and source code view (no Find banner is present)
Reviewed by Brian Weinstein.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner): Added keyboard shortcuts for Command-G and Command-Shift-G.
2012-04-05 Timothy Hatcher <timothy@apple.com>
Add support to WebInspector.ContentView for dealing with the find banner.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the DOM tree and
source code view (no Find banner is present)
Reviewed by Joseph Pecoraro.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView):
(WebInspector.ClusterContentView.prototype.get supportsSearch): Added. Always return true.
(WebInspector.ClusterContentView.prototype.get numberOfSearchResults): Added. Forward to the current content view.
(WebInspector.ClusterContentView.prototype.performSearch): Added. Ditto.
(WebInspector.ClusterContentView.prototype.searchCleared): Added. Ditto.
(WebInspector.ClusterContentView.prototype.revealPreviousSearchResult): Added. Ditto.
(WebInspector.ClusterContentView.prototype.revealNextSearchResult): Added. Ditto.
(WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Dispatch the
NumberOfSearchResultsDidChange event.
(WebInspector.ClusterContentView.prototype._contentViewNumberOfSearchResultsDidChange): Re-dispatch
the NumberOfSearchResultsDidChange event with this content view as the target.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype.findBannerPerformSearch): Added. Forward to the current content view.
(WebInspector.ContentBrowser.prototype.findBannerSearchCleared): Added. Ditto.
(WebInspector.ContentBrowser.prototype.findBannerRevealPreviousResult): Added. Ditto.
(WebInspector.ContentBrowser.prototype.findBannerRevealNextResult): Added. Ditto.
(WebInspector.ContentBrowser.prototype._showFindBanner): Don't show if the current content view does not support search.
(WebInspector.ContentBrowser.prototype._contentViewNumberOfSearchResultsDidChange): Added. Update the find banner.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get supportsSearch): Added stub.
(WebInspector.ContentView.prototype.get numberOfSearchResults): Added stub.
(WebInspector.ContentView.prototype.performSearch): Added stub.
(WebInspector.ContentView.prototype.searchCleared): Added stub.
(WebInspector.ContentView.prototype.revealPreviousSearchResult): Added stub.
(WebInspector.ContentView.prototype.revealNextSearchResult): Added stub.
* UserInterface/FindBanner.js:
(WebInspector.FindBanner): Added event listeners.
(WebInspector.FindBanner.prototype._inputFieldChanged): Added. Call the delegate.
(WebInspector.FindBanner.prototype._previousResultButtonClicked): Added. Ditto.
(WebInspector.FindBanner.prototype._nextResultButtonClicked): Added. Ditto.
2012-04-02 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FindBanner which implements the user interface for searching in content views.
The banner shows via Command-F and hides with Escape. Searching is not hooked up yet.
Part of: <rdar://problem/11039642> REGRESSION (New Web Inspector): Can't search in the
DOM tree and source code view (no Find banner is present)
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Create a FindBanner and keyboard shortcut for Command-F.
(WebInspector.ContentBrowser.prototype._showFindBanner): Added.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Change the target element
of the find banner to the new content view.
* UserInterface/ContentViewContainer.css:
(.content-view-container): Added overflow hidden so the find-banner does not show when hidden.
(.content-view-container > .content-view): Ditto.
* UserInterface/FindBanner.css: Added.
* UserInterface/FindBanner.js: Added.
(WebInspector.FindBanner):
(WebInspector.FindBanner.prototype.get delegate):
(WebInspector.FindBanner.prototype.set delegate):
(WebInspector.FindBanner.prototype.get element):
(WebInspector.FindBanner.prototype.get inputField):
(WebInspector.FindBanner.prototype.get searchQuery):
(WebInspector.FindBanner.prototype.set searchQuery):
(WebInspector.FindBanner.prototype.get numberOfResults):
(WebInspector.FindBanner.prototype.set numberOfResults):
(WebInspector.FindBanner.prototype.get targetElement):
(WebInspector.FindBanner.prototype.set targetElement.delayedWork):
(WebInspector.FindBanner.prototype.set targetElement):
(WebInspector.FindBanner.prototype.show.delayedWork):
(WebInspector.FindBanner.prototype.show):
(WebInspector.FindBanner.prototype.hide):
(WebInspector.FindBanner.prototype._doneButtonClicked):
(WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
* UserInterface/Main.html: Included FindBanner.css and FindBanner.js.
2012-04-13 Timothy Hatcher <timothy@apple.com>
Use searchRegex.lastIndex instead of lineMatch.index + searchTerm.length.
When creating TextRanges in SearchSidebarPanel it is better to use lastIndex instead of the search term length.
This isn't a bug now, but it could be later when we support regex search queries in addition of plan text searches.
Reviewed by Brian Weinstein.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback.resourceCallback): Use searchRegex.lastIndex.
(WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback.domSearchResults): Ditto.
2012-04-05 Timothy Hatcher <timothy@apple.com>
Add better support for getting and setting the text selection in WebInspector.TextEditor.
This will be needed for the find banner support. <rdar://problem/11193282>
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.get selectedTextRange): Added.
(WebInspector.TextEditor.prototype.set selectedTextRange): Added.
(WebInspector.TextEditor.prototype.revealLine): Use the selectedTextRange setter.
(WebInspector.TextEditor.prototype._textRangeToDOMRange): Added. Use _textPositionToDOMLocation
to get the start and end and make a new Range.
(WebInspector.TextEditor.prototype._domRangeToTextRange): Added. Use _domLocationToTextPosition
to get the start and end and make a new TextRange.
(WebInspector.TextEditor.prototype._domLocationToTextPosition): Added.
(WebInspector.TextEditor.prototype._textPositionToDOMLocation): Added.
(WebInspector.TextEditorTextChunk): Set _textChunk on the element.
* UserInterface/Utilities.js:
(Node.prototype.traverseNextTextNode): Added. Copied from OpenSource utilities.js.
(Node.prototype.rangeBoundaryForOffset): Added. Ditto.
2012-04-02 Timothy Hatcher <timothy@apple.com>
Add support for disabling keyboard shortcuts and unbinding them altogether.
You might disable a shortcut to make it only apply when a content view is showing, but still
have the shortcut be global. Also added support for unbinding a shortcut if you need to remove
it altogether from the document.
This is likely to be required for find banner support.
Reviewed by Brian Weinstein.
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut):
(WebInspector.KeyboardShortcut.prototype.get disabled): Added.
(WebInspector.KeyboardShortcut.prototype.set disabled): Added.
(WebInspector.KeyboardShortcut.prototype.unbind): Added. Removes the shortcut from the target.
(WebInspector.KeyboardShortcut.prototype.matchesEvent): Return early if disabled.
2012-04-02 Timothy Hatcher <timothy@apple.com>
Make it possible to generate colored images at different sizes than the intrinsic image size.
This is useful when the input image is a PDF and a different size is needed. This support
is needed for the find banner back/forward arrows.
Reviewed by Brian Weinstein.
* UserInterface/ImageUtilities.js:
(generateColoredImage): Added optional width and height parameters. Use the intrinsic width and
height as fallback.
(generateColoredImagesForCSS.generateImage): Pull the width and height out of the specification.
Use the intrinsic width and height as fallback. Pass the width and height to generateColoredImage
with a scale of 1 now that the pixelRatio is now premultiplied in the width and height.
2012-04-02 Timothy Hatcher <timothy@apple.com>
Tweak the colors and gradients used by the search sidebar to match other bars in the Web Inspector.
If only we had variables in CSS...
Reviewed by John Sullivan.
* UserInterface/SearchSidebarPanel.css:
(.sidebar > .panel.search > .search-bar): Tweaked the colors to match the ones in TimelinesContentView.css
the upcoming FindBanner.css.
2012-04-12 Timothy Hatcher <timothy@apple.com>
Create a funnel point for display names of URLs and hosts, and properly decode lastPathComponent.
This decodes lastPathComponent as a URL escaped string. The host needs to be decoded as a punycode string,
but that isn't easily done in JavaScript so <rdar://problem/11237413> tracks that.
<rdar://problem/11236933> High-ascii web addresses show corrupted in Web Inspector
Reviewed by Brian Weinstein.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Remove unused lastPathComponent var.
* UserInterface/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles): Use displayNameForURL and displayNameForHost.
* UserInterface/ApplicationCacheManifestTreeElement.js:
(WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Ditto.
* UserInterface/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement): Use displayNameForURL.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Ditto.
* UserInterface/CookieStorageTreeElement.js:
(WebInspector.CookieStorageTreeElement): Use displayNameForHost.
* UserInterface/DOMStorageTreeElement.js:
(WebInspector.DOMStorageTreeElement): Ditto.
(WebInspector.DOMStorageTreeElement.prototype.get name): Ditto.
* UserInterface/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement): Ditto.
(WebInspector.DatabaseHostTreeElement.prototype.get name): Ditto.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink): Use displayNameForURL.
* UserInterface/Main.js:
(WebInspector.displayNameForURL): Added. Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
(WebInspector.displayNameForHost): Added. Returns the input, with a comment about decoding punycode.
(WebInspector.updateWindowTitle): Use decodeURIComponent for lastPathComponent and displayNameForHost for host.
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Use displayNameForURL.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.get data): Use displayNameForURL and displayNameForHost.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): Ditto.
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Use displayNameForURL.
* UserInterface/ScriptTreeElement.js:
(WebInspector.ScriptTreeElement): Use displayNameForURL and displayNameForHost.
2012-04-11 Timothy Hatcher <timothy@apple.com>
Strip common error message prefixes from the message line in the Issue sidebar.
The prefix is used to determine the title line, so it redundant to include it in the message.
And removing it from the message gives more room for the important info of the message.
<rdar://problem/11219712> Can't see entire content of errors in the Issue sidebar
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/IssueMessage.js:
(WebInspector.IssueMessage): Determine the type based on source and text prefix matching.
Removed _source property, and added _type to replace it.
(WebInspector.IssueMessage.Type.displayName): Added.
(WebInspector.IssueMessage.prototype.get type): Renamed from source and return _type instead.
* UserInterface/IssueTreeElement.js:
(WebInspector.IssueTreeElement): Use a switch for the level instead of raw string comparison.
Use WebInspector.IssueMessage.Type.displayName to get the title.
(WebInspector.IssueTreeElement.titleForIssue): Removed.
2012-04-09 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for pause/continue, step over, step into and step out.
This matches Xcode's keyboard shortcuts and also supports the original Web Inspector
keyboard shortcuts for compatibility.
<rdar://problem/11205675> Debugger keyboard shortcuts are broken (step into, step over, etc)
Reviewed by John Sullivan.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Create the KeyboardShortcuts and show them in the tooltips.
(WebInspector.QuickConsole.prototype.set collapsed): Add the keyboard shortcut to the tooltips.
(WebInspector.QuickConsole.prototype._debuggerDidPause): Ditto.
(WebInspector.QuickConsole.prototype._debuggerDidResume): Ditto.
2012-04-07 Timothy Hatcher <timothy@apple.com>
Make the completion popup look like the one in Xcode.
<rdar://problem/11201824> Console: Autocomplete suggestion list is ugly (has wrong typeface)
Reviewed by Dan Bernstein.
* UserInterface/TextPrompt.css:
(.suggest-box):
(.suggest-box .container):
(.suggest-box-content-item):
(.suggest-box-content-item.selected):
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition): Adjusted padding. Impose a max
height of 160, which turns out to be 10 items.
2012-04-07 Timothy Hatcher <timothy@apple.com>
Make the completion popup work when the console is scrolled.
<rdar://problem/11184504> "Current Log" console input is way broken when using inline completion popup
Reviewed by Joseph Pecoraro.
* UserInterface/Utilities.js:
(Element.prototype.offsetRelativeToWindow): Removed. boxInWindow was the only client.
(Element.prototype.boxInWindow): Removed targetWindow parameter, the only client always passed 'window'.
Use getClientRects instead of the broken offsetRelativeToWindow.
2012-04-06 Timothy Hatcher <timothy@apple.com>
Make console completion behave more like Xcode's auto completion.
This makes the suggestion popup appear for single items and completions are always shown
as unselected grey text, not a selected range. The tab key now also accepts the completion.
<rdar://problem/11201751> Console: Tab to autocomplete does not work
Reviewed by Joseph Pecoraro.
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt.prototype._completionsReady): Always pass true for canShowForSingleItem when call
_suggestBox.updateSuggestions.
(WebInspector.TextPrompt.prototype._completionsReady): Remove the auto completion path. There is now only
one completion style, handled by applySuggestion.
(WebInspector.TextPrompt.prototype.applySuggestion): Don't select the completion, do the what _completionsReady
did for the auto complete path -- create an auto complete element for the grey text.
(WebInspector.TextPrompt.prototype.tabKeyPressed): Call tabKeyPressed on _suggestBox to accept the completion
instead of doing nothing.
2012-04-06 Timothy Hatcher <timothy@apple.com>
Make the reload keyboard shortcut work when an input field is focused.
This makes the reload shortcuts and quick console toggle use the KeyboardShortcut class.
<rdar://problem/11187008> Web Inspector is very picky about what has to be focused in order to reload the page
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Remove keydown event listener. Added reload keyboard shortcuts.
(WebInspector._reloadPage): Added.
(WebInspector._reloadPageIgnoringCache): Added.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Added toggle or focus keyboard shortcut.
(WebInspector.QuickConsole.prototype._toggleOrFocus): Added.
2012-04-02 Timothy Hatcher <timothy@apple.com>
Select the contents of the search field when pressing the Command-Shift-F keyboard shortcut.
In addition to focusing the field, we now select the contents. This matches behavior of all
search fields tied to keyboard shortcuts.
<rdar://problem/11169101>
Reviewed by Joseph Pecoraro.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._focusSearchField): Call select() on the field.
2012-04-05 Timothy Hatcher <timothy@apple.com>
Make clicking search results select the text range again.
This broke when the TextEditor content element was made user modifiable. When a user modifiable region is blurred
it loses its selection. To prevent this we make it user modifiable only when focused.
<rdar://problem/11193282> REGRESSION (r42062): Search results are not selected when clicked in the Search sidebar
Reviewed by Brian Weinstein.
* UserInterface/TextEditor.css:
(.text-editor > .content-container > .content): Removed -webkit-user-modify.
(.text-editor > .content-container > .content:focus): Added. Set -webkit-user-modify here when focused.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Set a tabIndex so the content can be focused when not user modifiable.
2012-03-31 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11160188> Headers in resource details sidebar panel should be sortable
Reviewed by Timothy Hatcher.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid):
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
2012-03-30 Timothy Hatcher <timothy@apple.com>
Prevent dragging and dropping everywhere except editable fields in the Web Inspector.
Reviewed by John Sullivan.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added dragover event listener.
(WebInspector._dragOver): Added. Prevent the drop from being accepted unless the target
is an editable field.
2012-03-30 Timothy Hatcher <timothy@apple.com>
Make revealing line numbers in the Web Inspector work again in all cases.
This removes line number revealing from SourceCodeTextEditor and merges the extra logic that
SourceCodeTextEditor had down into TextEditor. The problem was in WebInspector.TextEditor.shown,
where _lineNumberToReveal was being deleted before SourceCodeTextEditor could use it.
<rdar://problem/11148983> REGRESSION: Debugger does not scroll execution line into view when
pausing in the debugger
Reviewed by Brian Weinstein.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Remove call to
_revealPendingLineIfPossible.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.shown): Call _revealPendingLineIfPossible instead of revealLine.
(WebInspector.TextEditor.prototype.revealLine): Delete _lineNumberToReveal now that the reveal
is likely to happen.
(WebInspector.TextEditor.prototype._revealPendingLineIfPossible): Added.
(WebInspector.TextEditor.prototype._reset): Call _revealPendingLineIfPossible.
2012-03-29 Timothy Hatcher <timothy@apple.com>
Switch to the new current log when reloading the page while viewing the current log.
<rdar://problem/11145724> Reloading the page should switch to Current Log
Reviewed by Brian Weinstein.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._sessionStarted): Select the new Current Log
if the current view is the previously active content view.
2012-03-29 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10657781> Remote Inspector: Improve Generic Searching for Node "Inspect Element Eyeglass"
Match Open Source and add the two second highlight for inspected
nodes. This is very useful for the Remote Inspector when using
node searching.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector._domNodeWasInspected):
2012-03-28 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for back and forward in the content browser.
The shortcuts are Command-Control-Left and Command-Control-Right.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Create the KeyboardShortcuts and add the shortcut to the button tooltips.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for toggling the navigation and details sidebars.
The shortcuts are Control-0 and Control-Shift-0.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create the KeyboardShortcuts.
(WebInspector._leftSidebarToggleButtonToolTip): Include the keyboard shortcut.
(WebInspector._rightSidebarToggleButtonToolTip): Ditto.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for the details sidebar panels.
The shortcuts are Control-Shift-1, Control-Shift-2, etc.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel): Pass "4" as the keyboard shortcut key.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Pass "3" as the keyboard shortcut key.
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel): Pass the keyboard shortcut key through.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel): Pass "2" as the keyboard shortcut key.
* UserInterface/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Pass "1" as the keyboard shortcut key.
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel): Pass "5" as the keyboard shortcut key.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Add keyboard shortcuts for the navigation sidebar panels.
The shortcuts are Control-1, Control-2, etc. We don't use Command to prevent conflicting with
Safari's existing bookmarks bar commands.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Pass "7" as the keyboard shortcut key.
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel): Pass "6" as the keyboard shortcut key.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Pass "3" as the keyboard shortcut key.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Pass "5" as the keyboard shortcut key.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Pass "8" as the keyboard shortcut key.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Create a KeyboardShortcut and add it to the displayName.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Pass "1" as the keyboard shortcut key.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Pass "4" as the keyboard shortcut key.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel): Pass "2" as the keyboard shortcut key.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Make it easier to properly show a sidebar panel in the Web Inspector.
This adds a show function to SidebarPanel that reveals the Sidebar if needed and selects
the sidebar panel. For navigation sidebar panels it also focuses the TreeOutline.
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.stopProfilingJavaScript): Use show().
* UserInterface/Main.js:
(WebInspector._debuggerDidPause): Use show().
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.show): Added. Call the superclass show and focus the tree.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._focusSearchField): Use show().
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.addSidebarPanel): Use insertSidebarPanel.
(WebInspector.Sidebar.prototype.insertSidebarPanel): Set the _parentSidebar to this.
(WebInspector.Sidebar.prototype.removeSidebarPanel): Set the _parentSidebar to null.
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.get parentSidebar): Added.
(WebInspector.SidebarPanel.prototype.show): Added.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Add support to WebInspector.KeyboardShortcut for specifying a target element and callback.
This adds support for Command-Shift-F to focus the search field as the first shortcut.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut): Added targetElement and callback parameters. Register a keydown listener.
(WebInspector.KeyboardShortcut._handleKeyDown): Added. Walk the tree from the target and check for matching
keyboard shortcuts.
(WebInspector.KeyboardShortcut.prototype.get callback): Added.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Create a KeyboardShortcut for Command-Shift-F to focus the search field.
(WebInspector.SearchSidebarPanel.prototype._focusSearchFiled): Added.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Reintroduce WebInspector.KeyboardShortcut as a proper class.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/EditingSupport.js:
(WebInspector.startEditing.defaultFinishHandler): Use KeyboardShortcut.Key.Escape.keyCode instead of
KeyboardShortcut.Keys.Esc.code.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController): Remove the _shortcuts object and assign individual shortcuts.
(WebInspector.JavaScriptLogViewController.prototype._promptKeyDown): Call matchesEvent on each shortcut.
* UserInterface/KeyboardShortcut.js: Added.
(WebInspector.KeyboardShortcut):
(WebInspector.Key):
(WebInspector.Key.prototype.get keyCode):
(WebInspector.Key.prototype.get displayName):
(WebInspector.Key.prototype.toString):
(WebInspector.KeyboardShortcut.prototype.get modifiers):
(WebInspector.KeyboardShortcut.prototype.get key):
(WebInspector.KeyboardShortcut.prototype.get displayName):
(WebInspector.KeyboardShortcut.prototype.matchesEvent):
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Use KeyboardShortcut.Key
instead of KeyboardShortcut.Keys.
2012-03-28 Timothy Hatcher <timothy@apple.com>
Remove WebInspector.KeyboardShortcut, soon to be replaced by a better version.
Part of: <rdar://problem/10947746> Add keyboard shortcuts for common actions in the new Web Inspector
Reviewed by Joseph Pecoraro.
* UserInterface/KeyboardShortcut.js: Removed.
2012-03-26 Timothy Hatcher <timothy@apple.com>
Fix an issue where Inspect Element would sometimes not stick and the DOM node selection would revert to
the previous selected DOM node.
<rdar://problem/11122326> Using the Inspect Element content menu sometimes fails to select the right DOM node
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Return early if the DOM tree
has a selection already. A selection can be made while waiting for the async reply.
2012-03-26 Timothy Hatcher <timothy@apple.com>
Add some missing checks to the DOMNodeDetailsSidebarPanel.
This prevents updating the interface if the DOM node selection changed while waiting for a response about
the previous node from the backend.
Reviewed by Ada Chan.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Return early if the
DOM node does not match the current DOM node. The DOM node changed while we were waiting for the async response.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Ditto.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback): Ditto.
2012-03-25 Timothy Hatcher <timothy@apple.com>
Use DetailsSectionPropertiesRow for the DOM node Properties section.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNodeDetailsSidebarPanel.css: Removed.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Create a
DetailsSection and DetailsSectionPropertiesRow for each prototype.
* UserInterface/DetailsSection.css: Set margin-bottom to -1px so nested section borders
collapse into a single border.
(.details-section):
* UserInterface/Main.html: Removed DOMNodeDetailsSidebarPanel.css.
2012-03-24 Timothy Hatcher <timothy@apple.com>
Make Select All only select the text content of the resource.
To do this content element needs to either be in an iframe or editable. Working with frames is
pretty annoying, so making the content editable was the best option. But since we don't support
editing resources yet, we need to prevent the editing from occurring.
<rdar://problem/11039596> REGRESSION (New Web Inspector): Select all while viewing source selects
info in Details sidebar
Reviewed by Dan Bernstein.
* UserInterface/TextEditor.css:
(.text-editor > .content-container > .content): Added -webkit-user-modify: read-write-plaintext-only.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Added event listeners for keydown, textInput and webkitEditableContentChanged.
(WebInspector.TextEditor.prototype._preventKeyDown): Added. Allow command keys and page up, page down,
home, end, up, down, left, right.
(WebInspector.TextEditor.prototype._preventTextInput): Added. Prevent paste and other input.
(WebInspector.TextEditor.prototype._editableContentChanged): Added. Do a reset if this happens.
2012-03-24 Timothy Hatcher <timothy@apple.com>
Remove WebInspector.isMac() and the dead code that came with it.
Rubber-stamped by Dan Bernstein.
* UserInterface/EditingSupport.js:
(WebInspector.startEditing.defaultFinishHandler):
(WebInspector.setCurrentFocusElement):
* UserInterface/KeyboardShortcut.js:
(WebInspector.KeyboardShortcut._modifiersToString):
* UserInterface/TextPrompt.js:
(WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
2012-03-22 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector DataGrid sort indicator be HiDPI compliant.
Part of: <rdar://problem/10643175> DataGrid sort indicator arrow and Timeline pills/callouts should be made HiDPI compliant
Reviewed by Joseph Pecoraro.
* UserInterface/DataGrid.css:
(.data-grid th.sort-ascending > div:first-child::after): Use the canvas based image.
(.data-grid th.sort-descending > div:first-child::after): Ditto.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid): Call _generateSortIndicatorImagesIfNeeded.
(WebInspector.DataGrid.prototype._generateSortIndicatorImagesIfNeeded): Added.
* UserInterface/Images/SortIndicatorDownArrow.pdf: Added.
* UserInterface/Images/SortIndicatorUpArrow.pdf: Added.
* UserInterface/Images/treeDownTriangleBlack.png: Removed.
* UserInterface/Images/treeUpTriangleBlack.png: Removed.
2012-03-22 Timothy Hatcher <timothy@apple.com>
Make the rest of the disclosure triangles in the Web Inspector HiDPI compliant.
Part of: <rdar://problem/10643175> Some disclosure triangles and Timeline pills should be made HiDPI compliant
Reviewed by Joseph Pecoraro.
* UserInterface/Images/DisclosureTriangleTinyClosed.pdf: Added.
* UserInterface/Images/DisclosureTriangleTinyOpen.pdf: Added.
* UserInterface/Images/disclosureTriangleSmallDown.png: Removed.
* UserInterface/Images/disclosureTriangleSmallRight.png: Removed.
* UserInterface/Images/treeDownTriangleWhite.png: Removed.
* UserInterface/Images/treeRightTriangleBlack.png: Removed.
* UserInterface/Images/treeRightTriangleWhite.png: Removed.
* UserInterface/ConsoleGroup.js:
(WebInspector.ConsoleGroup): Delete bracket element. It was ugly and sooo Windows...
* UserInterface/Main.js:
(WebInspector.contentLoaded): Call _generateDisclosureTriangleImages.
(WebInspector._generateDisclosureTriangleImages): Added. Generate images for small and tiny.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Use the canvas based disclosure triangles.
* UserInterface/DOMTreeOutline.css: Ditto.
* UserInterface/DataGrid.css: Ditto.
* UserInterface/Section.css: Ditto.
* UserInterface/LogContentView.css: Ditto. Also delete the bracket style rules.
2012-03-22 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10391969> Remote Inspector: Add CSS Completion for iOS Properties
Add CSS auto-completion keywords for iOS properties.
Add "touch" to the list of syntax highlighted value keywords.
Reviewed by Timothy Hatcher.
* UserInterface/CSSKeywordCompletions.js:
* UserInterface/CSSSourceTokenizer.js:
(WebInspector.CSSSourceTokenizer):
2012-03-21 Timothy Hatcher <timothy@apple.com>
Use -webkit-image-set instead of media queries in the Web Inspector.
This patch also uses separate border-image-slice and border-image-source properties to
avoid duplicate slice numbers in each rule.
I didn't use image-set for the border-image cases since you still need a media query
for the 2x slice numbers.
Reviewed by Jon Honeycutt.
* UserInterface/ApplicationCacheIcons.css:
(.application-cache-manifest .icon): Use -webkit-image-set.
(.application-cache-frame .icon): Ditto.
* UserInterface/CookieIcon.css:
(.cookie-icon .icon): Use -webkit-image-set.
* UserInterface/DOMStorageIcons.css:
(.local-storage-icon .icon): Use -webkit-image-set.
(.session-storage-icon .icon): Ditto.
* UserInterface/DatabaseIcon.css:
(.database-icon .icon): Use -webkit-image-set.
* UserInterface/DatabaseTableIcon.css:
(.database-table-icon .icon): Use -webkit-image-set.
* UserInterface/FolderIcon.css:
(.folder-icon .icon): Use -webkit-image-set.
* UserInterface/InstrumentIcons.css:
(.network-icon .icon): Use -webkit-image-set.
(.colors-icon .icon): Ditto.
(.script-icon .icon): Ditto.
(.stopwatch-icon .icon):
(.profile-icon .icon): Use -webkit-image-set.
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .title-bar > .record-glyph): Use -webkit-image-set.
(.sidebar > .panel.instrument > .title-bar > .record-glyph.recording): Ditto.
(.sidebar > .panel.instrument > .title-bar > .record-glyph:hover): Ditto.
(.sidebar > .panel.instrument > .title-bar > .record-glyph.recording:hover): Ditto.
(.sidebar > .panel.instrument > .title-bar > .record-glyph.forced): Ditto.
(.sidebar > .panel.instrument > .title-bar > .record-glyph.recording.forced): Ditto.
* UserInterface/LogIcon.css:
(.log-icon .icon): Use -webkit-image-set.
* UserInterface/ResourceIcons.css:
(.resource-icon .icon): Use -webkit-image-set.
(.resource-icon.resource-type-document .icon): Ditto.
(.resource-icon.resource-type-image .icon): Ditto.
(.resource-icon.resource-type-font .icon): Ditto.
(.resource-icon.resource-type-stylesheet .icon): Ditto.
(.resource-icon.resource-type-script .icon): Ditto.
(.anonymous-script-icon .icon): Ditto.
* UserInterface/TextEditor.css:
(.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint): Use border-image-source.
* UserInterface/TimelineOverview.css:
(.timeline-overview > .timeline .bar): Use border-image-slice.
(.timeline-overview > .timeline.timeline-record-type-network .bar): Use border-image-source.
(.timeline-overview > .timeline.timeline-record-type-layout .bar): Ditto.
(.timeline-overview > .timeline.timeline-record-type-script .bar): Ditto.
2012-03-21 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector navigation bar and some disclosure triangles HiDPI aware again.
This regressed when HiDPI canvas was turned off by <rdar://problem/10887881>. This change also uses
media queries, so dragging the Web Inspector between different DPI monitors will correctly switch.
<rdar://problem/11091555> HiDPI: Many small icons in new Web Inspector are blurry in HiDPI
Reviewed by Joseph Pecoraro.
* UserInterface/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
* UserInterface/DetailsSection.css:
(.details-section > .header::before): Set background-size.
(.details-section > .header:not(.mouse-over-options-element):active::before): Added 2x version.
(.details-section.collapsed > .header::before): Ditto.
(.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
* UserInterface/ImageUtilities.js:
(generateColoredImage): Added scale parameter. Multiply width and height by scale.
(generateColoredImagesForCSS.imageLoaded): Call generateImage for each pixel ratio.
(generateColoredImagesForCSS.generateImage): Added pixelRatio parameter. Multiply the shadow values by pixelRatio.
Pass the pixelRation to generateColoredImage.
(generateColoredImagesForCSS): Remove depth and scale.
(generateEmbossedImages._imageLoaded): Call _createEmbossedCanvasImage for each pixel ratio.
(generateEmbossedImages._createEmbossedCanvasImage): Added pixelRatio parameter. Define the depth. Multiply the
width and height by pixelRatio. Use width and height instead of image.width and image.height through out.
(generateEmbossedImages._invertMaskImage): Added width and height parameters. Use instead of image.width and image.height.
(generateEmbossedImages._applyImageMask): Remove unused HTMLCanvasElement as input code path.
* UserInterface/Main.css:
(.go-to-arrow:active): Added 2x version.
(:focus .selected .go-to-arrow): Added 2x version.
(:focus .selected .go-to-arrow:active): Added 2x version.
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item .disclosure-button): Set background-size.
(.navigation-sidebar-panel-content-tree-outline .item.selected .disclosure-button): Added 2x version.
(.navigation-sidebar-panel-content-tree-outline .item.expanded .disclosure-button): Added 2x version.
(.navigation-sidebar-panel-content-tree-outline .item.selected.expanded .disclosure-button): Added 2x version.
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added media query and 2x versions.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid th.collapser > .collapser-button): Set background-size.
(.content-view.timelines > .data-grid th.collapser > .collapser-button:active): Added 2x version.
(.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button): Added 2x version.
(.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active): Added 2x version.
2012-03-20 Timothy Hatcher <timothy@apple.com>
Don't allow setting breakpoints for resource types that are not Script or Document.
<rdar://problem/11044410> Should not be allowed to set breakpoints on CSS resources
Reviewed by Brian Weinstein.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor): Don't add event listeners unless _supportsDebugging is true.
(WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners inside if _supportsDebugging block.
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Don't add breakpoints unless _supportsDebugging.
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Assert _supportsDebugging.
(WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
(WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.get _supportsDebugging): Added.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Return early if !_supportsDebugging.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Assert and return early if !_supportsDebugging.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
2012-03-20 Timothy Hatcher <timothy@apple.com>
Add and remove the window-inactive style class so controls, row selections, and backgrounds use their inactive colors.
<rdar://problem/11064364> Inspector controls (bars and buttons) have active appearance in inactive windows
Reviewed by Brian Weinstein.
* UserInterface/ButtonNavigationItem.css:
(body.window-inactive .navigation-bar > .item.button:not(.suppress-emboss) > .glyph):
(.navigation-bar > .item.button.disabled > .glyph):
(body.window-inactive .navigation-bar > .item.button.disabled:not(.suppress-emboss) > .glyph):
(.navigation-bar > .item.button.suppress-emboss > .glyph):
(.navigation-bar > .item.button.suppress-emboss:active > .glyph):
(.navigation-bar > .item.button.suppress-emboss.disabled > .glyph): Moved from QuickConsole.css.
* UserInterface/DataGrid.css:
(body.window-inactive .data-grid th.sort-descending): Fixed the selector to use window-inactive.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added window event listeners for blur and focus.
(WebInspector.updateDockedState): Remove the window-inactive class when docking, just in case.
(WebInspector._windowFocused): Added.
(WebInspector._windowBlurred): Added.
* UserInterface/QuickConsole.css: Moved the disabled button style to ButtonNavigationItem.css.
2012-03-19 Timothy Hatcher <timothy@apple.com>
Support showing and working with Script breakpoints from the Breakpoint sidebar.
Part of: <rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
Reviewed by Joseph Pecoraro.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel):
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Refactor code to work in terms on both Resource and Script.
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForSourceCode): Renamed from _addBreakpointsForResource.
(WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Use _addBreakpointsForSourceCode.
(WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Ditto.
(WebInspector.BreakpointSidebarPanel.prototype._scriptAdded): Added. Call _addBreakpointsForSourceCode if this script isn't
backed by a Resource.
(WebInspector.BreakpointSidebarPanel.prototype._scriptsCleared): Added. Remove all ScriptTreeElements.
(WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Refactored to work with either Resource or Script.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.scriptForIdentifier): Added.
(WebInspector.DebuggerManager.prototype.scriptsForURL): Added.
(WebInspector.DebuggerManager.prototype._setBreakpoint): Set the breakpoint correctly for Script's without URLs.
2012-03-19 Timothy Hatcher <timothy@apple.com>
Show Scripts in the Resource sidebar at the top level.
These scripts are grouped into 3 folders: Extension Scripts, Extra Scripts and Anonymous Scripts.
<rdar://problem/11075565> REGRESSION (New Web Inspector): Injected extension content scripts are not shown
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.reset): Fire ScriptsCleared event.
(WebInspector.DebuggerManager.prototype.scriptDidParse): Fire ScriptAdded event. Pass isContentScript
to the Script constructor.
* UserInterface/Images/ClippingJS.png: Added.
* UserInterface/Images/ClippingJS@2x.png: Added.
* UserInterface/Main.html: Included ScriptTreeElement.js.
* UserInterface/ResourceIcons.css:
(.anonymous-script-icon .icon): Added.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Added event listeners for ScriptAdded and ScriptsCleared.
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Create a tree element for
the anonymous script.
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): Create a tree element for scripts with URLs.
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared): Remove the script folders.
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Support ScriptTreeElement.
* UserInterface/Script.js:
(WebInspector.Script): Added injected parameter.
(WebInspector.Script.prototype.get injected): Added.
* UserInterface/ScriptTreeElement.js: Added.
(WebInspector.ScriptTreeElement):
(WebInspector.ScriptTreeElement.prototype.get script):
2012-03-19 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ScriptContentView for showing content of Script objects.
Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
breakpoint is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Added case for Script.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Simplify and use ResourceSidebarPanel.showSourceCode.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Update assert for ScriptContentView.
(WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Move a variable down below an early return.
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Updated to work with Scripts.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close all ScriptContentViews.
* UserInterface/ScriptContentView.css: Added.
(.content-view.script > .text-editor):
* UserInterface/ScriptContentView.js: Added. Copied mostly from TextResourceContentView.
(WebInspector.ScriptContentView):
(WebInspector.ScriptContentView.prototype.get script):
(WebInspector.ScriptContentView.prototype.get textEditor):
(WebInspector.ScriptContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.ScriptContentView.prototype.revealLine):
(WebInspector.ScriptContentView.prototype.shown):
(WebInspector.ScriptContentView.prototype.hidden):
(WebInspector.ScriptContentView.prototype.closed):
(WebInspector.ScriptContentView.prototype._contentWillPopulate):
(WebInspector.ScriptContentView.prototype._executionLineNumberDidChange):
2012-03-18 Timothy Hatcher <timothy@apple.com>
Hide line numbers for blank lines when showing inline scripts while the debugger is paused.
When paused in the debugger we sometimes can only show the scripts for the HTML file. When
this happens the scripts are the only thing visible (in their final position) with blank
lines for the earlier HTML content. This hides the line numbers for those blank lines
to provide a clue to the user that they shouldn't expect content there.
Reviewed by Brian Weinstein.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor): Start with the first line as invalid, before a populate there
is always a blank first line.
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Clear the invalid line numbers.
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
Add blank lines to the invalid line numbers map.
(WebInspector.SourceCodeTextEditor.prototype.textEditorShouldHideLineNumber): Added. Check the invalid
line numbers map.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.updateLayout): Added force parameter and pass it to _updateLineNumbers.
(WebInspector.TextEditor.prototype._reset): Pass true to updateLayout.
(WebInspector.TextEditor.prototype._updateLineNumbers): Added force parameter. Always rebuild the line numbers
when this is true.
(WebInspector.TextEditor.prototype._lineNumberTextContent): Added. Helper.
(WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Use _lineNumberTextContent.
(WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Remove duplicate copies of _checkForOldResources and put it in the NavigationSidebarPanel base class.
Now that the individual _checkForOldResources functions don't access different URL maps, this code
can now be shared down in NavigationSidebarPanel.
Reviewed by John Sullivan.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Removed event listeners for _checkForOldResources.
(WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Remove call to _checkForOldResources.
(WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources): Removed.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Removed event listeners for _checkForOldResources.
(WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Removed.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Added event listeners for _checkForOldResources.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Added.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Removed event listeners for _checkForOldResources.
(WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Removed.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Simplify IssueSidebarPanel and SearchSidebarPanel by using TreeOutline.getCachedTreeElement to
find existing ResourceTreeElements.
Reviewed by Brian Weinstein.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Removed _issueRootElements.
(WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Use getCachedTreeElement to find
the existing ResourceTreeElement.
(WebInspector.IssueSidebarPanel.prototype._issuesCleared): Removed _issueRootElements reference.
(WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Removed _resourceSearchResultMap.
(WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Removed _resourceSearchResultMap
reference. Use getCachedTreeElement to find the existing ResourceTreeElement.
(WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork):
Removed _resourceSearchResultMap reference.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Simplify BreakpointSidebarPanel by using TreeOutline.getCachedTreeElement to find existing
the BreakpointTreeElements and ResourceTreeElements.
Reviewed by Brian Weinstein.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Removed _resourceTreeElementURLMap.
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Use getCachedTreeElement to
find the existing ResourceTreeElement.
(WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Use getCachedTreeElement to
find the BreakpointTreeElement to remove.
(WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Removed
_resourceTreeElementURLMap reference.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Fix some exceptions I hit while adding ScriptContentView.
Add some null checks at the callers of sidebarPanelForRepresentedObject, since sidebarPanelForRepresentedObject
can return null when the representedObject is unknown. The sidebarPanelForRepresentedObject function logs an
error to the console when it returns null. So the exceptions were just more noise.
Reviewed by John Sullivan.
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject): Null check the result of sidebarPanelForRepresentedObject.
(WebInspector._updateCurrentContentViewCookie): Ditto.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Fix an issue where the execution line was not highlighted for single line scripts.
Reviewed by Brian Weinstein.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._reset): Add ExecutionLineStyleClassName to the text chunk element
if the chunk is one line and it is the execution line.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Rename ResourceSidebarPanel.showResourceSourceCode to ResourceSidebarPanel.showSourceCode.
This is prep for making ResourceSidebarPanel be responsible for showing Scripts.
Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
breakpoint is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected):
* UserInterface/DebugSidebarPanel.js:
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel.prototype._treeElementSelected):
* UserInterface/Main.js:
(WebInspector.openURL):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Renamed from showResourceSourceCode. Changed
to not assume we are dealing with a Resource.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype._goToResource):
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected):
2012-03-18 Timothy Hatcher <timothy@apple.com>
Prevent double dividers in the navigation bar when viewing a non-frame content view.
The node search navigation item is hidden when not on a frame content view, but that causes
the adjacent dividers to come together. We need to hide one divider in this case.
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Remember the divider to the left of the node search item.
(WebInspector._currentContentViewDidChange): Hide the divider too.
2012-03-18 Timothy Hatcher <timothy@apple.com>
Show script content when the debugger pauses on a resource that hasn't populated its full content yet.
Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not show when a
breakpoint is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.scriptsForResource): Added.
(WebInspector.DebuggerManager.prototype.reset): Clear _scriptURLMap.
(WebInspector.DebuggerManager.prototype.scriptDidParse): Don't add the script again if it is already known.
Add scripts with URLs to _scriptURLMap.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor): Call _activeCallFrameDidChange to update the execution line and request
script content if needed.
(WebInspector.SourceCodeTextEditor.prototype.revealLine): Store the line number if we don't have the line needed
to show yet. Delete the stored values if we call through to TextEditor.
(WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Don't delete the stored values here.
Return early if we don't have the line needed.
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Added.
(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate): Added.
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent): Added.
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Set _fullContentPopulated and call _populateWithContent.
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Call _populateWithInlineScriptContent or
_populateWithScriptContent for Resource source code.
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent): Added. Request the content for all
the scripts for this URL.
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable): Concat the scripts
together, adding the script tags.
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent): Added. Request the single script content.
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent.scriptContentAvailable): Set _fullContentPopulated
and call _populateWithContent.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Listen for the ContentWillPopulate event.
(WebInspector.TextResourceContentView.prototype._contentWillPopulate): Renamed from contentAvailable. Do nothing if the text
editor is already added.
2012-03-16 Timothy Hatcher <timothy@apple.com>
Factor most of TextResourceContentView out into SourceCodeTextEditor, a new TextEditor subclass.
This is prep work for making a ScriptContentView to show Scripts before the resource loads.
Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
show when a breakpoint is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/IssueManager.js:
(WebInspector.IssueManager.prototype.issuesForSourceCode): Renamed from issuesForResource.
* UserInterface/Main.html: Included SourceCodeTextEditor.js and SourceCodeTextEditor.css.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Use issuesForSourceCode.
* UserInterface/SourceCodeTextEditor.css: Copied from TextResourceContentView.css.
(.source-code.text-editor .text-editor-text-chunk.error):
(.source-code.text-editor .text-editor-text-chunk.warning):
* UserInterface/SourceCodeTextEditor.js: Added.
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.get sourceCode):
(WebInspector.SourceCodeTextEditor.prototype.revealLine): Copied from TextResourceContentView.
(WebInspector.SourceCodeTextEditor.prototype.shown): Call _revealPendingLineIfPossible.
(WebInspector.SourceCodeTextEditor.prototype.close): Remove event listeners.
(WebInspector.SourceCodeTextEditor.prototype._revealPendingLineIfPossible): Helper.
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Copied from TextResourceContentView.
(WebInspector.SourceCodeTextEditor.prototype._updateBreakpointStatus): Ditto.
(WebInspector.SourceCodeTextEditor.prototype._breakpointRemoved): Ditto.
(WebInspector.SourceCodeTextEditor.prototype._activeCallFrameDidChange): Ditto.
(WebInspector.SourceCodeTextEditor.prototype._matchesScriptLocation): Helper.
(WebInspector.SourceCodeTextEditor.prototype._matchesBreakpoint): Helper.
(WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Helper.
(WebInspector.SourceCodeTextEditor.prototype._issueWasAdded): Copied from TextResourceContentView.
(WebInspector.SourceCodeTextEditor.prototype._addIssueToLineNumberMap): Helper.
(WebInspector.SourceCodeTextEditor.prototype._addIssueToLine): Copied from TextResourceContentView.
(WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBaseURL): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorLineContentUpdated): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointInfo): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved): Ditto.
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointToggled): Ditto.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Call the Object constructor.
(WebInspector.TextEditor.prototype.set executionLineNumber): Fire the ExecutionLineNumberDidChange event.
* UserInterface/TextResourceContentView.css:
(.text-editor .text-editor-text-chunk.error): Removed.
(.text-editor .text-editor-text-chunk.warning): Removed.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Listen for the ExecutionLineNumberDidChange event.
(WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): If the SourceCodeTextEditor
has an executionLineNumber, we can assume it is always the active call frame.
(WebInspector.TextResourceContentView.prototype.contentAvailable): Just remove the spinner or error message
and append the text editor.
(WebInspector.TextResourceContentView.prototype.revealLine): Just call revealLine on the text editor.
(WebInspector.TextResourceContentView.prototype.closed): Call close on the text editor.
(WebInspector.TextResourceContentView.prototype._executionLineNumberDidChange): Added.
2012-03-15 Timothy Hatcher <timothy@apple.com>
Allow breakpoints to be set for a Resource or a Script.
This is prep for making a TextEditor subclass that works with either a Script or a Resource.
Part of: <rdar://problem/11047982> REGRESSION (New Web Inspector): Page source does not
show when a breakpoint is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint): Make the constructor take a SourceCode object instead of a URL.
(WebInspector.Breakpoint.prototype.get scriptIdentifier): Added.
(WebInspector.Breakpoint.prototype.get info): Updated the comment.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Use breakpointsForSourceCode.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode): Renamed from breakpointsForURL. Takes
a SourceCode object and looks up by url or id.
(WebInspector.DebuggerManager.prototype.addBreakpoint): Don't assume there is a url. Adds the breakpoint
to the URL map and/or the script identifier map.
(WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto for removal.
(WebInspector.DebuggerManager.prototype._saveBreakpoints): Skips breakpoints without URLs.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.contentAvailable): Use breakpointsForSourceCode.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Pass the resource to the
Breakpoint constructor instead of the URL.
2012-03-17 Timothy Hatcher <timothy@apple.com>
Use Date.toLocaleString() to format the date in the Exprires column of the Cookies view.
<rdar://problem/9628659> Expires date in the Cookies view should be localized
Reviewed by Ada Chan.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable): Use toLocaleString().
2012-03-16 Joseph Pecoraro <pecoraro@apple.com>
Give each Timeline DataGrid a chance to react to EventMarkers.
If another timeline data grid was active when event markers arrived,
then switching to the Network data grid was not showing those event
markers. Give each Timeline data grid a chance to react to the
event marker, not just the active data grid.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._recordingStarted):
(WebInspector.TimelinesContentView.prototype._recordedEventMarker):
(WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
2012-03-16 Joseph Pecoraro <pecoraro@apple.com>
Workaround sporatic double thick border appearing in collapsed columns.
Occasionally the Networks data grid will show a double thick border where
the collapsed, 0-width, columns were. Workaround this by just hiding the
border for collapsed columns.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid.collapsed-details td.column-group-details:not(:last-child)):
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
2012-03-15 Timothy Hatcher <timothy@apple.com>
Make the Quick Console toolbar buttons pin to the bottom when doing multi-line input.
Also make the scrollbars not interfere if the user has old-school scrollbars.
Reviewed by Joseph Pecoraro.
* UserInterface/QuickConsole.css:
(.quick-console): Specify overflow-x and overflow-y separately. Use auto instead of scroll.
(.quick-console > .view-container): Use auto instead of scroll.
(.quick-console > .toolbar > .navigation-bar-container): Added.
(.quick-console > .toolbar > .navigation-bar-container > .navigation-bar-spacer): Added.
(.quick-console > .toolbar > .navigation-bar-container > .navigation-bar): Updated the selector.
(.quick-console > .toolbar > .navigation-bar-container > .navigation-bar > .item.button.disabled > .glyph): Ditto.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Create navigation bar container and spacer.
2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11049672> Delete key should delete selected breakpoint in sidebar
- Delete key removes the breakpoint.
- Enter / Space toggles the breakpoint.
- All Exceptions and Uncaught Exceptions breakpoints cannot be removed
and will beep if the user attempts to delete them.
Reviewed by Timothy Hatcher.
* UserInterface/TreeOutline.js:
(TreeOutline.prototype._treeKeyDown):
Expose onspace like onenter and ondelete.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.ondelete):
(WebInspector.BreakpointTreeElement.prototype.onenter):
(WebInspector.BreakpointTreeElement.prototype.onspace):
Implement default TreeElement handlers for keys.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
(WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
Ensure we never try to remove the custom breakpoints.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype._breakpointRemoved):
When a breakpoint is removed update the ContentView and TextEditor.
2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
Only show the button when a FrameView (DOM Tree / Source Code) is available.
When switching away from a FrameView make sure to disable node searching
if it was active. Also since the nav bar may have changed size have the
content browser update its navigation bar layout.
If this happens more in the future the buttons should be owned by the
individual ContentViews instead of WebInspector.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._currentContentViewDidChange):
2012-03-15 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11050670> REGRESSION (New Web Inspector): Add Inspect Element button (magnifying glass button)
Add an on/off button for node searching.
Reviewed by Timothy Hatcher.
* UserInterface/ActivateButtonNavigationItem.js: Added.
(WebInspector.ActivateButtonNavigationItem):
(WebInspector.ActivateButtonNavigationItem.prototype.get activated):
(WebInspector.ActivateButtonNavigationItem.prototype.set activated):
(WebInspector.ActivateButtonNavigationItem.prototype.generateStyleText):
ActivateButton uses the normal "Focus" style when "Activated". It
then includes a darker version of "Focus" for "Activated:active".
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype._generateImages):
Allow for more flexible subclassing.
* UserInterface/ImageUtilities.js:
(generateEmbossedImages._imageLoaded):
(generateEmbossedImages._createEmbossedCanvasImage):
Create a FocusDark style if requested.
* UserInterface/Images/Hand.pdf: Added.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._domNodeWasInspected):
(WebInspector._toggleNodeSearch.callback):
(WebInspector._toggleNodeSearch):
Add the button to the right.
2012-03-14 Timothy Hatcher <timothy@apple.com>
Fix typo of the servicePendingContentRequests function was mentioned in review but I forgot to save the file.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.markAsFailed): Fix typo of servicePendingContentRequests.
2012-03-14 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10935394> REGRESSION (New Web Inspector): load and DOMContentLoaded event lines are not shown in the Timeline overview
<rdar://problem/10935417> REGRESSION (New Web Inspector): developer generated timestamps are not shown in the Timeline overview
Add event marker decorations to the TimelineOverview.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineDecorations.css:
(.timeline-decorations > .event-markers > .event-marker.timestamp):
Make markTimeline/timeStamp green instead of yellow. Easier to see.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.clear):
Clearing should also remove visible EventMarkers.
* UserInterface/TimelineOverview.css:
(.timeline-overview .timeline-decorations > .event-markers):
(.timeline-overview .timeline-decorations > .event-markers > .event-marker-tooltip):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._recordedEventMarker):
Pass event markers on to the TimelineOverview.
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.update):
(WebInspector.TimelineOverview.prototype.addTimelineEventMarker):
Have the decorator draw event markers.
2012-03-14 Timothy Hatcher <timothy@apple.com>
Provide a way to request content from a Script.
Factor out the content requesting parts of Resource down into a SourceCode class that
both Resource and Script now inherit from.
Part of: <rdar://problem/11047982> REGRESSION: Page source does not show when a breakpoint
is hit while loading the page
Reviewed by Joseph Pecoraro.
* UserInterface/Main.html: Included SourceCode.js.
* UserInterface/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.canRequestContentFromBackend): Added.
(WebInspector.Resource.prototype.requestContentFromBackend): Added.
(WebInspector.Resource.prototype.markAsFinished): Call requestContentFromBackendIfNeeded.
(WebInspector.Resource.prototype.markAsFailed): Call servicePendingContentRequests with force.
* UserInterface/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.canRequestContentFromBackend): Added.
(WebInspector.Script.prototype.requestContentFromBackend): Added.
* UserInterface/SourceCode.js: Added.
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.get content):
(WebInspector.SourceCode.prototype.get contentIsBase64Encoded):
(WebInspector.SourceCode.prototype.get contentURL):
(WebInspector.SourceCode.prototype.requestContent):
(WebInspector.SourceCode.prototype.canRequestContentFromBackend):
(WebInspector.SourceCode.prototype.requestContentFromBackend):
(WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded):
(WebInspector.SourceCode.prototype.servicePendingContentRequests):
(WebInspector.SourceCode.prototype._processContent):
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11044135> Quick Console should handle multiline input better
The QuickConsole consists of two pieces in a fixed height. The toolbar with
JavaScript prompt, and the output content view container. The console itself
grows to a maximum size (75% of the total window size or user specified by
resizing). When handling multiline input the toolbar containing the prompt
is allowed to grow, pushing up the content. When the maximum is reached the
content will scroll under it, and likewise the multiline JavaScript prompt
will eventually scroll under it.
Reviewed by Timothy Hatcher.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
(WebInspector.JavaScriptLogViewController.prototype._promptHistoryChange):
(WebInspector.JavaScriptLogViewController.prototype._promptPasteboardEvent):
(WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges.afterEvent):
(WebInspector.JavaScriptLogViewController.prototype._detectPromptHeightChanges):
* UserInterface/TextPrompt.js:
(WebInspector.TextPrompt):
(WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
In order to detect with the input prompt changes height, we hook into
a number of events. Keydown, cut/paste, and TextPrompt history changes.
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console.collapsed):
Let the console scroll when multiline input fills the entire console.
To allow multiline input when collapsed remove !important from height.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.set collapsed):
(WebInspector.QuickConsole.prototype.get multiline):
(WebInspector.QuickConsole.prototype.get collapsedHeight):
Use constants where possible for height values.
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
(WebInspector.QuickConsole.prototype.promptDidChangeHeight):
Responds to actions that will most like require resizes.
(WebInspector.QuickConsole.prototype._updateToolbarSize):
Update the toolbar size if the prompt size changed.
(WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
Update the view container's size when single line or multiline.
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
Tweak quick console focusing.
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
This didn't appear to work for all actions. Ignore the caret checking,
and more proactively focus as long as there is no selection.
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
Minor quick console mouse improvements.
Allow selection in the messages output.
Clicking in the messages output focuses the prompt if there is no
selection. This matches LogContentView.
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.css:
(.quick-console > .view-container):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
Event marker lines should not overlap the quick console.
Reviewed by Brian Weinstein.
* UserInterface/TimelineDecorations.css:
(.timeline-decorations > .event-markers):
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
Renamed isFocused() to a focused getter based on earlier review feedback.
Reviewed by Brian Weinstein.
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt.prototype.get focused):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.consoleCleared):
* UserInterface/Main.js:
(WebInspector._keydown):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._activeLogCleared):
2012-03-13 Joseph Pecoraro <pecoraro@apple.com>
Converge to a single RecordedEventMarker event based on earlier review feedback.
Reviewed by Timothy Hatcher.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
2012-03-13 Timothy Hatcher <timothy@apple.com>
Make profiles work again while retaining the correct insertion order in the Timeline DataGrids.
This reverts most of r41172 and fixes the single issue from the open source version of the code.
When there isn't a previousGridNode that means we need to insert at the top of the DataGrid.
But the open source code was missing the !previousGridNode check, causing elements to append
at the end instead.
<rdar://problem/10960578> REGRESSION (r41172): DOM exceptions when showing profile data grid
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype._attach): Revert r41172 and add a check for !previousGridNode.
2012-03-13 Timothy Hatcher <timothy@apple.com>
Don't follow links when they are being edited by the user.
Inspired by the fix for https://webkit.org/b/60814.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Call isBeingEdited and return early if true.
* UserInterface/EditingSupport.js:
(WebInspector.isBeingEdited): Check ancestor elements too.
* UserInterface/Main.js:
(WebInspector.handlePossibleLinkClick): Call isBeingEdited and return early if true.
2012-03-13 Timothy Hatcher <timothy@apple.com>
Remove duplicate code for the handling clicked links.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView): Removed click event listener.
(WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Removed.
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Use handlePossibleLinkClick.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Pass along the lineNumber.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView): Removed click event listener.
(WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Removed.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Removed click event listener.
(WebInspector.LogContentView.prototype._messagesClicked): Removed.
* UserInterface/Main.js:
(WebInspector.handlePossibleLinkClick): Added.
(WebInspector._mouseWasClicked): Call handlePossibleLinkClick.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Removed click event listener.
(WebInspector.QuickConsole.prototype._messagesClicked): Removed.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype._mouseWasClicked): Use handlePossibleLinkClick.
2012-03-13 Timothy Hatcher <timothy@apple.com>
Properly bind and unbind every DOMNode to DOMTreeManager.
Merges the fix for https://webkit.org/b/78116 from open source (r107093).
Reviewed by Joseph Pecoraro.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode): Inserts the node into the DOMTreeManager map here. So all
the callers don't need to do it.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._setDocument): Removed binding code.
(WebInspector.DOMTreeManager.prototype._setDetachedRoot): Ditto.
(WebInspector.DOMTreeManager.prototype._setChildNodes): Removed call to _bindNodes.
(WebInspector.DOMTreeManager.prototype._bindNodes): Removed.
(WebInspector.DOMTreeManager.prototype._childNodeRemoved): Call _unbind.
(WebInspector.DOMTreeManager.prototype._unbind): Added. Recursively unbind.
2012-03-13 Timothy Hatcher <timothy@apple.com>
Fix an issue where removing a TreeElement from a TreeOutline would cause the TreeOutline
to forget all TreeElements that came after the TreeElement that was removed.
Reviewed by Brian Weinstein.
* UserInterface/TreeOutline.js:
(TreeOutline.prototype._forgetChildrenRecursive): Pass parentElement instead of this to
traverseNextTreeElement, forcing it to stop when it reaches the last descendant of parentElement.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Keep the QuickConsole scroll position pinned to the bottom when changing the height.
Reviewed by Joseph Pecoraro.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype.updateLayout): Scroll to the bottom if we were before the possible height change.
(WebInspector.QuickConsole.prototype._isScrolledToBottom): Added.
(WebInspector.QuickConsole.prototype._scrollToBottom): Added.
(WebInspector.QuickConsole.prototype._resizerMouseDown): Remember if the view was scrolled to the bottom before resize.
(WebInspector.QuickConsole.prototype._resizerMouseMoved): Scroll to the bottom if we were before resize.
(WebInspector.QuickConsole.prototype._resizerMouseUp): Delete the flag.
(WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches): Scroll the console element into view that
was clicked or scroll to the bottom if we were before.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Allow the QuickConsole to shrink in height when it auto grew in height.
Reviewed by Joseph Pecoraro.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype.set collapsed): Reset _userPreferredMaximumHeightWasSetSinceLastToggle back to false.
(WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight): Set _userPreferredMaximumHeightWasSetSinceLastToggle to true.
(WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider): Return early if _userPreferredMaximumHeightWasSetSinceLastToggle
is set after calling _updateScrollDivider. Added an allowShrinking parameter.
(WebInspector.QuickConsole.prototype._viewContainerClick): Update comment. And call _updateViewContainerSizeAndScrollDivider,
passing true to allow shrinking.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Quick fixes to the QuickConsole styles.
Reviewed by Joseph Pecoraro.
* UserInterface/QuickConsole.css:
(.quick-console): Set overflow to hidden so the toolbar box-shadow does not spill out the sides. Also
removes a box-shadow that was not doing anything useful.
(.quick-console > .view-container): Set overflow-x to hidden so the horizontal scrollbar never shows.
(.quick-console > .toolbar): Set a transition on box-shadow so the shadow animates. Add a base box-shadow
that has 0 for blur so it animates nicely.
(.quick-console > .toolbar.scroll-divider): Tweak the shadow so it is rgba() and a larger blur.
2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
Disable the Toggle button when there is no Quick Console content.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector._keydown):
* UserInterface/QuickConsole.css:
(.quick-console > .toolbar > .navigation-bar > .item.button.disabled > .glyph):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.toggle):
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
(WebInspector.QuickConsole.prototype._toggleButtonClicked):
(WebInspector.QuickConsole.prototype._resizerDoubleClicked):
(WebInspector.QuickConsole.prototype._activeLogCleared):
2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11034808> Esc should focus or toggle the QuickConsole
Esc will focus the quick console if nothing else is focused and accepting
input. When focused, Esc will toggle the console's drawer.
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector._keydown):
Handle the Esc key.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole.prototype._toggleButtonClicked):
When the quick console is focused and a user clicks the toggle button,
the quick console emits a "blur" event even though the caret is still
inside it and commands can be run. This breaks the "isFocused()" state
of the field and thus the Esc key toggling the field. So, lets just
auto-focus the TextPrompt when the toggle button is clicked.
2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11034699> Quick Console should respect clear keyboard shortcuts
React to the clear active log event but only on the currently active console.
Reviewed by Brian Weinstein.
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt):
(WebInspector.JavaScriptTextPrompt.prototype.isFocused):
(WebInspector.JavaScriptTextPrompt.prototype._focusedPrompt):
(WebInspector.JavaScriptTextPrompt.prototype._blurredPrompt):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.consoleCleared):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype._activeLogCleared):
2012-03-12 Joseph Pecoraro <pecoraro@apple.com>
Improve QuickConsole content sizing.
Make the quick console work like a calculator. The most recent
result is closest to the console prompt. Older results scroll
up off the top. Now when resizing, the user is setting their
preferred maximum size of the drawer.
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.set collapsed):
(WebInspector.QuickConsole.prototype.get collapsedHeight):
(WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
(WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
Give comments describing the boundary heights.
(WebInspector.QuickConsole.prototype.get userPreferredMaximumHeight):
(WebInspector.QuickConsole.prototype.set userPreferredMaximumHeight):
Add a convenient function for getting the user preferred sizes.
(WebInspector.QuickConsole.prototype.set height):
(WebInspector.QuickConsole.prototype._expandViewContainerSize):
(WebInspector.QuickConsole.prototype._updateViewContainerSizeAndScrollDivider):
(WebInspector.QuickConsole.prototype._updateScrollDivider):
When setting the height, we typically drop through to updating the
container size to get the size to fit, and update the scroll divider
if needed.
(WebInspector.QuickConsole.prototype._resizerMouseMoved):
When the user resized, save the height into Settings.
(WebInspector.QuickConsole.prototype.updateLayout):
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
Times when we need to adjust sizes.
(WebInspector.QuickConsole.prototype._viewContainerScroll):
Don't adjust the size, just show/hide the divider.
(WebInspector.QuickConsole.prototype._viewContainerClick.afterDispatches):
(WebInspector.QuickConsole.prototype._viewContainerClick.afterClickHandling):
(WebInspector.QuickConsole.prototype._viewContainerClick):
Adjust the size, but only after any possible work.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Don't break into the debugger when evaluating an expression in the console that triggers an exception.
The exception will still be logged as the result in the console. We might tweak how this works later,
but right now breaking into the debugger for this is annoying. This change matches open source.
Reviewed by Brian Weinstein.
* UserInterface/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendCommand): Pass true for doNotPauseOnExceptions parameter.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Remove an overzealous assert in DebuggerManager.
The script identifier can be reused, so just make a new Script and insert it into the map again.
Reviewed by Brian Weinstein.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.scriptDidParse): Removed console.assert.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Clean up the styles for the console and log views.
Reviewed by Brian Weinstein.
* UserInterface/JavaScriptTextPrompt.css:
(.javascript-prompt): Adjust the padding and remove the margin.
* UserInterface/JavaScriptTextPrompt.js:
(WebInspector.JavaScriptTextPrompt): Set the text to "" so a "<br>" is inserted into the prompt. This lets the insertion
caret to position correctly.
* UserInterface/LogContentView.css:
(.console-message, .console-user-command): Adjust the padding and remove the margin.
(.console-message::before, .console-user-command::before, .javascript-prompt::before, .console-group-title::before):
Don't use a negative margin, make it a positive one. The padding above makes room.
(.console-group-messages .section .header::before): Bump up the disclosure triangle, it was 1px too low.
(.console-group-messages .section .header .title): Reset the line-height to make the logged object not take up extra space.
* UserInterface/QuickConsole.css:
(.quick-console > .toolbar > .text-prompt > .javascript-prompt): Reduce top position to better center the prompt.
2012-03-12 Timothy Hatcher <timothy@apple.com>
Fix an issue where the whole Web Inspector Ui would just 1px after typing in the quick console.
Reviewed by Joseph Pecoraro.
* UserInterface/QuickConsole.css:
(.quick-console > .toolbar): Removed -webkit-box-sizing.
(.quick-console > .toolbar > .navigation-bar): Set the height to 21px so it does not extend out of .toolbar.
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Give the QuickConsole a LogViewController. The JavaScriptTextPrompt will
go in the toolbar, and the ViewContainer will hold the ConsoleGroup output.
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console > .toolbar > .text-prompt):
(.quick-console > .toolbar > .text-prompt > .javascript-prompt):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.didAppendConsoleMessage):
(WebInspector.QuickConsole.prototype._mouseWasClicked):
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Add a scroll divider box shadow when the Quick Console's view
contains scrollable content.
Reviewed by Timothy Hatcher.
* UserInterface/QuickConsole.css:
(.quick-console > .view-container):
(.quick-console > .toolbar.scroll-divider):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.set collapsed):
(WebInspector.QuickConsole.prototype.set height):
(WebInspector.QuickConsole.prototype._resizerMouseUp):
(WebInspector.QuickConsole.prototype._updateScrollDivider):
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Add JavaScriptLogViewController class. This holds a JavaScriptTextPrompt
for input and a ConsoleGroup to put the output of JavaScript commands.
The idea being that you could swap out either the input source or output
destination. Currently this class just knows how to deal with JavaScript.
This moves out most of the remaining JavaScript knowledge from
LogContentView and puts it into this new controller. There is just one
delegate message back.
Reviewed by Timothy Hatcher.
* UserInterface/JavaScriptLogViewController.js: Added.
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.constructor.WebInspector.JavaScriptLogViewController.get prompt):
(WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup):
(WebInspector.JavaScriptLogViewController.prototype.get currentConsoleGroup):
(WebInspector.JavaScriptLogViewController.prototype.clear):
(WebInspector.JavaScriptLogViewController.prototype.appendConsoleMessage):
(WebInspector.JavaScriptLogViewController.prototype._requestClearMessages):
(WebInspector.JavaScriptLogViewController.prototype._promptKeyDown):
(WebInspector.JavaScriptLogViewController.prototype._enterKeyPressed):
(WebInspector.JavaScriptLogViewController.prototype._appendCommand.printResult):
(WebInspector.JavaScriptLogViewController.prototype._appendCommand):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.constructor.WebInspector.LogContentView.messageAdded):
(WebInspector.LogContentView.prototype.consoleCleared):
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messagesClicked):
* UserInterface/Main.html:
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Remove unused OpenSource code from LogContentView.
Also simplify keyboard shortcut registrations.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._appendCommand.printResult):
(WebInspector.LogContentView.prototype._appendCommand):
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Add OpenSource's ConsoleView copyright headers to JSTextPrompt, ConsoleGroup, and Command files.
Add OpenSource's ConsoleMessage* copyright headers to ConsoleMessage* files.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommand.js:
* UserInterface/ConsoleCommandResult.js:
* UserInterface/ConsoleGroup.js:
* UserInterface/ConsoleMessage.js:
* UserInterface/ConsoleMessageImpl.js:
* UserInterface/JavaScriptTextPrompt.js:
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Split ConsoleGroup, ConsoleCommand, and ConsoleCommandResult into
separate files and do a tiny bit of cleanup to match the Safari
frontend style.
Reviewed by Timothy Hatcher.
* UserInterface/ConsoleCommand.js: Added.
(WebInspector.ConsoleCommand):
(WebInspector.ConsoleCommand.prototype.constructor.WebInspector.ConsoleCommand.clearHighlight):
(WebInspector.ConsoleCommand.prototype.highlightSearchResults):
(WebInspector.ConsoleCommand.prototype.matchesRegex):
(WebInspector.ConsoleCommand.prototype.toMessageElement):
(WebInspector.ConsoleCommand.prototype._formatCommand):
* UserInterface/ConsoleCommandResult.js: Added.
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.constructor.WebInspector.ConsoleCommandResult.toMessageElement):
* UserInterface/ConsoleGroup.js: Added.
(WebInspector.ConsoleGroup):
(WebInspector.ConsoleGroup.prototype.constructor.WebInspector.ConsoleGroup.addMessage):
(WebInspector.ConsoleGroup.prototype._titleClicked):
* UserInterface/ConsoleMessage.js:
(WebInspector.ConsoleMessage.create):
* UserInterface/LogContentView.js:
* UserInterface/Main.html:
2012-03-11 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Extract the JavaScript TextPrompt details into a new class,
JavaScriptTextPrompt, which is a TextPrompt with JavaScript
completion logic.
Reviewed by Timothy Hatcher.
* UserInterface/JavaScriptTextPrompt.js: Added.
(WebInspector.JavaScriptTextPrompt):
(WebInspector.JavaScriptTextPrompt.prototype.constructor.WebInspector.JavaScriptTextPrompt.get promptElement):
(WebInspector.JavaScriptTextPrompt.prototype.completions):
(WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated.getCompletions):
(WebInspector.JavaScriptTextPrompt.prototype._completions.evaluated):
(WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNamesFromEval):
(WebInspector.JavaScriptTextPrompt.prototype._completions.receivedPropertyNames):
(WebInspector.JavaScriptTextPrompt.prototype._completions):
(WebInspector.JavaScriptTextPrompt.prototype._reportCompletions):
* UserInterface/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.disable):
(WebInspector.LogContentView.prototype.shown):
(WebInspector.LogContentView.prototype._scheduleScrollIntoView.scrollIntoView):
(WebInspector.LogContentView.prototype._scheduleScrollIntoView):
(WebInspector.LogContentView.prototype._immediatelyScrollIntoView):
* UserInterface/Main.html:
2012-03-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11025039> Console error when right clicking in Console: missing WebInspector.populateHrefContextMenu
Remove unnecessary or unsupported Console contextmenu options that
came from OpenSource.
Reviewed by Timothy Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
* Localizations/en.lproj/localizedStrings.js:
2012-03-11 Timothy Hatcher <timothy@apple.com>
Don't highlight non-enumerable properties at the top level for Local, Closure, and Catch scopes.
Those scopes are synthesized scope objects, unlike Global and With scopes.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype.update): Check for dontHighlightNonEnumerablePropertiesAtTopLevel.
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Set dontHighlightNonEnumerablePropertiesAtTopLevel
for the Local, Closure, and Catch scopes.
2012-03-11 Timothy Hatcher <timothy@apple.com>
Select and show the Scope Chain details sidebar panel when paused.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector._debuggerDidPause): Set a flag to show it when available.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Check for the flag and show the panel.
2012-03-11 Timothy Hatcher <timothy@apple.com>
Populate the Scope Chain details sidebar panel.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Included ScopeVariableTreeElement.js.
* UserInterface/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Build ObjectPropertiesSections and DetailsSections
for each ScopeChainNode in the scope chain.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork): Added. Append the DetailsSections.
* UserInterface/ScopeVariableTreeElement.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js.
Some code style clean up and modifications to how _expandedProperties and the _propertyIdentifier prefix are accessed.
2012-03-11 Timothy Hatcher <timothy@apple.com>
Clean up the styles for properties sections and support creation without the header element.
This is needed for the Scope Chain sidebar panel.
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section): Removed padding and background properties.
(.sidebar > .panel.details.css-style .styles-section .header): Removed background properties.
(.sidebar > .panel.details.css-style .styles-section.no-header .properties): Added. Reset padding.
* UserInterface/ComputedStylePropertiesSection.js:
(WebInspector.ComputedStylePropertiesSection): Call the PropertiesSection constructor after
some initial setup since Section will now call expand() when there is no header.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline): Use the syntax-highlighted class name constant.
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.properties): Added. Specify padding.
* UserInterface/DetailsSectionPropertiesRow.js:
(WebInspector.DetailsSectionPropertiesRow): Add the syntax-highlighted class name.
* UserInterface/PropertiesSection.js:
(WebInspector.PropertiesSection): Call the Section constructor after some initial setup since
Section will now call expand() when there is no header.
* UserInterface/Section.css:
(.section.expanded.no-header .properties): Added. Reset padding-left.
* UserInterface/Section.js:
(WebInspector.Section): Don't create the header element if there if title and subtitle are not
strings or Nodes.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Removed syntax-highlighted class name since it is added
by DetailsSectionPropertiesRow now.
* UserInterface/SyntaxHighlightingDefaultTheme.css: Removed background-color so this does not cause
sidebar to be white.
* UserInterface/SyntaxHighlightingSupport.js: Added syntax-highlighted class name constant.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Use constant from SyntaxHighlightingSupport.js.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Add the start of the Scope Chain details sidebar panel which will show all the variables
available when paused in the debugger.
Part of: <rdar://problem/10318770>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Images/NavigationItemVariable.pdf: Added.
* UserInterface/Main.html: Included ScopeChainDetailsSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a ScopeChainDetailsSidebarPanel and include it.
* UserInterface/ScopeChainDetailsSidebarPanel.js: Added.
(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.inspect): Look for CallFrame objects.
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.get callFrame):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh): Needs implemented.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects): Include _callFrame.
(WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber): Store the activeCallFrame when
it applies to this resource to we can return it in supplementalRepresentedObjects.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Add support to ContentView for supplemental represented objects.
Supplemental represented objects can be used to provide more matching choices to the details
sidebar panels for things that are are not represented as path components in the navigation bar.
This support will be used to supply the call frame that is active in a TextResourceContentView,
for the purposes of showing a details sidebar panel with scope chain information.
Reviewed by Joseph Pecoraro.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView): Listen for the SupplementalRepresentedObjectsDidChange event.
(WebInspector.ClusterContentView.prototype.get supplementalRepresentedObjects): Added. Pass through
the current content view's supplementalRepresentedObjects.
(WebInspector.ClusterContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
Fire the SupplementalRepresentedObjectsDidChange on behalf of the current content view.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Listen for the SupplementalRepresentedObjectsDidChange event.
(WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Include the current content view's
supplementalRepresentedObjects if they are not null and not empty.
(WebInspector.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange): Added.
Dispatch the CurrentRepresentedObjectsDidChange event soon.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get supplementalRepresentedObjects): Added stub.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Include scope variables when doing autocompletion in the console.
Part of: <rdar://problem/10318770>
Reviewed by Joseph Pecoraro.
* UserInterface/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames): Added. Walk the scope chain and
request all the properties for each scope node object.
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames.propertiesCollected): Added. Add the property
names to the result and call the callback when pendingRequests is 0.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._completions): Use CallFrame.collectScopeChainVariableNames.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Support evaluating against the local scope when paused in the debugger.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.evalInInspectedWindow): Use DebuggerAgent.evaluateOnCallFrame
when there is an active call frame.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Move the flashing prevention code from DebugSidebarPanel to DebuggerManager.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel): Listen for the new CallFramesDidChange event instead of
the Paused and Resumed events.
(WebInspector.DebugSidebarPanel.prototype._showNotPausedEmptyContentPlaceholder): Added.
(WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Updated the message.
(WebInspector.DebugSidebarPanel.prototype._debuggerCallFramesDidChange): Check for null callFrames
and call _showNotPausedEmptyContentPlaceholder.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Remove assert, since we might be paused still.
Clear the delayed resume timeout.
(WebInspector.DebuggerManager.prototype.debuggerDidResume): Delay clearing the state and firing events.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Add debugger controls for pause, resume, step over, step in, and step out.
Part of: <rdar://problem/10318770>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/Pause.pdf: Added.
* UserInterface/Images/Resume.pdf: Added.
* UserInterface/Images/StepInto.pdf: Added.
* UserInterface/Images/StepOut.pdf: Added.
* UserInterface/Images/StepOver.pdf: Added.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Create the button items.
(WebInspector.QuickConsole.prototype._debuggerPauseResumeButtonClicked): Added.
(WebInspector.QuickConsole.prototype._debuggerStepOverButtonClicked): Added.
(WebInspector.QuickConsole.prototype._debuggerStepIntoButtonClicked): Added.
(WebInspector.QuickConsole.prototype._debuggerStepOutButtonClicked): Added.
(WebInspector.QuickConsole.prototype._debuggerDidPause): Added.
(WebInspector.QuickConsole.prototype._debuggerDidResume): Added.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Use ToggleButtonNavigationItem for the quick console toggle button.
Also start using the right artwork for the glyph.
Part of: <rdar://problem/10319586>
Reviewed by Joseph Pecoraro.
* UserInterface/Images/ToggleArrowDown.pdf: Added.
* UserInterface/Images/ToggleArrowUp.pdf: Added.
* UserInterface/QuickConsole.css: Removed styles to flip the arrow when collapsed.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Use ToggleButtonNavigationItem. Add a divider to the left of the button.
(WebInspector.QuickConsole.prototype.set collapsed): Change the image for the toggle button.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Remove QuickConsoleButtonNavigationItem and merge its functionality down into ButtonNavigationItem.
Having a special subclass prevent us from using ToggleButtonNavigationItem without adding another
special QuickConsoleToggleButtonNavigationItem subclass.
Part of: <rdar://problem/10319586>
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar > .item.suppress-emboss > .glyph):
(.navigation-bar > .item.suppress-emboss:active > .glyph):
(.navigation-bar > .item.button.disabled > .glyph):
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem): Call _updateImage and the suppress-emboss style class if needed.
(WebInspector.ButtonNavigationItem.prototype.set image): Call _updateImage.
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Generate a background-size for _suppressEmboss.
(WebInspector.ButtonNavigationItem.prototype._canvasIdentifier): Added assert.
(WebInspector.ButtonNavigationItem.prototype._updateImage): Added.
(WebInspector.ButtonNavigationItem.prototype._generateImages): Added assert.
* UserInterface/Main.html: Removed QuickConsoleButtonNavigationItem.{css,js}.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole): Use ButtonNavigationItem.
* UserInterface/QuickConsoleButtonNavigationItem.css: Removed.
* UserInterface/QuickConsoleButtonNavigationItem.js: Removed.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Make line numbers in the Breakpoint sidebar be 1-based. Also fixes a couple asserts that the
breakpoint lineNumber is 0-based.
Reviewed by Dan Bernstein.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint): Fix assert.
(WebInspector.Breakpoint.prototype.set lineNumber): Ditto.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Add 1 to the user visible number.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Select the Debug sidebar panel and show the navigation sidebar when the debugger pauses.
Part of: <rdar://problem/10318770>
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added Paused event listener.
(WebInspector._debuggerDidPause): Added.
2012-03-10 Timothy Hatcher <timothy@apple.com>
Highlight the current execution line.
Part of: <rdar://problem/10318770>
Reviewed by Joseph Pecoraro.
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Select the active call frame tree element.
(WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Set the active call frame.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get activeCallFrame): Added.
(WebInspector.DebuggerManager.prototype.set activeCallFrame): Added. Fire ActiveCallFrameDidChange
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _activeCallFrame and fire ActiveCallFrameDidChange.
(WebInspector.DebuggerManager.prototype.debuggerDidResume): Ditto.
* UserInterface/Images/InstructionPointer.png: Added.
* UserInterface/Images/InstructionPointer@2x.png: Added.
* UserInterface/TextEditor.css:
(.text-editor > .gutter > .line-number.execution-line::after):
(.text-editor .text-editor-text-chunk.execution-line):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Initialize _executionLineNumber to NaN.
(WebInspector.TextEditor.prototype.get executionLineNumber): Added.
(WebInspector.TextEditor.prototype.set executionLineNumber): Added. Call _updateExecutionLineNumber.
(WebInspector.TextEditor.prototype.singleLineElementForLine): Handle a null result from _textChunkForLine.
(WebInspector.TextEditor.prototype._updateExecutionLineNumber): Added. Removes from the old line and adds to the new.
(WebInspector.TextEditor.prototype._updateLineNumbers): Make lineNumber 0-based instead of 1-based.
(WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Add 1 for user visible line numbers.
(WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Ditto.
(WebInspector.TextEditor.prototype._textChunkForLine): Handle negative numbers and NaN.
(WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Assert the textChunk isn't null.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype.contentAvailable):
(WebInspector.TextResourceContentView.prototype._updateExecutionLineNumber):
2012-03-09 Timothy Hatcher <timothy@apple.com>
Populate the Debug sidebar with call frames when the debugger pauses.
Part of: <rdar://problem/10318770>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CallFrameIcons.css: Added.
(.function-icon .icon):
(.event-listener-icon .icon):
* UserInterface/CallFrameTreeElement.js: Added.
(WebInspector.CallFrameTreeElement):
(WebInspector.CallFrameTreeElement.prototype.get callFrame):
* UserInterface/DebugSidebarPanel.js:
(WebInspector.DebugSidebarPanel):
(WebInspector.DebugSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
(WebInspector.DebugSidebarPanel.prototype._debuggerDidPause): Added. Create CallFrameTreeElements.
(WebInspector.DebugSidebarPanel.prototype._debuggerDidResume): Added. Set a timeout for delayedWork.
(WebInspector.DebugSidebarPanel.prototype._debuggerDidResume.delayedWork): Added. Remove the tree elements.
(WebInspector.DebugSidebarPanel.prototype._treeElementSelected): Added. Show the resource source code.
* UserInterface/Images/EventListener.pdf: Added.
* UserInterface/Images/Function.pdf: Added.
* UserInterface/Main.html: Included CallFrameIcons.css and CallFrameTreeElement.js.
2012-03-09 Timothy Hatcher <timothy@apple.com>
Process the call frames when the debugger pauses and create easy to use objects.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/CallFrame.js: Added.
(WebInspector.CallFrame):
(WebInspector.CallFrame.prototype.get id):
(WebInspector.CallFrame.prototype.get scriptLocation):
(WebInspector.CallFrame.prototype.get functionName):
(WebInspector.CallFrame.prototype.get thisObject):
(WebInspector.CallFrame.prototype.get scopeChain):
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get callFrames): Added.
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Process the callFramesPayload.
(WebInspector.DebuggerManager.prototype.debuggerDidResume): Clear the _callFrames.
(WebInspector.DebuggerManager.prototype._scriptLocationFromPayload): Added. Helper.
(WebInspector.DebuggerManager.prototype._scopeChainFromPayload): Added. Helper.
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload): Added. Helper.
* UserInterface/Main.html: Included CallFrame.js, ScopeChainNode.js, and ScriptLocation.js.
* UserInterface/ScopeChainNode.js: Added.
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get type):
(WebInspector.ScopeChainNode.prototype.get object):
* UserInterface/ScriptLocation.js: Added.
(WebInspector.ScriptLocation):
(WebInspector.ScriptLocation.prototype.get script):
(WebInspector.ScriptLocation.prototype.get lineNumber):
(WebInspector.ScriptLocation.prototype.get columnNumber):
2012-03-09 Timothy Hatcher <timothy@apple.com>
Track the paused state of the debugger and add functions to pause, resume, and step.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get paused): Added.
(WebInspector.DebuggerManager.prototype.pause): Added.
(WebInspector.DebuggerManager.prototype.resume): Added.
(WebInspector.DebuggerManager.prototype.stepOver): Added.
(WebInspector.DebuggerManager.prototype.stepInto): Added.
(WebInspector.DebuggerManager.prototype.reset): Reset _paused and fire the Resumed event.
(WebInspector.DebuggerManager.prototype.debuggerDidPause): Set _paused and fire the Paused event.
(WebInspector.DebuggerManager.prototype.debuggerDidResume): Set _paused and fire the Resumed event.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.paused): Call DebuggerManager.debuggerDidPause.
(WebInspector.DebuggerObserver.prototype.resumed): Call DebuggerManager.debuggerDidResume.
2012-03-09 Timothy Hatcher <timothy@apple.com>
Add WebInspector.Script and create them when scripts are parsed.
Part of: <rdar://problem/10318770>
Reviewed by Brian Weinstein.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.reset): Clear the script map.
(WebInspector.DebuggerManager.prototype.scriptDidParse): Added. Create a Script instance
and add it to the id map.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.scriptParsed): Call DebuggerManager.scriptDidParse.
* UserInterface/Main.html: Included Script.js.
* UserInterface/Script.js: Added.
(WebInspector.Script):
(WebInspector.Script.prototype.get id):
(WebInspector.Script.prototype.get range):
(WebInspector.Script.prototype.get url):
(WebInspector.Script.prototype.get urlComponents):
2012-03-09 Timothy Hatcher <timothy@apple.com>
Add a way to break on all exceptions and uncaught exceptions.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein and Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BreakpointIcons.css:
(.breakpoint-exception-icon .icon): Added.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Create BreakpointTreeElements for the two exception breakpoints.
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement): Add support for a custom style class and title.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager): Create an all exceptions and and all uncaught exceptions breakpoint.
(WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint): Added.
(WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint): Added.
(WebInspector.DebuggerManager.prototype.breakpointResolved): Remove an overzealous assert.
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Intercept the exception breakpoints
and call _updateBreakOnExceptionsState after updating the settings.
(WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState): Added. Communicate the state to the
backend and update resolved state.
2012-03-10 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Allow resizing of the quick console. The quick console behaves like
sidebars. It toggles collapsed state when double clicked, and opens
or closes when resizing. The allowed maximum height is 75% of the
screen. When the window is resized smaller, we may need to shorten
the console to be within the 75%.
Remember the height before we collapsed so that if you toggle
immediately it will restore the height to what it was.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector._contentBrowserSizeDidChange):
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console > .resizer):
Position the quick-console resizer like a sidebar resizer. 5px
wide, with a couple pixels above and below the border.
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.get collapsedHeight):
(WebInspector.QuickConsole.prototype.get minimumUncollapsedHeight):
(WebInspector.QuickConsole.prototype.get maximumUncollapsedHeight):
(WebInspector.QuickConsole.prototype.updateLayout):
(WebInspector.QuickConsole.prototype.get height):
(WebInspector.QuickConsole.prototype.set height):
(WebInspector.QuickConsole.prototype._toggleButtonClicked):
(WebInspector.QuickConsole.prototype._resizerDoubleClicked):
(WebInspector.QuickConsole.prototype._resizerMouseDown):
(WebInspector.QuickConsole.prototype._resizerMouseMoved):
(WebInspector.QuickConsole.prototype._resizerMouseUp):
2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Pull the console out of ContentBrowser and instead just put it underneath.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
* UserInterface/Main.css:
(#content):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/QuickConsole.css:
(#quick-console):
(#quick-console.collapsed):
(#quick-console .navigation-bar > .console-toggle):
(#quick-console.collapsed .navigation-bar > .console-toggle):
(#quick-console > .quick-console-view-container):
(#quick-console > .quick-console-toolbar):
(#quick-console > .quick-console-toolbar > .quick-console-text-prompt):
(#quick-console > .quick-console-toolbar > .navigation-bar):
2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Add a toggle button to the quick console's navigation bar.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Misc changes.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem):
(WebInspector.ButtonNavigationItem.prototype.get glyphElement):
Expose glyphElement for QuickConsole buttons to use.
Add a way to suppress creating embossed images.
* UserInterface/QuickConsoleButtonNavigationItem.css: Added.
(.navigation-bar > .item.quick-console-button):
(.navigation-bar > .item.quick-console-button:active):
* UserInterface/QuickConsoleButtonNavigationItem.js: Added.
(WebInspector.QuickConsoleButtonNavigationItem):
(WebInspector.QuickConsoleButtonNavigationItem.prototype.generateStyleText):
The QuickConsole buttons are just styled with different opacities. We
can remove most of the custom NavigationItem styles and set the glyph
image directly.
* UserInterface/QuickConsole.css:
(.quick-console .navigation-bar > .console-toggle):
(.quick-console.collapsed .navigation-bar > .console-toggle):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.get collapsed):
(WebInspector.QuickConsole.prototype.set collapsed):
(WebInspector.QuickConsole.prototype._toggleButtonClicked):
Give the console a toggle button.
2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
View hierarchy for the quick console:
<div class="quick-console">
<!--
Content view container. When the console adjusts its height this becomes
visible. This flex fills the vertical space.
-->
<div class="view-container"></div>
<!--
Toolbar fixed to the bottom. TextPrompt and NavigationBar with buttons.
Fixed height, position:relative to appear on top, and the text-prompt
flex fills horizontally.
-->
<div class="toolbar">
<div class="text-prompt" contenteditable="true"></div>
<div class="navigation-bar"></div>
</div>
</div>
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/QuickConsole.css:
(.quick-console):
(.quick-console.collapsed):
(.quick-console > .view-container):
(.quick-console > .toolbar):
(.quick-console > .toolbar > .text-prompt):
(.quick-console > .toolbar > .navigation-bar):
* UserInterface/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.get element):
* UserInterface/QuickConsoleNavigationBar.js: Added.
(WebInspector.QuickConsoleNavigationBar):
(WebInspector.QuickConsoleNavigationBar.prototype.addNavigationItem):
Add navigation items on the left. Since we will always want the toggle button on the right.
2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319586> Implement the Quick Console for the new Web Inspector design
Add the QuickConsole to the bottom of the ContentBrowser.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
* UserInterface/Main.html:
* UserInterface/QuickConsole.css: Added.
(.quick-console):
(body.window-inactive .navigation-bar):
* UserInterface/QuickConsole.js: Added.
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.get element):
2012-03-09 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11017753> Sometimes Load event-marker doesn't show up (99%)
When an event-marker is very close to, but not, the new maximum boundary
the maximum boundary wasn't being extended to allow for a nice display of
the event-marker. Now, if the event-marker is within 3% of the maximum
boundary, then just extend the maximum boundary by 3%.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
2012-03-08 Timothy Hatcher <timothy@apple.com>
Follow up to my previous fix for reloading the page sometimes removes the main resource from breakpoints.
Not all breakpoints pass in the resource to _addBreakpoint. If resource was undefined it would cause
a new ResourceTreeElement to be created for each breakpoint.
Reviewed by Joseph Pecoraro.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Lookup the resource first,
so it can always be compared to the ResourceTreeElement's resource.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
Follow-up patch to clean up DOMTreeManager events data.
Always pass the node as "node" and parentNode as "parent". There was
one case looking for parentNode that was totally wrong.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._domNodeChanged):
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._characterDataModified):
(WebInspector.DOMTreeManager.prototype._childNodeInserted):
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._characterDataModified):
(WebInspector.DOMTreeUpdater.prototype._nodeInserted):
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11005082> Editing node attribute should or HTML should update Path Components
Update path components when the selected node has an attribute
or character data change.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype._domNodeChanged):
In the attribute events the changed node is event.data.node.
In the character data event the changed node is event.data.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11014611> Inline Web SQL Database DataGrid resizers are not updated if inspector window resized
When the window resizes, the ContentView gets an updateLayout. Use this
opportunity to update the layout of any inline DataGrids so that their
resizers are positioned correctly.
Reviewed by Timothy Hatcher.
* UserInterface/DatabaseContentView.js:
(WebInspector.DatabaseContentView.prototype.constructor.WebInspector.DatabaseContentView.updateLayout):
(WebInspector.DatabaseContentView.prototype._appendViewQueryResult):
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
Remove uses of WebInspector.useLowerCaseMenuTitles. On the Safari frontend
this is always yes and the function doesn't even exist. This code is currently
unreachable, the change is to fix update-safari-localizable-strings usage.
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/LogContentView.js:
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Tweak the event-markers so they are always behind the network datagrid's
timeline pills. This is done by making three layers: event-marker (bottom),
timeline pills (middle), and tooltip div (top).
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.css:
(.network-timeline-decorations > .event-markers > .event-marker):
(.network-datagrid tr > td.timeline-column):
(.network-timeline-decorations > .event-markers > .event-marker-tooltip):
Style the three layers, z-indexes.
* UserInterface/TimelinesContentView.css:
Remove old z-index.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
Rename the constants to use the standard "StyleClassName" suffix and
give the DataGrid a class name.
* UserInterface/TimelineDecorations.css:
(.timeline-decorations > .event-markers > .event-marker-tooltip):
(.timeline-decorations > .event-markers > .event-marker):
(.timeline-decorations > .event-markers > .event-marker.load-event):
(.timeline-decorations > .event-markers > .event-marker.dom-content-event):
(.timeline-decorations > .event-markers > .event-marker.timestamp):
Drop the "wrapper" element. The event-marker now displays the same as the tooltip div.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateEventMarkers):
Rename "wrapper" -> "tooltip" and position the tooltip and marker the same.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Remember if the Network DataGrid column group was collapsed or expanded.
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._clickInColumnCollapser):
(WebInspector.DataGrid.prototype.collapseColumnGroup):
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
Add collapseColumnGroup(name) API to DataGrid and share the
code with the old path, when the user clicks the button.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
On creation load the setting, and save the setting on toggle.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
Give all columns a starting width (based on the auto-calculated widths).
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/11014578> DOM Storage DataGrids should be sortable
Allow sorting of both of the DOM Storage DataGrid columns.
Before sorting nodes, make sure to delete the creation node
and re-add it in the end.
Reviewed by Timothy Hatcher.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries):
(WebInspector.DOMStorageContentView.prototype._sortDataGrid):
(WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort.comparator):
(WebInspector.DOMStorageContentView.prototype._insertNodesIntoDataGridWithSort):
Share sort code with table creation and sort changed.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype.removeChild):
When the creation node is removed, delete the reference to it.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
Rename DataGrid methods and events.
DataGrid.prototype.updateWidths -> updateLayout
"sorting changed" event -> WebInspector.DataGrid.Event.SortChanged
"width changed" event -> WebInspector.DataGrid.Event.DidLayout
This then also renames the NetworkDataGrid event handlers
and moves the sorting dispatch function into its only caller.
Reviewed by Brian Weinstein.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView):
(WebInspector.CSSSelectorProfileView.prototype.updateLayout):
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.updateLayout):
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.updateLayout):
(WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries):
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.updateLayout):
(WebInspector.DataGrid.prototype.applyColumnWidthsMap):
(WebInspector.DataGrid.prototype._clickInHeaderCell):
(WebInspector.DataGrid.prototype._resizerDragging):
(WebInspector.DataGrid.prototype._endResizerDragging):
* UserInterface/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype.updateLayout):
(WebInspector.DatabaseTableContentView.prototype._queryFinished):
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.prototype.updateLayout):
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype._dataGridSortChanged):
(WebInspector.NetworkDataGrid.prototype._dataGridDidLayout):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype.constructor.WebInspector.TimelinesContentView.showTimelineForRecordType):
(WebInspector.TimelinesContentView.prototype.updateLayout):
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
Relayout the selected node when widths change. This is only needed for
the selected node because currently it is the only node that can be
displaying labels when the data grid's columns widths change.
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.updateLayout):
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype._updateLayout):
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.updateLayout):
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Draw the event markers over the Network datagrid.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
Tooltip strings for the event-marker lines.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
(WebInspector.NetworkDataGrid.prototype._updateDecorations):
(WebInspector.NetworkDataGrid.prototype._updateEventMarkers):
Let the calculator handle updating the bounds and the decorator drawing the markers.
* UserInterface/NetworkGraphCalculator.js:
(WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventMarker):
When updating boundaries for event markers its possible that event markers will
arrive later then resources (onload or console.timeStamp() for example). If such
an event is more than 10% past the current bounds we don't stretch the bounds
because it would distort the graph too much. Likewise, if a timestamp will become
the new maximum extend an extra 3% to provide some white-space past the marker.
* UserInterface/TimelineDecorations.css:
(.timeline-decorations > .event-markers):
(.timeline-decorations > .event-markers > .event-marker-wrapper):
This wrapper provides a larger surface area for the tooltip. 9px total (4px + 1px + 4px).
(.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker):
(.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.load-event):
(.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.dom-content-event):
(.timeline-decorations > .event-markers > .event-marker-wrapper > .event-marker.timestamp):
Different colors for the different types of event-markers.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid tr.selected td.timeline-column):
Make sure the selected timeline datagrid row draws over the event-marker.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations):
(WebInspector.TimelineDecorations.prototype.updateEventMarkers.toolTipForEventMarker):
(WebInspector.TimelineDecorations.prototype.updateEventMarkers):
Position and style the event markers within the bounds.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Add TimelineEventMarkers to the Network's TimelineDecorations. They are
not displayed yet, and the TimelineOverview won't show markers yet.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._recordedEventMarker):
Pass incoming event markers to the current datagrid. Only the network data grid uses them.
(WebInspector.TimelinesContentView.prototype._updatePendingRecords):
(WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecordsAndEventMarkers):
When updating the bounds of the timeline graph also provide pending event markers
so that late events (like onload) can stretch the maximum bounds if necessary.
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithEventMarker):
(WebInspector.TimelineDataGrid.prototype.addTimelineEventMarker):
Default empty implementations for DataGrids to handle event markers.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.reset):
(WebInspector.NetworkDataGrid.prototype.addTimelineEventMarker):
Pass event markers on to the decorations manager. We also need a way to reset now.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations):
(WebInspector.TimelineDecorations.prototype.addTimelineEventMarker):
Keep track of event makers we may need to display.
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.clear):
Add clear, just in case it is needed later. The overview currently doesn't handle event markers.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Add a TimelineEventMarker class for marked timestamps. Current
event markers that we are interested in are the DOMContent event,
Load event, and console.timeStamp() calls.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.domContentEventFired):
(WebInspector.PageObserver.prototype.loadEventFired):
Point out that these are not needed, they are covered by TimelineAgent
in the Safari frontend.
* UserInterface/TimelineEventMarker.js: Added.
(WebInspector.TimelineEventMarker):
(WebInspector.TimelineEventMarker.prototype.constructor.WebInspector.TimelineEventMarker.get timestamp):
(WebInspector.TimelineEventMarker.prototype.get type):
Simple class encapsulating a timestamp and type.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.get timelineEventMarkers):
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
Keep a record of event markers.
2012-03-08 Joseph Pecoraro <pecoraro@apple.com>
When hiding the dock button also hide the divider between the dock
button and the sidebar's other navigation items.
Reviewed by Timothy Hatcher.
* UserInterface/ButtonNavigationItem.js:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateDockToggleButtonVisibility):
* UserInterface/NavigationItem.js:
(WebInspector.NavigationItem.prototype.get hidden):
(WebInspector.NavigationItem.prototype.set hidden):
2012-03-08 Timothy Hatcher <timothy@apple.com>
Reloading the page sometimes removes the main resource from breakpoints.
The _checkForOldResources function is delayed on the timeout. This caused the
breakpoints to be appended to a ResourceTreeElement that will soon be removed.
Reviewed by Brian Weinstein.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Create a new ResourceTreeElement
if the resource is different from the previous ResourceTreeElement.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Ditto.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Ditto.
2012-03-08 Timothy Hatcher <timothy@apple.com>
Communicate breakpoints to the backend and update the resolved state of the breakpoints.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint): Initialize _id to null.
(WebInspector.Breakpoint.prototype.get id): Added.
(WebInspector.Breakpoint.prototype.set id): Added.
(WebInspector.Breakpoint.prototype.set lineNumber): Report oldLineNumber in the event.
(WebInspector.Breakpoint.prototype.get info): Updated comment.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Mark disabled breakpoints as resolved
when they are added to the user interface.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.addBreakpoint): Call _setBreakpoint.
(WebInspector.DebuggerManager.prototype.removeBreakpoint): Call _removeBreakpoint.
(WebInspector.DebuggerManager.prototype.breakpointResolved): Added.
(WebInspector.DebuggerManager.prototype.reset): Added.
(WebInspector.DebuggerManager.prototype._setBreakpoint): Added. Talk to the DebuggerAgent.
(WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
(WebInspector.DebuggerManager.prototype._removeBreakpoint): Added. Talk to the DebuggerAgent.
(WebInspector.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
(WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange): Added. Call _removeBreakpoint.
(WebInspector.DebuggerManager.prototype._breakpointLineNumberDidChange.breakpointRemoved): Call _setBreakpoint.
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange): Call _removeBreakpoint or _setBreakpoint.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.globalObjectCleared): Call DebuggerManager.reset.
(WebInspector.DebuggerObserver.prototype.breakpointResolved): Call DebuggerManager.breakpointResolved.
2012-03-08 Timothy Hatcher <timothy@apple.com>
Use "resolved" to describe breakpoints instead of "inactive".
The term inactive was confusing since we also have disabled. Using resolved better
describes the property.
Reviewed by Brian Weinstein.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.set lineNumber):
(WebInspector.Breakpoint.prototype.get resolved): Renamed from inactive.
(WebInspector.Breakpoint.prototype.set resolved): Renamed from inactive.
(WebInspector.Breakpoint.prototype.get info):
* UserInterface/BreakpointTreeElement.css:
(.item.breakpoint .status > .status-image):
(.item.breakpoint .status > .status-image.resolved):
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype._updateStatus):
* UserInterface/TextEditor.css:
(.text-editor > .gutter > .line-number > .breakpoint):
(.text-editor > .gutter > .line-number.breakpoint-resolved > .breakpoint):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo):
(WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype.closed):
(WebInspector.TextResourceContentView.prototype._updateBreakpointStatus):
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo):
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded):
(WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated):
(WebInspector.TextResourceContentView.prototype._textEditorBreakpointInfoForBreakpoint):
2012-03-08 Timothy Hatcher <timothy@apple.com>
Fix an assertion and exception that is seen sometimes when opening the Web Inspector.
The _rebuildSections function is wired up to events. Those events can fire when we don't have
a selected DOM node. So we need to return early in that case and not assert.
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Return early if domNode is null.
2012-03-08 Timothy Hatcher <timothy@apple.com>
Fix a merge issue that caused breakpoint lines to not have an icon.
Part of: <rdar://problem/10318777>
Reviewed by Brian Weinstein.
* UserInterface/BreakpointTreeElement.js: Remove the duplicate GenericLineIconStyleClassName that
had a typo in the value.
2012-03-08 Brian Weinstein <bweinstein@apple.com>
<rdar://problem/11007383> Need a way to clear the current console log.
Reviewed by Tim Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Call this._registerShortcuts.
(WebInspector.LogContentView.prototype.consoleCleared): Renamed from _consoleCleared.
(WebInspector.LogContentView.prototype._registerShortcuts): Remove the shortcut to dump memory, and remove
the code to set up shortcuts screen.
(WebInspector.LogContentView.prototype._requestClearMessages): Call to the LogManager.
(WebInspector.LogContentView.prototype._promptKeyDown): Actually look up the shortcut in the shortcuts
list.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.requestClearMessages): Call clearMessages on the ConsoleAgent, and fire
an event saying the active log was cleared.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Listen for the active log being cleared.
(WebInspector.LogSidebarPanel.prototype._activeLogCleared): Call consoleCleared on the active log content view.
2012-03-08 Brian Weinstein <bweinstein@apple.com>
<rdar://problem/11012162> Log repeat counts are not updated when the console is open.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Call through to the LogManager.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._appendCommand): Call LogManager.repeatCountWasInterrupted.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize): Initialize whether or
not the repeat count was interrupted (by the user entering a command in the log content view).
(WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage and call _addMessage.
(WebInspector.LogManager.prototype.messageRepeatCountUpdated): If the repeat count wasn't interrupted,
update the count. If it was, then clone our message element, and create a new one, and set its repeat
and ignored count.
(WebInspector.LogManager.prototype.repeatCountWasInterrupted): Set the flag indicating our repeat count
was interrupted.
(WebInspector.LogManager.prototype._addMessage): Add the message to our list of messages, set it as our
previous message, and fire our event.
2012-03-08 Timothy Hatcher <timothy@apple.com>
Update the disabled and inactive state of breakpoints in the TextEditor gutter as they change.
Part of: <rdar://problem/10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.setBreakpointInfoForLine): Added.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Added event listeners for DisabledStateDidChange and InactiveStateDidChange.
(WebInspector.TextResourceContentView.prototype.closed): Removed the added event listeners.
(WebInspector.TextResourceContentView.prototype._updateBreakpointStatus): Added. Calls setBreakpointInfoForLine.
2012-03-08 Timothy Hatcher <timothy@apple.com>
Show the status of each breakpoint in the Breakpoint sidebar. Also update the title when the line number changes.
Clicking the breakpoint image will toggle the disabled state.
Part of: <rdar://problem/10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/Breakpoint.js:
* UserInterface/BreakpointTreeElement.css: Added.
(.item.breakpoint .status > .status-image):
(.item.breakpoint .status > .status-image.inactive):
(.item.breakpoint .status > .status-image.disabled):
* UserInterface/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype._updateMainTitle): Added.
(WebInspector.BreakpointTreeElement.prototype._updateStatus): Added.
(WebInspector.BreakpointTreeElement.prototype._statusImageElementMouseDown): Added
(WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked): Added
* UserInterface/Images/BreakpointButton.pdf: Added.
* UserInterface/Images/BreakpointInactiveButton.pdf: Added.
* UserInterface/Main.html: Included BreakpointTreeElement.css.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Fix the AttributedString prototype chain.
Reviewed by Brian Weinstein.
* UserInterface/AttributedString.js: Set the AttributedString prototype instead of the SourceTokenizer prototype.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Make selecting a breakpoint in the sidebar show the resource and reveal the line.
Part of: <rdar://problem/10318777>
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel): Set onselect to _treeElementSelected.
(WebInspector.BreakpointSidebarPanel.prototype._treeElementSelected): Added.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Populate the Breakpoint sidebar with breakpoints.
Part of: <rdar://problem/10318777>
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/BreakpointIcons.css: Added.
(.breakpoint-generic-line-icon .icon):
* UserInterface/BreakpointSidebarPanel.js:
(WebInspector.BreakpointSidebarPanel):
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpoint): Added. Helper.
(WebInspector.BreakpointSidebarPanel.prototype._addBreakpointsForResource): Added. Helper.
(WebInspector.BreakpointSidebarPanel.prototype._resourceAdded): Added. Call _addBreakpointsForResource.
(WebInspector.BreakpointSidebarPanel.prototype._mainResourceChanged): Added. Call _addBreakpointsForResource.
(WebInspector.BreakpointSidebarPanel.prototype._breakpointAdded): Added. Call _addBreakpoint.
(WebInspector.BreakpointSidebarPanel.prototype._breakpointRemoved): Added. Remove the breakpoint, and resource
if that was the last breakpoint.
(WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources):
(WebInspector.BreakpointSidebarPanel.prototype._checkForOldResources.delayedWork): Check for detached resources
and remove them from the tree.
* UserInterface/BreakpointTreeElement.js: Added.
(WebInspector.BreakpointTreeElement):
(WebInspector.BreakpointTreeElement.prototype.get breakpoint):
* UserInterface/Main.html: Included BreakpointTreeElement.js and BreakpointIcons.css.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Rename ResourceSearchMatch.pdf to ResultLine.pdf to be more generic so it can be used by the Breakpoint sidebar.
Part of: <rdar://problem/10318777>
Reviewed by Brian Weinstein.
* UserInterface/Images/ResultLine.pdf: Renamed from WebInspector/UserInterface/Images/ResourceSearchMatch.pdf.
* UserInterface/SearchIcons.css:
(.resource-match-icon .icon): Use ResultLine.pdf.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Persist breakpoints between sessions.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/Breakpoint.js:
(WebInspector.Breakpoint): Support taking an info object or url. Make inactive default to true.
The backend will later mark them as active once they are resolved.
(WebInspector.Breakpoint.prototype.get info): Added. Returns an object to store.
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager): Iterate over the info objects in the setting and make breakpoints.
(WebInspector.DebuggerManager.prototype.addBreakpoint): Return early if null.
(WebInspector.DebuggerManager.prototype.removeBreakpoint): Ditto.
(WebInspector.DebuggerManager.prototype._inspectorClosing): Added. Call _saveBreakpoints.
(WebInspector.DebuggerManager.prototype._saveBreakpoints): Added. Make an array of info objects
and save them in the setting.
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Bring the padding down to 1px for both sides of the timeline graph.
This makes the percent widths a little more accurate and matches
the padding on the timeline overview.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid td.timeline-column):
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Dynamically determine the width of the localized string
with similar table heading styles.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Improve the header display to only show dividers within the visible range.
Now, when we show dividers in that range, the first divider always has a left
border, and the last divider only does when that column is not the active sort.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.css:
(.network-timeline-decorations > .header > .divider:last-child):
(.network-timeline-decorations:not(.sort-active) > .header > .divider:last-child):
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Changing the sort column might not be enough of a size difference to
cause the headers to refresh. Force a refresh in this case.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype._sortChanged):
(WebInspector.NetworkDataGrid.prototype._updateDecorations):
(WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
The NetworkDataGrid's timeline graph should only show header
values when its "details" columns are collapsed. Give
TimelineDecorations a way to hide header times.
Reviewed by Timothy Hatcher.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
Hide / show the header dividers when columns are collapsed / expanded.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
(WebInspector.TimelineDecorations.prototype.isShowingHeaderDividers):
(WebInspector.TimelineDecorations.prototype.showHeaderDividers):
(WebInspector.TimelineDecorations.prototype.hideHeaderDividers):
Hide / show the header dividers by applying the "hidden" class to the headerElement.
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Give the NetworkDataGrid timeline TimelineDecorations. We want to
make sure that the header labels don't overlap the column header
"Timeline" on the left or sort / collapse columns button on the right.
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._clickInHeaderCell):
(WebInspector.DataGrid.prototype._sortChanged):
(WebInspector.DataGrid.prototype.isColumnSortColumn):
Expose a way for a subclass to act on sort changes and check
if a column is the active sort column.
* UserInterface/Main.html:
* UserInterface/NetworkDataGrid.css: Added.
(.network-timeline-decorations):
(.network-timeline-decorations > .header):
Give the network timeline decorations some specific styles because
JavaScript will have to position the decorations.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype.reset):
(WebInspector.NetworkDataGrid.prototype.update):
(WebInspector.NetworkDataGrid.prototype.updateWidths):
(WebInspector.NetworkDataGrid.prototype._sortChanged):
Update the timeline decorations whenever widths change or content changes.
(WebInspector.NetworkDataGrid.prototype._localizedTimelineHeaderWidth):
(WebInspector.NetworkDataGrid.prototype._updateDecorations):
(WebInspector.NetworkDataGrid.prototype._updateDecorationsPosition):
(WebInspector.NetworkDataGrid.prototype._updateHeaderTimes):
Position the header decorations over the timeline columns, and update the
header times using our current calculator's bounds.
* UserInterface/TimelineDecorations.css:
(.timeline-decorations):
Allow clicking through all decorations, they are simply overlays.
* UserInterface/TimelineDecorations.js:
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
Adjust for a left / right padding in which we won't let labels overflow into.
This can be improved further by packing the labels just into the visible area.
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Make the timeline data grids share a common base class so we don't need
to check for functions before calling them. Only the NetworkDataGrid
has a graph right now and needs extra calls, other others are empty.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._recordingStarted):
(WebInspector.TimelinesContentView.prototype._updatePendingRecords):
(WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
No need to check if the DataGrid implements a function now.
Also call update on the datagrid after we update records.
* UserInterface/TimelineDataGrid.js: Added.
(WebInspector.TimelineDataGrid):
(WebInspector.TimelineDataGrid.prototype.constructor.WebInspector.TimelinesDataGrid.get currentCalculator):
(WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithRecord):
(WebInspector.TimelineDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
(WebInspector.TimelineDataGrid.prototype.reset):
(WebInspector.TimelineDataGrid.prototype.update):
Shared base class interface.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid):
Extend from TimelineDataGrid instead of DataGrid directly.
2012-03-07 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Refactor the display of timeline headers into a separate file.
This currently handles drawing the header dividers, but will
also manage event markers (DOMContent and onload events).
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
* UserInterface/TimelineOverview.css:
* UserInterface/TimelineDecorations.css: Added.
(.timeline-decorations):
(.timeline-decorations > .header):
(.timeline-decorations > .header > .divider):
(.timeline-decorations > .header > .divider:last-child):
(.timeline-decorations > .header > .divider > .label):
(.timeline-decorations > .header > .divider:first-child > .label):
Move timeline-overview header styles to timeline-decorations header styles.
* UserInterface/TimelineDecorations.js: Added.
(WebInspector.TimelineDecorations):
(WebInspector.TimelineDecorations.prototype.constructor.WebInspector.TimelineDecorations.get element):
(WebInspector.TimelineDecorations.prototype.get headerElement):
(WebInspector.TimelineDecorations.prototype.updateHeaderTimes):
Manage the header and dividers.
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.clear):
(WebInspector.TimelineOverview.prototype.update):
(WebInspector.TimelineOverview.prototype.updateLayout):
User the decorations class to draw headers over the timeline.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Install the Web Inspector user interface files in Production builds again.
<rdar://problem/10957655>
Reviewed by Joseph Pecoraro.
* Scripts/copy-user-interface-resources.sh: Removed early exit and FIXME comment.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Implement the TextEditor breakpoint delegates in WebInspector.TextResourceContentView.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.contentAvailable): Populate the breakpoint
map by asking the DebuggerManager for all the breakpoints for this URL.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointInfo): Added.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointAdded): Added.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointRemoved): Added.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointMoved): Added.
(WebInspector.TextResourceContentView.prototype.textEditorBreakpointToggled): Added.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Add the start of WebInspector.DebuggerManager.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein.
* UserInterface/DebuggerManager.js: Added.
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.get breakpoints):
(WebInspector.DebuggerManager.prototype.breakpointsForURL):
(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
* UserInterface/Main.html: Incldued DebuggerManager.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an instance of WebInspector.DebuggerManager.
2012-03-07 Timothy Hatcher <timothy@apple.com>
Add WebInspector.Breakpoint.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/Breakpoint.js: Added.
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.get url):
(WebInspector.Breakpoint.prototype.get lineNumber):
(WebInspector.Breakpoint.prototype.set lineNumber):
(WebInspector.Breakpoint.prototype.get inactive):
(WebInspector.Breakpoint.prototype.set inactive):
(WebInspector.Breakpoint.prototype.get disabled):
(WebInspector.Breakpoint.prototype.set disabled):
* UserInterface/Main.html: Included Breakpoint.js.
2012-03-06 Timothy Hatcher <timothy@apple.com>
Support dragging breakpoints to move them to a new line or to delete them.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype._gutterElementMouseDown): Add a new breakpoint
if the target does not already have one. Otherwise start tracking the existing
breakpoint for dragging.
(WebInspector.TextEditor.prototype._documentMouseMoved): Added.
(WebInspector.TextEditor.prototype._documentMouseUp): Added.
(WebInspector.TextEditor.prototype._gutterElementMouseUp): Only toggle on mouse up.
2012-03-06 Timothy Hatcher <timothy@apple.com>
Make clicking on the line gutter create and toggle breakpoints.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Added mouseup event listener.
(WebInspector.TextEditor.prototype._gutterElementMouseUp): Added. Notifies the delegate to add
or toggle a breakpoint when a line number if clicked.
2012-03-06 Timothy Hatcher <timothy@apple.com>
Add initial support for displaying breakpoints.
Part of: <rdar://problem/10318770&10318777>
Reviewed by Joseph Pecoraro.
* UserInterface/Images/Breakpoint.png: Added.
* UserInterface/Images/Breakpoint@2x.png: Added.
* UserInterface/Images/BreakpointInactive.png: Added.
* UserInterface/Images/BreakpointInactive@2x.png: Added.
* UserInterface/TextEditor.css:
(.text-editor > .gutter):
(.text-editor > .gutter > .line-number.has-breakpoint):
(.text-editor > .gutter > .line-number.has-breakpoint > .text):
(.text-editor > .gutter > .line-number.has-breakpoint.breakpoint-disabled > .text):
(.text-editor > .gutter > .line-number > .breakpoint):
(.text-editor > .gutter > .line-number.breakpoint-inactive > .breakpoint):
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._updateLineNumbers): Call _addBreakpointElementToLineElementWithInfo
and _removePossibleBreakpointElementFromLineElement depending on the delegate result.
(WebInspector.TextEditor.prototype._addBreakpointElementToLineElementWithInfo): Added.
(WebInspector.TextEditor.prototype._removePossibleBreakpointElementFromLineElement): Added.
2012-03-06 Mark Rowe <mrowe@apple.com>
<rdar://problem/10873285> Make WebInspector.framework work with staged frameworks
Install WebInspector.framework in /System/Library/StagedFrameworks/Safari when USE_STAGING_INSTALL_PATH is set to YES.
Reviewed by Dan Bernstein.
* Configurations/WebInspectorFramework.xcconfig:
2012-03-06 Joseph Pecoraro <pecoraro@apple.com>
Share duplicated code to get a display name for a node.
Reviewed by Timothy Hatcher.
* UserInterface/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent):
* UserInterface/DOMUtilities.js:
(WebInspector.displayNameForNode):
* UserInterface/Main.html:
2012-03-06 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10989550> Inspector should hide docking button when undocked and not allowed to dock (78575)
Reviewed by Timothy Hatcher.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.get hidden):
(WebInspector.ButtonNavigationItem.prototype.set hidden):
Allow a button navigation item to be hidden.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setDockingAvailable):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector.setDockingAvailable):
(WebInspector._updateDockToggleButtonVisibility):
Update the dock toggle button's visibility when it is created,
when the attached state changes, or when availability changes.
2012-03-05 Timothy Hatcher <timothy@apple.com>
Add WebInspector.BreakpointSidebarPanel and WebInspector.DebugSidebarPanel.
Start of: <rdar://problem/10318770&10318777>
Reviewed by Brian Weinstein.
* UserInterface/BreakpointSidebarPanel.js: Added.
(WebInspector.BreakpointSidebarPanel):
* UserInterface/DebugSidebarPanel.js: Added.
(WebInspector.DebugSidebarPanel):
* UserInterface/Main.html: Included BreakpointSidebarPanel.js and DebugSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Use BreakpointSidebarPanel and DebugSidebarPanel classes.
2012-03-05 Joseph Pecoraro <pecoraro@apple.com>
Follow-up and remove unnecessary outline:none from specific
data-grids now that this style is the default.
* UserInterface/ApplicationCacheFrameContentView.css:
(.content-view.application-cache-frame > .data-grid):
* UserInterface/CookieStorageContentView.css:
(.content-view.cookie-storage > .data-grid):
* UserInterface/DatabaseTableContentView.css:
(.content-view.database-table > .data-grid):
* UserInterface/DetailsSection.css:
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
WebSQL Database inline data grids should not have an outline
when clicked on. The data grid can keep its tabindex, but
just remove the outline when its focused.
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.css:
(.data-grid):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
Format the Cookie size column using standard size representations.
Reviewed by Brian Weinstein.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10982421> Event Listeners section flashes when switching between nodes
We no longer need to resolve the node, since the Safari frontend
doesn't show an ObjectProperties tree. We already have all the
information we need in the eventListener callback. Removing this
async call removes the flashing.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
We should save state the expanded/collapsed state of different event types.
Just default to having them collapsed and save the state when they are expanded.
Rubber-stamped by Timothy Hatcher.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection):
* UserInterface/EventListenerSection.js:
(WebInspector.EventListenerSection):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
Don't linkify EventListeners without a URL.
This can happen for EventListeners added through the Inspector's console.
Reviewed by Timothy Hatcher.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
2012-03-04 Timothy Hatcher <timothy@apple.com>
Hook up the Start Timeline Recording Develop menu items.
Reviewed by Brian Weinstein.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.isTimelineProfilingEnabled): Return WebInspector.timelineManager.recording.
(InspectorFrontendAPI.setTimelineProfilingEnabled): Show the Instrument panel and timeline, then start recording.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Only load the last content view if InspectorFrontendAPI didn't show one.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mainResourceDidChange): Ignore resource events when there isn't a main frame yet.
(WebInspector.TimelineManager.prototype._resourceWasAdded): Ditto.
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10981986> Back button should be enabled when link causes a switch between "DOM Tree" and "Source Code"
Update the back/forward buttons when the path components change.
Reviewed by Timothy Hatcher.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
Rename WebInspector.domAgent -> WebInspector.domTreeManager.
This code is currently unreachable.
Reviewed by Brian Weinstein and Timothy Hatcher.
* UserInterface/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Make node name's in the EventListener section links that jump to
that node. Also, when hovering the node it highlights on the page.
Reviewed by Timothy Hatcher.
* UserInterface/DOMUtilites.js: Added.
(WebInspector.displayNameForNode):
(WebInspector.linkifyNodeReference):
Copied from OpenSource's DOMPresentationUtils.js, updated for the new
frontend, and remove unused code.
* UserInterface/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
Use the DOMUtilities method to linkify the node.
* UserInterface/Main.html:
* UserInterface/Main.css:
(.node-link):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Add event listener information to the DOM Node Details Sidebar panel.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.constructor.WebInspector.DOMNodeDetailsSidebarPanel.refresh):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
Add a new "Event Listeners" Section and refresh it when the selected node changes.
Each row in this section is an EventListenerSection.
* UserInterface/DetailsSection.css:
(.details-section .details-section > .header):
Style a nested details section to be gray.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection):
Take an extra parameter in the Constructor to avoid saving collapsed states.
EventListener event type sections will always start out collapsed.
* UserInterface/EventListenerSection.js: Added.
(WebInspector.EventListenerSection):
(WebInspector.EventListenerSection.prototype.constructor.WebInspector.EventListenerSection.addListener):
EventListenerSection is a specific event type, and contains a group for each listener.
* UserInterface/EventListenerSectionGroup.js: Added.
(WebInspector.EventListenerSectionGroup):
(WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update.updateWithNodeObject):
(WebInspector.EventListenerSectionGroup.prototype.constructor.WebInspector.EventListenerSectionGroup.update):
(WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
(WebInspector.EventListenerSectionGroup.prototype._type):
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
Each listener displays a few rows of information about it. Go-to arrow
links are provided to jump to the function.
* UserInterface/EventListenerSectionGroup.css: Added.
(.event-listener-section > .content > .group > .row.simple > .value .go-to-arrow):
(.event-listener-section > .content > .group > .row.simple > .value):
Style the simple row in the section to play nicely with resizing and the go-to arrow.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Add new strings and files.
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Rename the DOM Node sidebar's Properties object group and make sure
to release it when its no longer needed. There will be a separate
object group for Event Listeners.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
Add missing Copyright entires to the pre-built License.
Reviewed by Damian Kaleta.
* Scripts/copy-user-interface-resources.sh:
2012-03-04 Joseph Pecoraro <pecoraro@apple.com>
Fix outline around previously edited DOM element attribute.
When editing, the tabIndex attribute of the element is set
to 0 and restored to the old value after editing. In most cases
the previous value was unset, which returns -1. When cleaning
up elem.tabIndex = -1 was actually keeping around the tabIndex
attribute and giving the element an outline when clicked once
and receiving :focus.
Instead of restoring the tabIndex to -1, just remove the
tabIndex attribute and avoid its associated focus behavior.
Reviewed by Timothy Hatcher.
* UserInterface/EditingSupport.js:
(WebInspector.startEditing.cleanUpAfterEditing):
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Part of <rdar://problem/10981607> CSS and JavaScript profiles need a way to toggle between absolute times and percentages.
The CSS selector profile code had the ability to switch from percentages to time when the
user double clicks an element in the "Total" column.
However, we were accessing a WebInspector setting the wrong way.
Reviewed by Tim Hatcher.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView.prototype._mouseDownInDataGrid): Access the WebInspector setting the right way.
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Have ConsoleMessageImpl and ProfileDataGridTree use WebInspector.linkifyURLAsNode instead of
using their own custom code to do the same thing.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Call WebInspector.linkifyURLAsNode.
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Ditto.
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Hook up the links in the CSS selector profile view.
Rest of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorDataGridNode.prototype.createCell): Pass the line number to WebInspector.linkifyURLAsNode.
(WebInspector.CSSSelectorProfileView): Add a click event listener.
(WebInspector.CSSSelectorProfileView.prototype._mouseWasClicked): Call WebInspector.openURL on the clicked link.
* UserInterface/Main.js:
(WebInspector.linkifyURLAsNode): Set the link's lineNumber property to be the passed in line number.
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Make the columns in all DataGrids resizable.
This fixes:
- JavaScript profile views
- CSS selector profile views
- Application cache views.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.updateLayout):
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView.prototype.updateLayout):
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.prototype.updateLayout):
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Rename some functions to make them more clear that they are for JavaScript.
Reviewed by Tim Hatcher.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.addJavaScriptProfile): Renamed from addProfile.
(WebInspector.ProfileManager.prototype.setRecordingJavaScriptProfile): Renamed from setRecordingProfile.
* UserInterface/ProfilerObserver.js:
(WebInspector.ProfilerObserver.prototype.addProfileHeader): Update for naming.
(WebInspector.ProfilerObserver.prototype.setRecordingProfile): Ditto.
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Implement the recording of CSS selector profiles, and have them show up in the inspector and be
selectable.
There are a few loose ends to clean up after this patch.
- Some renames in ProfileManager.
- Make link clicking work in CSS selector profiles.
More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Updated localized strings
* UserInterface/CSSSelectorProfileType.js:
(WebInspector.CSSSelectorProfileType.prototype.nextProfileId): Returns the available profile ID.
(WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): Don't call anything in the profiles panel.
(WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): Remove the callback that creates a profile
header.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Change ProfileObject to JavaScriptProfileObject and add a case for CSSSelectorProfileObject.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver): Check the CSS selector case.
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Ditto.
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Ditto.
(WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Ditto.
* UserInterface/JavaScriptProfileView.js: Change the assert.
* UserInterface/Main.html: Add new files.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager): Create a CSS selector profile type.
(WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the recording CSS
selector profile.
(WebInspector.ProfileManager.prototype.isProfilingCSSSelectors): Returns whether or not we are recording a CSS selector
profile.
(WebInspector.ProfileManager.prototype.startProfilingCSSSelectors): Start recording a CSS selector profile, and create
a WebInspector.CSSSelectorProfileObject, and send an event to tell the instrument sidebar panel about it.
(WebInspector.ProfileManager.prototype.stopProfilingCSSSelectors): Stop recording the CSS selector profile, and in the
callback for when the profile finished, update the information about the CSS selector profile and tell the instrument
sidebar that the profile was updated.
(WebInspector.ProfileManager.prototype.addProfile): Create a JavaScriptProfileObject instead of a ProfileObject.
(WebInspector.ProfileManager.prototype.setRecordingProfile): Ditto.
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Add subclasses of ProfileObject for CSS Selector profile and JavaScript profiles. They are not used anywhere,
but they will be to be able to differentiate between the two types of profiles.
It also gives us a way to store the CSS selector profile data on the CSSSelectorProfileObject.
Reviewed by Tim Hatcher.
* UserInterface/CSSSelectorProfileObject.js: Added.
(WebInspector.CSSSelectorProfileObject):
(WebInspector.CSSSelectorProfileObject.prototype.constructor.WebInspector.CSSSelectorProfileObject.get data): Returns
the data.
(WebInspector.CSSSelectorProfileObject.prototype.set data): Sets the data.
(WebInspector.CSSSelectorProfileObject.prototype.get totalTime): Returns the total time.
(WebInspector.CSSSelectorProfileObject.prototype.set totalTime): Sets the total time.
* UserInterface/JavaScriptProfileObject.js: Added.
(WebInspector.JavaScriptProfileObject):
* UserInterface/Main.html: Add new files
2012-03-04 Brian Weinstein <bweinstein@apple.com>
Fix some issues in CSSSelectorProfileView.js to get it running with the new inspector.
This patch changes the superclass from View -> ContentView, removes instances of the percent button,
and changes *styleClass -> classList.*.
More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorDataGridNode.prototype.get data): Switch the format of a setting.
(WebInspector.CSSSelectorDataGridNode.prototype.createCell): Use linkifyURLAsNode instead of
linkifyResourceAsNode (which we don't have).
(WebInspector.CSSSelectorProfileView): Add an assert, change our superclass type, update the
setting syntax, and call updateWidths on the data grid.
(WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): Use classList.contains.
2012-03-02 Brian Weinstein <bweinstein@apple.com>
Bring in some files from open source.
More of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
Rubber-stamped by Jing Jin.
* UserInterface/CSSSelectorProfileType.js: Added. Moved from CSSSelectorProfileView.js to its own file.
* UserInterface/CSSSelectorProfileView.js: Added. Copied from open source.
2012-03-02 Brian Weinstein <bweinstein@apple.com>
Turn the glyph that starts profiles in the inspector into a select with two options.
- Start JavaScript Profiling
- Start CSS Profiling
JavaScript profiling uses the same codepath as before, and CSS profiling isn't hooked up
yet, but will be in future patches.
Start of <rdar://problem/10897489> Implement CSS profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Update localized strings.
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .title-bar > .record-glyph): Add some additional rules so
this style works for a select and a div.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Change _recordProfileGlyphElement to a select, and add
options to it.
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown): Clear any selection
the select might have had, and prevent opening the select if we are stopping a profile.
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked): Return early if we are
ignoring this click.
(WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected): Start a JavaScript profile
if that was the user's selection, and add a FIXME for starting a CSS profile.
2012-03-04 Timothy Hatcher <timothy@apple.com>
Strike out all properties that did not parse correctly.
The broken case is if you use: background: -webkit-linear-gradient(...);
and background: -moz-linear-gradient(...) in the same rule. Before they
would both be shown normal (except for the warning icon on the -moz line),
now the -moz property is also striked out.
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Added not-parsed-ok to the
rule that adds text-decoration: line-through to properties.
2012-03-04 Timothy Hatcher <timothy@apple.com>
Syntax highlight values in the Style details sidebar.
Reviewed by Brian Weinstein.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processColor): Call numberProcessor instead
of directly making text nodes for unknown colors and color values.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processKeyword): Added.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.processSimpleSyntax): Added.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle): Add new processors for strings, numbers, and keywords.
2012-03-03 Brian Weinstein <bweinstein@apple.com>
<rdar://problem/10977869> Profile Link in Log View doesn't jump to Profile in Instruments View.
Give WebInspector.openURL the ability to open URLs with the webkit-profile scheme.
Reviewed by Tim Hatcher.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype.showProfile): Look over the tree elements for one with
a profile with the matching title and type, and show it.
* UserInterface/Main.js:
(WebInspector.openURL): If the URL has the webkit-profile scheme, call InstrumentSidebarPanel.showProfile.
* UserInterface/ProfileType.js: Add a constant for "webkit-profile".
2012-03-03 Timothy Hatcher <timothy@apple.com>
Hide the DOM node highlight when the DOM tree content view is hidden.
Reviewed by Dan Bernstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.hidden): Call WebInspector.domTreeManager.hideDOMNodeHighlight().
2012-03-03 Timothy Hatcher <timothy@apple.com>
Reduce flashing in the details sidebar when switching content views.
This makes sure to fire the represented objects did change event immediately after the content
view changes so the sidebar updates at the same time as the content view. This is especially important
if the sidebar is auto showing or hiding.
Reviewed by Dan Bernstein.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon):
Use _dispatchCurrentRepresentedObjectsDidChangeEvent instead of a nested function.
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent): Added.
Clears the timeout if there is one pending.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _dispatchCurrentRepresentedObjectsDidChangeEvent
instead of _dispatchCurrentRepresentedObjectsDidChangeEventSoon.
2012-03-03 Timothy Hatcher <timothy@apple.com>
Auto hide the details sidebar when empty if the user closed it when empty.
The details sidebar will show again when switching to a content view that has sidebar panels to show.
If the user shows the sidebar when empty it will not auto hide anymore. If the user hides the sidebar
when it isn't empty it will stay hidden until manually shown.
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added setting.
(WebInspector._sidebarCollapsedStateDidChange): Update setting based on collapsed state and sidebar panel count.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Show or hide the details sidebar when the sidebar
panel count changes.
2012-03-03 Timothy Hatcher <timothy@apple.com>
Add the "Show All" checkbox to the Computed Style section header.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section .properties li): Clean up to better align the text.
(.sidebar > .panel.details.css-style .styles-section.read-only .properties > li): Ditto.
(.sidebar > .panel.details.css-style .styles-section.computed-style .properties .inherited): Fixed to work.
(.sidebar > .panel.details.css-style .details-section.show-all .styles-section.computed-style .properties .inherited): Ditto.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Create the checkbox and label.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._computedStyleShowAllCheckboxValueChanged): Added. Toggle the setting
and show-all class on the computed style section.
* UserInterface/DetailsSection.css:
(.details-section > .header:not(.mouse-over-options-element):active::before): Don't show active if the options element is.
(.details-section.collapsed > .header:not(.mouse-over-options-element):active::before): Ditto.
(.details-section > .header > label): Added. Generic support for a label and checkbox.
(.details-section.collapsed > .header > label): Ditto.
(.details-section > .header > label > input[type="checkbox"]): Ditto.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection): Make a title element span so it can be updated separately. Append the options element.
(WebInspector.DetailsSection.prototype.get title): Use the title element.
(WebInspector.DetailsSection.prototype.set title): Ditto.
(WebInspector.DetailsSection.prototype._headerElementClicked): Return early if it is within the options element.
(WebInspector.DetailsSection.prototype._optionsElementMouseDown): Added. Add the mouse-over-options-element class.
(WebInspector.DetailsSection.prototype._optionsElementMouseUp): Added. Remove the mouse-over-options-element class.
2012-03-03 Brian Weinstein <bweinstein@apple.com>
<rdar://problem/10979339> Links in Log and Profile content views don't take you to the correct line
r41258 added the ability to jump to a certain line number when opening a resource
in the inspector by setting the lineNumber property on the link element that will
be clicked.
Adopt this for JavaScript profiles and the Log content view.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): Set the line number of the link
element.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView): Add a mouse listener.
(WebInspector.JavaScriptProfileView.prototype._mouseWasClicked): Call WebInspector.openURL.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype._mouseWasClicked): Get the line number from the link
element and pass that line number to WebInspector.openURL.
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype._linkifyLocation): Set the line number of the
link element.
2012-03-03 Timothy Hatcher <timothy@apple.com>
Make $0..$9 work in the new Web Inspector's console.
Reviewed by Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Call ConsoleAgent.addInspectedNode
when the selected DOM node changes.
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
When we need to refresh all of the rows, we need to make a copy of the
children array, because the children array gets resorted as the rows
are updated.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Tweak to prevent hiding a few of the rows on either end of the
visible bounds. This makes scrolling feel a little bit nicer.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Style the collapse-button and divider.
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.css:
(.data-grid th.sortable:not(.mouse-over-collapser):active):
(.data-grid th.sortable.sort-ascending:not(.mouse-over-collapser):active, .data-grid th.sortable.sort-descending:not(.mouse-over-collapser):active):
When the collapse-button is moused over, we shouldn't apply the :active
style to the entire table header cell when its clicked, because the
user will be clicking on the collapser-button.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid th.sortable:not(.mouse-over-collapser):active):
(.content-view.timelines > .data-grid th.collapser):
(.content-view.timelines > .data-grid th.collapser > .divider):
(.content-view.timelines > .data-grid th.collapser > .collapser-button):
(.content-view.timelines > .data-grid th.collapser > .collapser-button:active):
(.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button):
(.content-view.timelines > .data-grid th.collapser.collapsed > .collapser-button:active):
(.content-view.timelines > .data-grid th.sort-descending.collapser > div:first-child):
Style the button to the far right. Adjust the sort indicator
to be the left of the collapse-button and divider.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.generateEmbossedCollapseImages.canvasIdentifier):
(WebInspector.TimelinesContentView.generateEmbossedCollapseImages):
Generate embossed images once for all Timeline DataGrids.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._mouseoverColumnCollapser):
(WebInspector.DataGrid.prototype._mouseoutColumnCollapser):
Add a class to the <th> so that the :active highlight won't take
affect when the user clicks the collapser button, but does when
the user clicks on the test of the header cell.
* UserInterface/ImageUtilities.js:
(generateEmbossedImages._imageLoaded):
Make the Focus state optional, and don't generate it if its not needed.
* UserInterface/Images/LessColumns.pdf: Added.
* UserInterface/Images/MoreColumns.pdf: Added.
Images added for the collapse button.
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Move generating embossed canvas images into ImageUtilities so
that it can be shared with DataGrid in the next part. This turns
all self/this references into parameters.
Reviewed by Timothy Hatcher.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype._generateImages):
* UserInterface/ImageUtilities.js:
(generateEmbossedImages._imageLoaded):
(generateEmbossedImages._createEmbossedCanvasImage):
(generateEmbossedImages._drawImageShadow):
(generateEmbossedImages._invertMaskImage):
(generateEmbossedImages._applyImageMask):
(generateEmbossedImages):
* UserInterface/Main.html:
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Reviewed by Timothy Hatcher.
* UserInterface/DataGrid.css:
(.data-grid th):
When columns were collapsed down to width:0, the <th> content was overflowing.
<td> already had overflow:hidden, so this just adds it to <th>.
(.data-grid th.sort-descending > div:first-child):
(.data-grid th.sort-ascending > div:first-child::after):
(.data-grid th.sort-descending > div:first-child::after):
Now that a <th> may have multiple divs, specify that we want the
sort indicator to show up after the first <div>, before the
divider and collapse-button.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.updateWidths):
Move code into the block that was only used in the block.
(WebInspector.DataGrid.prototype.columnWidthsMap):
(WebInspector.DataGrid.prototype.applyColumnWidthsMap):
A brute force API to get / adjust all column widths.
(WebInspector.DataGrid.prototype._isColumnVisible):
(WebInspector.DataGrid.prototype._showColumn):
(WebInspector.DataGrid.prototype._hideColumn):
(WebInspector.DataGrid.prototype._positionResizers):
Rewrite to actually work. Setting a colgroup as hidden or display:none
was actually ignoring the colgroup alltogether, breaking the normal
colgroup[i] === column[i] relationship. Setting the width to 0 kept
the relationship, and hides the column's contents.
(WebInspector.DataGrid.prototype._clickInHeaderCell):
(WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
(WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
Handle clicks on the collapser button. Run some optional subclass
methods so state can be saved and so the column widths can be adjusted.
* UserInterface/NetworkDataGrid.js:
(WebInspector.NetworkDataGrid.prototype.willToggleColumnGroup):
(WebInspector.NetworkDataGrid.prototype.didToggleColumnGroup):
Handle toggling the column sizes. When collapsing, keep the "Name"
field the same width that it was. But when expanding, just relayout
back to whatever the original widths were.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
Add rows to a "details" column group and specify a collapser.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid .column-group-details):
Slightly dim the "details" column group.
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
Update offscreen rows after sorting.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid):
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
Sorting the Network Timeline column should sort by resource
response time, falling back to request time. Make this
the default sort for the DataGrid.
Reviewed by Timothy Hatcher.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
2012-03-03 Joseph Pecoraro <pecoraro@apple.com>
Fix the Timeline Grid sizes for the RemoteDebugger. It looks
as if this isn't needed anymore and actually displays poorly
on 10.7.3 WebKit.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.css:
2012-03-03 Timothy Hatcher <timothy@apple.com>
Don't move to editing the next property when pressing return/enter while editing a property value.
Pressing return/enter still moves to the value when you are editing the property name. If you want
to edit the next property, that is what tab is for!
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.editingNameValueKeyDown): Support a move direction of "none".
(WebInspector.StylePropertyTreeElement.prototype.selectElement.editingCommitted): Don't call the moveToNextCallback
if there is no moveDirection or moveDirection is "none".
2012-03-03 Timothy Hatcher <timothy@apple.com>
Override TreeElement.ondblclick instead of having a separate dblclick listener in StylePropertyTreeElement.
Reviewed by Joseph Pecoraro.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.onattach): Removed dblclick event listener.
(WebInspector.StylePropertyTreeElement.prototype.ondblclick): Renamed from _startEditing.
2012-03-03 Timothy Hatcher <timothy@apple.com>
Make URLs that go to the main resource of a frame open in the Web Inspector instead of in a new tab.
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector.openURL): Check frame.mainResource.url before calling frame.resourceForURL.
2012-03-02 Timothy Hatcher <timothy@apple.com>
Fix an error that was showing in the console and prevented revalidation of styled when DOM attributes are removed.
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Renamed from _attributesRemovedOrStyleInvalidated
since _attributesModified is what was registered as the event listener.
* UserInterface/Object.js:
(WebInspector.Object.addEventListener): Assert the event type and listener are not null/undefined/empty.
(WebInspector.Object.removeEventListener): Ditto.
2012-03-03 Timothy Hatcher <timothy@apple.com>
Use a go-to arrow to link to the location of the style rule in the stylesheet resource.
The text links added a lot of clutter and often collided with the selector in bad ways.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style .styles-section .go-to-arrow): Sized to fit the line. Hidden by default.
(.sidebar > .panel.details.css-style .styles-section:hover .go-to-arrow): Reveal on hover of the section.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection.prototype._linkify): Create the go-to arrow instead of a text link.
2012-03-02 Timothy Hatcher <timothy@apple.com>
Show user agent rules in a separate section called "Base Style Rules".
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Create the Base Style Rules section.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Take an array and
return a modified version of the array instead of fixed modification of the matchedRuleGroups array.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Update the user agent section separately.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Don't show an origin for user agent rules, since they are
in their own section now.
2012-03-02 Timothy Hatcher <timothy@apple.com>
Style the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.css: Added.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection):
Stop passing false for isFirstSection argument.
* UserInterface/ComputedStylePropertiesSection.js:
(WebInspector.ComputedStylePropertiesSection): Update className.
* UserInterface/DetailsSection.css:
* UserInterface/Main.html: Included CSSStyleDetailsSidebarPanel.css.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Remove isFirstSection argument.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle): Create and append the expand element for the
disclosure triangle use for shorthands. Create an inner element for the swatch for transparent colors.
(WebInspector.StylePropertyTreeElement.prototype.restoreNameElement): Remove "webkit-" class prefix.
(WebInspector.StylePropertyTreeElement.prototype._isNameElement): Ditto.
(WebInspector.StylePropertyTreeElement.prototype._isValueElement): Ditto. Return early if it is the expand element.
(WebInspector.StylePropertyTreeElement.prototype.isEventWithinDisclosureTriangle): Added.
2012-03-01 Timothy Hatcher <timothy@apple.com>
Show an empty content message in the Issue sidebar when there are no issues.
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Call _updateEmptyContentPlaceholder.
(WebInspector.IssueSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
(WebInspector.IssueSidebarPanel.prototype._issuesCleared): Call _updateEmptyContentPlaceholder.
(WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Ditto.
2012-03-01 Timothy Hatcher <timothy@apple.com>
Don't show the same node twice in the navigation bar when the close tag is selected in the DOM tree.
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Skip close tag tree elements.
2012-03-01 Timothy Hatcher <timothy@apple.com>
Update the Style details sidebar when stylesheets, the media query result, or the DOM changes.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Added event listeners for the DOM and CSS changes.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.get _userOperationInProgress): Added.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSectionsIfNonUserAction): Added. Call _rebuildSections.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesModified): Added. Call _rebuildSectionsIfNonUserAction.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._attributesRemoved): Added. Ditto.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleInvalidated): Added. Ditto.
2012-03-01 Timothy Hatcher <timothy@apple.com>
Include pseudo elements in the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Go through the pseudo elements.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSection): Broken out from
createStylePropertiesSectionGroup.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup): Only create
the row and group now.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createMatchedRuleGroups): Added. Creates sections
and groups for each pseudo element identifier.
2012-03-01 Timothy Hatcher <timothy@apple.com>
Update the computed style and overloaded properties when editing a style property.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections.createStylePropertiesSectionGroup):
Add the StylePropertiesSection to the mainPropertySectionMap.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Store direct references to the important
property sections and add them to the mainPropertySections.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections): Added.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshSections.computedStyleCallback): Iterate over all the property sections
and build the style rules needed to update overloaded and used properties.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Clean up.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): Call _refreshSections.
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Remove reference to WebInspector.panels.elements.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype._updatePane): Use _refreshSections.
(WebInspector.StylePropertyTreeElement.prototype.toggleEnabled): Use _parentPane.
(WebInspector.StylePropertyTreeElement.prototype.applyStyleText): Ditto.
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
Fixed localization typo.
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Before we make other improvements at least adjust the timeline graph
sizes to reasonable sizes.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Adopt OpenSource's "offscreen" row hiding for performance.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid tr.offscreen):
(.content-view.timelines > .data-grid tr.offscreen td):
Ensure offscreen table rows still have a height, and hide their contents.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype.updateLayout):
(WebInspector.TimelinesContentView.prototype._updatePendingRecords):
Update offscreen rows when the view resizes, and after we've sorted / added new rows.
(WebInspector.TimelinesContentView.prototype._updateOffscreenRows):
Mark data grid table rows outside the visible bounds as "offscreen".
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.select):
When a user uses keyboard shortcuts and moves up/down to a row that
was offscreen, the selection happens before the node scrolls into view.
In order for its layout to work properly it can't be display none,
so remove the offscreen class preemptively.
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Reviewed by Timothy Hatcher.
* UserInterface/Images/graphLabelCalloutLeft.png: Added.
* UserInterface/Images/graphLabelCalloutLeftWhite.png: Added.
* UserInterface/Images/graphLabelCalloutRight.png: Added.
* UserInterface/Images/graphLabelCalloutRightWhite.png: Added.
* UserInterface/Images/timelineHollowPillBlue.png: Added.
* UserInterface/Images/timelineHollowPillGray.png: Added.
* UserInterface/Images/timelineHollowPillGreen.png: Added.
* UserInterface/Images/timelineHollowPillOrange.png: Added.
* UserInterface/Images/timelineHollowPillPurple.png: Added.
* UserInterface/Images/timelineHollowPillRed.png: Added.
* UserInterface/Images/timelineHollowPillYellow.png: Added.
* UserInterface/Images/timelinePillBlue.png: Added.
* UserInterface/Images/timelinePillGray.png: Added.
* UserInterface/Images/timelinePillGreen.png: Added.
* UserInterface/Images/timelinePillOrange.png: Added.
* UserInterface/Images/timelinePillPurple.png: Added.
* UserInterface/Images/timelinePillRed.png: Added.
* UserInterface/Images/timelinePillWhiteFlat.png: Added.
Open Source images and new white images from Timothy Hatcher.
There will need to be HiDPI versions of these images.
* UserInterface/Main.html:
Added new files.
* UserInterface/Main.html:
* UserInterface/NetworkTimeline.css: Added.
Basic styles copied from Open Source. Minor adjustments for image sizes.
(.data-grid:focus tr.selected .network-graph-bar):
(.data-grid:focus tr.selected .resource-cached .network-graph-bar):
(.data-grid:focus tr.selected .network-graph-bar.waiting):
(.data-grid:focus tr.selected .network-graph-label):
(.data-grid:focus tr.selected .network-graph-label.after):
(.data-grid:focus tr.selected .network-graph-label.before::after):
(.data-grid:focus tr.selected .network-graph-label.after::before):
New frontend styles for the network graph when the data grid row is selected.
This makes the pill, callouts, and text white / blue matching the data grid
selected style.
* UserInterface/NetworkDataGrid.js: Added.
(WebInspector.NetworkDataGrid):
(WebInspector.NetworkDataGrid.prototype.constructor.WebInspector.NetworkDataGrid.get currentCalculator):
(WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithRecord):
(WebInspector.NetworkDataGrid.prototype.updateCalculatorBoundariesWithDataGridNode):
(WebInspector.NetworkDataGrid.prototype.reset):
NetworkDataGrid has a just a time calculator right now, that adjusts its bounds
based on resource start time, end times, and on-going load times.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ResourceTimelineDataGridNode.prototype._createGraphElement):
Create and update the network graph elements for the cell content.
(WebInspector.ResourceTimelineDataGridNode.prototype.select):
Show the pill labels when the row is selected. Not just onmouseover.
(WebInspector.ResourceTimelineDataGridNode.prototype._refreshGraph):
(WebInspector.ResourceTimelineDataGridNode.prototype._refreshLabelPositions):
Use the provided network calculator shared with the other grid nodes to create
the appropriate bar for this resource.
appropriately within the network calculators bounds.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
Timeline DataGrids may have embedded timeline graphs that adjust their bounds
based on the records (start times, max sizes, etc) their content contains.
Calculator objects manage those bounds. If the current data grid has a
calculator we do a few extra actions to ensure nice updates.
(WebInspector.TimelinesContentView.prototype._recordingStarted):
Reset the data grid's calculators.
(WebInspector.TimelinesContentView.prototype._updatePendingRecords):
(WebInspector.TimelinesContentView.prototype._updateCalculatorBoundsForPendingRecords):
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsWithNewBounds):
Update the calculator's bounds before updating pending records so that all records
are drawn with the same, most accurate bounds.
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10960903> Include Network timeline graph in the network data grid
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New strings for the tooltips provided by the graph calculator.
* UserInterface/Main.html:
* UserInterface/NetworkGraphCalculator.js: Added.
(WebInspector.NetworkTimeCalculator):
(WebInspector.NetworkTimeCalculator.prototype.get boundarySpan):
(WebInspector.NetworkTimeCalculator.prototype.reset):
(WebInspector.NetworkTimeCalculator.prototype.computeBarGraphPercentages):
(WebInspector.NetworkTimeCalculator.prototype.computeBarGraphLabels):
(WebInspector.NetworkTimeCalculator.prototype.updateBoundaries):
(WebInspector.NetworkTimeCalculator.prototype.formatValue):
(WebInspector.NetworkTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTimeCalculator.prototype._upperBound):
(WebInspector.NetworkTransferTimeCalculator):
(WebInspector.NetworkTransferTimeCalculator.prototype._lowerBound):
(WebInspector.NetworkTransferTimeCalculator.prototype._upperBound):
(WebInspector.NetworkTransferDurationCalculator):
(WebInspector.NetworkTransferDurationCalculator.prototype._upperBound):
Port from OpenSource to work with the new frontend's resource objects.
* UserInterface/ResourceTimelineRecord.js:
(WebInspector.ResourceTimelineRecord.prototype.get endTime):
Move "endTime" resource calculation from here ...
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get lastTimestamp):
... to here as "lastTimestamp".
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
Upgrade .hidden to a common case that does display:none.
This is used throughout the OpenSource frontend to hide elements
and some existing code already uses it and may not be getting
the proper treatment.
Reviewed by Timothy Hatcher.
* UserInterface/TextEditor.css:
* UserInterface/NavigationSidebarPanel.css:
* UserInterface/ApplicationCacheFrameContentView.css:
* UserInterface/Main.css:
(.hidden):
* UserInterface/TextEditor.css:
This removes new front-end occurrences of "hidden". However
it did not remove their JavaScript property.
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
Prevent adding a node to the pending refresh list multiple times.
Reviewed by Timothy Hatcher.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._updatePendingRecords):
(WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh):
Flag on the DataGridNode as pending a refresh if we've added it
to the refresh list and remove the flag after refreshing.
2012-03-01 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10952471> Page should reload when pushing <cmd>+R
Reviewed by Timothy Hatcher.
* UserInterface/EditingSupport.js:
(WebInspector.isEventTargetAnEditableField):
Add code, similar to Open Source to detect if the event is inside of
an editable field. Although some TextPrompt's mark their element as
editing, the Console does not. Nor do <input>s.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._keydown):
Add a keydown listener on the document checking for <cmd>+R.
2012-03-01 Brian Weinstein <bweinstein@apple.com>
Finish up JavaScript profiling in the new inspector.
This patch fixes some loose ends.
- Profiles started by the user now have the title "JavaScript Profile n".
- Profile tree elements now have an icon.
- Selecting "Start Profiling JavaScript" or "Stop Profiling JavaScript" from the Develop menu
now take you to the instrument sidebar panel.
Rest of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Update localized strings.
* UserInterface/Images/Profile.png: Added.
* UserInterface/Images/Profile@2x.png: Added.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.startProfilingJavaScript): Show the instrument sidebar panel.
(InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
* UserInterface/InstrumentIcons.css: Add icons for profile tree elements.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._titleForProfile): Make the title for user generated
profiles "JavaScript Profile n", instead of just "Profile n".
(WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Use the class name for the icon.
2012-03-01 Brian Weinstein <bweinstein@apple.com>
Clear the list of profiles when the page navigates.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Add a listener for when the profile manager says the profiles
were cleared.
(WebInspector.InstrumentSidebarPanel.prototype._profilesCleared): Remove the tree elements from the sidebar,
clear the map from profile titles -> tree elements, close all profile content views, and update the empty
content placeholder.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager): Add a listener for when the main resource did change.
(WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Remove an unused variable.
(WebInspector.ProfileManager.prototype._mainResourceDidChange): Call initialize and fire an event saying that profiles
were cleared.
2012-02-29 Brian Weinstein <bweinstein@apple.com>
Add the ability to start/stop JavaScript profiling from the inspector.
This patch adds a recording glyph to the profiles title bar (which matches the one in the timelines title bar).
The button will start and stop JavaScript profiling.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Update localized strings.
* UserInterface/InstrumentSidebarPanel.css: Make all of these rules work for title bars in the instruments
sidebar panel other than the Timelines title bar. We need these rules for the Profiles title bar as well.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Add a record button and status text next to the profiles sidebar. Also start
listening for when the profile manager starts and stops profiling.
(WebInspector.InstrumentSidebarPanel.prototype._profilingStarted): Start the text of the profiling status and add
a recording style class to the glyph.
(WebInspector.InstrumentSidebarPanel.prototype._profilingEnded): Clear the text of the profiling status and remove
the recording style class from the glyph.
(WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOver): Update the text of the profiling status.
(WebInspector.InstrumentSidebarPanel.prototype._profileGlyphMousedOut): Ditto.
(WebInspector.InstrumentSidebarPanel.prototype._profileGlyphClicked): Toggle the profiling state.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Add a flag that represents
whether or not we are currently profiling.
(WebInspector.ProfileManager.prototype.setRecordingProfile): Fire events for when we start or stop profiling.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Remember the last selected details sidebar panel and restore it when that panel becomes available.
Reviewed by Jon Honeycutt.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Add event listener for SidebarPanelSelected event.
(WebInspector._detailsSidebarPanelSelected): Added. Remember the identifier of the selected sidebar panel.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Ignore selection changes and restore the selection
when the last selected sidebar panel is reinserted into the sidebar.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Prevent the new Web Inspector resources from installing in production builds since we are
not enabling the Inspector in DP2.
Reviewed by Mark Rowe.
* Scripts/copy-user-interface-resources.sh: Exit early before copying.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Include missing image needed by the Log and Database content views.
<rdar://problem/10952496> "userInputPreviousIcon.png" resource failed to load in Console
Reviewed by Dan Bernstein.
* UserInterface/DatabaseContentView.css:
(.database-user-query::before): Use UserInputPromptPrevious.pdf.
* UserInterface/Images/UserInputPromptPrevious.pdf: Added.
* UserInterface/LogContentView.css:
(.console-user-command::before): Use UserInputPromptPrevious.pdf.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Go through the style rules and mark the used and overloaded properties.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Call _markUsedProperties and
pass the result to WebInspector.ComputedStylePropertiesSection.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._markUsedProperties): Added. Copied from open source's
StylesSidebarPane.js file.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Populate the Style sidebar sections after getting all the style info.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Build a list of style rules
that match the cascade order so we can mark used and overloaded properties. Rebuild the sections.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.getInlineStylesAsync): Merge from open source to work with TOT protocol.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Don't show a selector if selectorText is empty.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Request the style information and store it, then build the sections after the last callback.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Request the style info.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.computedStyleCallback): Store the result.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.matchedStylesCallback): Store the result.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.inlineStylesCallback): Store the results and
call buildSections. Since this was the last async call to cssStyleManager, this will always be the last response.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections.buildSections): Added stub that needs implemented.
2012-02-29 Timothy Hatcher <timothy@apple.com>
Remove the refresh code in the Style sidebar since it needs reworked to properly update in one step.
The updating needs to be done in one step so the cascade and property priority are taken into account.
The previous way of updating the sections in three async steps was not going to work.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _rebuildSections.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshStyleRules): Removed.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Removed.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Removed.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._rebuildSections): Added stub that needs implemented.
2012-02-28 Timothy Hatcher <timothy@apple.com>
More work for resource links in the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel): Make the event listener capture since another listener interferes.
(WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Pass along the line number.
* UserInterface/Main.js:
(WebInspector.openURL): Add support for opening to a line number. Use ResourceSidebarPanel which does all the work.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Use _linkify instead of linkifyResourceAsNode.
(WebInspector.StylePropertiesSection.prototype._linkify): Added.
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode): Use _linkify instead of linkifyResourceAsNode.
2012-02-28 Timothy Hatcher <timothy@apple.com>
Copy over Color.js from open source and hook it up to the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager): Use WebInspector.Color.Format.
* UserInterface/Color.js: Copied from OpenSource/Source/WebCore/inspector/front-end/Color.js.
* UserInterface/Main.html: Included Color.js.
* UserInterface/StylePropertyTreeElement.js: Use WebInspector.Color.Format.
2012-02-28 Timothy Hatcher <timothy@apple.com>
Get style editing working.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._handleKeyDown): Use WebInspector.CSSPropertyPrompt.alteredFloatNumber.
* UserInterface/CSSPropertyPrompt.js:
(WebInspector.CSSPropertyPrompt):
(WebInspector.CSSPropertyPrompt.alteredFloatNumber): Moved from BoxModelDetailsSectionRow.
(WebInspector.CSSPropertyPrompt.alteredHexNumber): Added from Open Source.
(WebInspector.CSSPropertyPrompt.prototype._handleUpOrDownValue): Use alteredFloatNumber and alteredHexNumber on this class.
* UserInterface/EditingSupport.js:
(WebInspector.restoreFocusFromElement): Added from Open Source.
* UserInterface/Main.html: Included CSSPropertyPrompt.js.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype): Create CSSPropertyPrompt correctly.
2012-02-28 Timothy Hatcher <timothy@apple.com>
Replace more uses of {add,remove,has}StyleClass with classList.{add,remove,contains}.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/BlankStylePropertiesSection.js:
(WebInspector.BlankStylePropertiesSection):
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
(WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.createCell):
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection.prototype._handleEmptySpaceDoubleClick):
2012-02-28 Timothy Hatcher <timothy@apple.com>
Make links work in the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshAttributeStyles): Pass the domNode.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Ditto.
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel): Add click event listener.
(WebInspector.DOMDetailsSidebarPanel.prototype._mouseWasClicked): Added. Find the parentFrame for
the inspected DOM node and then call openURL.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL): Remove references to
elements panel and fix up the linifying code to work with the new Inspector code.
2012-02-29 Brian Weinstein <bweinstein@apple.com>
Group together profiles with the same name into folders when there is more than
one of them.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Update localized strings.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Add a mapping from profile title -> profile tree element (or folder).
(WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Add multiple cases for when
we add a profile. If it's the first profile with a given name, add it to the sidebar. If there already
is a folder that represents all profiles with that name, then add the profile to that folder. If there
is already a profile with that same name, create a folder to represent all profiles with that name,
and add both the previous profile and the new profile to that folder.
2012-02-28 Brian Weinstein <bweinstein@apple.com>
Make console.profile work and show entries in the instrument sidebar.
We now enable profiling when we open the web inspector, instead of when we are just told to create
a profile. This allows console.profile to work when the web inspector is open.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager): Enable the ProfilerAgent when we start the ProfileManager.
(WebInspector.ProfileManager.prototype.startProfilingJavaScript): Call startRecordingProfile.
(WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Don't disable the ProfilerAgent.
(WebInspector.ProfileManager.prototype.addProfile): If we don't have a recording JavaScript profile (which
we wouldn't if addProfile was called from console.profile), then create a new ProfileObject and fire an
event.
2012-02-28 Timothy Hatcher <timothy@apple.com>
Start showing Computed Style in the Style details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Create a Computed Style section.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Call _refreshComputedStyle.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._refreshComputedStyle): Added. Request the computed styles
then make a ComputedStylePropertiesSection.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager): Added setting for color format.
(WebInspector.CSSStyleManager.prototype.get preferredColorFormat): Added.
* UserInterface/ComputedStylePropertiesSection.js:
(WebInspector.ComputedStylePropertiesSection): Replace addStyleClass with classList.add.
(WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): Ditto.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection): Make a empty group by default if none are passed in.
* UserInterface/DetailsSectionPropertiesRow.js: Added.
(WebInspector.DetailsSectionPropertiesRow):
(WebInspector.DetailsSectionPropertiesRow.prototype.get propertiesSection):
(WebInspector.DetailsSectionPropertiesRow.prototype.set propertiesSection):
* UserInterface/Main.html: Included DetailsSectionPropertiesRow.
* UserInterface/StylePropertiesSection.js:
(WebInspector.StylePropertiesSection): Removed single-click experiment.
* UserInterface/StylePropertyTreeElement.js:
(WebInspector.StylePropertyTreeElement.prototype.onattach): Removed single-click experiment.
(WebInspector.StylePropertyTreeElement.prototype.updateTitle): Use CSSStyleManager for the color format.
Replaced addStyleClass with classList.add and removeStyleClass with classList.remove.
2012-02-27 Timothy Hatcher <timothy@apple.com>
Fix some exceptions when running against shipping WebKit.
There are no setters for sortOrder or sortColumnIdentifier. Trying to set them use to throw an exception.
They just are silently ignored in TOT WebKit. The sort info is properly set earlier in the function.
Reviewed by Joseph Pecoraro.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Remove sets for sortOrder and sortColumnIdentifier.
2012-02-27 Timothy Hatcher <timothy@apple.com>
Hide the appearance and style details sidebars when the node is not an element.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
* UserInterface/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.supportsDOMNode): Added. Support only ELEMENT_NODE types.
* UserInterface/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel.prototype..inspect): Call supportsDOMNode before setting domNode.
(WebInspector.DOMDetailsSidebarPanel.prototype.supportsDOMNode): Added. Always return true.
2012-02-27 Timothy Hatcher <timothy@apple.com>
Move empty message support from DetailsSectionDataGridRow down to DetailsSectionRow.
This allows BoxModelDetailsSectionRow to show a properly styled empty message. It will
also allow other rows in the Style details sidebar to do the same.
Reviewed by Joseph Pecoraro.
* UserInterface/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow): Pass the emptyMessage to the DetailsSectionRow constructor.
(WebInspector.BoxModelDetailsSectionRow.prototype._refresh): Use showEmptyMessage.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics): Use hideEmptyMessage
* UserInterface/DetailsSection.css:
(.details-section > .content > .group > .row.empty): Removed .data-grid from the selector.
* UserInterface/DetailsSectionDataGridRow.js:
(WebInspector.DetailsSectionDataGridRow): Pass the emptyMessage to DetailsSectionRow constructor.
(WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid): Use showEmptyMessage
and hideEmptyMessage.
* UserInterface/DetailsSectionRow.js:
(WebInspector.DetailsSectionRow): Initialize the _emptyMessage.
(WebInspector.DetailsSectionRow.prototype.get emptyMessage): Added.
(WebInspector.DetailsSectionRow.prototype.set emptyMessage): Added.
(WebInspector.DetailsSectionRow.prototype.showEmptyMessage): Added.
(WebInspector.DetailsSectionRow.prototype.hideEmptyMessage): Added.
2012-02-27 Timothy Hatcher <timothy@apple.com>
Add WebInspector.CSSStyleDetailsSidebarPanel and make it show up in the details sidebar.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleDetailsSidebarPanel.js: Added.
(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
* UserInterface/Images/NavigationItemCurleyBraces.pdf: Added.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-02-27 Timothy Hatcher <timothy@apple.com>
Add WebInspector.CSSObserver and wire it up to the InspectorBackend.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSObserver.js: Added.
(WebInspector.CSSObserver):
(WebInspector.CSSObserver.prototype.mediaQueryResultChanged):
(WebInspector.CSSObserver.prototype.styleSheetChanged):
* UserInterface/Main.html: Included CSSObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Call registerCSSDispatcher with an CSSObserver instance.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Add a sane name for user generated profiles.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype.addProfile):
* UserInterface/ProfileManager.js:
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Create a JavaScriptProfileView when a profile is selected and show it.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* Localizations/en.lproj/localizedStrings.js: Update localized strings.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add a case for ProfileObject.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Add a listener for when items in the content tree outline are selected.
(WebInspector.InstrumentSidebarPanel.prototype._profileSelected): Call showContentViewForRepresentedObject on
the selected ProfileObject.
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject): Add a case for ProfileObject.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Hook up Start/Stop Profiling JavaScript in the Develop menu, and make each profile show
up as a sidebar item.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.isProfilingJavaScript): Call into the ProfileManager.
(InspectorFrontendAPI.startProfilingJavaScript): Ditto.
(InspectorFrontendAPI.stopProfilingJavaScript): Ditto.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel.prototype._profileWasAdded): Create a tree element for the added profile.
(WebInspector.InstrumentSidebarPanel.prototype._profileWasUpdated): Update the title of the tree element for the
profile that was updated.
* UserInterface/JavaScriptProfileType.js: Change the value of a constant to match data we get back
from the Profiler.
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize): Clear the current JavaScript
profile variable.
(WebInspector.ProfileManager.prototype.isProfilingJavaScript): Return whether or not we are profiling JavaScript.
(WebInspector.ProfileManager.prototype.startProfilingJavaScript): Enable the ProfilerAgent, we kick off the profile in
the callback.
(WebInspector.ProfileManager.prototype.stopProfilingJavaScript): Stop recording the current profile and disable the
ProfilerAgent.
(WebInspector.ProfileManager.prototype.addProfile): Update our temporary recording profile to give it the information about
the profile that was added, and fire an event that the profile was u pdated.
(WebInspector.ProfileManager.prototype.setRecordingProfile): Create a temporary profile if needed, and fire an event that
it was created.
(WebInspector.ProfileManager.prototype._profilerWasEnabled): Create a JavaScriptProfileType and start recording.
* UserInterface/ProfilerObserver.js:
(WebInspector.ProfilerObserver.prototype.addProfileHeader): Call ProfileManager.addProfile.
(WebInspector.ProfilerObserver.prototype.setRecordingProfile): Call ProfileManager.setRecordingProfile.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Add a stub ProfilerObserver and hook it up in Main.js.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/Main.html: Add new file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Set up the ProfilerObserver.
* UserInterface/ProfilerObserver.js: Added.
(WebInspector.ProfilerObserver):
(WebInspector.ProfilerObserver.prototype.constructor.WebInspector.ProfilerObserver.resetProfiles):
(WebInspector.ProfilerObserver.prototype.addProfileHeader):
(WebInspector.ProfilerObserver.prototype.addHeapSnapshotChunk):
(WebInspector.ProfilerObserver.prototype.finishHeapSnapshot):
(WebInspector.ProfilerObserver.prototype.setRecordingProfile):
(WebInspector.ProfilerObserver.prototype.reportHeapSnapshotProgress):
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Add ProfileType and JavaScriptProfileType to Main.html, since later patches will depend on them.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/Main.html:
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Make ProfileDataGridTree work with the changes to the new inspector.
- Update the way formatted strings are created
- Changes the settings to use the new inspector's syntax
- Remove the depedency on the linkifier
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.get data):
(WebInspector.ProfileDataGridNode.prototype.linkifyLocation):
(WebInspector.ProfileDataGridNode.prototype.createCell):
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Bring in some specialized profile data grid components from open source.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/BottomUpProfileDataGridTree.js: Added. Copied from open source.
* UserInterface/ProfileDataGridTree.js: Added. Copied from open source.
* UserInterface/TopDownProfileDataGridTree.js: Added. Copied from open source.
* UserInterface/Main.html: Add new files.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Add rules from open source for the profile view to JavaScriptProfileView.css.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/JavaScriptProfileView.css: Added. Copied rules from open source.
* UserInterface/Main.html: Added file.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Clean up JavaScriptProfileView so it can be used in the new inspector.
This patch:
- Removes the status bar buttons (adding a FIXME to bring back that functionality)
- Makes the class inherit from ContentView instead of just View
- Replaces *styleClass functions with classList.*
- Changes the settings to use the new inspector's syntax
Reviewed by Tim Hatcher.
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView):
(WebInspector.JavaScriptProfileView.prototype._changeView):
(WebInspector.JavaScriptProfileView.prototype._percentClicked):
(WebInspector.JavaScriptProfileView.prototype._updatePercentButton):
(WebInspector.JavaScriptProfileView.prototype._focusClicked):
(WebInspector.JavaScriptProfileView.prototype._excludeClicked):
(WebInspector.JavaScriptProfileView.prototype._resetClicked):
(WebInspector.JavaScriptProfileView.prototype._dataGridNodeSelected):
(WebInspector.JavaScriptProfileView.prototype._dataGridNodeDeselected):
(WebInspector.JavaScriptProfileView.prototype._mouseDownInDataGrid):
* UserInterface/Main.html: Add JavaScriptProfileView.
2012-02-24 Brian Weinstein <bweinstein@apple.com>
Add a ProfileObject class, which just holds some data about profiles (type, title, uid, and whether or not
it is temporary).
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/ProfileObject.js: Added.
(WebInspector.ProfileObject):
(WebInspector.ProfileObject.prototype.constructor.WebInspector.ProfileObject.get typeId):
(WebInspector.ProfileObject.prototype.get title):
(WebInspector.ProfileObject.prototype.get uid):
(WebInspector.ProfileObject.prototype.get isTemporary):
2012-02-22 Brian Weinstein <bweinstein@apple.com>
Create a stub ProfileManager and add an initialize method.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/Main.html: Add new file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a profile manager.
* UserInterface/ProfileManager.js: Added.
(WebInspector.ProfileManager):
(WebInspector.ProfileManager.prototype.constructor.WebInspector.ProfileManager.initialize):
2012-02-20 Brian Weinstein <bweinstein@apple.com>
Rename CPUProfile to JavaScriptProfile.
More of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/JavaScriptProfileType.js:
(WebInspector.JavaScriptProfileType):
(WebInspector.JavaScriptProfileType.prototype.createView):
* UserInterface/JavaScriptProfileView.js:
(WebInspector.JavaScriptProfileView.prototype._changeView.set else):
2012-02-20 Brian Weinstein <bweinstein@apple.com>
Bring in some files from open source.
Start of <rdar://problem/10897473> Implement JavaScript profiling in the new Web Inspector.
Reviewed by Tim Hatcher.
* UserInterface/JavaScriptProfileType.js: Added. Copied from open source.
* UserInterface/JavaScriptProfileView.js: Added. Copied from open source.
* UserInterface/ProfileType.js: Added. Copied from open source.
2012-02-26 Timothy Hatcher <timothy@apple.com>
Use insertionIndexForObjectInListSortedByFunction to efficiently build the timeline data grids.
Calling _sortCurrentDataGrid for each update was expensive since it removes all the rows and reinserts them.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype._attach): Fix a bug that prevented inserting the row in the right place.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype._updatePendingRecords): Use insertionIndexForObjectInListSortedByFunction
when there is a sortColumnIdentifier. Don't call _sortCurrentDataGrid anymore.
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Use _sortComparator.
(WebInspector.TimelinesContentView.prototype._sortComparator): Added. Factored out of _sortCurrentDataGrid.
2012-02-26 Timothy Hatcher <timothy@apple.com>
Show recoding status in the Instrument sidebar and allow manually starting and stopping recording.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Images/Recording.png: Added.
* UserInterface/Images/Recording@2x.png: Added.
* UserInterface/Images/RecordingHovered.png: Added.
* UserInterface/Images/RecordingHovered@2x.png: Added.
* UserInterface/Images/RecordingStopped.png: Added.
* UserInterface/Images/RecordingStopped@2x.png: Added.
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .title-bar):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph:hover):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording:hover):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.forced):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-glyph.recording.forced):
(.sidebar > .panel.instrument > .title-bar.timelines > .record-status):
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Create glyph and status elements.
(WebInspector.InstrumentSidebarPanel.prototype._recordingStarted): Added. Update glyph and status.
(WebInspector.InstrumentSidebarPanel.prototype._recordingStopped): Added. Ditto.
(WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOver): Added. Clear forced class.
Update status to reflect what it will be if the button is clicked.
(WebInspector.InstrumentSidebarPanel.prototype._recordGlyphMousedOut): Added. Restore current status.
(WebInspector.InstrumentSidebarPanel.prototype._recordGlyphClicked): Added. Add forced class to prevent
the glyph from showing a confusing status after click.
2012-02-26 Timothy Hatcher <timothy@apple.com>
Draw the overview bar graph at the top of the timeline content view.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineOverview.css:
(.timeline-overview > .timeline > .bar-container):
(.timeline-overview > .timeline .bar):
(.timeline-overview > .timeline .bar.waiting):
(.timeline-overview > .timeline.timeline-record-type-network .bar):
(.timeline-overview > .timeline.timeline-record-type-layout .bar):
(.timeline-overview > .timeline.timeline-record-type-script .bar):
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview): Create a bar container in each timeline.
(WebInspector.TimelineOverview.prototype.update): Call _updateTimelineBars for each type.
(WebInspector.TimelineOverview.prototype._updateTimelineBars): Added.
(WebInspector.TimelineOverview.prototype._updateTimelineBars.computePercentages): Compute percentages
for startTime and endTime.
(WebInspector.TimelineOverview.prototype._updateTimelineBars.computeActivePercentages): Compute percentages
for endTime and the start of activeDuration.
(WebInspector.TimelineOverview.prototype._updateTimelineBars.addBar): Create a bar and append it.
(WebInspector.TimelineOverview.prototype._updateTimelineBars.createBars): Iterate over the records and find
the distribution on the graph.
2012-02-26 Timothy Hatcher <timothy@apple.com>
Improve auto recording of timeline data so it stops at a reasonable time instead of a fixed 30 seconds.
Recording will now stop when there has been 1 second of dead time after the load event fires. Or after a
maximum of 10 seconds after the load event fires. This works well for a number of large and small sites.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager): Initialize _domContentLoadedEventTime and _loadEventTime.
(WebInspector.TimelineManager.prototype.get mainFrameLoadEventTime): Added.
(WebInspector.TimelineManager.prototype.get mainFrameDOMContentLoadedEventTime): Added.
(WebInspector.TimelineManager.prototype.startRecording): Initialize _domContentLoadedEventTime and _loadEventTime.
(WebInspector.TimelineManager.prototype.stopRecording): Clear _deadTimeTimeout.
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Process the MarkLoad and MarkDOMContent records.
Call _stopAutoRecordingSoon for MarkLoad.
(WebInspector.TimelineManager.prototype._addRecord): Call _resetAutoRecordingDeadTimeTimeout.
(WebInspector.TimelineManager.prototype._startAutoRecording): Removed timeout for stopRecording.
(WebInspector.TimelineManager.prototype._stopAutoRecordingSoon): Added. Start a timeout for the maximum time. Also
call _resetAutoRecordingDeadTimeTimeout to start watching dead time.
(WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout): Added. Reset the dead time timeout.
2012-02-26 Timothy Hatcher <timothy@apple.com>
Draw the times in the timeline overview header.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)): Reduce divider opacity.
* UserInterface/TimelineOverview.css:
(.timeline-overview > .header): Added.
(.timeline-overview > .header > .divider): Added.
(.timeline-overview > .header > .divider:last-child): Added.
(.timeline-overview > .header > .divider > .label): Added.
(.timeline-overview > .header > .divider:first-child > .label): Added.
(.timeline-overview > .timeline): Added.
(.timeline-overview > .timeline:not(:first-child)): Added.
* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview): Create the header element and timeline rows.
(WebInspector.TimelineOverview.prototype.get recordTypes): Added.
(WebInspector.TimelineOverview.prototype.clear): Added. Reset the minimum and maximum boundaries. Call _updateHeaderTimes.
(WebInspector.TimelineOverview.prototype.update): Added. Find the minimum and maximum times. Call _updateHeaderTimes.
(WebInspector.TimelineOverview.prototype.updateLayout): Added. Call _updateHeaderTimes.
(WebInspector.TimelineOverview.prototype._updateHeaderTimes): Added. Update the dividers and labels.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.prototype.updateLayout): Call updateLayout on the timeline overview.
(WebInspector.TimelinesContentView.prototype.timelineOverviewRecordsWithType): Added.
(WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Don't return early, call _updatePendingRecordsSoon.
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Return early if not visible.
(WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call update on the timeline overview. Fix if statement.
(WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Don't return early, call _updatePendingRecordsSoon.
2012-02-25 Timothy Hatcher <timothy@apple.com>
Add the start of WebInspector.TimelineOverview, the overview graph at the top of the timeline content view.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Joseph Pecoraro.
* UserInterface/Main.html:
* UserInterface/TimelineOverview.css: Added.
(.timeline-overview):
* UserInterface/TimelineOverview.js: Added.
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.get element):
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .timeline-overview):
* UserInterface/TimelinesContentView.js:
2012-02-25 Timothy Hatcher <timothy@apple.com>
Add a way to jump to resource source code from the Network and Script timeline data grid.
Part of: <rdar://problem/10319553&10319567>
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid): Remove capture on the click and mousedown events. This allows the go-to
to prevent row selection in the data grid.
* UserInterface/ImageUtilities.js:
(generateColoredImage): Added support for adjusting the alpha by multiplying.
(generateColoredImagesForCSS.generateImage): Pass along the fillColor alpha.
* UserInterface/Main.css:
(.go-to-arrow): Added.
(.go-to-arrow:active): Added.
(:focus .selected .go-to-arrow): Added.
(:focus .selected .go-to-arrow:active): Added.
* UserInterface/Main.js:
(WebInspector.createGoToArrowButton.stopPropagation): Added.
(WebInspector.createGoToArrowButton): Added. Generate the images and button element.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the name column.
(WebInspector.ResourceTimelineDataGridNode.prototype._goToResource): Added. Show the resource.
* UserInterface/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Append a go-to button to the resource column.
(WebInspector.ScriptTimelineDataGridNode.prototype._goToResource): Added. Show the resource and line.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid td .go-to-arrow): Added. Float right, hidden by default
(.content-view.timelines > .data-grid tr:hover .go-to-arrow): Added. Show the button.
2012-02-25 Timothy Hatcher <timothy@apple.com>
Fix some exceptions that occurred when clicking on a resource in the Issues sidebar.
Reviewed by John Sullivan.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Move _issues and _contentPopulated above the call to the ResourceContentView
constructor since addIssue needs them and ResourceContentView populates the issues.
2012-02-25 Timothy Hatcher <timothy@apple.com>
Share code for generating disclosure triangles so it can be used in other places.
Reviewed by John Sullivan.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
* UserInterface/ImageUtilities.js:
(generateColoredImagesForCSS): Added. Copied from NavigationSidebarPanel and made generic.
(generateColoredImagesForCSS.imageLoaded): Added.
(generateColoredImagesForCSS.generateImage): Added.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Use generateColoredImagesForCSS.
2012-02-24 Timothy Hatcher <timothy@apple.com>
Populate the Script data grid in the timeline content view.
Part of: <rdar://problem/10319567> Implement the Script instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Included ScriptTimelineDataGridNode.js and ScriptTimelineRecord.js.
* UserInterface/ScriptTimelineDataGridNode.js: Added.
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.get record):
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
* UserInterface/ScriptTimelineRecord.js: Added.
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
(WebInspector.ScriptTimelineRecord.prototype.get eventType):
(WebInspector.ScriptTimelineRecord.prototype.get details):
(WebInspector.ScriptTimelineRecord.prototype.get resource):
(WebInspector.ScriptTimelineRecord.prototype.get lineNumber):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Handle script record types.
(WebInspector.TimelineManager.prototype.eventRecorded): Pass along the parent record to processRecord.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid .resource-column .icon): Updated the selector to work with name-column and resource-column.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView):
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Handle WebInspector.Resource values.
(WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a ScriptTimelineDataGridNode.
2012-02-24 Timothy Hatcher <timothy@apple.com>
Populate the Layout & Rendering data grid in timeline content view.
Part of: <rdar://problem/10319571> Implement the Rendering instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/LayoutTimelineDataGridNode.js: Added.
(WebInspector.LayoutTimelineDataGridNode):
(WebInspector.LayoutTimelineDataGridNode.prototype.get record):
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
* UserInterface/LayoutTimelineRecord.js: Added.
(WebInspector.LayoutTimelineRecord):
(WebInspector.LayoutTimelineRecord.EventType.displayName):
(WebInspector.LayoutTimelineRecord.prototype.get eventType):
(WebInspector.LayoutTimelineRecord.prototype.get x):
(WebInspector.LayoutTimelineRecord.prototype.get y):
(WebInspector.LayoutTimelineRecord.prototype.get width):
(WebInspector.LayoutTimelineRecord.prototype.get height):
(WebInspector.LayoutTimelineRecord.prototype.get area):
* UserInterface/Main.html: Included LayoutTimelineRecord.js and LayoutTimelineDataGridNode.js.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Create record objects for each type.
(WebInspector.TimelineManager.prototype.eventRecorded): Iterate over the records.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Create columns for the Layout data grid.
(WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Create a LayoutTimelineDataGridNode.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Adjust the output of Number.secondsToString to give higher resolution for < 100ms.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Utilities.js:
(Number.secondsToString): Show more decimal points for < 100ms. Reduce the number of
decimal points in higher resolution mode as well.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Support sorting the data grids in the timeline view.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.css:
(.data-grid th.sort-descending > div): Add some padding so the sort direction arrow does not overlap the text.
* UserInterface/Resource.js:
(WebInspector.Resource): Initialize _cached so it can sort properly.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Add event listeners for sorting changes.
(WebInspector.TimelinesContentView.prototype._updatePendingRecords): Call _sortCurrentDataGrid.
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid): Added.
(WebInspector.TimelinesContentView.prototype._sortCurrentDataGrid.comparator): Added.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Separate data from presentation in ResourceTimelineDataGridNode to make it easy to sort using the raw data.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.createCell): Make a text node if the content isn't a Node.
(WebInspector.DataGridNode.prototype.createCellContent): Return raw data. The text node is made by the caller.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.get data): Return the raw data instead of formatted data.
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Format the data based on the column.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Cause network records to update in batches with any new records being added to reduce flashing.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode): Update event listeners to call _needsRefresh.
(WebInspector.ResourceTimelineDataGridNode.prototype.get record): Added.
(WebInspector.ResourceTimelineDataGridNode.prototype.refresh): Remove timeout check.
(WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh): Renamed from _refreshSoon. Fire
NeedsRefresh event.
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Add event listener for NeedsRefresh.
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call _updatePendingRecords.
(WebInspector.TimelinesContentView.prototype.shown): Call _updatePendingRecords.
(WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Call _updatePendingRecordsSoon.
(WebInspector.TimelinesContentView.prototype._updatePendingRecordsSoon): Renamed from _addPendingRecordsSoon.
(WebInspector.TimelinesContentView.prototype._updatePendingRecords): Renamed from _addPendingRecords. Also
refresh pending grid nodes.
(WebInspector.TimelinesContentView.prototype._scheduleGridNodeForRefresh): Added. Store the grid node and
call _updatePendingRecordsSoon.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Properly record main resources for all frames in the Network timeline.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager): Change MainFrameDidChange listener to _mainResourceDidChange.
(WebInspector.TimelineManager.prototype._startAutoRecording): Return true if recording started.
(WebInspector.TimelineManager.prototype._mainResourceDidChange): Added. Call _startAutoRecording,
return early if true. Add the main resource as a record if it isn't the auto recording resource.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Always clear records and restart recording when navigating to a new page.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype.stopRecording): Clear _autoRecordingMainResourceRequestIdentifier.
(WebInspector.TimelineManager.prototype._startAutoRecording): Set _autoRecordingMainResourceRequestIdentifier.
Don't return early if _autoRecordingMainResourceRequestIdentifier.
2012-02-22 Timothy Hatcher <timothy@apple.com>
Show resource icons and failed loads in the Network data grid.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DataGrid.js:
(WebInspector.DataGridNode.prototype.createCell): Call createCellContent.
(WebInspector.DataGridNode.prototype.createCellContent): Added. Make a text node.
* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent): Added. Create a fragment
for the name column with an icon. Add the error class to all cells for failed loads.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid .name-column .icon): Added.
(.content-view.timelines > .data-grid td.error): Added. Color red.
(.content-view.timelines > .data-grid tr.selected td.error): Added. Color white.
2012-02-21 Timothy Hatcher <timothy@apple.com>
Start populating the Network timeline data grid with resource load information.
Part of: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Included ResourceTimelineDataGridNode.js.
* UserInterface/Resource.js:
(WebInspector.Resource): Initialize _responseHeaders to avoid an exception.
(WebInspector.Resource.prototype.get statusCode): Added.
(WebInspector.Resource.prototype.get statusText): Added.
* UserInterface/ResourceTimelineDataGridNode.js: Added.
(WebInspector.ResourceTimelineDataGridNode):
(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
* UserInterface/ResourceTimelineRecord.js:
(WebInspector.ResourceTimelineRecord): Add event listener for TimestampsDidChange.
(WebInspector.ResourceTimelineRecord.prototype._dispatchUpdatedEvent): Added. Fire Updated event.
* UserInterface/TimelinesContentView.css:
(.content-view.timelines > .data-grid td:last-child):
(.content-view.timelines > .data-grid td):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Create the Network data grid headers and populate _pendingRecords.
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Call updateWidths
and _addPendingRecords.
(WebInspector.TimelinesContentView.prototype.updateLayout): Added.
(WebInspector.TimelinesContentView.prototype.shown): Call _addPendingRecords.
(WebInspector.TimelinesContentView.prototype._recordingStarted): Added.
(WebInspector.TimelinesContentView.prototype._recordAdded): Added.
(WebInspector.TimelinesContentView.prototype._addRecordToDataGrid): Added.
(WebInspector.TimelinesContentView.prototype._addPendingRecordsSoon): Added.
(WebInspector.TimelinesContentView.prototype._addPendingRecords): Added.
(WebInspector.TimelinesContentView.prototype._createDataGridNodeForRecord): Added.
* UserInterface/Utilities.js:
(Number.secondsToString): Added. Copied from open source.
2012-02-21 Timothy Hatcher <timothy@apple.com>
Make showing a timeline switch to a different data grid and reflect the selected timeline
in the sidebar and the navigation bar.
Also make the timeline show when reopening the inspector when it was showing last time.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Don't store the tree elements on this. Create a map of tree elements
based on the the record type.
(WebInspector.InstrumentSidebarPanel.prototype.showTimeline): Added.
(WebInspector.InstrumentSidebarPanel.prototype.showTimelineForRecordType): Added. Select the tree element.
(WebInspector.InstrumentSidebarPanel.prototype.cookieForContentView): Added.
(WebInspector.InstrumentSidebarPanel.prototype.showContentViewForCookie): Added.
(WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView.createPathComponent): Added.
(WebInspector.TimelinesContentView): Create the path components and test data grids.
(WebInspector.TimelinesContentView.prototype.showTimelineForRecordType): Added. Show the data grid. Update
the path component. Tell the sidebar panel to select the right tree element.
(WebInspector.TimelinesContentView.prototype.get selectionPathComponents): Added.
(WebInspector.TimelinesContentView.prototype.shown): Added.
(WebInspector.TimelinesContentView.prototype._pathComponentSelected): Added.
2012-02-21 Timothy Hatcher <timothy@apple.com>
Add WebInspector.TimelineRecord and WebInspector.ResourceTimelineRecord. Start recording Network records on load.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/Main.html:
* UserInterface/ResourceTimelineRecord.js: Added.
(WebInspector.ResourceTimelineRecord):
(WebInspector.ResourceTimelineRecord.prototype.get resource):
(WebInspector.ResourceTimelineRecord.prototype.get startTime):
(WebInspector.ResourceTimelineRecord.prototype.get endTime):
(WebInspector.ResourceTimelineRecord.prototype.get waitingDuration):
(WebInspector.ResourceTimelineRecord.prototype.get activeDuration):
* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager): Listen for Frame events. Initialize properties.
(WebInspector.TimelineManager.prototype.get recording): Added.
(WebInspector.TimelineManager.prototype.get records): Added.
(WebInspector.TimelineManager.prototype.get recordsWithType): Added.
(WebInspector.TimelineManager.prototype.startRecording): Clear records. Dispatch RecordingStarted event.
(WebInspector.TimelineManager.prototype.stopRecording): Clear timeout. Dispatch RecordingStopped event.
(WebInspector.TimelineManager.prototype._addRecord): Added. Adds record and dispatches RecordAdded event.
(WebInspector.TimelineManager.prototype._startAutoRecording): Added. Start recording and
(WebInspector.TimelineManager.prototype._resourceWasAdded): Added. Create a record.
* UserInterface/TimelineRecord.js: Added.
(WebInspector.TimelineRecord):
(WebInspector.TimelineRecord.prototype.get startTime):
(WebInspector.TimelineRecord.prototype.get endTime):
(WebInspector.TimelineRecord.prototype.get duration):
(WebInspector.TimelineRecord.prototype.get waitingDuration):
(WebInspector.TimelineRecord.prototype.get activeDuration):
2012-02-20 Timothy Hatcher <timothy@apple.com>
Add WebInspector.TimelineObserver and WebInspector.TimelineManager.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/Main.html: Included TimelineManager.js and TimelineObserver.js.
* UserInterface/Main.js: Create an instance of TimelineManager.
(WebInspector.contentLoaded):
* UserInterface/TimelineManager.js: Added.
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startRecording):
(WebInspector.TimelineManager.prototype.stopRecording):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/TimelineObserver.js: Added.
(WebInspector.TimelineObserver):
(WebInspector.TimelineObserver.prototype.eventRecorded): Call TimelineManager.
2012-02-20 Timothy Hatcher <timothy@apple.com>
Change the names for the Instrument timelines based on feedback from Adam.
Now: "Network Requests", "Layout & Rendering" and "JavaScript & Events".
Reviewed by Adam Roben.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Update the tree element titles.
2012-02-19 Timothy Hatcher <timothy@apple.com>
Record network timestamps on WebInspector.Resource along with HTTP response status and sizes.
Needed for: <rdar://problem/10319553> Implement the Network instrument for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added timestamp parameter.
(WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added timestamp parameter.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added timestamp parameter.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.requestWillBeSent): Pass along timestamp.
(WebInspector.NetworkObserver.prototype.requestServedFromCache): Call markResourceRequestAsServedFromMemoryCache.
(WebInspector.NetworkObserver.prototype.responseReceived): Pass along timestamp.
(WebInspector.NetworkObserver.prototype.dataReceived): Call resourceRequestDidReceiveData.
(WebInspector.NetworkObserver.prototype.loadingFinished): Pass along timestamp.
(WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
(WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
* UserInterface/Resource.js:
(WebInspector.Resource): Added timestamp parameter.
(WebInspector.Resource.prototype.get requestSentTimestamp): Added.
(WebInspector.Resource.prototype.get lastRedirectReceivedTimestamp): Added.
(WebInspector.Resource.prototype.get responseReceivedTimestamp): Added.
(WebInspector.Resource.prototype.get lastDataReceivedTimestamp): Added.
(WebInspector.Resource.prototype.get finishedOrFailedTimestamp): Added.
(WebInspector.Resource.prototype.get duration): Added.
(WebInspector.Resource.prototype.get latency): Added.
(WebInspector.Resource.prototype.get receiveDuration): Added.
(WebInspector.Resource.prototype.get cached): Added.
(WebInspector.Resource.prototype.get size): Added.
(WebInspector.Resource.prototype.get transferSize): Added.
(WebInspector.Resource.prototype.updateForRedirectResponse): Added timestamp parameter.
(WebInspector.Resource.prototype.updateForResponse): Ditto.
(WebInspector.Resource.prototype.increaseSize): Added.
(WebInspector.Resource.prototype.increaseTransferSize): Added.
(WebInspector.Resource.prototype.markAsCached): Added.
(WebInspector.Resource.prototype.markAsFinished): Added timestamp parameter.
(WebInspector.Resource.prototype.markAsFailed): Ditto.
2012-02-19 Timothy Hatcher <timothy@apple.com>
Show empty content messages for no search results, no recorded profiles and no storage.
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/InstrumentSidebarPanel.css:
(.sidebar > .panel.instrument > .empty-content-placeholder): Position with the content.
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Call updateEmptyContentPlaceholder.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .empty-content-placeholder): Use a flex box to center the message.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder): Added. Helper.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Set and unset _emptyFilterResults.
* UserInterface/SearchSidebarPanel.css:
(.sidebar > .panel.search > .empty-content-placeholder): Position with the content.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholderSoon): Added.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.updateEmptyContentPlaceholder): Added.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback.resourceCallback): Call
updateEmptyContentPlaceholderSoon before any return.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.resourcesCallback): Ditto.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback.domSearchResults): Ditto.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel.performSearch.domCallback): Ditto.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel): Call _updateEmptyContentPlaceholder.
(WebInspector.StorageSidebarPanel.prototype._updateEmptyContentPlaceholder): Added.
(WebInspector.StorageSidebarPanel.prototype._addChild): Call _updateEmptyContentPlaceholder.
(WebInspector.StorageSidebarPanel.prototype._storageCleared): Call _updateEmptyContentPlaceholder.
2012-02-19 Timothy Hatcher <timothy@apple.com>
Make DataGrid have a custom style in the timelines content view.
Larger headers with matching gradient to the sidebar panel. Also larger rows with a grey alternating row color.
Part of: <rdar://problem/10319553&10319567&10319571>
Reviewed by Brian Weinstein.
* UserInterface/Main.html:
* UserInterface/TimelinesContentView.css: Added.
(.content-view.timelines > .data-grid):
(.content-view.timelines > .data-grid th):
(.content-view.timelines > .data-grid th:not(:last-child)):
(.content-view.timelines > .data-grid th.sortable:active):
(.content-view.timelines > .data-grid th.sort-descending):
(.content-view.timelines > .data-grid .data-container):
(.content-view.timelines > .data-grid table.data):
(.content-view.timelines > .data-grid td):
(.content-view.timelines > .data-grid td:not(:last-child)):
* UserInterface/TimelinesContentView.js:
(WebInspector.TimelinesContentView): Create a dummy DataGrid for position and style testing.
2012-02-19 Timothy Hatcher <timothy@apple.com>
Add an empty content view for the Instrument sidebar timelines.
Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Added check for TimelinesObject.
(WebInspector.ContentView.isViewable): Added check for TimelinesObject.
* UserInterface/Images/Stopwatch.png: Added.
* UserInterface/Images/Stopwatch@2x.png: Added.
* UserInterface/InstrumentIcons.css:
(.stopwatch-icon .icon):
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Create the _timelinesElement and an instance of TimelinesObject.
(WebInspector.InstrumentSidebarPanel.prototype.treeElementForRepresentedObject): Added.
(WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected): Added.
* UserInterface/Main.html: Included TimelinesContentView.js and TimelinesObject.js.
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject): Added check for TimelinesObject.
* UserInterface/TimelinesContentView.js: Added.
(WebInspector.TimelinesContentView):
* UserInterface/TimelinesObject.js: Added.
(WebInspector.TimelinesObject):
2012-02-18 Timothy Hatcher <timothy@apple.com>
Start implementing the user interface for the Instrument sidebar panel.
This adds the Loading, Rendering and Scripting tree elements to the top of the sidebar.
Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Images/Colors.png: Added.
* UserInterface/Images/Colors@2x.png: Added.
* UserInterface/Images/Network.png: Added.
* UserInterface/Images/Network@2x.png: Added.
* UserInterface/Images/Script.png: Added.
* UserInterface/Images/Script@2x.png: Added.
* UserInterface/InstrumentIcons.css: Added.
(.network-icon .icon):
(.colors-icon .icon):
(.script-icon .icon):
* UserInterface/InstrumentSidebarPanel.css: Added.
(.sidebar > .panel.instrument > .title-bar):
(.sidebar > .panel.instrument > .title-bar.timelines):
(.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines):
(.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item:not(:first-child):not(.selected)):
(.sidebar > .panel.instrument > .navigation-sidebar-panel-content-tree-outline.timelines .item.selected + .item):
(.sidebar > .panel.instrument > .title-bar.profiles):
(.sidebar > .panel.instrument > .content):
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel): Create the title abrs and tree outline.
* UserInterface/Main.html: Included InstrumentSidebarPanel.css and InstrumentIcons.css.
2012-02-18 Timothy Hatcher <timothy@apple.com>
Add support for hiding the disclosure triangle column for sidebar panels that don't have a hierarchy.
The only panel we have like this right now is Log, but Instrument will also use it.
Reviewed by Brian Weinstein.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Set HideDisclosureButtonsStyleClassName on the contentTreeOutlineElement.
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item): Remove a margin-top that was pushing all items down
for no good reason.
(.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons > .children): Added.
(.navigation-sidebar-panel-content-tree-outline > .children.hide-disclosure-buttons > .children): Added.
(.navigation-sidebar-panel-content-tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) .icon): Added.
(.navigation-sidebar-panel-content-tree-outline.hide-disclosure-buttons .item .disclosure-button): Added.
* UserInterface/NavigationSidebarPanel.js:
2012-02-18 Timothy Hatcher <timothy@apple.com>
Add WebInspector.InstrumentSidebarPanel.
Part of: <rdar://problem/10318728> Implement the Instrument sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/InstrumentSidebarPanel.js: Added.
(WebInspector.InstrumentSidebarPanel):
* UserInterface/Main.html: Included InstrumentSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an instance of InstrumentSidebarPanel.
2012-02-20 Jeff Miller <jeffm@apple.com>
Ignore files generated by Xcode inside WebInspectorUI.xcodeproj.
* WebInspectorUI.xcodeproj: Added property svn:ignore.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Fix a couple of issues where settings were not being retrieved or stored.
Reviewed by John Sullivan.
* UserInterface/Setting.js:
(WebInspector.Setting.prototype.get value): Make a copy of the default value so changes to object values don't modify the default value.
Switch a use of _name to _localStorageKey when checking if the key in in localStorage.
(WebInspector.Setting.prototype.set value): Use Object.shallowEqual to better check if objects are equal.
* UserInterface/Utilities.js:
(Object.defineProperty): Return early if a or b are null. null is an object, but Object.keys throws for null.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Fix an exception when using the Web Inspector with empty settings.
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Null check this._lastSelectedNodePathSetting.value
and this._lastSelectedNodePathSetting.value.path.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Prefix the setting keys in localStorage with "com.apple.WebInspector".
The Web Inspector is loaded from a file url it share localStorage with other local files.
This prevents conflicting with another key.
Reviewed by Brian Weinstein.
* UserInterface/Setting.js:
(WebInspector.Setting): Set _localStorageKey.
(WebInspector.Setting.prototype.get value): Use _localStorageKey.
(WebInspector.Setting.prototype.set value): Ditto.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Cache setting values locally to avoid JSON and localStorage when the value doesn't change often.
This mimics r107953 from open source with some style cleanup.
Reviewed by Brian Weinstein.
* UserInterface/Setting.js:
(WebInspector.Setting.prototype.get value): Return this._value if it exists.
(WebInspector.Setting.prototype.set value): Set _value.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Don't store settings in localStorage with values equal to the default value.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Ada Chan.
* UserInterface/Setting.js:
(WebInspector.Setting.prototype.set value): Call removeItem if the value equals the default value.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Remember the last selected DOM node between reloads and Inspector sessions.
Last part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Create the setting. Use _requestRootDOMNode.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Try to select the last DOM node
if the URL matches, otherwise just select the body or document element.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectNode): Added.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable.selectLastSelectedNode): Added.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Don't set rootDOMNode to null.
This minimizes DOM tree churn and better matches what the open source inspector does.
(WebInspector.DOMTreeContentView.prototype._requestRootDOMNode): Added helper.
(WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Remember the selected node path.
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._reset): Don't set rootDOMNode to null. DOMTreeContentView handles it.
2012-02-17 Timothy Hatcher <timothy@apple.com>
Minimize the number of times DOMTree's RootDOMNodeInvalidated event fires.
This was causing some DOM tree churn on reload. There is still some churn, but this helps.
Reviewed by Brian Weinstein.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree): Only add extra event listeners when not the main frame.
(WebInspector.DOMTree.prototype.get frame): Added for good measure, will be needed soon.
(WebInspector.DOMTree.prototype.requestRootDOMNode): Bump the request identifier.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check the request identifier.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
(WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
(WebInspector.DOMTree.prototype._nodeRemoved): Assert not the main frame.
(WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add support to the storage sidebar panel to restore the last content view.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.cookieForContentView): Added. Create a cookie based on the
type of the represented object.
(WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie.finalizeCookieChecking): Walk all the tree
elements and match them based on type alone. So if you were looking at cookies on one site, and later open the
inspector on another site, the new site's cookies will show.
(WebInspector.StorageSidebarPanel.prototype.showContentViewForCookie): Set a timeout to call finalizeCookieChecking.
(WebInspector.StorageSidebarPanel.prototype._checkTreeElementAgainstPendingContentViewCookie): Added.
(WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded): Call _checkTreeElementAgainstPendingContentViewCookie.
(WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Ditto.
(WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Ditto.
(WebInspector.StorageSidebarPanel.prototype._frameManifestAdded): Ditto.
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Style cleanup.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add support to the log sidebar panel to restore the last content view.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype.cookieForContentView): Added.
(WebInspector.LogSidebarPanel.prototype.showContentViewForCookie): Added.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add support to the resource sidebar panel to restore the last content view and select the resource in the sidebar.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.cookieForContentView): Added. Return a cookie with the resource URL.
(WebInspector.ResourceSidebarPanel.prototype.showContentViewForCookie): Added. Find the resource by URL and shows it.
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): Cleaned up to match showContentViewForCookie.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Call showContentViewForCookie if _cookieToShowWhenAvailable.
(WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Remove code that moved into showSourceCodeForFrame.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add support for remembering the last content view so it can potentially be restored next session.
This requires each sidebar to supply a cookie and restore it on load. No sidebars support it yet.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create setting objects for the responsible sidebar panel and cookie.
(WebInspector.sidebarPanelForRepresentedObject): Added. Broke out of contentBrowserTreeElementForRepresentedObject.
(WebInspector.contentBrowserTreeElementForRepresentedObject): Use sidebarPanelForRepresentedObject.
(WebInspector._updateCurrentContentViewCookie): Added. Asks the responsible sidebar panel for a cookie.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Call _updateCurrentContentViewCookie.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.cookieForContentView): Added stub.
(WebInspector.NavigationSidebarPanel.prototype.showContentViewForCookie): Added. Ditto.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.removeSidebarPanel): Use findSidebarPanel.
(WebInspector.Sidebar.prototype.set selectedSidebarPanel): Ditto.
(WebInspector.Sidebar.prototype.findSidebarPanel): Renamed from _findSidebarPanel.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Remember what view was last used for frames (DOM Tree or Source Code).
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Joseph Pecoraro.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Create a setting.
(WebInspector.FrameContentView.prototype.shown): Use the setting to call _showContentViewForIdentifier.
(WebInspector.FrameContentView.prototype._identifierForContentView): Added. Helper.
(WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Set the setting value.
2012-02-16 Timothy Hatcher <timothy@apple.com>
If the left sidebar is collapsed, then show the dock buttons in the content browser navigation bar.
Reviewed by Adam Roben.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Make a static dockButtonDividerNavigationItem. Remove inserts for the buttons.
(WebInspector.updateDockedState): Call _updateDockNavigationItems.
(WebInspector._updateDockNavigationItems): Added. Shows the buttons in the right navigation bar based on
docked and left sidebar collapsed state.
(WebInspector._sidebarCollapsedStateDidChange): Call _updateDockNavigationItems.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add a null check in resourceForURL, since the mainFrame can be null if called early enough.
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceForURL): Null check mainFrame.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ContentBrowser.Event.CurrentContentViewDidChange.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Fire the CurrentContentViewDidChange event.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Remember the expanded state of frames and folders in the resource sidebar panel.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement): Call _updateExpandedSetting.
(WebInspector.FrameTreeElement.prototype.onexpand): Added. Set the expanded setting value.
(WebInspector.FrameTreeElement.prototype.oncollapse): Added. Set the expanded setting value.
(WebInspector.FrameTreeElement.prototype.removeChildren): Delete the folder tree elements.
(WebInspector.FrameTreeElement.prototype._updateExpandedSetting): Added.
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Change the expanded setting since the frame URL has changed.
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Removed _shouldExpandWhenFirstChildIsAdded code.
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject.createFolderTreeElement): Added.
Sets up the onexpand and oncollapse listeners and creates a expanded setting.
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Use createFolderTreeElement.
(WebInspector.FrameTreeElement.prototype._folderTreeElementExpandedStateChange): Added. Set the expanded setting value.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove a call to expand, that is handled by FrameTreeElement now.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Support expanding a TreeElement before it has children, so it will expand once the first child is added.
Needed for: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/TreeOutline.js:
(TreeOutline.prototype.appendChild): Call expand if this is the first child.
(TreeOutline.prototype.insertChild): Ditto.
(TreeElement.prototype.expand): Set the expanded flag even if there are no children.
2012-02-16 Timothy Hatcher <timothy@apple.com>
Use a hash of the URL instead of the whole URL for remembering the last page searched.
This way the URL isn't cluttering localStorage for size and privacy reasons.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Adam Roben.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.performSearch): Use hash when setting
the _lastSearchedPageSetting.value.
(WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Use hash when comparing
with the _lastSearchedPageSetting.value.
* UserInterface/Utilities.js:
(String.prototype.hash): Added. Based on wtf/StringHasher.h (SuperFastHash) algorithm.
2012-02-15 Timothy Hatcher <timothy@apple.com>
Remember the search term and rerun the search when re-opening the inspector on the same page.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Store the inputElement on the object and add an event
listener for the MainFrameChanged event. Create the setting objects and restore the search term.
(WebInspector.SearchSidebarPanel.prototype.performSearch): Broken out from _searchFieldChanged.
(WebInspector.SearchSidebarPanel.prototype._searchFieldChanged): Call performSearch.
(WebInspector.SearchSidebarPanel.prototype._mainFrameDidChange): Added. Call performSearch
if the frame change is the first and the page is the same as the last time.
2012-02-15 Timothy Hatcher <timothy@apple.com>
Remember the filter bar filters for each navigation sidebar panel.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
Reviewed by Brian Weinstein.
* UserInterface/FilterBar.js:
(WebInspector.FilterBar.prototype.set filters): Added.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Create the filters setting.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter): Set the filters setting.
2012-02-15 Timothy Hatcher <timothy@apple.com>
Remember the collapsed state of sections in the details sidebar.
Part of: <rdar://problem/10854042> Remember aspects of the user interface customization
(sidebar state, last view, etc.)
Reviewed by Brian Weinstein.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel): Give identifiers to DetailsSections.
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel): Give identifiers to DetailsSections.
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel): Give identifiers to DetailsSections.
* UserInterface/DetailsSection.js:
(WebInspector.DetailsSection): Create a collapsed setting. Set collapsed to the value of the setting.
(WebInspector.DetailsSection.prototype.get identifier): Added.
(WebInspector.DetailsSection.prototype.set collapsed): Update the collapsed setting.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Give identifiers to DetailsSections.
2012-02-15 Timothy Hatcher <timothy@apple.com>
Remember the last selected navigation sidebar panel, the sidebar widths and their collapsed state.
<rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Listed for SidebarPanelSelected. Use _sidebarWidthDidChange for WidthDidChange.
Create setting objects for last selected navigation sidebar panel, the sidebar widths and their collapsed state.
(WebInspector._sidebarCollapsedStateDidChange): Update the collapsed settings.
(WebInspector._navigationSidebarPanelSelected): Added. Update the last selected navigation sidebar panel setting.
(WebInspector._sidebarWidthDidChange): Added. Update the width settings. Call _contentBrowserSizeDidChange.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set width): Return early if the width is the same. This avoids sending events
if the width didn't change.
(WebInspector.Sidebar.prototype.set collapsed): Return early if the collapsed state is the same. This avoids
sending events if the collapsed state didn't change.
2012-02-15 Timothy Hatcher <timothy@apple.com>
Add WebInspector.Setting from Open Source.
<rdar://problem/10854042> Remember aspects of the user interface customization (sidebar state, last view, etc.)
Reviewed by Brian Weinstein.
* UserInterface/Main.html: Included Setting.js.
* UserInterface/Setting.js: Added. Copied partially from OpenSource/Source/WebCore/inspector/front-end/Settings.js.
(WebInspector.Setting):
(WebInspector.Setting.prototype.get name):
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
2012-02-14 Brian Weinstein <bweinstein@apple.com>
<rdar://problem/10857306> Consider putting "Show Activity" menu item in Develop menu as mitigation for the old Activity window.
Reviewed by Tim Hatcher.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showResources): Make the resources panel the selected panel, and make it not collapsed.
2012-02-14 Timothy Hatcher <timothy@apple.com>
Tail truncate the search result title so the tooltip does not get too large.
<rdar://problem/10843369> Web Inspector should impose limit on tooltip size to avoid insanely large tooltips
Reviewed by John Sullivan.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title at the end to 50 characters max.
Use \u2026 instead of the actual ellipsis character since UTF8 in source code makes me nervous.
2012-02-14 Timothy Hatcher <timothy@apple.com>
Show failed resources when first opening the Web Inspector.
This is the Safari side of the Open Source r107715.
Follow up to: <rdar://problem/10843653>
Reviewed by Brian Weinstein.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._createResource): Set the loaderId for good measure.
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Check for failed and canceled.
2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
Allow the current ContentView to handle a "copy" event.
If the ContentView implements handleCopyEvent and there is
no window selection, we send the copy event to the ContentView.
Reviewed by Timothy Hatcher.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._beforecopy):
(WebInspector._copy):
Add support for passing copy event to a ContentView implementing handleCopyEvent.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.handleCopyEvent):
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.handleCopyEvent):
A DOMTreeContentView allows copying the current selected element.
2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
<rdar://problem/10854052> Cmd-C (and Copy menu item) don't work for selected line in DOM Tree
Merge r105679 from Open Source's frontend to get the "Copy as HTML"
context menu working.
Reviewed by Timothy Hatcher.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype.copyNode):
2012-02-13 Joseph Pecoraro <pecoraro@apple.com>
Make RemoteDebugger work on 10.7.3.
When the front-end is run on an earlier Lion system, such as
SULionDuchess in RemoteDebugger.app, it fails because
Function.prototype.bind is unavailable. Since this appears to be the
only deficiency at the moment, lets define it when its not available.
Reviewed by Timothy Hatcher.
* UserInterface/Main.html:
Move Utilities.js earlier.
* UserInterface/Utilities.js:
Provide a Function.prototype.bind implementation when unavailable.
2012-02-13 Timothy Hatcher <timothy@apple.com>
Make failed resources show up with red text in the sidebar and show an error message when selected.
<rdar://problem/10843653> Failed resources have no visible distinction in the new Web Inspector
Reviewed by Brian Weinstein.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.addClassName): Added.
(WebInspector.GeneralTreeElement.prototype.removeClassName): Added.
* UserInterface/ImageResourceContentView.js:
(WebInspector.ImageResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
* UserInterface/Main.css:
(.message-text-view): Reduced the line-height and added some padding.
(.message-text-view.error): Changed the color of red to a ddarker shade.
(.message-text-view.error::before): Added. Show an error icon.
* UserInterface/Main.html:
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Added issue event listener and issue code from TextResourceContentView.
(WebInspector.ResourceContentView.prototype.contentAvailable): Removed resource parameter.
(WebInspector.ResourceContentView.prototype.addIssue): Added.
(WebInspector.ResourceContentView.prototype.closed): Remove issue event listener.
(WebInspector.ResourceContentView.prototype._contentAvailable): Added.
(WebInspector.ResourceContentView.prototype._issueWasAdded): Added.
* UserInterface/ResourceTreeElement.css: Added.
(.item.resource.failed): Color text red.
(.item.resource.failed .subtitle): Ditto.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement): Add the resource style class.
(WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Add or remove the failed style class.
(WebInspector.ResourceTreeElement.prototype._typeDidChange): Use addClassName and removeClassName.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Removed the issue code, it is now in ResourceContentView.
(WebInspector.TextResourceContentView.prototype.contentAvailable): Removed FIXME and resource parameter.
(WebInspector.TextResourceContentView.prototype.addIssue): Show a full error message if there is no content yet.
2012-02-13 Timothy Hatcher <timothy@apple.com>
Fix a bug where opening the Inspector while loading a page could cause a subresource that just finished loading
to be shown in the Inspector as the main resource.
Reviewed by Brian Weinstein.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.initialize): Set _waitingForMainFrameResourceTreePayload.
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Return early if _waitingForMainFrameResourceTreePayload.
(WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Ditto.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
(WebInspector.FrameResourceManager.prototype._addResourceToFrame): Ditto.
(WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Delete _waitingForMainFrameResourceTreePayload.
Also clear the _resourceRequestIdentifierMap and _frameIdentifierMap maps.
2012-02-13 Timothy Hatcher <timothy@apple.com>
Make sure the sidebar tree is ready before showing the source code in response to a Show Page Source user action.
Also reveal and select the frame in the Resource sidebar for which the source was shown.
<rdar://problem/10855004> File path components are missing when using Show Page Source menu item
Reviewed by Brian Weinstein.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. A custom implementation is
needed for this since the frames are populated lazily.
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.getParent): Added.
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor): Added.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Check for _frameIdentifierToShowSourceCodeWhenAvailable
and call showSourceCodeForFrame.
(WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): Return early if the main frame tree element isn't
in the sidebar tree outline yet.
2012-02-13 Timothy Hatcher <timothy@apple.com>
Remove the "Create RemoteWebInspector.framework symlinks" build phase now that all
clients are off the old framework.
This also fixes a build error seen in the archive builders.
<rdar://problem/10828236> Remove Symlinks for RemoteWebInspector.framework
Rubber-stamped by Joseph Pecoraro.
* WebInspectorUI.xcodeproj/project.pbxproj: Removed "Create RemoteWebInspector.framework symlinks".
2012-02-12 Timothy Hatcher <timothy@apple.com>
Enable localization of the new Web Inspector again.
<rdar://problem/10688721>
Reviewed by John Sullivan.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.js:
(WebInspector.UIString): Lookup the string in window.localizedStrings again.
2012-02-11 Timothy Hatcher <timothy@apple.com>
Minify the CSS and JavaScript resources in Production builds.
<rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
Reviewed by Joseph Pecoraro.
* Scripts/cssmin.py: Added.
* Scripts/jsmin.py: Copied from Safari/Reader/jsmin.py.
* WebInspectorUI.xcodeproj/project.pbxproj: Call cssmin.py on Main.css and jsmin.py on Main.js.
2012-02-11 Timothy Hatcher <timothy@apple.com>
Remove console.assert() calls from Productions builds.
<rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
Reviewed by Joseph Pecoraro.
* Scripts/remove-console-asserts.pl: Added.
* WebInspectorUI.xcodeproj/project.pbxproj: Call remove-console-asserts.pl on the combined Main.js file.
2012-02-11 Timothy Hatcher <timothy@apple.com>
Combine scripts and stylesheets into single files in Production builds.
<rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
Reviewed by Joseph Pecoraro.
* Scripts/combine-resources.pl: Added.
* Scripts/copy-user-interface-resources.sh: Call combine-resources.pl in Production builds.
* UserInterface/Main.html: Removed a FIXME comment that gets in the way of combine-resources.pl.
* WebInspectorUI.xcodeproj/project.pbxproj: Added combine-resources.pl.
2012-02-11 Timothy Hatcher <timothy@apple.com>
Build the user interface files into the WebInspector framework.
<rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
Reviewed by Joseph Pecoraro.
* Configurations/Base.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR and WEBCORE_PRIVATE_HEADERS_DIR.
* Configurations/DebugRelease.xcconfig: Added WEBKIT_UMBRELLA_FRAMEWORKS_DIR for engineering builds.
* Scripts/copy-user-interface-resources.sh: Added.
* WebInspectorUI.xcodeproj/project.pbxproj: Added UserInterface folder, localizedStrings.js,
Copy User Interface Resources and Copy WebCore Inspector Resources build phases.
2012-02-11 Timothy Hatcher <timothy@apple.com>
Move Safari/Develop/WebInspector to WebInspector/UserInterface.
<rdar://problem/10408292> Master the new Web Inspector resources into a separate framework
Reviewed by Joseph Pecoraro.
* ChangeLog: Copied over the Safari/ChangeLog entries with changes in Safari/Develop/WebInspector.
* UserInterface: Renamed from Safari/Develop/WebInspector.
2012-02-10 Timothy Hatcher <timothy@apple.com>
Copy over StylesSidebarPane.js from Open Source and break it up into one class per file.
Part of: <rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/BlankStylePropertiesSection.js: Copied from OpenSource/Source/WebCore/inspector/front-end/StylesSidebarPane.js.
* UserInterface/CSSPropertyPrompt.js: Ditto.
* UserInterface/ComputedStylePropertiesSection.js: Ditto.
* UserInterface/StylePropertiesSection.js: Ditto.
* UserInterface/StylePropertyTreeElement.js: Ditto.
2012-02-10 Timothy Hatcher <timothy@apple.com>
Collapse bread-crumb compoenents in the middle when there ins't enough room to show them all.
This keeps the important ones (the ends) on the screen while hiding the less important middle.
Reviewed by Brian Weinstein.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path-component.hidden): Added.
(.hierarchical-path-component.collapsed): Added.
(.hierarchical-path-component.collapsed > .icon): Added.
(.hierarchical-path-component.collapsed > .title): Added.
(.hierarchical-path-component.collapsed > select): Added.
(.hierarchical-path-component > .separator): Added.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype.get hidden): Added.
(WebInspector.HierarchicalPathComponent.prototype.set hidden): Added.
(WebInspector.HierarchicalPathComponent.prototype.get collapsed): Added.
(WebInspector.HierarchicalPathComponent.prototype.set collapsed): Added.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components): Delete _collapsedComponent.
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Loop through the components starting
at the middle and fanning out in each direction to collapse until widthToRemove depleted.
2012-02-10 Brian Weinstein <bweinstein@apple.com>
Show page and frame source using the new inspector if it is enabled.
When the user selects Show Page Source from the Develop menu or Show Page Source or Show Frame Source
from the context menu, call new WKInspector API if we are using the new inspector.
<rdar://problem/10830076> Show Page Source should open the new Web Inspector to the page source
<rdar://problem/10844831> Show Frame Source should open the new Web Inspector to that frame's source
Reviewed by Tim Hatcher.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame): Call through to the ResourceSidebarPanel.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.showSourceCodeForFrame): If we have a Frame object for
the frame ID we were given, find its content view and show the source for it. If there isn't a frame
object yet, store the frame ID for the frame we want to show.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): If we want to show a frame ID when it becomes
available, then return early before showing the main resource.
(WebInspector.ResourceSidebarPanel.prototype._frameWasAdded): If we are waiting to show a frame's source, and it
was just added, then call showSourceCodeForFrame.
2012-02-09 Timothy Hatcher <timothy@apple.com>
Set a default tooltip for GeneralTreeElements if there isn't a custom one already assigned.
This gives the user a way to read truncated titles for all the sidebar tree elements.
Reviewed by Brian Weinstein.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleElements): Build a tool tip based on the
main title and subtitle.
2012-02-09 Brian Weinstein <bweinstein@apple.com>
Clean up the code to set the titles of application cache manifest and frame tree elements.
This patch moves the responsibility of generating titles and subtitles for the application cache
manifests and frames from their represented objects to the tree elements.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrame.js: Moved code from here...
* UserInterface/ApplicationCacheFrameTreeElement.js: ... to here.
(WebInspector.ApplicationCacheFrameTreeElement): Pass a blank title, it will be populated by updateTitles, and then call updateTitles.
(WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles): Set the
mainTitle and the subtitle on the GeneralTreeElement.
* UserInterface/ApplicationCacheManifest.js: Moved code from here...
* UserInterface/ApplicationCacheManifestTreeElement.js: ... to here.
(WebInspector.ApplicationCacheManifestTreeElement): Pass an empty title. StorageTreeElement will populate it when the flattened variable
is set.
(WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Call _generateTitles
if necessary, and then return the name.
(WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Call _generateTitles if necessary, and then
return the secondary name.
(WebInspector.ApplicationCacheManifestTreeElement.prototype._generateTitles): Moved from ApplicationCacheManifest.js.
2012-02-09 Brian Weinstein <bweinstein@apple.com>
Implement a better titling scheme for application cache manifests and frames.
This patch reworks the titles and subtitles of application cache manifests and frames.
For the manifest, if it is collapsed, it will say: Application Cache - Manifest Name.
If it isn't collapsed (there is a top level "Application Cache" folder), then it will say: Manifest Name - Host Name.
For the frame, the main title will be the last path component of the frame (if it exists), or the host. The subtitle
will be the host, if the host isn't the same as the main title of the frame, or the subtitle of the application cache
manifest's tree element.
Rest of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrame.js:
(WebInspector.ApplicationCacheFrame.prototype.get title): Call _generateTitles, which doesn't return a title anymore.
(WebInspector.ApplicationCacheFrame.prototype.get subtitle): Call _generateTitles and return this._subtitle.
(WebInspector.ApplicationCacheFrame.prototype.clearTitles): Set the subtitle and main title to null, and call _generateTitles.
(WebInspector.ApplicationCacheFrame.prototype._generateTitles): Clean up the code to generate a main title, and generate
a subtitle as well.
* UserInterface/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement): Pass the title and the subtitle.
(WebInspector.ApplicationCacheFrameTreeElement.prototype.constructor.WebInspector.ApplicationCacheFrameTreeElement.updateTitles):
Clear the titles on the represented object, and set the mainTitle and subtitle on the tree element to their new values.
* UserInterface/ApplicationCacheManifest.js:
(WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitles.
(WebInspector.ApplicationCacheManifest.prototype.get subtitle): Ditto.
(WebInspector.ApplicationCacheManifest.prototype._generateTitles): Clean up the code to generate a main title and also generate
a subtitle.
* UserInterface/ApplicationCacheManifestTreeElement.js:
(WebInspector.ApplicationCacheManifestTreeElement.prototype.get secondaryName): Get the represented object's subtitle.
* UserInterface/StorageTreeElement.js:
(WebInspector.StorageTreeElement): Use the flattened setter instead of setting the variable. The setter does a bit more work
that we need to do.
(WebInspector.StorageTreeElement.prototype.set flattened): Add the ability to set a subtitle when we are not flattened. If the
flattening changes, call _updateChildrensTitles.
(WebInspector.StorageTreeElement.prototype._updateChildrensTitles): Call updateTitles for each child that has updateTitles in their
prototype.
2012-02-09 Brian Weinstein <bweinstein@apple.com>
Have ApplicationCacheFrameContentView listen for when application cache statuses change.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView): Add an event listener.
(WebInspector.ApplicationCacheFrameContentView.prototype.closed): Remove an event listener.
(WebInspector.ApplicationCacheFrameContentView.prototype._updateStatus): Call through to updateStatus.
2012-02-09 Brian Weinstein <bweinstein@apple.com>
Remove a bunch of dead code from ApplicationCacheFrameContentView.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView):
(WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus):
2012-02-09 Brian Weinstein <bweinstein@apple.com>
Add icons for application cache manifest and frame tree elements.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Tim Hatcher.
* UserInterface/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement): Set a class name.
* UserInterface/ApplicationCacheManifestTreeElement.js:
(WebInspector.ApplicationCacheManifestTreeElement): Ditto.
* UserInterface/ApplicationCacheIcons.css: Added.
* UserInterface/Images/ApplicationCache.png: Added.
* UserInterface/Images/ApplicationCache@2x.png: Added.
* UserInterface/Main.html: Add new file.
2012-02-09 Timothy Hatcher <timothy@apple.com>
Fix a file not found error in the Web Inspector.
Reviewed by Brian Weinstein.
* UserInterface/IndeterminateProgressSpinner.css:
(.indeterminate-progress-spinner): Use IndeterminateProgressSpinner1.pdf instead of IndeterminateProgressSpinner.pdf.
2012-02-09 Timothy Hatcher <timothy@apple.com>
Don't add event listeners in the ContentView "shown" functions.
This was leading to duplicate listeners if the content view was hidden and shown multiple times.
Reviewed by Brian Weinstein.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView): Add the event listener here...
(WebInspector.ClusterContentView.prototype.shown): ... instead of here.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Add the event listener here...
(WebInspector.DOMTreeContentView.prototype.shown): ... instead of here.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Add the event listener here.
(WebInspector.ResourceContentView.prototype.shown): Removed.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Add the event listener here...
(WebInspector.TextResourceContentView.prototype.shown): ... instead of here.
(WebInspector.TextResourceContentView.prototype.hidden): Don't remove the event listener here...
(WebInspector.TextResourceContentView.prototype.closed): ... remove it here instead.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Update the details sidebar when the network state or the frame manifest state changes.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Call _refreshOnlineRow and _refreshStatusRow.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._networkStateUpdated): Call _refreshOnlineRow.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._frameManifestStatusChanged): If the frame that changed
matches ours, call _refreshStatusRow.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshOnlineRow): Set the text of the online row.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype._refreshStatusRow): Set the text of the status row.
* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager.prototype.networkStateUpdated):
(WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Make sure we update the status of an existing cache frame in _frameManifestUpdated.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrame.js:
(WebInspector.ApplicationCacheFrame.prototype.set status): Add a setter.
* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): If we already have an ApplicationCacheFrame,
make sure to set the status when it changes.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Add a status section to the details sidebar that shows the application cache status and whether the user is online
or offline.
This doesn't listen to changes in state while the sidebar is showing yet, but it will in the next patch.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Add the manifest URL and the frame URL that loaded the manifest to the details sidebar.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel): Create a start to our structure of groups and rows.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.get applicationCacheFrame): Return the application cache frame.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame): Set the application cache frame and say
we need a refresh.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Set the data in our rows.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Add a basic ApplicationCacheDetailsSidebarPanel, and make it be enabled at the right time.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheDetailsSidebarPanel.js: Added.
(WebInspector.ApplicationCacheDetailsSidebarPanel): Call the DetailsSidebarPanel constructor.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.constructor.WebInspector.ApplicationCacheDetailsSidebarPanel.inspect): Determine
if one of the selected objects is an ApplicationCacheFrame.
(WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.refresh): Add a FIXME.
* UserInterface/Main.html: Add a new file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create the ApplicationCacheDetailsSidebarPanel.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Create an ApplicationCacheFrameContentView when an ApplicationCacheFrameTreeElement is selected.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Implement some needed functions in ApplicationCacheManager to handle calls from ApplicationCacheObserver and
ApplicationCacheFrameContentView.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager):
(WebInspector.ApplicationCacheManager.prototype.networkStateUpdated): Update the online state, and add a FIXME to fire an event.
(WebInspector.ApplicationCacheManager.prototype.get online):
(WebInspector.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
(WebInspector.ApplicationCacheManager.prototype.requestApplicationCache):
* UserInterface/ApplicationCacheObserver.js:
(WebInspector.ApplicationCacheObserver.prototype.constructor.WebInspector.ApplicationCacheObserver.applicationCacheStatusUpdated):
(WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Implement Number.bytesToString.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/Utilities.js:
(Number.string_appeared_here.value):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Make more of ApplicationFrameContentView work.
Add some styling, and make some of the code in ApplicationFrameContentView match our mannerisms. There are a couple
places we ask the ApplicationCacheManager for data. These functions don't exist yet, but they will in the next patch.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrameContentView.css: Added.
(.content-view.application-cache-frame > .data-grid):
(.content-view.application-cache-frame .hidden):
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView): Create our version of an empty view instead of open source's. Ask the application
cache manager for data.
(WebInspector.ApplicationCacheFrameContentView.prototype.shown): Use our correct method name.
(WebInspector.ApplicationCacheFrameContentView.prototype.hidden): Ditto.
(WebInspector.ApplicationCacheFrameContentView.prototype._maybeUpdate): Check this.visible instead of isVisible().
(WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus): Ditto.
(WebInspector.ApplicationCacheFrameContentView.prototype._update): Ask the application cache manager for data.
(WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback): Use our functions to hide and show the empty views / datagrids.
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid): Ditto.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Do some clean-up of ApplicationCacheFrameContentView.
Change the argument it takes to a represented object, have it inherit from ContentView, and remove calls to add/removeStyleClass.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView):
(WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Bring in ApplicationCacheItemsView from open source as ApplicationCacheFrameContentView.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrameContentView.js: Added. Copied from open source.
2012-02-07 Brian Weinstein <bweinstein@apple.com>
Add tree elements for application cache manifests and frames that have an application cache.
When the document adds or removes frames from the application cache, ApplicationCacheManager fires events. The storage sidebar
panel listens for these events and updates the state of the tree elements in the sidebar panel. Currently, we only add
sidebar items, but removing them will be added in a future patch.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
(WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype._frameManifestAdded):
(WebInspector.StorageSidebarPanel.prototype._frameManifestRemoved):
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2012-02-06 Brian Weinstein <bweinstein@apple.com>
Add tree elements for application cache frames and application cache manifests.
They aren't used yet, but will be used by the StorageSidebarPanel in a later patch.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrameTreeElement.js: Added.
(WebInspector.ApplicationCacheFrameTreeElement): Basic tree element subclass with a FIXME for an icon.
* UserInterface/ApplicationCacheManifest.js:
(WebInspector.ApplicationCacheManifest.prototype.get title): Call _generateTitle if we don't already have one.
(WebInspector.ApplicationCacheManifest.prototype._generateTitle): Try and get a title from the manifest URL's last path component, host
or the whole URL.
* UserInterface/ApplicationCacheManifestTreeElement.js: Added.
(WebInspector.ApplicationCacheManifestTreeElement): Inherits from StorageTreeElement.
(WebInspector.ApplicationCacheManifestTreeElement.prototype.constructor.WebInspector.ApplicationCacheManifestTreeElement.get name): Get the
represented object's title.
(WebInspector.ApplicationCacheManifestTreeElement.prototype.get categoryName): return Application Cache.
* UserInterface/Main.html: Add new files.
2012-02-06 Brian Weinstein <bweinstein@apple.com>
Implement the callback functions when we get information about the application cache. We create the necessary
application cache objects now, but don't create tree elements or notify the storage sidebar panel about them
yet.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager): Listen for when child frames are removed.
(WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Get the
frames with application caches here..
(WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): .. Instead of here.
(WebInspector.ApplicationCacheManager.prototype._childFrameWasRemoved): Call _frameManifestRemoved.
(WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): If the frame doesn't have a manifest URL,
call _frameManifestRemoved.
(WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Call _frameManifestUpdated for all frames
that have manifests.
(WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated): Create a frame manifest object if it is necessary,
and add FIXMEs to fire some events about the application cache state.
(WebInspector.ApplicationCacheManager.prototype._frameManifestRemoved): Remove the manifest object for this frame.
2012-02-06 Brian Weinstein <bweinstein@apple.com>
Add ApplicationCacheFrame and ApplicationCacheManifest. These are just simple objects that wrap a few properties.
More of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheFrame.js: Added.
(WebInspector.ApplicationCacheFrame):
(WebInspector.ApplicationCacheFrame.prototype.constructor.WebInspector.ApplicationCacheFrame.get frame):
(WebInspector.ApplicationCacheFrame.prototype.get manifest):
(WebInspector.ApplicationCacheFrame.prototype.get status):
* UserInterface/ApplicationCacheManifest.js: Added.
(WebInspector.ApplicationCacheManifest):
(WebInspector.ApplicationCacheManifest.prototype.constructor.WebInspector.ApplicationCacheManifest.get manifestURL):
* UserInterface/Main.html:
2012-02-06 Brian Weinstein <bweinstein@apple.com>
Add ApplicationCacheManager, and have it listen for when frames navigate, and call some ApplicationCacheAgent
methods to get data from WebCore.
We don't do anything with this data yet, but will in follow-up patches.
Part of <rdar://problem/10642953> Implement Application Cache sidebar items and content views for new web inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ApplicationCacheManager.js: Added.
(WebInspector.ApplicationCacheManager): Initialize the ApplicationCacheAgent, and add a listener for when frames navigate.
(WebInspector.ApplicationCacheManager.prototype.constructor.WebInspector.ApplicationCacheManager.initialize): Clear our (always empty)
list of application cache objects.
(WebInspector.ApplicationCacheManager.prototype._mainResourceDidChange): Get the list of frames with application caches if the main frame
navigated. If it was a subframe, check the status of the application cache for the subframe.
(WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded): Stub.
(WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded): Ditto.
* UserInterface/Main.html: Add new file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an ApplicationCacheManager.
2012-02-06 Timothy Hatcher <timothy@apple.com>
Show the full URL in the tool tip for resources in the Web Inspector.
Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
Reviewed by Brian Weinstein.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateResource): Call _updateToolTip.
(WebInspector.ResourceTreeElement.prototype._updateToolTip): Added.
(WebInspector.ResourceTreeElement.prototype._urlDidChange): Call _updateToolTip.
2012-02-06 Timothy Hatcher <timothy@apple.com>
Make double-click in the Web Inspector Resource sidebar open the resource in a new Safari tab/window.
This is like the Activity window, which we want to replace with the new Web Inspector.
Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
Reviewed by Brian Weinstein.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.ondblclick): Added.
2012-02-06 Timothy Hatcher <timothy@apple.com>
Fix an error on reload in the Web Inspector where the main resource would not be marked as finished, so the source
would never display and the spinner in the sidebar would never go away.
Reviewed by Brian Weinstein.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Only reuse the main resource
or provisional main resource if the loader identifiers match.
2012-02-06 Timothy Hatcher <timothy@apple.com>
Show a spinner in resource content views while waiting for content to become available.
Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
Reviewed by Brian Weinstein.
* UserInterface/Main.html:
* UserInterface/ResourceContentView.css: Added.
(.content-view.resource > .indeterminate-progress-spinner):
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Append a spinner.
2012-02-06 Timothy Hatcher <timothy@apple.com>
Show a progress spinner in the Resource sidebar next to resources that are still loading.
Part of: <rdar://problem/10259020> Improve Web Inspector's view of per-page resources enough that Activity window can be eliminated
Reviewed by Brian Weinstein.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement): Initialize status to "".
(WebInspector.GeneralTreeElement.prototype.get status): Added.
(WebInspector.GeneralTreeElement.prototype.set status): Added.
(WebInspector.GeneralTreeElement.prototype.onattach): Call _updateStatusElement.
(WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded): Create the status element.
(WebInspector.GeneralTreeElement.prototype._updateStatusElement): Added.
* UserInterface/Images/IndeterminateProgressSpinner1.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner10.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner11.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner12.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner2.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner3.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner4.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner5.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner6.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner7.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner8.pdf: Added.
* UserInterface/Images/IndeterminateProgressSpinner9.pdf: Added.
* UserInterface/IndeterminateProgressSpinner.css: Added.
* UserInterface/IndeterminateProgressSpinner.js: Added.
(WebInspector.IndeterminateProgressSpinner):
(WebInspector.IndeterminateProgressSpinner.prototype.get element):
* UserInterface/Main.html:
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item .status):
(.navigation-sidebar-panel-content-tree-outline .item .status:empty):
(.navigation-sidebar-panel-content-tree-outline .item.small .status):
(.navigation-sidebar-panel-content-tree-outline .item.small .status .indeterminate-progress-spinner):
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .status):
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateResource): Add event listeners and call _updateLoadingStatus.
(WebInspector.ResourceTreeElement.prototype._updateLoadingStatus): Added. Sets status to a spinner when loading.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Use PDFs for the user input prompt and result icons.
Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
Reviewed by Sam Weinig.
* UserInterface/DatabaseContentView.css:
(.database-query-prompt::before): Use Use UserInputPrompt.pdf.
* UserInterface/Images/UserInputPrompt.pdf: Added.
* UserInterface/Images/UserInputResult.pdf: Added.
* UserInterface/Images/userInputIcon.png: Removed.
* UserInterface/Images/userInputResultIcon.png: Removed.
* UserInterface/LogContentView.css:
(#console-prompt::before): Use UserInputPrompt.pdf.
(.console-user-command-result.console-log-level::before): Use UserInputResult.pdf.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Use PDFs for the error and wrning icons.
Part of: <rdar://problem/10643175> DataGrid and the DOM tree and the Console should be HiDPI compliant
Reviewed by Sam Weinig.
* UserInterface/DatabaseContentView.css:
(.database-query-result.error::before): Use ErrorSmall.pdf.
* UserInterface/Images/ErrorSmall.pdf: Added.
* UserInterface/Images/WarningSmall.pdf: Added.
* UserInterface/Images/errorIcon.png: Removed.
* UserInterface/Images/warningIcon.png: Removed.
* UserInterface/LogContentView.css:
(.console-error-level::before): Use ErrorSmall.pdf.
(.console-warning-level::before): Use WarningSmall.pdf.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Remove unused code and images from the log content view for status bar items and filtering.
Reviewed by Joseph Pecoraro.
* UserInterface/Images/deleteIcon.png: Removed.
* UserInterface/Images/searchSmallBrightBlue.png: Removed.
* UserInterface/LogContentView.css:
(.console-debug-level::before): Use a background color instead of an image. The debug
level is not used by the new Web Inspector.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Removed creation code for status bar items and filtering.
(WebInspector.LogContentView.prototype.evalInInspectedWindow): Pass undefined for the context.
* UserInterface/Section.css:
(.section .properties .delete-button): Removed.
(.section .properties li.hovered .delete-button): Removed.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Update LogContentView to work with the new Web Inspector's ContentView instead of the old View.
Reviewed by Joseph Pecoraro.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.hidden): Renamed from willHide. Call storeScrollPositions.
(WebInspector.LogContentView.prototype.shown): Renamed from willShow. Merged with afterShow.
(WebInspector.LogContentView.prototype.storeScrollPositions): Removed WebInspector.View.prototype call.
(WebInspector.LogContentView.prototype.restoreScrollPositions): Ditto.
(WebInspector.LogContentView.prototype.updateLayout): Renamed from onResize.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Make the "Show Error Console" develop menu item work with the new Web Inspector.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.get currentContentView): Added.
(WebInspector.ContentBrowser.prototype.canGoBack): Use this.currentContentView.
(WebInspector.ContentBrowser.prototype.canGoForward): Ditto.
(WebInspector.ContentBrowser.prototype.goBack): Ditto.
(WebInspector.ContentBrowser.prototype.goForward): Ditto.
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Ditto.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Ditto.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole): Call LogSidebarPanel.showCurrentLog.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype.showCurrentLog):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Don't select the main frame
if there is already a content view showing.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork): Ditto.
2012-02-04 Timothy Hatcher <timothy@apple.com>
Fix an infinite loop when doing "Show Error Console" or any of the Inspector develop menu items.
<rdar://problem/10801359> Hitting Cmd-Opt-C (Develop -> Show Error Console) causes WebProcess
to freak out (100% CPU, GBs of RAM)
Reviewed by Joseph Pecoraro.
* UserInterface/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadCompleted): Set _loaded before calling dispatch, otherwise dispatch
will keep append commands to _pendingCommands and the for loop will never finish.
2012-02-02 Timothy Hatcher <timothy@apple.com>
Add the Box Model to the Appearance details sidebar panel.
Last part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/AppearanceDetailsSidebarPanel.js:
(WebInspector.AppearanceDetailsSidebarPanel):
(WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
* UserInterface/BoxModelDetailsSectionRow.css: Added.
* UserInterface/BoxModelDetailsSectionRow.js: Copied from OpenSource/Source/WebCore/inspector/front-end/MetricsSidebarPane.js.
Modified to use DOMTreeManager and CSSStyleManager and other minor renames to work in the new inspector.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.get forcedPseudoClasses): Added stub with FIXME.
* UserInterface/Main.html: Included BoxModelDetailsSectionRow.{css,js}.
2012-02-02 Timothy Hatcher <timothy@apple.com>
Add WebInspector.AppearanceDetailsSidebarPanel, future home for the box-model diagram.
Part of: <rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/AppearanceDetailsSidebarPanel.js: Added.
(WebInspector.AppearanceDetailsSidebarPanel):
(WebInspector.AppearanceDetailsSidebarPanel.prototype.refresh): Call _refreshBoxModel.
(WebInspector.AppearanceDetailsSidebarPanel.prototype._refreshBoxModel):
* UserInterface/Main.html: Included AppearanceDetailsSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an instance of AppearanceDetailsSidebarPanel.
2012-02-02 Timothy Hatcher <timothy@apple.com>
Replace WebInspector.domAgent use with WebInspector.domTreeManager.
Needed for:
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.setRuleSelector.callback):
(WebInspector.CSSStyleManager.prototype.addRule.callback):
(WebInspector.CSSStyleManager.prototype._ownerDocumentId):
2012-02-02 Timothy Hatcher <timothy@apple.com>
Create a singelton WebInspector.CSSStyleManager instance.
Needed for:
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-02-02 Timothy Hatcher <timothy@apple.com>
WebInspector.CSSStyleModel to WebInspector.CSSStyleManager.
Also rename WebInspector.CSSStyleModel.Events to WebInspector.CSSStyleManager.Event
and delete some calls in the CSSStyleManager constructor we don't need.
Needed for:
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.parseRuleArrayPayload):
(WebInspector.CSSStyleManager.prototype.getMatchedStylesAsync):
(WebInspector.CSSStyleManager.prototype.mediaQueryResultChanged):
(WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.if):
(WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged.mycallback):
(WebInspector.CSSStyleManager.prototype._fireStyleSheetChanged):
2012-02-02 Timothy Hatcher <timothy@apple.com>
Copy over classes from open source's CSSStyleModel.js.
Needed for:
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/CSSMedia.js: Added.
(WebInspector.CSSMedia):
(WebInspector.CSSMedia.parsePayload):
(WebInspector.CSSMedia.parseMediaArrayPayload):
* UserInterface/CSSProperty.js: Added.
(WebInspector.CSSProperty):
(WebInspector.CSSProperty.parsePayload):
(WebInspector.CSSProperty.prototype.get propertyText):
(WebInspector.CSSProperty.prototype.get isLive):
(WebInspector.CSSProperty.prototype.get active):
(WebInspector.CSSProperty.prototype.get styleBased):
(WebInspector.CSSProperty.prototype.get inactive):
(WebInspector.CSSProperty.prototype.get disabled):
(WebInspector.CSSProperty.prototype.setText):
(WebInspector.CSSProperty.prototype.setText.callback):
(WebInspector.CSSProperty.prototype.setValue):
(WebInspector.CSSProperty.prototype.setDisabled.callback):
(WebInspector.CSSProperty.prototype.setDisabled):
* UserInterface/CSSRule.js: Added.
(WebInspector.CSSRule):
(WebInspector.CSSRule.parsePayload):
(WebInspector.CSSRule.prototype.get isUserAgent):
(WebInspector.CSSRule.prototype.get isUser):
(WebInspector.CSSRule.prototype.get isViaInspector):
(WebInspector.CSSRule.prototype.get isRegular):
* UserInterface/CSSStyleDeclaration.js: Added.
(WebInspector.CSSStyleDeclaration):
(WebInspector.CSSStyleDeclaration.buildShorthandValueMap):
(WebInspector.CSSStyleDeclaration.parsePayload):
(WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
(WebInspector.CSSStyleDeclaration.prototype.get allProperties):
(WebInspector.CSSStyleDeclaration.prototype.getLiveProperty):
(WebInspector.CSSStyleDeclaration.prototype.getPropertyValue):
(WebInspector.CSSStyleDeclaration.prototype.getPropertyPriority):
(WebInspector.CSSStyleDeclaration.prototype.getPropertyShorthand):
(WebInspector.CSSStyleDeclaration.prototype.isPropertyImplicit):
(WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands):
(WebInspector.CSSStyleDeclaration.prototype.getLonghandProperties):
(WebInspector.CSSStyleDeclaration.prototype.getShorthandValue):
(WebInspector.CSSStyleDeclaration.prototype.getShorthandPriority):
(WebInspector.CSSStyleDeclaration.prototype.propertyAt):
(WebInspector.CSSStyleDeclaration.prototype.pastLastSourcePropertyIndex):
(WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
(WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
(WebInspector.CSSStyleDeclaration.prototype.appendProperty):
* UserInterface/CSSStyleManager.js: Added.
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.parseRuleArrayPayload):
(WebInspector.CSSStyleModel.prototype.getMatchedStylesAsync):
(WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
(WebInspector.CSSStyleModel.prototype.getInlineStylesAsync):
(WebInspector.CSSStyleModel.prototype.setRuleSelector):
(WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
(WebInspector.CSSStyleModel.prototype.addRule):
(WebInspector.CSSStyleModel.prototype.addRule.callback):
(WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
(WebInspector.CSSStyleModel.prototype._ownerDocumentId):
(WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.if):
(WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged.mycallback):
(WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
(WebInspector.CSSStyleModel.prototype.setStyleSheetText):
* UserInterface/CSSStyleSheet.js: Added.
(WebInspector.CSSStyleSheet):
(WebInspector.CSSStyleSheet.createForId):
(WebInspector.CSSStyleSheet.prototype.getText):
(WebInspector.CSSStyleSheet.prototype.setText):
* UserInterface/Main.html:
2012-02-02 Timothy Hatcher <timothy@apple.com>
Fix asserts in the Web Inspector when loading a loopinsight.com article.
Reviewed by Brian Weinstein.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.constructor.WebInspector.Frame.initialize): Don't disassociate from the
old main resource if it didn't change.
(WebInspector.Frame.prototype.commitProvisionalLoad): Ditto.
2012-02-01 Timothy Hatcher <timothy@apple.com>
Fix issue where log views would draw over the previous log view on reload.
This fixes a bunch of asserts that ContentViewContainer was spewing.
<rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Decrement the
currentIndex when it is greater than or equal to i.
2012-01-31 Brian Weinstein <bweinstein@apple.com>
Add DatabaseContentView.{js|css}. These were taken from open source, with a few modifications.
Rest of <rdar://problem/10684679> Implement a database query view for the new Inspector.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseContentView.css: Added. Copied rules from open source.
* UserInterface/DatabaseContentView.js: Added. Copied from open source.
* UserInterface/Main.html: Added new files.
2012-01-31 Brian Weinstein <bweinstein@apple.com>
Stub the boilerplate that is needed to hook up DatabaseContentView.
DatabaseContentView doesn't exist yet, but when it does, a new DatabaseContentView will be
created when a DatabaseTreeElement is selected.
Work towards <rdar://problem/10684679> Implement a database query view for the new Inspector.
Reviewed by Tim Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add a new case for DatabaseContentView.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/Main.html:
* UserInterface/Main.js: Ditto.
(WebInspector.contentBrowserTreeElementForRepresentedObject):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._storageCleared): Ditto.
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
2012-01-31 Timothy Hatcher <timothy@apple.com>
Generate friendlier titles for the current log and previous logs in the Log sidebar.
Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._sessionStarted): Set the previous current tree element title
to "Previous Log %d".
(WebInspector.LogSidebarPanel.prototype._activeTreeElement): Added.
(WebInspector.LogSidebarPanel.prototype._activeLogContentView): Use _activeTreeElement().
* UserInterface/LogTreeElement.js:
(WebInspector.LogTreeElement): Set the main title to "Current Log" and the subtitle to the time.
2012-01-31 Timothy Hatcher <timothy@apple.com>
Add an icon for logs in the Web Inspector Log sidebar.
Part of: <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Images/Log.png: Added.
* UserInterface/Images/Log@2x.png: Added.
* UserInterface/LogIcon.css: Added.
* UserInterface/LogObject.js:
(WebInspector.LogObject): Added startDate parameter and set _startDate.
(WebInspector.LogObject.prototype.get startDate): Added.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._sessionStarted):
* UserInterface/LogTreeElement.js: Added.
(WebInspector.LogTreeElement):
(WebInspector.LogTreeElement.prototype.get logObject):
* UserInterface/Main.html: Included LogTreeElement.js and LogIcon.css.
2012-01-30 Timothy Hatcher <timothy@apple.com>
Fix disclosure triangles in the Log content view after they broke in r40433.
Reviewed by Brian Weinstein.
* UserInterface/Section.css:
(.section): Added. Moved position: relative here.
(.section .header): Removed position: relative from here.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Clear all content views of type LogContentView when we clear the log sidebar panel.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._logsCleared):
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Make the log views from previous loads of the page non-editable.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/LogContentView.css:
(#console-prompt.disabled): Make the field read only.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.setDisabled): Add the disabled class to the content prompt.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted): Call setDisabled
on the previously active LogContentView.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Have to double click on disclosure triangles for log messages with backtraces.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/DOMTreeOutline.css:
(.dom-tree-outline li.parent): Switch from text-indent to margin-left.
* UserInterface/TreeOutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle): Update this to match open source.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Make console log messages with backtraces display correctly in the log view.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/LogContentView.css: Copied some rules about outline-disclosure from Open Source.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Create correct links in the Log content view.
Instead of calling through to this._linkifier (which we don't have), create links ourselves.
This will work by calling through to WebInspector.openURL, which will either open a resource in a new tab,
or show you the resource content view for the link you clicked.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._linkifyLocation): We don't have a this._linkifier, so use our own function.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
When we get a console message from the ConsoleObserver, add it to the correct LogContentView.
With this patch, we show console logging from the page in the content view, so it is now more than
just a place to evaluate JavaScript.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Tell the LogManager about the
added message.
* UserInterface/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded): Create a ConsoleMessage object, and fire an event that a new message
was added.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel): Add a listener for when messages are added.
(WebInspector.LogSidebarPanel.prototype._messageAdded): Find the content view for the current log item, and call messageAdded
on the LogContentView.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView.prototype.messageAdded): Call _consoleMessageAdded.
(WebInspector.LogContentView.prototype._consoleMessageAdded): This now takes just the ConsoleMessage instead of an event.
2012-01-30 Brian Weinstein <bweinstein@apple.com>
Enable the ConsoleAgent after creating the managers.
Reviewed by Tim Hatcher.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-01-30 Timothy Hatcher <timothy@apple.com>
Add DOM properties to the DOM node details sidebar panel.
Last part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DOMNodeDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.dom-node .row.properties):
* UserInterface/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Call _refreshProperties.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties): Added.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.collectPrototypes): Added.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Added.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Added.
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection): Added.
* UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.css.
* UserInterface/Section.css:
(.section .header): Added position: relative so the disclosure triangles show up correctly.
(.properties-tree): Added outline: none to prevent a focus ring.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Add a simple DOM node details sidebar panel that shows type, name and attributes.
Part of: <rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DOMNodeDetailsSidebarPanel.js: Added.
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._attributesChanged):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._nodeTypeDisplayName):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._createAttributesDataGrid):
* UserInterface/Images/NavigationItemAngleBrackets.pdf: Added.
* UserInterface/Main.html: Included DOMNodeDetailsSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Included DOMNodeDetailsSidebarPanel in the details sidebar list.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Add DOMDetailsSidebarPanel as a base class for all the DOM node focused details sidebar panels.
Needed for:
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DOMDetailsSidebarPanel.js: Added.
(WebInspector.DOMDetailsSidebarPanel):
(WebInspector.DOMDetailsSidebarPanel.prototype.inspect):
(WebInspector.DOMDetailsSidebarPanel.prototype.get domNode):
(WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
(WebInspector.DOMDetailsSidebarPanel.prototype.addEventListeners):
(WebInspector.DOMDetailsSidebarPanel.prototype.removeEventListeners):
* UserInterface/Main.html: Included DOMDetailsSidebarPanel.js.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Display information about the selected resource in the resource details sidebar panel.
Last part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel): Create DetailsSections for the various parts of info to display.
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource): Remove and add event listeners.
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh): Call the individual refresh functions.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL): Added. Update the affected rows.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResourceType): Added. Ditto.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshMIMEType): Added. Ditto.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestHeaders): Added. Ditto.
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResponseHeaders): Added. Ditto.
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid): Added. Helper to create a simple grid.
* UserInterface/Utilities.js:
(parseLocationQueryParameters): Use the queryString function after trimming the "?".
(queryString): Added. Factored out of parseLocationQueryParameters.
(queryString.decode): Added. Properly decode "+" as " ".
2012-01-26 Timothy Hatcher <timothy@apple.com>
Add the start of WebInspector.ResourceDetailsSidebarPanel.
Part of: <rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Main.html: Included ResourceDetailsSidebarPanel.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a WebInspector.ResourceDetailsSidebarPanel.
* UserInterface/ResourceDetailsSidebarPanel.js: Added.
(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype.inspect):
(WebInspector.ResourceDetailsSidebarPanel.prototype.get resource):
(WebInspector.ResourceDetailsSidebarPanel.prototype.refresh):
2012-01-29 Timothy Hatcher <timothy@apple.com>
Add DetailsSection and friends to be used by details sidebar panels.
Needed for:
<rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DetailsSection.css: Added.
(.details-section):
(.details-section > .header):
(.details-section > .header::before):
(.details-section > .header:active::before):
(.details-section.collapsed > .header::before):
(.details-section.collapsed > .header:active::before):
(.details-section > .content):
(.details-section.collapsed > .content):
(.details-section > .content > .group):
(.details-section > .content > .group:nth-child(even)):
(.details-section > .content > .group:nth-child(even) > .row:first-child > *):
(.details-section > .content > .group:nth-child(even) > .row:last-child > *):
(.details-section > .content > .group > .row):
(.details-section > .content > .group > .row:last-child > *):
(.details-section > .content > .group > .row.empty):
(.details-section > .content > .group:nth-child(even) > .row.empty:last-child):
(.details-section > .content > .group:nth-child(even) > .row.empty:last-child > *):
(.details-section > .content > .group:nth-child(even) > .row.empty:last-child > * > *):
(.details-section > .content > .group > .row > *):
(.details-section > .content > .group > .row > .label):
(.details-section > .content > .group > .row > .value):
(.details-section > .content > .group > .data-grid-row):
(.details-section > .content > .group > .data-grid-row.empty):
(.details-section > .content .data-grid):
* UserInterface/DetailsSection.js: Added.
(WebInspector.DetailsSection):
(WebInspector.DetailsSection.prototype.get element):
(WebInspector.DetailsSection.prototype.get title):
(WebInspector.DetailsSection.prototype.set title):
(WebInspector.DetailsSection.prototype.get collapsed):
(WebInspector.DetailsSection.prototype.set collapsed):
(WebInspector.DetailsSection.prototype.get groups):
(WebInspector.DetailsSection.prototype.set groups):
(WebInspector.DetailsSection.prototype._headerElementClicked):
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.disclosureImageLoaded):
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded.generateDisclosureTriangle):
(WebInspector.DetailsSection.prototype._generateDisclosureTrianglesIfNeeded):
* UserInterface/DetailsSectionDataGridRow.js: Added.
(WebInspector.DetailsSectionDataGridRow):
(WebInspector.DetailsSectionDataGridRow.prototype.constructor.WebInspector.DetailsSectionDataGridRow.get element):
(WebInspector.DetailsSectionDataGridRow.prototype.get emptyMessage):
(WebInspector.DetailsSectionDataGridRow.prototype.set emptyMessage):
(WebInspector.DetailsSectionDataGridRow.prototype.get dataGrid):
(WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
* UserInterface/DetailsSectionGroup.js: Added.
(WebInspector.DetailsSectionGroup):
(WebInspector.DetailsSectionGroup.prototype.get element):
(WebInspector.DetailsSectionGroup.prototype.get rows):
(WebInspector.DetailsSectionGroup.prototype.set rows):
* UserInterface/DetailsSectionRow.js: Added.
(WebInspector.DetailsSectionRow):
(WebInspector.DetailsSectionRow.prototype.get element):
(WebInspector.DetailsSectionRow.prototype.get label):
(WebInspector.DetailsSectionRow.prototype.set label):
(WebInspector.DetailsSectionRow.prototype.get value):
(WebInspector.DetailsSectionRow.prototype.set value):
* UserInterface/Main.html: Included DetailsSection.{css,js}, DetailsSectionDataGridRow.js,
DetailsSectionGroup.js, and DetailsSectionRow.js.
2012-01-26 Timothy Hatcher <timothy@apple.com>
Selectively show and hide panels in the Details sidebar based on if they can inspect the current
represented objects being viewed in the content browser.
Needed for:
<rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added event listener for CurrentRepresentedObjectsDidChange event.
(WebInspector._contentBrowserRepresentedObjectsDidChange): Added. Call inspect on each details
sidebar panel and show ones that return true and hide ones that return false.
2012-01-26 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DetailsSidebarPanel for use by panels in the Details sidebar.
Needed for:
<rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DetailsSidebarPanel.js: Added.
(WebInspector.DetailsSidebarPanel):
(WebInspector.DetailsSidebarPanel.prototype.inspect):
(WebInspector.DetailsSidebarPanel.prototype.shown):
(WebInspector.DetailsSidebarPanel.prototype.needsRefresh):
(WebInspector.DetailsSidebarPanel.prototype.refresh):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set selectedSidebarPanel): Call hidden and shown on the SidebarPanel.
(WebInspector.Sidebar.prototype.set collapsed): Update layout of the navigation bar when uncollapsed.
* UserInterface/SidebarPanel.js:
(WebInspector.SidebarPanel.prototype.shown): Added stub.
(WebInspector.SidebarPanel.prototype.hidden): Added stub.
2012-01-26 Timothy Hatcher <timothy@apple.com>
Add support for removing and inserting SidebarPanels to WebInspector.Sidebar.
Needed for:
<rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.removeNavigationItem): Clear the selected navigation item if it is this.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.insertSidebarPanel): Added.
(WebInspector.Sidebar.prototype.removeSidebarPanel): Added.
(WebInspector.Sidebar.prototype.set selectedSidebarPanel): Allow setting of null. Factored out code into _findSidebarPanel.
(WebInspector.Sidebar.prototype._findSidebarPanel): Added.
2012-01-25 Timothy Hatcher <timothy@apple.com>
Add support for getting the current represented objects from ContentBrowser.
Needed for:
<rdar://problem/10319511> Implement the File inspector for the new Web Inspector design
<rdar://problem/10319520> Implement the Style inspector for the new Web Inspector design
<rdar://problem/10319527> Implement the DOM Attributes inspector for the new Web Inspector design
<rdar://problem/10319536> Implement the Metrics inspector for the new Web Inspector design
<rdar://problem/10319541> Implement the Properties/DOM object inspector for the new Web Inspector design
<rdar://problem/10319546> Implement the Event Listener inspector for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.get currentRepresentedObjects): Added.
(WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Make sure to set
components even if it is empty.
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon): Set a timeout.
(WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon.delayed): Fire the event.
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Call
_dispatchCurrentRepresentedObjectsDidChangeEventSoon.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call
_dispatchCurrentRepresentedObjectsDidChangeEventSoon.
* UserInterface/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
a representedObject wasn't passed in.
* UserInterface/GeneralTreeElementPathComponent.js:
(WebInspector.GeneralTreeElementPathComponent): Set the representedObject to the treeElement.representedObject if
a representedObject wasn't passed in.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.get lastComponent): Added.
2012-01-26 Timothy Hatcher <timothy@apple.com>
Center align navigation items in navigation bars by default.
You can still get left alignment by adding a flexible space on the left. This make it easier than
flexible spaces on each side for center alignment.
Reviewed by Brian Weinstein.
* UserInterface/NavigationBar.css:
(.navigation-bar): Set -webkit-box-pack to center.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Add a helper function for display names of resource types.
Reviewed by Brian Weinstein.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Use WebInspector.Resource.Type.displayName.
* UserInterface/Resource.js:
(WebInspector.Resource.Type.displayName): Added. Can return plural or singular strings.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Update the request headers when resources are redirected.
Reviewed by Brian Weinstein.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass along the
request headers to updateForRedirectResponse.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get updateForRedirectResponse): Added requestHeaders parameter.
Set _requestHeaders and fire the RequestHeadersDidChange event.
2012-01-29 Timothy Hatcher <timothy@apple.com>
Centralize the code that adds zero-width spaces to long strings so it can be used
in other places.
Also add a copy event listener that strips the zero-width spaces from the pasteboard.
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Use insertWordBreakCharacters.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added copy event listener.
(WebInspector._sanitizeClipboardData): Added.
* UserInterface/Utilities.js:
(String.prototype.insertWordBreakCharacters): Added.
(String.prototype.removeWordBreakCharacters): Added.
2012-01-27 Brian Weinstein <bweinstein@apple.com>
Create a log session when the inspector is first loaded.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
2012-01-27 Brian Weinstein <bweinstein@apple.com>
Add some functions for open source needed to create links and strings.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/LogContentView.js:
(WebInspector.LogContentView): Add a click handler to the content view.
(WebInspector.LogContentView.prototype._mouseWasClicked): Find the <a> element we clicked on,
and open the URL. This does the right thing for external resources (loads them in Safari),
and resources from the page (loads the Resource in the inspector).
* UserInterface/Main.js:
(WebInspector.linkifyURLAsNode): Copied from open source.
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier): Ditto.
(WebInspector.linkifyStringAsFragment): Ditto.
2012-01-27 Brian Weinstein <bweinstein@apple.com>
Show the DOM tree for an element that the user enters.
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): Create a DOMTreeOutline instead
of an ElementTreeOutline, and get the node from the DOMTreeManager.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add working versions of LogContentView.css and LogContentView.js.
LogContentView.css copied rules for open source's
inspector.css, with one change to add outline: none to the prompt and a change to use the same font that
we use in the text editor.
LogContentView.js changed *styleClass to classList.*, and removed calls to objects that we don't have in
our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel).
This patch makes the console view show up, and you can type and run JavaScript.
Reviewed by Tim Hatcher.
* UserInterface/LogContentView.css: Added. Copied selected rules from inspector.css in Open Source.
* UserInterface/LogContentView.js: Added. This file was copied from Open Source, but changes have been
made to remove calls to objects that we don't have in our inspector (WebInspector.settings, WebInspector.debuggerPresentationModel),
and *styleClass has been changed to classList.*.
* UserInterface/Main.html: Added new files.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add some needed functions to Utilities.js. These were copied from Open Source, but switched over
to the Object.defineProperty syntax.
Reviewed by Tim Hatcher.
* UserInterface/Utilities.js:
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add the ConsoleMessage and ConsoleMessageImpl files from Open Source. These will be renamed
and combined in a follow-up patch.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleMessage.js: Added. Copied from Open Source's ConsoleModel.js.
* UserInterface/ConsoleMessageImpl.js: Added. Copied from Open Source. The only changes are
changing *styleClass -> classList.*.
* UserInterface/Main.html: Added new files.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add the TextPrompt.js and TextPrompt.css files. These are needed for autocompleting of the
user's input.
Reviewed by Tim Hatcher.
* UserInterface/Main.html: Add new files.
* UserInterface/TextPrompt.css: Added. Copied from Open Source.
* UserInterface/TextPrompt.js: Added. Copied from Open Source. The only changes that were
made were changing *styleClass("class") -> classList.*("class").
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add some images that will be needed by the log console view.
These need to be in HiDPI. I updated <rdar://problem/10749265> to say that the console images
need to be HiDPI as well.
Reviewed by Tim Hatcher.
* UserInterface/Images/disclosureTriangleSmallDown.png: Added.
* UserInterface/Images/disclosureTriangleSmallRight.png: Added.
* UserInterface/Images/errorIcon.png: Added.
* UserInterface/Images/searchSmallBrightBlue.png: Added.
* UserInterface/Images/userInputIcon.png: Added.
* UserInterface/Images/userInputResultIcon.png: Added.
* UserInterface/Images/warningIcon.png: Added.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add some needed files from Open Source.
Reviewed by Tim Hatcher.
* UserInterface/Images/deleteIcon.png: Added.
* UserInterface/Main.html: Added new files.
* UserInterface/ObjectPropertiesSection.js: Added. Copied from Open Source.
* UserInterface/PropertiesSection.js: Added. Copied from Open Source.
* UserInterface/Section.css: Added. Copied selected rules about .section and .properties-tree from Open Source.
* UserInterface/Section.js: Added. Copied from Open Source.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
This patch hooks up the plumbing to show a LogContentView (which doesn't exist), when a tree element
from the Log sidebar panel is selected.
Reviewed by Tim Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add a case for LogObject. It creates a LogContentView, which isn't available
yet, but will be in a later patch.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
(WebInspector.LogSidebarPanel.prototype._treeElementSelected): Make sure the selected element
has a LogObject as its represented object, and then show the correct content view.
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject): Add a case for LogObject.
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add a stub LogObject and use that as the represented object for the logs sidebar panel.
Reviewed by Tim Hatcher.
* UserInterface/LogObject.js: Added.
(WebInspector.LogObject):
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel.prototype._sessionStarted):
* UserInterface/Main.html:
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add tree elements to the Log Sidebar. Each tree element has the URL and date of when the page started loading,
and selecting it will show a console view in the future.
If the same page is loaded, the console sidebar isn't cleared, but when a page with a different URL is loaded,
then the sidebar is cleared.
Reviewed by Tim Hatcher.
* UserInterface/LogManager.js:
(WebInspector.LogManager):
(WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
(WebInspector.LogManager.prototype._mainResourceDidChange):
* UserInterface/LogSidebarPanel.js:
(WebInspector.LogSidebarPanel):
(WebInspector.LogSidebarPanel.prototype.constructor.WebInspector.LogSidebarPanel._sessionStarted):
(WebInspector.LogSidebarPanel.prototype._logsCleared):
2012-01-26 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add a stub LogManager, and call it from Main.js.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded):
* UserInterface/LogManager.js: Added.
(WebInspector.LogManager):
(WebInspector.LogManager.prototype.constructor.WebInspector.LogManager.initialize):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-01-26 Brian Weinstein <bweinstein@apple.com>
Start of <rdar://problem/10318784> Implement the Log sidebar for the new Web Inspector design.
Add a stub LogSidebarPanel and create it instead of a generic sidebar panel for Log.
Reviewed by Tim Hatcher.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2012-01-25 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Highlight lines that have errors or warnings. This patch doesn't behave correctly for lines that
have multiple issues, but that won't be implemented until we actually show the issues on the page.
This patch adds a new delegate call to TextEditor - textEditorLineContentUpdated. When a single line's
content is updated, it calls to the delegate, which will add a style class if there is an issue on that
line. In the future, it will also add the error text, but that will be done later as well.
Reviewed by Tim Hatcher.
* UserInterface/TextResourceContentView.css:
(.text-editor .text-editor-text-chunk.error): Add a background color and a box shadow.
(.text-editor .text-editor-text-chunk.warning): Ditto.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.singleLineElementForLine): Returns the element of the line if it is
a single line (if it's not, it isn't visible and we don't need to worry about it).
(WebInspector.TextEditorTextChunk.prototype.updateContent):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.addIssue): Call _addIssueToLine if we have an element to update.
(WebInspector.TextResourceContentView.prototype._addIssueToLine): Add a style class to the line if there is an
issue.
(WebInspector.TextResourceContentView.prototype.textEditorLineContentUpdated): Call _addIssueToLine if we have
any issues on that line.
* UserInterface/IssueManager.js
(WebInspector.IssueManager.prototype.issueWasAdded): We are given 1-based line numbers from the protocol, but everywhere
in the inspector deals with 0 based line numbers. Subtract 1 from the issue line number that we are given before
storing the IssueMessage.
2012-01-24 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
When a TextResourceContentView is instantiated, get a list of issues for its resource, and start listening for more.
When we get an issue from the listener or from the constructor, call _addIssue on them, which adds the issue to
the content view's collection of issues.
Reviewed by Tim Hatcher.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Start listening for issues and build a list of issues.
(WebInspector.TextResourceContentView.prototype._issueWasAdded): Call _addIssue.
(WebInspector.TextResourceContentView.prototype._addIssue): Add the issue to our list of issues, and add a FIXME to do more
with it.
2012-01-23 Brian Weinstein <bweinstein@apple.com>
Remove some unused variables.
Rubber-stamped by Joseph Pecoraro.
* UserInterface/TextEditor.js:
2012-01-23 Brian Weinstein <bweinstein@apple.com>
Last part of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
When a resource match is selected in the search sidebar, select the text that was searched for in
the TextContentResourceView and scroll it into view.
This makes it easier to find the text that the user searched for in long lines.
Reviewed by Tim Hatcher.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode): Pass the text range to select along.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Ditto.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Ditto.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.contentAvailable): Ditto.
(WebInspector.TextResourceContentView.prototype.revealLine): Ditto.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.shown): Ditto.
(WebInspector.TextEditor.prototype.revealLine): Build a selection range (start and end nodes and offsets), and set our selection
and bring the container of the selection end into view.
(WebInspector.TextEditor.prototype.revealLine.getTextNodes): Finds all of the text nodes in a possibly syntax highlighted line.
(WebInspector.TextEditor.prototype.revealLine.findOffsetInTextNodes): Iterate over all of the text nodes, and find the child
node and offset into the child node that matches the offset into the whole line.
2012-01-23 Timothy Hatcher <timothy@apple.com>
Fix some errors when inspecting frames now that #document is included in the tree.
This gives document nodes their own "D" icon, which was previously missing because of
a typo for the "N" icon.
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent): Add a case for Node.DOCUMENT_NODE. Fix a typo
by using DOMNodeIconStyleClassName instead of DOMUnknownNodeIconStyleClassName.
* UserInterface/Images/DOMDocument.pdf: Added.
* UserInterface/PathComponentIcons.css:
(.dom-document-icon .icon): Added.
2012-01-23 Timothy Hatcher <timothy@apple.com>
Merge the DOMAgent.js change in r105620 so the Inspect Element content menu works in frames.
Reviewed by Brian Weinstein.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode.prototype._setChildrenPayload): Return early for frame elements.
2012-01-23 Timothy Hatcher <timothy@apple.com>
Make command-clicking links in the DOM tree always open into a new Safari window/tab.
Since DOMTreeContentView delays the call to WebInspector.openURL, the openURL function
can't look at window.event to see if the command key is down. So we need to do that
check before calling openURL.
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Check for metaKey
and pass that as alwaysOpenExternally to WebInspector.openURL.
2012-01-23 Timothy Hatcher <timothy@apple.com>
Use InspectorFrontendHost.openInNewTab instead of PageAgent.open now that
https://webkit.org/b/74790 is fixed.
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.openURL): Use InspectorFrontendHost.openInNewTab instead of PageAgent.open.
2012-01-23 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Support the ability to have multiple matches on a line when we search the DOM.
When we find a DOM element matches our search term, we generate a title for it (by moving the _generateTitle
function from DOMSearchMatchObject out of the class to a static method), and find all of our matches in the title.
We then generate DOMSearchMatchObjects and SearchResultTreeElements for each of these.
Reviewed by Tim Hatcher.
* UserInterface/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject):
(WebInspector.DOMSearchMatchObject.prototype.get title): Returns the title.
(WebInspector.DOMSearchMatchObject.prototype.get textRange): Returns the text range.
(WebInspector.DOMSearchMatchObject.titleForDOMNode):
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): We always have a textRange now, both DOMSearchMatchObject and ResourceSearchMatchObject
both have a textRange getter.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Generate
the text for the DOM node that we found a result for, and find all of the matching instances in that node.
2012-01-23 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Support the ability to have multiple matches on a line for when we search in a resource.
When the PageAgent gives us information about the lines that match our search query, instead of just
finding the first match, find all of the matches on that line. Create a ResourceSearchMatchObject and
SearchResultTreeElement for each result on the line.
Reviewed by Tim Hatcher.
* UserInterface/ResourceSearchMatchObject.js:
(WebInspector.ResourceSearchMatchObject): Set the textRange
(WebInspector.ResourceSearchMatchObject.prototype.get textRange):
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement):
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): If we were given a text range, use that instead of finding the first match
in the title.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Find
all of the matches on the line instead of just the first one.
2012-01-23 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Bring TextRange over from open source.
Reviewed by Tim Hatcher.
* UserInterface/TextRange.js: Added.
(WebInspector.TextRange):
(WebInspector.TextRange.prototype.constructor.WebInspector.TextRange.isEmpty):
(WebInspector.TextRange.prototype.get linesCount):
(WebInspector.TextRange.prototype.collapseToEnd):
(WebInspector.TextRange.prototype.normalize):
(WebInspector.TextRange.prototype.clone):
2012-01-20 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Cancel old searches when new ones are started.
Reviewed by Tim Hatcher.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Check
to make sure we are still appending results for the right searchId.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Set the current _searchId.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call _cancelCurrentSearch.
(WebInspector.SearchSidebarPanel.prototype._cancelCurrentSearch): If a search ID is set, call DOMAgent.discardSearchResults on it,
and delete the searchId.
2012-01-22 Timothy Hatcher <timothy@apple.com>
Collaspe path components in the navigation bar when they are too wide to fit.
The components collapse from left to right with text truncation and eventually to just the icon.
Reviewed by Brian Weinstein.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path-component): Use -webkit-box and set a min-width.
(.hierarchical-path-component > .title): Use -webkit-box so the title can flex.
(.hierarchical-path-component > .title > .content): Added. Needed to make text-overflow work.
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child): Added.
Use a different min-width since the separator is hidden.
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-child > .separator):
Renamed to use :last-child instead of :last-of-type.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent): Create a title content element.
(WebInspector.HierarchicalPathComponent.prototype.get displayName): Use the title content element.
(WebInspector.HierarchicalPathComponent.prototype.set displayName): Ditto. Also set the tool tip.
(WebInspector.HierarchicalPathComponent.prototype.get forcedWidth): Added.
(WebInspector.HierarchicalPathComponent.prototype.set forcedWidth): Added.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components): Call updateLayout on the NavigationBar.
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout): Added.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.insertNavigationItem): Set _parentNavigationBar to this.
(WebInspector.NavigationBar.prototype.removeNavigationItem): Set _parentNavigationBar to null.
(WebInspector.NavigationBar.prototype.updateLayout): Call updateLayout on each navigation item.
* UserInterface/NavigationItem.js:
(WebInspector.NavigationItem.prototype.get parentNavigationBar): Added.
(WebInspector.NavigationItem.prototype.updateLayout): Added stub.
2012-01-22 Timothy Hatcher <timothy@apple.com>
Make it possible for content views to update their layout as the size of the content area changes.
The DOM tree needs this to update the size of the selection to stay aligned with the row. Data grid
based content views need this to update the position of the resizer elements. The font content view
uses this to update the size of the font preview.
Reviewed by Brian Weinstein.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.updateLayout): Added. Call through to the current content view.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.updateLayout): Added. Call updateLayout on the navigation bar and
the content view container.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.updateLayout): Added stub.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.updateLayout): Added. Call through to the current content view.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.updateLayout): Added. Call updateSelection on the DOMTreeOutline.
* UserInterface/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype.updateLayout): Added. Call updateWidths on the DataGrid.
* UserInterface/FontResourceContentView.js:
(WebInspector.FontResourceContentView.prototype.updateLayout): Added. Call sizeToFit.
(WebInspector.FontResourceContentView.prototype.shown): Removed call to sizeToFit since updateLayout is
called on show too.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added event listeners for Sidebar.Event.WidthDidChange and window resize.
(WebInspector._contentBrowserSizeDidChange): Added. Call updateLayout on contentBrowser.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set width): Fire WidthDidChange event.
(WebInspector.Sidebar.prototype.set collapsed): Ditto.
2012-01-21 Timothy Hatcher <timothy@apple.com>
Remove resources from the Search and Issue sidebars when the frames they belong to are
removed or navigated to a new page.
Part of:
<rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
<rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.isDetached): Added. Helper function.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Added event listeners.
(WebInspector.IssueSidebarPanel.prototype._checkForOldResources): Added.
(WebInspector.IssueSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Added event listeners.
(WebInspector.SearchSidebarPanel.prototype._checkForOldResources): Added.
(WebInspector.SearchSidebarPanel.prototype._checkForOldResources.delayedWork): Added.
2012-01-21 Timothy Hatcher <timothy@apple.com>
Disassociate resources from their frame when the main resource changes.
Resources were not being disassociated, so they always had a valid parentFrame. This made it
hard to tell if a resource was still part of the page or not. This change is needed so the Search
and Issue sidebars knows when it can remove resources during navigation.
Reviewed by Brian Weinstein.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.initialize): Call _disassociateWithResource for the old main resource.
(WebInspector.Frame.prototype.commitProvisionalLoad): Ditto. Also call removeAllResources before
committing the provisional resources.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.isMainResource): Null check _parentFrame.
(WebInspector.Resource.prototype._requestContentFromBackend): Null check _parentFrame and add a
fallback branch so pending callbacks get notified.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): Null check frame.
2012-01-21 Timothy Hatcher <timothy@apple.com>
Show a focus ring around the search field in the Search sidebar of the Web Inspector.
The filter field does not show a focus ring (matching Xcode), but the search field should.
Reviewed by Dan Bernstein.
* UserInterface/FilterBar.css:
(.filter-bar): Remove outline: none. Not sure why it was here, it is still set on
.filter-bar > input[type="search"].
* UserInterface/SearchSidebarPanel.css:
(.sidebar > .panel.search > .search-bar): Remove outline: none.
(.sidebar > .panel.search > .search-bar > input[type="search"]): Ditto.
2012-01-21 Timothy Hatcher <timothy@apple.com>
Make filtering work again in the Search sidebar of the Web Inspector.
In r40218 the mainTitle became a DocumentFragemnt, but the filtering code expects a string.
Reviewed by Dan Bernstein.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.prototype.get filterableData): Added. Return the raw
title of the represented object, which is still a string.
2012-01-20 Timothy Hatcher <timothy@apple.com>
Allow resizing the Web Inspector when docked.
Reviewed by Brian Weinstein.
* UserInterface/Main.css:
(#docked-resizer): Added.
(body.docked #docked-resizer): Added.
* UserInterface/Main.html: Added #docked-resizer element.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Add mousedown listener on #docked-resizer.
(WebInspector._dockedResizerMouseDown): Added.
(WebInspector._dockedResizerMouseDown.dockedResizerDrag): Added.
(WebInspector._dockedResizerMouseDown.dockedResizerDragEnd): Added.
2012-01-20 Timothy Hatcher <timothy@apple.com>
Add dock toggle and close buttons to the new Web Inspector.
Reviewed by Brian Weinstein.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar > .item.button:not(.disabled):not(.radio):not(.suppress-bezel):active):
Added :not(.suppress-bezel).
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.get suppressBezel): Added.
(WebInspector.ButtonNavigationItem.prototype.set suppressBezel): Added.
* UserInterface/Images/Close.pdf: Added.
* UserInterface/Images/Dock.pdf: Added.
* UserInterface/Images/Undock.pdf: Added.
* UserInterface/InspectorFrontendAPI.js: Added.
(InspectorFrontendAPI._loaded): Added.
(InspectorFrontendAPI._pendingCommands): Added.
(InspectorFrontendAPI.isDebuggingEnabled): Added stub.
(InspectorFrontendAPI.setDebuggingEnabled): Added stub.
(InspectorFrontendAPI.isTimelineProfilingEnabled): Added stub.
(InspectorFrontendAPI.setTimelineProfilingEnabled): Added stub.
(InspectorFrontendAPI.isProfilingJavaScript): Added stub.
(InspectorFrontendAPI.startProfilingJavaScript): Added stub.
(InspectorFrontendAPI.stopProfilingJavaScript): Added stub.
(InspectorFrontendAPI.setAttachedWindow): Added. Calls updateDockedState.
(InspectorFrontendAPI.showConsole): Added stub.
(InspectorFrontendAPI.dispatch): Added stub.
(InspectorFrontendAPI.loadCompleted): Added stub.
* UserInterface/Main.css:
(body.docked): Added. Adds a top border.
* UserInterface/Main.html: Included InspectorFrontendAPI.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create and insert the dock toggle and close buttons. Tell InspectorFrontendAPI
that we are loaded so pending commands are dispatched.
(WebInspector.updateDockedState): Added. Updates the sate of the navigation bar buttons.
(WebInspector.close): Added.
(WebInspector._dockToggleButtonToolTip): Added.
(WebInspector._toggleDockedState): Added.
* UserInterface/Utilities.js:
(parseLocationQueryParameters): Added. Helper to parse the query string.
2012-01-19 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Instead of passing a string as a title to the GeneralTreeElement, pass a DocumentFragment which
contains our necessary text, but highlights the search string.
Reviewed by Tim Hatcher.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype._updateTitleElements): Add a special case for _mainTitle
being a Node.
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item .highlight): Set the highlighted text to have
a yellow background with a darker yellow bottom border to match Xcode.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Create a document fragment, and
break the matching text into parts (before match, match, after match), and add a span around
the matching text.
2012-01-19 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Implement proper truncation of the search results, so the search term will always show up in the
title text of the search term
Reviewed by Tim Hatcher.
* UserInterface/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.prototype.get searchTerm): Return the search term.
* UserInterface/ResourceSearchMatchObject.js:
(WebInspector.ResourceSearchMatchObject.prototype.get searchTerm): Ditto.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement): Call truncateAndHighlightTitle.
(WebInspector.SearchResultTreeElement.truncateAndHighlightTitle): Truncate the title, and
add a FIXME about highlighting it.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Make selecting an issue in the Issue sidebar show the resource's content view and reveal the line.
Part of: <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded): Pass line to IssueManager.
* UserInterface/IssueManager.js:
(WebInspector.IssueManager.prototype.issueWasAdded): Added lineNumber parameter.
* UserInterface/IssueMessage.js:
(WebInspector.IssueMessage): Added lineNumber parameter.
(WebInspector.IssueMessage.prototype.get lineNumber): Added.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel): Set onselect to _treeElementSelected.
(WebInspector.IssueSidebarPanel.prototype._treeElementSelected): Added. Call showResourceSourceCode
based on the type of tree element selected.
* UserInterface/IssueTreeElement.js:
(WebInspector.IssueTreeElement): Added _issueMessage.
(WebInspector.IssueTreeElement.prototype.get issueMessage): Added.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Make selecting the resource in the search sidebar show the resource.
Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showResource): Added.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Call ResourceSidebarPanel.showResource
if the tree element is a ResourceTreeElement.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Make selecting text search results show the resource's content view and reveal the line.
Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showSourceCode): Added lineNumberToReveal parameter.
* UserInterface/ResourceSearchMatchObject.js:
(WebInspector.ResourceSearchMatchObject.prototype.get resource): Added.
(WebInspector.ResourceSearchMatchObject.prototype.get lineNumber): Added.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added lineNumberToReveal parameter.
(WebInspector.ResourceSidebarPanel.prototype.showResourceSourceCode): Added.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Handle ResourceSearchMatchObject.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.revealLine): Added. Find the right text chunk for the line, then
break it into single line text chunks then call scrollIntoViewIfNeeded on that text chunk.
(WebInspector.TextEditor.prototype.shown): Set _visible to true. Check if there is a line number that
needs to be revealed.
(WebInspector.TextEditor.prototype.hidden): Set _visible to false.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Start _contentPopulated as false.
(WebInspector.TextResourceContentView.prototype.contentAvailable): Set _contentPopulated to true. Check if
there is a line number that needs to be revealed.
(WebInspector.TextResourceContentView.prototype.revealLine): Added.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Expand the resources tree elements in the Issues and Search sidebars by default.
Part of:
<rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
<rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel.prototype._issueWasAdded): Call expand.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype._treeElementForResource): Call expand.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Call shown and hidden on the current content view in ClusterContentView.
This is needed for DOMTreeContentView to correctly reveal the selected DOM node when shown.
Reviewed by Brian Weinstein.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.shown): Call shown on the currentContentView if there is one.
(WebInspector.ClusterContentView.prototype.hidden): Call hidden on the currentContentView if there is one.
(WebInspector.ClusterContentView.prototype.get selectionPathComponents): Return [] if there is no currentContentView.
2012-01-19 Timothy Hatcher <timothy@apple.com>
Make selecting DOM search results reveal and select the node in the DOM tree.
Part of: <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.get domNode): Added.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype.showDOMTree): Added preventFocusChange parameter.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added preventFocusChange parameter.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel): Set onselect to _treeElementSelected.
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Added. Call showMainFrameDOMTree for
DOMSearchMatchObject results.
2012-01-18 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Add icons for the search sidebar. We are reusing the icons from the path components icons, and added
the resource match icon from Xcode.
Reviewed by Tim Hatcher.
* UserInterface/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.prototype.get className): Call _generateClassName.
(WebInspector.DOMSearchMatchObject.prototype._generateClassName): Generate the correct class name from the node
type.
* UserInterface/Images/ResourceSearchMatch.pdf: Added.
* UserInterface/Main.html:
* UserInterface/ResourceSearchMatchObject.js:
(WebInspector.ResourceSearchMatchObject.prototype.get className): Return the resource match class name.
* UserInterface/SearchIcons.css: Added.
* UserInterface/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement): Ask either the DOMSearchMatchObject or ResourceSearchMatchObject for its className.
2012-01-18 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Add some new classes, and generate proper titles for DOM search matches.
The new classes added are:
- DOMSearchMatchObject, which represents a match of the search term in the DOM.
- ResourceSearchMatchObject, which represents a match of the search term in a resource.
- SearchResultTreeElement, which represents the tree elements in the search sidebar, and its represented
object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
Reviewed by Tim Hatcher.
* UserInterface/DOMSearchMatchObject.js: Added.
(WebInspector.DOMSearchMatchObject):
(WebInspector.DOMSearchMatchObject.prototype.constructor.WebInspector.DOMSearchMatchObject.get title): Call _generateTitle if we don't
have one yet.
(WebInspector.DOMSearchMatchObject.prototype._generateTitle): Generate a title from the DOMNode.
* UserInterface/Main.html:
* UserInterface/ResourceSearchMatchObject.js: Added.
(WebInspector.ResourceSearchMatchObject):
(WebInspector.ResourceSearchMatchObject.prototype.constructor.WebInspector.ResourceSearchMatchObject.get title): Return the matching line
text with a FIXME.
* UserInterface/SearchResultTreeElement.js: Added.
(WebInspector.SearchResultTreeElement): Assert our represented object is either a DOMSearchMatchObject or a ResourceSearchMatchObject.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Create a SearchResultTreeElement.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): Ditto.
2012-01-18 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Implement searching of the DOM, and add the results to the search sidebar alongside matches in resources.
This patch also stores the ResourceTreeElements in the SearchSidebarPanel class, since both DOM search results
and resource search results will need to be under the same parent.
Reviewed by Tim Hatcher.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback):
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback.domSearchResults): For each
search result, get the DOM Node and owner document's URL, and add the DOM node under the owner document's ResourceTreeElement.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.domCallback): Call DOMAgent.getSearchResults.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call DOMAgent.performSearch.
2012-01-18 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Implement searching of resources. Call the inspector API to search in all resources for our search term,
and then for each resource that found a match, search in that resource for all of the matching lines.
Reviewed by Tim Hatcher.
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback.resourceCallback): Loop
over each matching line, and add a ResourceTreeElement for the parent, and a tree element for each matching search result.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged.resourcesCallback): For
each matching resource, search the resource.
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged): Call PageAgent.searchInResources.
2012-01-17 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Add a search field to the search sidebar. It is there and looks pretty, but doesn't do anything yet.
Reviewed by Tim Hatcher.
* UserInterface/Main.html:
* UserInterface/SearchSidebarPanel.css: Added.
(.sidebar > .panel.search > .content):
(.sidebar > .panel.search > .search-bar):
(.search-bar):
(.search-bar > input[type="search"]):
* UserInterface/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel):
(WebInspector.SearchSidebarPanel.prototype.constructor.WebInspector.SearchSidebarPanel._searchFieldChanged):
2012-01-17 Brian Weinstein <bweinstein@apple.com>
Start of <rdar://problem/10318754> Implement the Search sidebar for the new Web Inspector design.
Add a stub Search sidebar and call it from Main.js instead of creating a generic sidebar panel.
Reviewed by Tim Hatcher.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded):
* UserInterface/SearchSidebarPanel.js: Added.
(WebInspector.SearchSidebarPanel):
2012-01-18 Timothy Hatcher <timothy@apple.com>
Make the Inspect Element context menu item work along with the inspect() console function.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.selectAndRevealDOMNode): Added.
(WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Use selectDOMNode
instead of revealAndSelect since that also fires an event.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.inspectElement): Fire DOMNodeWasInspected.
(WebInspector.DOMTreeManager.prototype.inspectNodeObject): Added. Resolves an object to
a DOMNode and calls inspectElement.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Remove call to _showContentViewForIdentifier.
(WebInspector.FrameContentView.prototype.get selectionPathComponents): Return [] if there
is no current content view.
(WebInspector.FrameContentView.prototype.shown): Added. Show the DOM tree if _shownInitialContent
is not true.
(WebInspector.FrameContentView.prototype.closed): Added. Reset _shownInitialContent to false.
(WebInspector.FrameContentView.prototype.showSourceCode): Added. Helper function.
(WebInspector.FrameContentView.prototype.showDOMTree): Added. Helper function.
(WebInspector.FrameContentView.prototype._pathComponentForContentView): Return null if there
is no current content view.
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.inspect): Pass the object to the right manager.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Enable the InspectorAgent.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Add DOMNodeWasInspected event listener.
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameDOMTree): Added. Helper function.
(WebInspector.ResourceSidebarPanel.prototype.showMainFrameSourceCode): Added. Helper function.
(WebInspector.ResourceSidebarPanel.prototype._domNodeWasInspected): Added. Call showMainFrameDOMTree.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype.inspectDatabase): Added. Fire DatabaseWasInspected event.
(WebInspector.StorageManager.prototype.inspectDOMStorage): Added. Fire DOMStorageObjectWasInspected event.
(WebInspector.StorageManager.prototype._databaseForId): Added.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasInspected): Added. Reveal and select the tree element.
(WebInspector.StorageSidebarPanel.prototype._databaseWasInspected): Added. Ditto.
2012-01-18 Timothy Hatcher <timothy@apple.com>
Add String.prototype.collapseWhitespace since it is needed by DOMTreeElement.js.
Reviewed by Jing Jin.
* UserInterface/Utilities.js:
(String.prototype.collapseWhitespace): Added.
2012-01-18 Timothy Hatcher <timothy@apple.com>
Now that the document node for child frames is included in the DOM tree, use it as the root
for child frames to avoid seeing "#document" and having everything nested under it.
Also use the straight forward approach to request the document if the DOMTree is for the main frame.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree.prototype.requestRootDOMNode.mainDocumentAvailable): Added.
(WebInspector.DOMTree.prototype.requestRootDOMNode): Evaluate "document" for child frames instead of
"window.frameElement". And use WebInspector.domTreeManager.requestDocument for the main frame.
2012-01-17 Timothy Hatcher <timothy@apple.com>
Rename ContentBrowser.showContentForRepresentedObject to ContentBrowser.showContentViewForRepresentedObject.
Also adds ContentBrowser.showContentView and ContentBrowser.contentViewForRepresentedObject while making
the showContentView* functions return the content view that was shown so it can be used by the caller.
Reviewed by Brian Weinstein.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.showContentViewForRepresentedObject): Renamed from showContentForRepresentedObject.
(WebInspector.ContentBrowser.prototype.showContentView): Added. Call through to the contentViewContainer.
(WebInspector.ContentBrowser.prototype.contentViewForRepresentedObject): Added. Ditto.
(WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Use showContentViewForRepresentedObject.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Return the contentView shown.
(WebInspector.ContentViewContainer.prototype.showContentView): Ditto.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Return the contentView shown.
* UserInterface/Main.js:
(WebInspector.openURL): Use showContentViewForRepresentedObject.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Use showContentViewForRepresentedObject
2012-01-17 Timothy Hatcher <timothy@apple.com>
Prevent leaking Web Inspector content views by unregistering event listeners from external objects
when the content views are closed.
Since some content views were registering as event listeners on external objects that had indefinite or
indeterminate lifetimes, that meant the closed content views were still around and responding to events
after they had been closed.
Reviewed by Brian Weinstein.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView): Moved event listnener to shown.
(WebInspector.ClusterContentView.prototype.shown): Added. Add event listener that was in the constructor.
(WebInspector.ClusterContentView.prototype.closed): Added. Remove event listener and close all
content views so they can do their own work.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.closed): Added stub.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Call closed on the view.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Moved event listnener to shown.
(WebInspector.DOMTreeContentView.prototype.shown): Add event listener that was in the constructor.
(WebInspector.DOMTreeContentView.prototype.closed): Added. Remove event listener.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Moved event listnener to shown.
(WebInspector.ResourceContentView.prototype.shown): Added. Add event listener that was in the constructor.
(WebInspector.ResourceContentView.prototype.closed): Added. Remove event listener.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Close the content views right away, not after
a delay to prevent the content views from responding to events when they are about to be closed anyway.
2012-01-17 Timothy Hatcher <timothy@apple.com>
Minimize churn in the DOM tree content view when navigating between pages.
The DOMTree was calling callbacks multiple times because the list wasn't cleared
when the RootDOMNodeDidChange was sent. And DOMTreeContentView would request
the DOM node again when RootDOMNodeDidChange was observed, causing the same
callback to be added back into the pending callbacks array.
This change clears the pending callbacks array each time the DOMTree is invalidated
so it is the responsibility of the client to listen for the RootDOMNodeInvalidated
event and request the root DOM node again (which is what happens already.)
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree.Event.RootDOMNodeInvalidated): Renamed from RootDOMNodeDidChange to better
reflect what is means.
(WebInspector.DOMTree.prototype.invalidate.performInvalidate): Always fire the RootDOMNodeInvalidated
event and clear the pending callbacks.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Check if we were invalidated
before continuing.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Ditto.
(WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Ditto.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Listen for the renamed RootDOMNodeInvalidated event.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeInvalidated): Renamed from _rootDOMNodeDidChange.
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._documentUpdated): Don't set rootDOMNode since the outline
might be for a subframe, and this is always the main document.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Properly create a RemoteObject in WebInspector.DOMTree so it can be released correctly.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/DOMTree.js:
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Make a RemoteObject using
WebInspector.RemoteObject.fromPayload and bind it to rootDOMNodeAvailable.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Release the remote object.
2012-01-17 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Add images for for the error and warning tree elements.
Reviewed by Tim Hatcher.
* UserInterface/Images/Error.pdf: Added.
* UserInterface/Images/Warning.pdf: Added.
* UserInterface/IssueIcons.css: Added.
(.error-issue-icon .icon):
(.warning-issue-icon .icon):
* UserInterface/IssueTreeElement.js:
(WebInspector.IssueTreeElement):
* UserInterface/Main.html:
2012-01-16 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Move the information about an Issue tree element from IssueSidebarPanel to its own class - IssueTreeElement.
Reviewed by Tim Hatcher.
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded): Create a new
IssueTreeElement, instead of a GeneralTreeElement.
* UserInterface/IssueTreeElement.js: Added.
(WebInspector.IssueTreeElement): Call through to GeneralTreeElement and set some properties.
(WebInspector.IssueTreeElement.titleForIssue): Moved from IssueSidebarPanel.
* UserInterface/Main.html: Added new file.
2012-01-16 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Implement displaying formatted console messages in the Issues Sidebar.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): Pass along the
parameters.
* UserInterface/IssueManager.js:
(WebInspector.IssueManager.prototype.issueWasAdded): Ditto.
* UserInterface/IssueMessage.js:
(WebInspector.IssueMessage): Turn the objects that we were passed in as parameters
into WebInspector.RemoteObjects, and call this._formatTextIfNecessary to format
our text.
(WebInspector.IssueMessage.prototype._formatTextIfNecessary.valueFormatter): Get the value of the RemoteObject.
(WebInspector.IssueMessage.prototype._formatTextIfNecessary.append): Append b to a, and return a.
(WebInspector.IssueMessage.prototype._formatTextIfNecessary): Format our text, and append any unused substitutions
to the string we generate. Once we are done generating the string, we set that as our text.
2012-01-13 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Clear the issues sidebar when the page is navigated. Add a listener in IssueManager that fires an
event that IssueSidebarPanel listens to.
Reviewed by Tim Hatcher.
* UserInterface/IssueManager.js:
(WebInspector.IssueManager):
(WebInspector.IssueManager.prototype.issueWasAdded):
(WebInspector.IssueManager.prototype._mainResourceDidChange):
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel):
(WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
(WebInspector.IssueSidebarPanel.prototype._issuesCleared):
2012-01-13 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Add things to the Issues sidebar, sorted by file. We currently only show issues that have a URL provided.
Each folder in the sidebar is a resource where the error came from. Each issue has a main title of the
kind of issue it is, and a subtitle of the issue text.
Reviewed by Tim Hatcher.
* UserInterface/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.constructor.WebInspector.ConsoleObserver.messageAdded): If the message
was an error or warning, tell the IssueManager about it.
* UserInterface/IssueManager.js: Added.
(WebInspector.IssueManager):
(WebInspector.IssueManager.prototype.constructor.WebInspector.IssueManager.initialize):
(WebInspector.IssueManager.prototype.issueWasAdded): Dispatch a message saying an issue was added.
* UserInterface/IssueMessage.js: Added.
(WebInspector.IssueMessage):
* UserInterface/IssueSidebarPanel.js:
(WebInspector.IssueSidebarPanel):
(WebInspector.IssueSidebarPanel.prototype.constructor.WebInspector.IssueSidebarPanel._issueWasAdded):
(WebInspector.titleForIssue):
* UserInterface/Main.html: Add new files.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Initialize the IssueManager.
* UserInterface/Utilities.js:
(Object.defineProperty): Add String.prototype.startsWith.
2012-01-13 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Add a new flavor of tree item to tree elements in a NavigationSidebarPanel. If you set both the small and twoLine properties
on a tree element, the title and subtitle will be on two lines, but it will only be slightly bigger than the
small style, and will still use the same small icon size.
Reviewed by Tim Hatcher.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.get twoLine):
(WebInspector.GeneralTreeElement.prototype.set twoLine):
(WebInspector.GeneralTreeElement.prototype.onattach):
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line):
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles):
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .titles.no-subtitle):
(.navigation-sidebar-panel-content-tree-outline .item.small.two-line .icon):
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .title::after):
(.navigation-sidebar-panel-content-tree-outline .item.small:not(.two-line) .subtitle::before):
2012-01-13 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Implement FrameResourceManager.resourceForURL. This checks the main frame's main resource for the passed in URL,
and then calls the main frame's resourceForURL function, which checks subresources and recursively checks
subframes for the correct URL.
Reviewed by Tim Hatcher.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceForURL):
2012-01-12 Brian Weinstein <bweinstein@apple.com>
Start of <rdar://problem/10318761> Implement the Issue sidebar for the new Web Inspector design.
Add a stub IssueSidebarPanel and call it from Main.js instead of just creating a generic sidebar panel.
Reviewed by Tim Hatcher.
* UserInterface/IssueSidebarPanel.js: Added.
(WebInspector.IssueSidebarPanel):
* UserInterface/Main.html: Add new file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an IssueSidebarPanel.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make the DOM tree content view show the current DOM node selection path in the quick navigation bar.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Added event listener for DOM tree selection changes.
(WebInspector.DOMTreeContentView.prototype.get selectionPathComponents): Added. Return path components for the DOM tree selection.
(WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange): Added. Fire the SelectionPathComponentsDidChange event.
(WebInspector.DOMTreeContentView.prototype._pathComponentSelected): Added. Reveal and select the DOM tree element.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.isCloseTag): Added.
* UserInterface/DOMTreeElementPathComponent.js: Added.
(WebInspector.DOMTreeElementPathComponent): Added.
(WebInspector.DOMTreeElementPathComponent.prototype.get domTreeElement): Added.
(WebInspector.DOMTreeElementPathComponent.prototype.get previousSibling): Added.
(WebInspector.DOMTreeElementPathComponent.prototype.get nextSibling): Added. Return null if isCloseTag.
* UserInterface/Images/DOMCharacterData.pdf: Added.
* UserInterface/Images/DOMComment.pdf: Added.
* UserInterface/Images/DOMDocumentType.pdf: Added.
* UserInterface/Images/DOMElement.pdf: Added.
* UserInterface/Images/DOMNode.pdf: Added.
* UserInterface/Images/DOMTextNode.pdf: Added.
* UserInterface/Main.html: Included DOMTreeElementPathComponent.js.
* UserInterface/PathComponentIcons.css:
(.dom-element-icon .icon): Added.
(.dom-text-node-icon .icon): Added.
(.dom-comment-icon .icon): Added.
(.dom-document-type-icon .icon): Added.
(.dom-character-data-icon .icon): Added.
(.dom-node-icon .icon): Added.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make link navigation work in the DOM tree.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView): Add click event listener.
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked): Added. Start a timeout since this is a single
click, if the timeout is canceled before it fires, then a double-click happened or another link was clicked.
(WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink): Added.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.onattach): Removed call to _preventFollowingLinksOnDoubleClick.
(WebInspector.DOMTreeElement.prototype.updateTitle): Ditto.
(WebInspector.DOMTreeElement.prototype._preventFollowingLinksOnDoubleClick): Removed.
(WebInspector.DOMTreeElement.prototype._buildAttributeDOM): Removed linkify parameter and remove dependency on
WebInspector.resourceURLForRelatedNode by making the anchor element directly.
(WebInspector.DOMTreeElement.prototype._buildTagDOM): Removed linkify parameter.
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Ditto.
* UserInterface/Utilities.js:
(String.prototype.trimMiddle): Added.
(String.prototype.trimEnd): Added.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Remove dependency on WebInspector.DOMSyntaxHighlighter and make style and script DOM nodes syntax highlighted
by using WebInspector.SyntaxHighlighter.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.syntaxHighlightStringAsDocumentFragment
instead of WebInspector.DOMSyntaxHighlighter. Also syntax highlight inline script and style text nodes.
* UserInterface/DOMTreeOutline.css:
(.dom-tree-outline .html-text-node.large): Added. Used for large text blocks, making viewing/editing more pleasant.
* UserInterface/SyntaxHighlighter.js:
(WebInspector.SyntaxHighlighter.prototype.synchronousHighlight): Added dontChunk parameter and fix undefined/null checks.
(WebInspector.SyntaxHighlighter.prototype.startHighlighting): Fix undefined/null checks
(WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Added dontChunk parameter and don't bail early if it is set.
* UserInterface/SyntaxHighlightingSupport.js:
(WebInspector.syntaxHighlightStringAsDocumentFragment): Added. Creates a TextContent and syntax highlights it and returns
the document fragment.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Break out the code for creating a syntax highlighted document fragment so it can be used
by the DOM tree for inline CSS and JavaScript.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein.
* UserInterface/SyntaxHighlightingSupport.js: Added.
(WebInspector.createSyntaxHighlightedDocumentFragment): Copied from WebInspector.TextEditorTextChunk.prototype.updateContent.
(WebInspector.createSyntaxHighlightedDocumentFragment.appendText): Ditto.
(WebInspector.createSyntaxHighlightedDocumentFragment.createTokenElement): Ditto.
* UserInterface/TextEditor.js:
(WebInspector.TextEditorTextChunk.prototype.updateContent): Use WebInspector.createSyntaxHighlightedDocumentFragment.
* UserInterface/Main.html: Included SyntaxHighlightingSupport.js.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Remove references to the Elements panel and make the context menu work in the DOM tree.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.selectOnMouseDown): Removed elements panel code.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline): Remove showInElementsPanelEnabled parameter.
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Removed elements panel code and call populateContextMenu.
(WebInspector.DOMTreeOutline.prototype.populateContextMenu): Removed call to populateHrefContextMenu which doesn't exist.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Style and syntax highlight the DOM tree elements.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/DOMTreeElement.js: Found and replaced "webkit-" with "" to fix the syntax highlighting class names.
* UserInterface/DOMTreeOutline.css: Added.
(.dom-tree-outline):
(.dom-tree-outline li.hovered:not(.selected) .selection):
(.dom-tree-outline li .selection):
(.dom-tree-outline li.selected .selection):
(.dom-tree-outline li.elements-drag-over .selection):
(.dom-tree-outline:focus li.selected .selection):
(.dom-tree-outline, .dom-tree-outline ol):
(.dom-tree-outline ol.children):
(.dom-tree-outline ol.children.expanded):
(.dom-tree-outline li):
(.dom-tree-outline:focus li.selected):
(.dom-tree-outline:focus li.selected *):
(.dom-tree-outline li.parent):
(.dom-tree-outline li .html-tag.close):
(.dom-tree-outline li.parent::before):
(.dom-tree-outline:focus li.parent.selected::before):
(.dom-tree-outline li.parent.expanded::before):
(.dom-tree-outline:focus li.parent.expanded.selected::before):
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline): Set the dom-tree-outline and syntax-highlighted class names.
(WebInspector.DOMTreeOutline.prototype.populateContextMenu): Found and replaced "webkit-" with "" to fix the
syntax highlighting class names.
* UserInterface/Main.html: Included DOMTreeOutline.css.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make it possible to share the syntax highlighting styles with the DOM tree.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/Main.html:
* UserInterface/SyntaxHighlightingDefaultTheme.css: Renamed from Safari/Develop/WebInspector/TextEditorDefaultTheme.css.
Found and replaced .text-editor with .syntax-highlighted.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Add the syntax-highlighted class name to the content container.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DOMTreeContentView and have it as a second view available in WebInspector.FrameContentView.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Added support for WebInspector.DOMTree.
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/DOMTreeContentView.css: Added.
(.content-view.dom-tree):
* UserInterface/DOMTreeContentView.js: Added.
(WebInspector.DOMTreeContentView): Create the DOMTreeOutline and request the root DOMNode.
(WebInspector.DOMTreeContentView.prototype.get domTree): Return _domTree.
(WebInspector.DOMTreeContentView.prototype.shown): Call setVisible on the DOMTreeOutline.
(WebInspector.DOMTreeContentView.prototype.hidden): Ditto.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeAvailable): Set the rootDOMNode on DOMTreeOutline.
(WebInspector.DOMTreeContentView.prototype._rootDOMNodeDidChange): Request the root DOMNode.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView): Create the DOM tree path component.
(WebInspector.FrameContentView.prototype._pathComponentForContentView): Return the DOM tree patch component
for DOMTree represented objects.
(WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Use the DOMTree of the frame.
* UserInterface/Images/DOMTree.pdf: Added.
* UserInterface/Main.html: Included DOMTreeContentView.{js,css}.
* UserInterface/PathComponentIcons.css:
(.dom-tree-icon .icon): Added.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Add support for getting the DOM tree for a specific WebInspector.Frame.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/DOMTree.js: Added.
(WebInspector.DOMTree):
(WebInspector.DOMTree.prototype.invalidate): Delay the invalidation on a timeout to coalesce multiple calls to invalidate.
(WebInspector.DOMTree.prototype.invalidate.performInvalidate): Do the work to invalidate.
(WebInspector.DOMTree.prototype.requestRootDOMNode): Get window.frameElement or document from the desired frame.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootObjectAvailable): Convert the RemoteObject to a DOMNode.
(WebInspector.DOMTree.prototype.requestRootDOMNode.rootDOMNodeAvailable): Get the child nodes before calling the callbacks.
(WebInspector.DOMTree.prototype.requestRootDOMNode.dispatchCallbacks): Helper to dispatch pending callbacks.
(WebInspector.DOMTree.prototype._nodeRemoved): Call invalidate if the node is the root node.
(WebInspector.DOMTree.prototype._documentUpdated): Call invalidate.
(WebInspector.DOMTree.prototype._frameMainResourceDidChange): Ditto.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.get domTree): Added.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Remove dependency on Preferences.maxInlineTextChildLength from WebInspector.DOMTreeElement.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.MaximumInlineTextChildLength): Added.
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Use WebInspector.DOMTreeElement.MaximumInlineTextChildLength.
(WebInspector.DOMTreeElement.prototype._showInlineText): Ditto.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Use WebInspector.DOMNode instead of WebInspector.DOMDocument since we don't have DOMDocument
in the new Web Inspector.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMNode.js:
(WebInspector.DOMNode): Set ownerDocument to this when this is a document node.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._setDocument): Use DOMNode instead of DOMDocument.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Update DOMTreeElement to correctly use the new non-formating WebInspector.UIString.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip): Use format() after UIString.
(WebInspector.DOMTreeElement.prototype.adjustCollapsedRange): Ditto.
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu): Removed WebInspector.useLowerCaseMenuTitles() use.
(WebInspector.DOMTreeElement.prototype._populateTextContextMenu): Ditto.
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu): Ditto.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Replace {add,remove,has}StyleClass in DOMTree{Element,Outline} with classList.{add,remove,contains}.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeElement.js:
(WebInspector.ElementsTreeElement.prototype.set hovered):
(WebInspector.ElementsTreeElement.prototype.onattach):
(WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
* UserInterface/DOMTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype._ondragover):
(WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
2012-01-16 Timothy Hatcher <timothy@apple.com>
Remove dependancy on WebInspector.Color from WebInspector.DOMTreeManager.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._buildHighlightConfig): Include the colors directly.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make WebInspector.DOMTreeUpdater listen for events on the correct object.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater): Use DOMTreeManager instead of the old DOMAgent name.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make WebInspector.DOMTreeOutline conform to the right style for objects with events.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._selectedNodeChanged):
2012-01-16 Timothy Hatcher <timothy@apple.com>
Make WebInspector.DOMTreeManager events conform to the style we use in the new Web Inspector.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._attributeModified): Use WebInspector.DOMTreeManager.Event and spell out Attribute.
(WebInspector.DOMTreeManager.prototype._attributeRemoved): Ditto.
(WebInspector.DOMTreeManager.prototype._loadNodeAttributes): Ditto.
(WebInspector.DOMTreeManager.prototype._characterDataModified): WebInspector.DOMTreeManager.Event.
(WebInspector.DOMTreeManager.prototype._setDocument): Ditto.
(WebInspector.DOMTreeManager.prototype._childNodeCountUpdated): Ditto.
(WebInspector.DOMTreeManager.prototype._childNodeInserted): Ditto.
(WebInspector.DOMTreeManager.prototype._childNodeRemoved): Ditto.
(WebInspector.DOMTreeManager.prototype.inspectElement): Ditto.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Don't call InspectorBackend.registerDOMDispatcher from WebInspector.DOMTreeManager.
The new Web Inspector calls InspectorBackend.registerDOMDispatcher from Main.js.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager): Remove call to InspectorBackend.registerDOMDispatcher.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Wire up WebInspector.DOMObserver to WebInspector.DOMTreeManager.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/DOMObserver.js:
(WebInspector.DOMObserver.prototype.documentUpdated):
(WebInspector.DOMObserver.prototype.setChildNodes):
(WebInspector.DOMObserver.prototype.attributeModified):
(WebInspector.DOMObserver.prototype.attributeRemoved):
(WebInspector.DOMObserver.prototype.inlineStyleInvalidated):
(WebInspector.DOMObserver.prototype.characterDataModified):
(WebInspector.DOMObserver.prototype.childNodeCountUpdated):
(WebInspector.DOMObserver.prototype.childNodeInserted):
(WebInspector.DOMObserver.prototype.childNodeRemoved):
2012-01-16 Timothy Hatcher <timothy@apple.com>
Use WebInspector.domTreeManager instead of the old WebInspector.domAgent.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.onselect):
(WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
(WebInspector.DOMTreeElement.prototype._tagNameEditingCommitted):
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._onmousemove):
(WebInspector.DOMTreeOutline.prototype._onmouseout):
(WebInspector.DOMTreeOutline.prototype._ondragstart):
(WebInspector.DOMTreeOutline.prototype._ondrop.callback):
(WebInspector.DOMTreeOutline.prototype._ondrop):
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired.focusElement):
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
* UserInterface/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._reset):
* UserInterface/RemoteObject.js:
(WebInspector.RemoteObject.prototype.pushNodeToFrontend):
2012-01-16 Timothy Hatcher <timothy@apple.com>
Create a WebInspector.DOMTreeManager instance.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a WebInspector.DOMTreeManager instance.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Rename WebInspector.ElementsTree{Outline,Element,Updater} to WebInspector.DOMTree{Outline,Element,Updater}.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeElement.js: Found and replaced WebInspector.ElementsTree with WebInspector.DOMTree.
* UserInterface/DOMTreeOutline.js: Ditto.
* UserInterface/DOMTreeUpdater.js: Ditto.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Rename WebInspector.DOMAgent to WebInspector.DOMTreeManager.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeManager.js: Found and replaced WebInspector.DOMAgent with WebInspector.DOMTreeManager.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Copy over WebInspector.ElementsTree{Outline,Element,Updater} from Open Source.
Copied into DOMTreeElement.js, DOMTreeOutline.js and DOMTreeUpdater.js since the classes will
soon be renamed to WebInspector.DOMTree{Outline,Element,Updater}.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeElement.js: Added.
(WebInspector.ElementsTreeElement):
(WebInspector.ElementsTreeElement.prototype.highlightSearchResults):
(WebInspector.ElementsTreeElement.prototype.hideSearchHighlights):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryShow):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight.updateEntryHide):
(WebInspector.ElementsTreeElement.prototype._updateSearchHighlight):
(WebInspector.ElementsTreeElement.prototype.get hovered):
(WebInspector.ElementsTreeElement.prototype.set hovered):
(WebInspector.ElementsTreeElement.prototype.get expandedChildrenLimit):
(WebInspector.ElementsTreeElement.prototype.set expandedChildrenLimit):
(WebInspector.ElementsTreeElement.prototype.get expandedChildCount):
(WebInspector.ElementsTreeElement.prototype.showChild):
(WebInspector.ElementsTreeElement.prototype._createTooltipForNode.setTooltip):
(WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions):
(WebInspector.ElementsTreeElement.prototype._createTooltipForNode.resolvedNode):
(WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
(WebInspector.ElementsTreeElement.prototype.updateSelection):
(WebInspector.ElementsTreeElement.prototype.onattach):
(WebInspector.ElementsTreeElement.prototype._preventFollowingLinksOnDoubleClick):
(WebInspector.ElementsTreeElement.prototype.onpopulate):
(WebInspector.ElementsTreeElement.prototype.updateChildren):
(WebInspector.ElementsTreeElement.prototype.insertChildElement):
(WebInspector.ElementsTreeElement.prototype.moveChild):
(WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode):
(WebInspector.ElementsTreeElement.prototype._updateChildren):
(WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange):
(WebInspector.ElementsTreeElement.prototype.handleLoadAllChildren):
(WebInspector.ElementsTreeElement.prototype.onexpand):
(WebInspector.ElementsTreeElement.prototype.oncollapse):
(WebInspector.ElementsTreeElement.prototype.onreveal):
(WebInspector.ElementsTreeElement.prototype.onselect):
(WebInspector.ElementsTreeElement.prototype.ondelete):
(WebInspector.ElementsTreeElement.prototype.onenter):
(WebInspector.ElementsTreeElement.prototype.selectOnMouseDown):
(WebInspector.ElementsTreeElement.prototype.ondblclick):
(WebInspector.ElementsTreeElement.prototype._insertInLastAttributePosition):
(WebInspector.ElementsTreeElement.prototype._startEditingTarget):
(WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
(WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
(WebInspector.ElementsTreeElement.prototype._populateNodeContextMenu):
(WebInspector.ElementsTreeElement.prototype._startEditing):
(WebInspector.ElementsTreeElement.prototype._addNewAttribute):
(WebInspector.ElementsTreeElement.prototype._triggerEditAttribute):
(WebInspector.ElementsTreeElement.prototype._startEditingAttribute.removeZeroWidthSpaceRecursive):
(WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
(WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
(WebInspector.ElementsTreeElement.prototype._startEditingTagName.keyupListener):
(WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingComitted):
(WebInspector.ElementsTreeElement.prototype._startEditingTagName.editingCancelled):
(WebInspector.ElementsTreeElement.prototype._startEditingTagName):
(WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.commit):
(WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose):
(WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
(WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
(WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
(WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.cancel):
(WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):
(WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.changeTagNameCallback):
(WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
(WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
(WebInspector.ElementsTreeElement.prototype._editingCancelled):
(WebInspector.ElementsTreeElement.prototype._distinctClosingTagElement):
(WebInspector.ElementsTreeElement.prototype.updateTitle):
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
* UserInterface/DOMTreeOutline.js: Added.
(WebInspector.ElementsTreeOutline):
(WebInspector.ElementsTreeOutline.prototype.wireToDomAgent):
(WebInspector.ElementsTreeOutline.prototype.setVisible):
(WebInspector.ElementsTreeOutline.prototype.addEventListener):
(WebInspector.ElementsTreeOutline.prototype.removeEventListener):
(WebInspector.ElementsTreeOutline.prototype.get rootDOMNode):
(WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
(WebInspector.ElementsTreeOutline.prototype.get isXMLMimeType):
(WebInspector.ElementsTreeOutline.prototype.selectedDOMNode):
(WebInspector.ElementsTreeOutline.prototype.selectDOMNode):
(WebInspector.ElementsTreeOutline.prototype.get editing):
(WebInspector.ElementsTreeOutline.prototype.update):
(WebInspector.ElementsTreeOutline.prototype.updateSelection):
(WebInspector.ElementsTreeOutline.prototype._selectedNodeChanged):
(WebInspector.ElementsTreeOutline.prototype.findTreeElement):
(WebInspector.ElementsTreeOutline.prototype.findTreeElement.parentNode):
(WebInspector.ElementsTreeOutline.prototype.createTreeElementFor):
(WebInspector.ElementsTreeOutline.prototype.set suppressRevealAndSelect):
(WebInspector.ElementsTreeOutline.prototype._revealAndSelectNode):
(WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent):
(WebInspector.ElementsTreeOutline.prototype._onmousedown):
(WebInspector.ElementsTreeOutline.prototype._onmousemove):
(WebInspector.ElementsTreeOutline.prototype._onmouseout):
(WebInspector.ElementsTreeOutline.prototype._ondragstart):
(WebInspector.ElementsTreeOutline.prototype._ondragover):
(WebInspector.ElementsTreeOutline.prototype._ondragleave):
(WebInspector.ElementsTreeOutline.prototype._isValidDragSourceOrTarget):
(WebInspector.ElementsTreeOutline.prototype._ondrop.callback):
(WebInspector.ElementsTreeOutline.prototype._ondrop):
(WebInspector.ElementsTreeOutline.prototype._ondragend):
(WebInspector.ElementsTreeOutline.prototype._clearDragOverTreeElementMarker):
(WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
(WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
(WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
(WebInspector.ElementsTreeOutline.prototype.adjustCollapsedRange):
(WebInspector.ElementsTreeOutline.prototype._updateModifiedNodes):
(WebInspector.ElementsTreeOutline.prototype._populateContextMenu):
* UserInterface/DOMTreeUpdater.js: Added.
(WebInspector.ElementsTreeUpdater):
(WebInspector.ElementsTreeUpdater.prototype._documentUpdated):
(WebInspector.ElementsTreeUpdater.prototype._attributesUpdated):
(WebInspector.ElementsTreeUpdater.prototype._characterDataModified):
(WebInspector.ElementsTreeUpdater.prototype._nodeInserted):
(WebInspector.ElementsTreeUpdater.prototype._nodeRemoved):
(WebInspector.ElementsTreeUpdater.prototype._childNodeCountUpdated):
(WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodesSoon):
(WebInspector.ElementsTreeUpdater.prototype._updateModifiedNodes):
(WebInspector.ElementsTreeUpdater.prototype._reset):
* UserInterface/Main.html: Included DOMTree{Outline,Element,Updater}.js.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Copy over WebInspector.DOMAgent from Open Source.
Copied into DOMTreeManager.js since WebInspector.DOMAgent will soon be renamed to WebInspector.DOMTreeManager.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMTreeManager.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
(WebInspector.DOMAgent):
(WebInspector.DOMAgent.prototype.requestDocument.onDocumentAvailable):
(WebInspector.DOMAgent.prototype.requestDocument):
(WebInspector.DOMAgent.prototype.pushNodeToFrontend):
(WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
(WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable):
(WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable):
(WebInspector.DOMAgent.prototype._attributeModified):
(WebInspector.DOMAgent.prototype._attributeRemoved):
(WebInspector.DOMAgent.prototype._inlineStyleInvalidated):
(WebInspector.DOMAgent.prototype._loadNodeAttributes):
(WebInspector.DOMAgent.prototype._characterDataModified):
(WebInspector.DOMAgent.prototype.nodeForId):
(WebInspector.DOMAgent.prototype._documentUpdated):
(WebInspector.DOMAgent.prototype._setDocument):
(WebInspector.DOMAgent.prototype._setDetachedRoot):
(WebInspector.DOMAgent.prototype._setChildNodes):
(WebInspector.DOMAgent.prototype._bindNodes):
(WebInspector.DOMAgent.prototype._childNodeCountUpdated):
(WebInspector.DOMAgent.prototype._childNodeInserted):
(WebInspector.DOMAgent.prototype._childNodeRemoved):
(WebInspector.DOMAgent.prototype.inspectElement):
(WebInspector.DOMAgent.prototype.performSearch.callback):
(WebInspector.DOMAgent.prototype.performSearch):
(WebInspector.DOMAgent.prototype.searchResult.mycallback):
(WebInspector.DOMAgent.prototype.searchResult):
(WebInspector.DOMAgent.prototype.cancelSearch):
(WebInspector.DOMAgent.prototype.querySelector):
(WebInspector.DOMAgent.prototype.querySelectorAll):
(WebInspector.DOMAgent.prototype.highlightDOMNode):
(WebInspector.DOMAgent.prototype.hideDOMNodeHighlight):
(WebInspector.DOMAgent.prototype.highlightDOMNodeForTwoSeconds):
(WebInspector.DOMAgent.prototype.setInspectModeEnabled):
(WebInspector.DOMAgent.prototype._buildHighlightConfig):
2012-01-16 Timothy Hatcher <timothy@apple.com>
Copy over WebInspector.DOMNode from Open Source.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/DOMNode.js: Copied from OpenSource/Source/WebCore/inspector/front-end/DOMAgent.js.
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.hasAttributes):
(WebInspector.DOMNode.prototype.hasChildNodes):
(WebInspector.DOMNode.prototype.nodeType):
(WebInspector.DOMNode.prototype.nodeName):
(WebInspector.DOMNode.prototype.nodeNameInCorrectCase):
(WebInspector.DOMNode.prototype.setNodeName):
(WebInspector.DOMNode.prototype.localName):
(WebInspector.DOMNode.prototype.nodeValue):
(WebInspector.DOMNode.prototype.setNodeValue):
(WebInspector.DOMNode.prototype.getAttribute):
(WebInspector.DOMNode.prototype.setAttribute):
(WebInspector.DOMNode.prototype.setAttributeValue):
(WebInspector.DOMNode.prototype.attributes):
(WebInspector.DOMNode.prototype.removeAttribute):
(WebInspector.DOMNode.prototype.getChildNodes.mycallback):
(WebInspector.DOMNode.prototype.getChildNodes):
(WebInspector.DOMNode.prototype.getOuterHTML):
(WebInspector.DOMNode.prototype.setOuterHTML):
(WebInspector.DOMNode.prototype.removeNode):
(WebInspector.DOMNode.prototype.copyNode):
(WebInspector.DOMNode.prototype.eventListeners):
(WebInspector.DOMNode.prototype.path):
(WebInspector.DOMNode.prototype.appropriateSelectorFor):
(WebInspector.DOMNode.prototype.isAncestor):
(WebInspector.DOMNode.prototype.isDescendant):
(WebInspector.DOMNode.prototype._setAttributesPayload):
(WebInspector.DOMNode.prototype._insertChild):
(WebInspector.DOMNode.prototype._removeChild):
(WebInspector.DOMNode.prototype._setChildrenPayload):
(WebInspector.DOMNode.prototype._renumber):
(WebInspector.DOMNode.prototype._addAttribute):
(WebInspector.DOMNode.prototype._setAttribute):
(WebInspector.DOMNode.prototype._removeAttribute):
(WebInspector.DOMNode.prototype.ownerDocumentElement):
(WebInspector.DOMNode.prototype.moveTo):
(WebInspector.DOMNode.prototype.isXMLNode):
* UserInterface/Main.html: Included DOMNode.js.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Copy over WebInspector.RemoteObject from Open Source.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/Main.html: Included RemoteObject.js.
* UserInterface/RemoteObject.js: Copied from OpenSource/Source/WebCore/inspector/front-end/RemoteObject.js.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Copy over WebInspector.ContextMenu from Open Source.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Rubber-stamped by John Sullivan.
* UserInterface/ContextMenu.js: Copied from OpenSource/Source/WebCore/inspector/front-end/ContextMenu.js.
* UserInterface/Main.html: Included ContextMenu.js.
2012-01-16 Timothy Hatcher <timothy@apple.com>
Rename TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
It always dealt with GeneralTreeElements from the start, not TreeElements. This makes it clear
that is can't be used with other TreeElement subclasses (like DOMTreeElement).
Rubber-stamped by John Sullivan.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use GeneralTreeElementPathComponent.
(WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Ditto.
* UserInterface/GeneralTreeElementPathComponent.js: Renamed from TreeElementHierarchicalPathComponent.js.
* UserInterface/Main.html: Renamed TreeElementHierarchicalPathComponent.js to GeneralTreeElementPathComponent.js.
2012-01-14 Timothy Hatcher <timothy@apple.com>
Prevent deselection of frames in the Resources sidebar when they navigate, or when resources redirect.
When a frame navigates or a resource redirects we remove it from the tree and reinsert it at the correct
sort order based on the new URL. When the tree element was removed we would automatically select a sibling.
This uses new TreeOutline support to suppress notifying select/deselect listeners so the temporary removal
is not noticed, so the content view does not change briefly.
Reviewed by Dan Bernstein.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype._addTreeElement):
(WebInspector.FrameTreeElement.prototype._removeTreeElement):
2012-01-14 Timothy Hatcher <timothy@apple.com>
Add more support for suppressing the select and deselect events in TreeOutline. This also fixes
a typo where suppress was pervasively misspelled.
This is needed to prevent changing views when a tree element in the Resources sidebar moves to a folder.
Reviewed by Dan Bernstein.
* UserInterface/TreeOutline.js:
(TreeOutline.prototype.removeChildAtIndex): Added suppressOnDeselect and suppressSelectSibling.
(TreeOutline.prototype.removeChild): Ditto.
(TreeOutline.prototype.removeChildren): Added suppressOnDeselect.
(TreeOutline.prototype.removeChildrenRecursive): Ditto.
(TreeElement.prototype.select): Added suppressOnSelect and suppressOnDeselect.
(TreeElement.prototype.revealAndSelect): Added the same parameters as select.
2012-01-11 Timothy Hatcher <timothy@apple.com>
Make DataGrid use CSS gradients for headers instead of images.
Part of: <rdar://problem/10643175> DataGrid should be HiDPI compliant
Reviewed by Jing Jin.
* UserInterface/DataGrid.css:
(.data-grid th):
(.data-grid th:first-child):
(.data-grid th:active:first-child):
(.data-grid th:last-child):
(.data-grid th:active:last-child):
(.data-grid table.data):
(.data-grid td):
(.data-grid td:last-child):
(.data-grid th.sortable:active):
(.data-grid th.sort-ascending, .data-grid th.sort-descending):
(.data-grid th.sortable.sort-ascending:active, .data-grid th.sortable.sort-descending:active):
(.data-grid th.sort-descending + th):
(.data-grid th.sort-descending + th:active):
(.data-grid th.sort-descending:first-child):
(.data-grid th.sort-descending:last-child):
(body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-descending):
* UserInterface/Images/glossyHeader.png: Removed.
* UserInterface/Images/glossyHeaderPressed.png: Removed.
* UserInterface/Images/glossyHeaderSelected.png: Removed.
* UserInterface/Images/glossyHeaderSelectedPressed.png: Removed.
2012-01-10 Timothy Hatcher <timothy@apple.com>
Improve appearance of DataGrid in the new Web Inspector.
This removes the extra border and outline around the DOM Storage and Cookie Storage content views.
The empty gutter on the right is also removed now that OS X has overlay scrollers.
Reviewed by Brian Weinstein.
* UserInterface/CookieStorageContentView.css:
(.content-view.cookie-storage > .data-grid): Set border and outline to none.
* UserInterface/DOMStorageContentView.css:
(.content-view.dom-storage > .data-grid): Ditto.
* UserInterface/DataGrid.css:
(.data-grid .data-container): Remove padding-right.
(.data-grid th:last-child): Added. Remove right border and set padding-right to give room for the scroller.
(.data-grid td:last-child): Added. Ditto.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid): Removed the corder cell since it ins't needed to make room for the scroller anymore.
2012-01-10 Timothy Hatcher <timothy@apple.com>
Add utility functions needed by the DOM tree code.
Part of: <rdar://problem/10663163> Implement the DOM Tree content view
Reviewed by John Sullivan.
* UserInterface/Utilities.js:
(Node.prototype.isAncestor): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
(Node.prototype.isDescendant): Ditto.
(Element.prototype.createChild): Ditto.
(DocumentFragment.prototype.createChild): Ditto.
2012-01-10 Timothy Hatcher <timothy@apple.com>
Fix a case where Element.totalOffsetLeft is used as a function instead of a property.
Reviewed by Brian Weinstein.
* UserInterface/TreeOutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle): Don't call totalOffsetLeft as a function.
2012-01-10 Timothy Hatcher <timothy@apple.com>
Make events dispatch to listeners on all constructors up the prototype chain, not just immediate constructor.
This is needed so subclasses of ContentView can dispatch events to listeners without the need for them to listen
on the concrete ContentView subclasses.
Reviewed by Brian Weinstein.
* UserInterface/Object.js:
(WebInspector.Object.prototype.dispatchEventToListeners):
2012-01-10 Timothy Hatcher <timothy@apple.com>
Make clicking of links for main resources of frames navigate to those resources. Before this only subresources
were navigable and clicking a main resource link would open a new Safari window instead of showing the source.
Reviewed by Brian Weinstein.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.resourceForURL): Check the main resources of the child frames for the requested URL.
2012-01-10 Timothy Hatcher <timothy@apple.com>
Allow repeated selection of tree elements in the Storage panel (and all future NavigationSidebarPanels.)
Reviewed by Brian Weinstein.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Set this._contentTreeOutline.allowsRepeatSelection to true.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Moved this.contentTreeOutline.allowsRepeatSelection = true from here
to WebInspector.NavigationSidebarPanel.
2012-01-12 Timothy Hatcher <timothy@apple.com>
Exclude Web Inspector strings from localizedStrings.js until they can be included
in Production builds.
Reviewed by Darin Adler.
* UserInterface/Main.js:
(WebInspector.UIString): Always return the string until we can actually do the lookup.
* English.lproj/localizedStrings.js: Updated to exclude Web Inspector strings.
2012-01-11 Brian Weinstein <bweinstein@apple.com>
Rest of <rdar://problem/10643012> Implement Database content views for new inspector design.
Implement custom views for when a database table is empty, or when there was an error
loading the data.
If a table is empty, we don't get a list of column names, and can't show an empty data grid.
If there was an error, we also can't show a data grid because we don't know anything about
the table.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype._queryFinished): If we were unable to create
a data grid, the table was empty, so call createMessageTextView.
(WebInspector.DatabaseTableContentView.prototype._queryError): Call createMessageTextView.
* UserInterface/Main.css:
(.message-text-view, message-text-view > p, message-text-view.error): Added styles for createMessageTextView.
* UserInterface/Main.js:
(WebInspector.createMessageTextView): Creates a view and returns it to the caller.
* English.lproj/localizedStrings.js:
2012-01-11 Brian Weinstein <bweinstein@apple.com>
Clear database table views when the page navigates.
Reviewed by Tim Hatcher.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2012-01-11 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
Implement the DataGrid for database tables.
This patch adds the ability to be able to execute SQL queries on a DatabaseObject, and DatabaseContentView
uses that to get the data from the selected table.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseObject.js:
(WebInspector.DatabaseObject.prototype.executeSQL): Call through to DatabaseAgent.executeSQL.
* UserInterface/DatabaseObserver.js: Add a map from transaction ID -> callbacks to be able to do the right
thing when sqlTransactionSucceeded or sqlTransactionFailed is called.
(WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Call the onSuccess callback for that
transaction ID.
(WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Call the onError callback for that transaction
ID.
* UserInterface/DatabaseTableContentView.css: Added.
(.content-view.database-table > .data-grid):
* UserInterface/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView): Call update.
(WebInspector.DatabaseTableContentView.prototype.constructor.WebInspector.DatabaseTableContentView.update): Get the
data from the table.
(WebInspector.DatabaseTableContentView.prototype._escapeTableName): Taken from open source.
(WebInspector.DatabaseTableContentView.prototype._queryFinished): Create a sortable data grid with the column names
and the values returned from the SQL call.
(WebInspector.DatabaseTableContentView.prototype._queryError): Added a FIXME to handle the error.
* UserInterface/Main.html:
2012-01-10 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643012> Implement Database content views for new inspector design.
Add a content view for database tables. It is currently empty, but a datagrid will be added that
will show the correct data.
Reviewed by Tim Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/DatabaseTableContentView.js: Added.
(WebInspector.DatabaseTableContentView):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
2012-01-10 Brian Weinstein <bweinstein@apple.com>
Clear the DOM and cookie storage content views when we navigate.
Reviewed by Joseph Pecoraro.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2012-01-10 Brian Weinstein <bweinstein@apple.com>
Rest of <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
Implement deleting of individual cookies.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable): Add a delete callback.
(WebInspector.CookieStorageContentView.prototype._deleteCallback): Delete the cookie.
2012-01-10 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
Implement the sorting of columns in the cookie data grid.
The code to sort the array was brought from open source. The rest of the patch is some refactoring
which makes the code more efficient. When we get the cookies from the PageAgent, we filter them,
and store the filtered cookies as a property in the class. When the sorting order is changed,
we just rebuild the table using the filtered cookies already stored, so we don't need to refilter
them when the sorting order changed.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Store the filtered
cookies as a property, then call rebuildTable.
(WebInspector.CookieStorageContentView.prototype._rebuildTable): Don't take cookies as a parameter any more, and don't
filter them.
(WebInspector.CookieStorageContentView.prototype._sortCookies.localeCompare): Copied from open source.
(WebInspector.CookieStorageContentView.prototype._sortCookies.numberCompare): Ditto.
(WebInspector.CookieStorageContentView.prototype._sortCookies.expiresCompare): Ditto.
(WebInspector.CookieStorageContentView.prototype._sortCookies): Ditto.
* UserInterface/Utilities.js:
(Object.defineProperty): Copied from open source.
2012-01-10 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
Filter the cookies that are shown for each domain that the page has loaded. This means that when
you see the cookies for twitter.com, you will only see the twitter.com cookies, and not the doubleclick
cookies that twitter might have loaded.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._updateWithCookies): Use the filtered cookies.
(WebInspector.CookieStorageContentView.prototype._filterCookies): Get a list of all the resources
that are loaded with the CookieStorageContentView's host, and when looking at the document's cookies,
only add the ones that match the host.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.get frames): Get the frames of the document.
(WebInspector.cookieMatchesResourceURL): Brought over from open source.
(WebInspector.cookieDomainMatchesResourceDomain): Ditto.
2012-01-09 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
Show a list of cookies on the page. It can't be sorted, and isn't filtered for the cookie host that
you selected, but cookies do show up.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageContentView.css: Added.
(.content-view.cookie-storage > .data-grid): The data grid takes up the whole view.
* UserInterface/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView): Call update.
(WebInspector.CookieStorageContentView.prototype.constructor.WebInspector.CookieStorageContentView.update): Get the cookies
on the page, and then call _updateWithCookies on the result.
(WebInspector.CookieStorageContentView.prototype._updateWithCookies): Create the data grid if it hasn't been created yet, and
populate it.
* UserInterface/Main.html: Add new file.
* English.lproj/localizedStrings.js: Update localized string.
2012-01-09 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10642964> Implement Cookie content view for new web inspector design.
Add a content view for cookie storage. It is currently empty, but a datagrid will be added that
will show the correct data.
Reviewed by Tim Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add a new case for CookieStorageObject,
(WebInspector.ContentView.isViewable): Ditto.
* UserInterface/CookieStorageContentView.js: Added.
(WebInspector.CookieStorageContentView):
* UserInterface/Main.html: Add new files.
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject): Add a new case for CookieStorageObject.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Ditto.
2012-01-09 Brian Weinstein <bweinstein@apple.com>
When we want to update the DOM storage data grid, don't remove the whole data grid and re-create it,
just remove the DataGridNodes and regenerate those.
Reviewed by Tim Hatcher.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Don't remove the content
view's children.
(WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _updateDataGridForDOMStorageEntries (which was renamed).
(WebInspector.DOMStorageContentView.prototype._updateDataGridForDOMStorageEntries): Renamed. It also now only creates the data grid
if necessary, and removes the children from the data grid before adding the new children.
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Rest towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Hook up editing of the DOM storage items.
Reviewed by Tim Hatcher.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Add an editing callback.
(WebInspector.DOMStorageContentView.prototype._editingCallback): Tell the DOMStorageObject about what
item to modify.
* UserInterface/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.setItem): Call through to DOMStorageAgent.
* UserInterface/Editing.css: Added. Copied some rules from inspector.css in Open Source.
* UserInterface/EditingSupport.js: Added. Copied selected functions from Open Source UIUtils.js.
* UserInterface/KeyboardShortcut.js: Added.
* UserInterface/Main.html: Added new files.
* UserInterface/Utilities.js: Copied isInsertionCaretInside from Open Source utilities.js, but made it
a property.
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Implement DOMStorageObserver.updateDOMStorage, and have it call all the way through to calling
update on the DOMStorageContentView.
Reviewed by Tim Hatcher.
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage):
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype.domStorageWasUpdated):
(WebInspector.StorageManager.prototype._mainResourceDidChange):
(WebInspector.StorageManager.prototype._domStorageForId):
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Hook up the delete callback from the datagrid. When the delete key is pressed and a row is selected,
that DOM storage item will be deleted.
Reviewed by Tim Hatcher.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries):
(WebInspector.DOMStorageContentView.prototype._deleteCallback):
* UserInterface/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.getEntries):
(WebInspector.DOMStorageObject.prototype.removeItem):
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Make resizing columns work.
Reviewed by Tim Hatcher.
* UserInterface/DataGrid.js:
(WebInspector.DataGrid.prototype._resizerDragging): Change totalOffsetLeft to be a property instead of
a function. This matches Utilities.js and code that we already have.
(WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): Ditto.
* UserInterface/Main.js:
(WebInspector.elementDragStart): Copied from Open Source.
(WebInspector.elementDragEnd): Ditto.
* UserInterface/Utilities.js:
(Object.defineProperty):
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
We now show a data grid with the contents of the local or session storage.
It's not editable, and you can't resize the columns yet, but that will come in
the not too distant future.
Reviewed by Tim Hatcher.
* UserInterface/DOMStorageContentView.css: Added.
(.content-view.dom-storage > .data-grid): Make the data grid take up the whole content view.
* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView): Call update.
(WebInspector.DOMStorageContentView.prototype.constructor.WebInspector.DOMStorageContentView.update): Remove all children
from the content view, and ask the DOM storage object for a list of entries, and pass _showDOMStorageEntries as a callback.
(WebInspector.DOMStorageContentView.prototype._showDOMStorageEntries): Call _dataGridForDOMStorageEntries and add the data grid
to the
(WebInspector.DOMStorageContentView.prototype._dataGridForDOMStorageEntries): Create the data grid and populate it.
* UserInterface/DOMStorageObject.js:
(WebInspector.DOMStorageObject.prototype.isLocalStorage):
(WebInspector.DOMStorageObject.prototype.getEntries): Ask for the entries for the DOM storage.
* UserInterface/Main.html: Add the new CSS file.
* English.lproj/localizedStrings.js: Update the localized strings.
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Clean up DataGrid by replacing (add|remove|has)StyleClass with classList.(add|remove|contains).
Reviewed by Tim Hatcher.
* UserInterface/DataGrid.js:
2012-01-06 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Add a content view for DOM storage. Currently it is just a blank view, but a datagrid will be
added that will show the correct data.
Reviewed by Tim Hatcher.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add a new case for DOMStorageObject.
(WebInspector.ContentView.isViewable): Ditto.
(.content-view.dom-storage > .content-view-container):
* UserInterface/DOMStorageContentView.js: Added.
(WebInspector.DOMStorageContentView):
* UserInterface/Main.html:
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel): Add a listener for when a tree element is selected.
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected): Install the content view.
2012-01-04 Brian Weinstein <bweinstein@apple.com>
Work towards <rdar://problem/10643005> Implement DOM Storage content views for new inspector design.
Add DataGrid JavaScript, CSS files, and necessary images to the internal project.
Reviewed by Tim Hatcher.
* UserInterface/DataGrid.js: Added. This was copied from ToT Open Source, but the changes from
http://trac.webkit.org/changeset/98225 and http://trac.webkit.org/changeset/98228 were rolled out,
because we don't share the same concept of a WebInspector view.
* UserInterface/Images/glossyHeader.png: Added.
* UserInterface/Images/glossyHeaderPressed.png: Added.
* UserInterface/Images/glossyHeaderSelected.png: Added.
* UserInterface/Images/glossyHeaderSelectedPressed.png: Added.
* UserInterface/Images/treeDownTriangleBlack.png: Added.
* UserInterface/Images/treeDownTriangleWhite.png: Added.
* UserInterface/Images/treeRightTriangleBlack.png: Added.
* UserInterface/Images/treeRightTriangleWhite.png: Added.
* UserInterface/Images/treeUpTriangleBlack.png: Added.
* UserInterface/Main.html: Added new files.
* UserInterface/dataGrid.css: Added.
2012-01-06 Timothy Hatcher <timothy@apple.com>
Add a path component to WebInspector.FrameContentView that will eventually let you switch
between Source Code and DOM Tree.
Reviewed by Joseph Pecoraro.
* UserInterface/FrameContentView.js:
(WebInspector.FrameContentView.createPathComponent): Added. Helper for making HierarchicalPathComponents.
(WebInspector.FrameContentView): Create a Source Code path component.
(WebInspector.FrameContentView.prototype.get selectionPathComponents): Added. Append the current view's path
components to the path component representing the current view.
(WebInspector.FrameContentView.prototype._pathComponentForContentView): Added.
(WebInspector.FrameContentView.prototype._showContentViewForIdentifier): Added.
(WebInspector.FrameContentView.prototype._pathComponentSelected): Added.
* UserInterface/Images/SourceCode.pdf: Added.
* UserInterface/Main.html: Included PathComponentIcons.css.
* UserInterface/PathComponentIcons.css: Added.
(.source-code-icon .icon):
* English.lproj/localizedStrings.js: Updated.
2012-01-06 Timothy Hatcher <timothy@apple.com>
Add support for path components in the Quick Navigation bar that represent the current selection in a content view.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView): Listen for CurrentContentViewDidChange and SelectionPathComponentsDidChange events.
(WebInspector.ClusterContentView.prototype.get selectionPathComponents): Added. Forward the selectionPathComponents
of the current view.
(WebInspector.ClusterContentView.prototype._currentContentViewDidChange): Added. Dispatch SelectionPathComponentsDidChange event.
(WebInspector.ClusterContentView.prototype._contentViewSelectionPathComponentDidChange): Added. Dispatch the
SelectionPathComponentsDidChange event if the event target is our current content view.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Create a hierarchical path navigation item for the content view path components.
(WebInspector.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem): Added. Remove and insert the navigation
item if needed and update the components.
(WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange): Added. Call _updateContentViewSelectionPathNavigationItem.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _updateContentViewSelectionPathNavigationItem.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.get selectionPathComponents): Added stub.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path:not(.always-show-last-path-component-separator) > .hierarchical-path-component:last-of-type > .separator): Added
the :not(.always-show-last-path-component-separator) part so so prevent hiding the separator in that case.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.get alwaysShowLastPathComponentSeparator): Added.
(WebInspector.HierarchicalPathNavigationItem.prototype.set alwaysShowLastPathComponentSeparator): Added.
2012-01-05 Timothy Hatcher <timothy@apple.com>
Fix a regression from r39746 where link navigation between Web Inspector resource broke.
Reviewed by Brian Weinstein.
* UserInterface/Main.js:
(WebInspector.openURL): Use contentBrowser instead of the now removed contentViewContainer.
Also show the frame for main resources instead of the resource itself.
2012-01-05 Timothy Hatcher <timothy@apple.com>
Fix an issue where host names for frames where not shown when they differ from the frame that includes them.
Reviewed by Brian Weinstein.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.isMainResource): Added. Helper function.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): When the resource is a main resource, get the
host from the parent frame instead of the current frame.
2012-01-05 Timothy Hatcher <timothy@apple.com>
Add support for intra-view back/forward navigation.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.canGoBack): Added. Call through to the content view container.
(WebInspector.ClusterContentView.prototype.canGoForward): Added. Ditto.
(WebInspector.ClusterContentView.prototype.goBack): Added. Ditto.
(WebInspector.ClusterContentView.prototype.goForward): Added. Ditto.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.canGoBack): Added. Check the current content view first.
(WebInspector.ContentBrowser.prototype.canGoForward): Added. Check the current content view first.
(WebInspector.ContentBrowser.prototype.goBack): Added. Try the current content view first.
(WebInspector.ContentBrowser.prototype.goForward): Added. Try the current content view first.
(WebInspector.ContentBrowser.prototype._backButtonClicked): Call goBack on this instead of the content
view container directly.
(WebInspector.ContentBrowser.prototype._forwardButtonClicked): Call goForward on this instead of the
content view container directly.
(WebInspector.ContentBrowser.prototype._updateBackForwardButtons): Added.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Call _udpateBackForwardButtons.
* UserInterface/ContentView.js:
(WebInspector.ContentView.prototype.canGoBack): Added stub.
(WebInspector.ContentView.prototype.canGoForward): Added stub.
(WebInspector.ContentView.prototype.goBack): Added stub.
(WebInspector.ContentView.prototype.goForward): Added stub.
2012-01-04 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FrameContentView and WebInspector.ClusterContentView in preparation for showing
either the main resource text or the DOM tree for a frame.
Reviewed by Joseph Pecoraro.
* UserInterface/ClusterContentView.css: Added.
(.content-view.cluster > .content-view-container):
* UserInterface/ClusterContentView.js: Added.
(WebInspector.ClusterContentView):
(WebInspector.ClusterContentView.prototype.get contentViewContainer):
* UserInterface/ContentView.js:
(WebInspector.ContentView): Return a FrameContentView for a Frame.
(WebInspector.ContentView.isViewable): Added Frame.
* UserInterface/FrameContentView.js: Added.
(WebInspector.FrameContentView):
(WebInspector.FrameContentView.prototype.get frame):
* UserInterface/Main.html: Included ClusterContentView.{css,js} and FrameContentView.js.
* UserInterface/Main.js:
(WebInspector.contentBrowserTreeElementForRepresentedObject): Added WebInspector.Frame check.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Removed. The base class
version of this function is enough now.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Close all FrameContentViews
and improve a comment and add a FIXME.
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Use treeElement.representedObject
instead of treeElement.resource since we want a FrameContentView for frames.
2012-01-04 Timothy Hatcher <timothy@apple.com>
Populate the on-click menu for path components backed by tree elements.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Add PathComponentWasSelected event listener.
(WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Use TreeElementHierarchicalPathComponent.
(WebInspector.ContentBrowser.prototype._hierarchicalPathComponentWasSelected): Added.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Add assertions that isViewable is correct.
(WebInspector.ContentView.isViewable): Added.
* UserInterface/Main.html: Included TreeElementHierarchicalPathComponent.js.
* UserInterface/TreeElementHierarchicalPathComponent.js: Added.
(WebInspector.TreeElementHierarchicalPathComponent):
(WebInspector.TreeElementHierarchicalPathComponent.prototype.get treeElement):
(WebInspector.TreeElementHierarchicalPathComponent.prototype.get previousSibling):
(WebInspector.TreeElementHierarchicalPathComponent.prototype.get nextSibling):
2012-01-04 Timothy Hatcher <timothy@apple.com>
Show a popup menu on click in HierarchicalPathComponent that contains sibling path components.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathComponent.css:
(.hierarchical-path-component): Make positioning relative.
(.hierarchical-path-component > select): Added. Positioned so the text in the menu aligns with the text in .title.
* UserInterface/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent): Create the select element.
(WebInspector.HierarchicalPathComponent.prototype.get previousSibling): Added.
(WebInspector.HierarchicalPathComponent.prototype.set previousSibling): Added.
(WebInspector.HierarchicalPathComponent.prototype.get nextSibling): Added.
(WebInspector.HierarchicalPathComponent.prototype.set nextSibling): Added.
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement): Added. Build the select menu.
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption): Added. Helper to create
an option element from a path component.
(WebInspector.HierarchicalPathComponent.prototype._selectElementMouseDown): Added. Call _updateSelectElement.
(WebInspector.HierarchicalPathComponent.prototype._selectElementSelectionChanged): Added. Fire the SiblingWasSelected event.
* UserInterface/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components): Remove and add event listeners.
(WebInspector.HierarchicalPathNavigationItem.prototype._siblingPathComponentWasSelected): Added. Fire the PathComponentWasSelected event.
2012-01-03 Brian Weinstein <bweinstein@apple.com>
If a database doesn't have any tables, its tree element shouldn't have a disclosure triangle.
When creating the tree element for a database, initially set it not to have children, but make sure
it is populated when it is first created, so children will be added if it has them.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseTreeElement.js:
(WebInspector.DatabaseTreeElement):
(WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback):
(WebInspector.DatabaseTreeElement.prototype.onpopulate):
2012-01-02 Timothy Hatcher <timothy@apple.com>
Localize the Web Inspector by adding WebInspector.UIString in places that need it.
Reviewed by Jessie Berlin.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser):
* UserInterface/CookieStorageTreeElement.js:
(WebInspector.CookieStorageTreeElement.prototype.get categoryName):
* UserInterface/DOMStorageTreeElement.js:
(WebInspector.DOMStorageTreeElement.prototype.get categoryName):
* UserInterface/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement.prototype.get categoryName):
* UserInterface/DatabaseObject.js:
(WebInspector.DatabaseObject):
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype._folderNameForResourceType):
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject):
* UserInterface/Main.js:
(WebInspector.contentLoaded):
(WebInspector._leftSidebarToggleButtonToolTip):
(WebInspector._rightSidebarToggleButtonToolTip):
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded):
(WebInspector.StorageSidebarPanel.prototype._databaseWasAdded):
(WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded):
* English.lproj/localizedStrings.js: Updated with update-safari-localizable-strings.
2012-01-02 Timothy Hatcher <timothy@apple.com>
Add WebInspector.UIString and load the localized strings file.
Reviewed by Jessie Berlin.
* UserInterface/Main.js:
(WebInspector.loadLocalizedStrings): Added. Load the localized strings file and call
content loaded when it loads.
(WebInspector.UIString): Added.
2012-01-02 Timothy Hatcher <timothy@apple.com>
Add string formatting functions to Web Inspector.
These will be needed for localization and the console.
Reviewed by Brian Weinstein.
* UserInterface/Utilities.js:
(Array.convert): Copied from OpenSource/Source/WebCore/inspector/front-end/utilities.js.
(String.tokenizeFormatString): Ditto.
(String.standardFormatters): Ditto.
(String.format): Ditto.
(String.prototype.format): Added.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Add the toggle left and right sidebar buttons to the Quick Navigation bar.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/Images/LeftSidebarClose.pdf: Added.
* UserInterface/Images/LeftSidebarOpen.pdf: Added.
* UserInterface/Images/RightSidebarClose.pdf: Added.
* UserInterface/Images/RightSidebarOpen.pdf: Added.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create the left and right toggle sidebar buttons and add event listeners.
(WebInspector._leftSidebarToggleButtonToolTip): Added. Return the correct tool tip based on which sidebar
is currently on the left.
(WebInspector._rightSidebarToggleButtonToolTip): Added. Ditto for the right.
(WebInspector._toggleLeftSidebar): Added.
(WebInspector._toggleRightSidebar): Added.
(WebInspector._sidebarCollapsedStateDidChange): Added. Update the toggle navigation buttons.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.set collapsed): Fire the CollapsedStateDidChange event.
* UserInterface/TextEditor.css:
(.text-editor > .gutter): Made the min-width 1px smaller to align with the divider in the navigation bar.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Add support for removing navigation items.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.removeNavigationItem): Added.
(WebInspector.NavigationBar.prototype.set selectedNavigationItem): Moved code from here into _findNavigationItem.
(WebInspector.NavigationBar.prototype._findNavigationItem): Added.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Add support for inserting navigation items at a specific index.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.addNavigationItem): Call insertNavigationItem.
(WebInspector.NavigationBar.prototype.insertNavigationItem): Added.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ToggleButtonNavigationItem for the sidebar toggle buttons in the Quick Navigation bar.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.set image): Added.
(WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Call clearRect
since _generateImages can be called multiple times now.
* UserInterface/Main.html: Included ToggleButtonNavigationItem.js.
* UserInterface/ToggleButtonNavigationItem.js: Added.
(WebInspector.ToggleButtonNavigationItem): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.get defaultImage): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.get alternateImage): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.get toggled): Added.
(WebInspector.ToggleButtonNavigationItem.prototype.set toggled): Added. Set _toggled and set the correct image.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Actually set the ButtonNavigationItem tool tip so it shows up as expected.
Reviewed by Dan Bernstein.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem): Use the toolTip setter instead of _toolTip.
(WebInspector.ButtonNavigationItem.prototype.get toolTip): Return the title instead of _toolTip.
(WebInspector.ButtonNavigationItem.prototype.set toolTip): Added. Set the element title.
2011-12-31 Timothy Hatcher <timothy@apple.com>
Rename ButtonNavigationItem.displayName to toolTip.
It was always intended to be used as the tool tip, so this makes it clear.
Reviewed by Dan Bernstein.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem):
(WebInspector.ButtonNavigationItem.prototype.constructor.WebInspector.ButtonNavigationItem.get toolTip):
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem):
2011-12-29 Timothy Hatcher <timothy@apple.com>
Fix an issue in the Web Inspector where the old page content might appear when
pressing the back button.
Reviewed by Dan Bernstein.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Delay this work because
other listeners of this event might not have fired yet. So selecting the main frame before those listeners
do their work might cause the content of the old page to show instead of the new page.
2011-12-29 Timothy Hatcher <timothy@apple.com>
Add back/forward buttons to the Quick Navigation bar and hook them up.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Create the back and forward button navigation items.
(WebInspector.ContentBrowser.prototype._backButtonClicked): Added.
(WebInspector.ContentBrowser.prototype._forwardButtonClicked): Added.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Update the enabled state
of the back/forward navigation items.
* UserInterface/Images/BackArrow.pdf: Added.
* UserInterface/Images/ForwardArrow.pdf: Added.
2011-12-29 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DividerNavigationItem for dividing items in the Quick Navigation bar.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/DividerNavigationItem.css: Added.
(.navigation-bar > .item.divider):
* UserInterface/DividerNavigationItem.js: Added.
(WebInspector.DividerNavigationItem):
* UserInterface/Main.html: Included DividerNavigationItem.js and DividerNavigationItem.css.
2011-12-29 Timothy Hatcher <timothy@apple.com>
Add disabled support to WebInspector.ButtonNavigationItem.
This is needed for the back/forward buttons.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar > .item.button.disabled > .glyph): Added.
(.navigation-bar > .item.button:not(.disabled):not(.radio):active): Don't highlight on click when disabled.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype.get enabled): Added.
(WebInspector.ButtonNavigationItem.prototype.set enabled): Added.
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
(WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Don't fire the event when disabled.
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added :not(.disabled) to the focus and active rules.
2011-12-29 Timothy Hatcher <timothy@apple.com>
Add support for click events to WebInspector.ButtonNavigationItem.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem): Added click event listener to the element.
(WebInspector.ButtonNavigationItem.StyleClassName._mouseClicked): Added. Dispatch the Clicked event.
2011-12-29 Timothy Hatcher <timothy@apple.com>
Support different size glyph images on WebInspector.ButtonNavigationItem. Also adds a highlight to
buttons when pressed and general style clean up.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ButtonNavigationItem.css:
(.navigation-bar > .item.button): Default buttons to a width of 26px. Removed background styles.
(.navigation-bar > .item.button > .glyph): Set width and height to 100% and have the background
centered and non-repeating.
(.navigation-bar > .item.button:not(.radio):active): Added. Highlight when pressed.
* UserInterface/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem): Added image width and height arguments.
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
* UserInterface/RadioButtonNavigationItem.css:
(.navigation-bar > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
(.navigation-bar.collapsed > .item.radio.button): Added. Moved from ButtonNavigationItem.css.
(.navigation-bar > .item.radio.button.selected): Moved background-repeat from ButtonNavigationItem.css to here.
(.navigation-bar.collapsed > .item.radio.button.selected): Added. Adjust the background-size to fit the width.
* UserInterface/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem): Added image width and height arguments.
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Added background-size to the generated rules.
2011-12-28 Timothy Hatcher <timothy@apple.com>
Populate the Quick Navigation bar with the path of the selected item.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser): Added delegate argument. Create a HierarchicalPathNavigationItem and add
to the navigation bar.
(WebInspector.ContentBrowser.prototype.get delegate): Added.
(WebInspector.ContentBrowser.prototype.set delegate): Added.
(WebInspector.ContentBrowser.prototype._updateHierarchicalPathNavigationItem): Added. Build path components
based on the tree element for the represented object.
(WebInspector.ContentBrowser.prototype._currentContentViewDidChange): Added. Call _updateHierarchicalPathNavigationItem.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype._showContentView): Dispatch the CurrentContentViewDidChange event.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Pass this as the delegate to the ContentBrowser.
(WebInspector.contentBrowserTreeElementForRepresentedObject): Added. Call treeElementForRepresentedObject on
the ResourceSidebarPanel for Resource represented objects.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject): Added. Generic implementation
that will work for most NavigationSidebarPanel subclasses.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Added. If the resource is a
main resource, return the tree element for the parent frame.
2011-12-28 Timothy Hatcher <timothy@apple.com>
Add HierarchicalPathNavigationItem and friends for the Quick Navigation Bar.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/HierarchicalPathComponent.css: Added.
(.hierarchical-path-component):
(.hierarchical-path-component > .icon):
(.hierarchical-path-component > .title):
(.hierarchical-path-component:last-of-type > .separator):
(.hierarchical-path-component > .separator):
(.hierarchical-path-component.collapsed > .title):
* UserInterface/HierarchicalPathComponent.js: Added.
(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get element):
(WebInspector.HierarchicalPathComponent.prototype.get representedObject):
(WebInspector.HierarchicalPathComponent.prototype.get displayName):
(WebInspector.HierarchicalPathComponent.prototype.set displayName):
* UserInterface/HierarchicalPathNavigationItem.js: Added.
(WebInspector.HierarchicalPathNavigationItem):
(WebInspector.HierarchicalPathNavigationItem.prototype.get components):
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
* UserInterface/Images/HierarchicalNavigationItemChevron.pdf: Added.
* UserInterface/Main.html: Included HierarchicalPathComponent.css, HierarchicalPathNavigationItem.js
and HierarchicalPathComponent.js.
2011-12-26 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ContentBrowser to coordinate between the Quick Navigation bar and content view container.
Part of: <rdar://problem/10318787> Implement the Quick Navigation bar for the new Web Inspector design
Reviewed by Joseph Pecoraro and Brian Weinstein.
* UserInterface/ContentBrowser.css: Added.
(.content-browser):
(.content-browser > .navigation-bar):
(.content-browser > .content-view-container):
* UserInterface/ContentBrowser.js: Added.
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype.get navigationBar):
(WebInspector.ContentBrowser.prototype.get contentViewContainer):
(WebInspector.ContentBrowser.prototype.showContentForRepresentedObject):
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.get element): Add missing return.
* UserInterface/Main.css:
(#content-browser):
* UserInterface/Main.html: Renamed #content to #content-browser.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create a ContentBrowser instead of a NavigationBar and ContentViewContainer.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Use the ContentBrowser.
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Ditto.
2011-12-28 Timothy Hatcher <timothy@apple.com>
Hold references to the navigation sidebar panels for easy access.
Reviewed by Adam Roben.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Hold references to the sidebar panels.
2011-12-28 Timothy Hatcher <timothy@apple.com>
Remove unused TreeElement class names.
These class names were originally used for icons, but they have been
replaced by icon specific class names.
Reviewed by Brian Weinstein.
* UserInterface/CookieStorageTreeElement.js:
(WebInspector.CookieStorageTreeElement):
* UserInterface/DOMStorageTreeElement.js:
(WebInspector.DOMStorageTreeElement):
* UserInterface/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement):
* UserInterface/DatabaseTableTreeElement.js:
(WebInspector.DatabaseTableTreeElement):
* UserInterface/DatabaseTreeElement.js:
(WebInspector.DatabaseTreeElement):
* UserInterface/FolderTreeElement.js:
(WebInspector.FolderTreeElement):
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement):
* UserInterface/StorageTreeElement.js:
(WebInspector.StorageTreeElement):
2011-12-24 Timothy Hatcher <timothy@apple.com>
Add icons for local and session storage.
Reviewed by Brian Weinstein.
* UserInterface/DOMStorageIcons.css: Added.
(.local-storage-icon .icon):
(.session-storage-icon .icon):
* UserInterface/DOMStorageTreeElement.js:
(WebInspector.DOMStorageTreeElement): Add class names based on if it is local storage or not.
(WebInspector.DOMStorageTreeElement.prototype.get categoryName): Remove blank line.
* UserInterface/Images/LocalStorage.png: Added.
* UserInterface/Images/LocalStorage@2x.png: Added.
* UserInterface/Images/SessionStorage.png: Added.
* UserInterface/Images/SessionStorage@2x.png: Added.
* UserInterface/Main.html: Included DOMStorageIcons.css.
2011-12-24 Timothy Hatcher <timothy@apple.com>
Add icons for databases and database tables.
Reviewed by Brian Weinstein.
* UserInterface/DatabaseHostTreeElement.css: Removed. Duplicates FolderIcon.css.
* UserInterface/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement): Pass FolderIconStyleClassName.
* UserInterface/DatabaseIcon.css: Added.
(.database-icon .icon):
* UserInterface/DatabaseTableIcon.css: Added.
(.database-table-icon .icon):
* UserInterface/DatabaseTableTreeElement.js:
(WebInspector.DatabaseTableTreeElement): Pass class names to WebInspector.GeneralTreeElement.
* UserInterface/DatabaseTreeElement.js:
(WebInspector.DatabaseTreeElement): Don't inherit from FolderTreeElement. Pass class names
to WebInspector.GeneralTreeElement.
* UserInterface/Images/Database.png: Added.
* UserInterface/Images/Database@2x.png: Added.
* UserInterface/Images/DatabaseTable.png: Added.
* UserInterface/Images/DatabaseTable@2x.png: Added.
* UserInterface/Main.html: Included new files and removed DatabaseHostTreeElement.css.
* UserInterface/StorageTreeElement.js:
(WebInspector.StorageTreeElement): Remove a FIXME.
2011-12-24 Timothy Hatcher <timothy@apple.com>
Add images for the Cookie icon.
Reviewed by Dan Bernstein.
* UserInterface/CookieIcon.css: Added.
(.cookie-icon .icon):
* UserInterface/CookieStorageTreeElement.js:
(WebInspector.CookieStorageTreeElement):
* UserInterface/Images/Cookie.png: Added.
* UserInterface/Images/Cookie@2x.png: Added.
* UserInterface/Main.html: Included CookieIcon.css.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Fix a couple of indentation problems in the Web Inspector.
Reviewed by John Sullivan.
* UserInterface/CookieStorageObject.js: Indent before constructor.
* UserInterface/DatabaseHostTreeElement.js: Ditto.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Break out WebInspector.NavigationItem and its subclasses from NavigationBar.js and NavigationBar.css into separate files.
Rubber-stamped by John Sullivan.
* UserInterface/ButtonNavigationItem.css: Added.
* UserInterface/ButtonNavigationItem.js: Added.
* UserInterface/FlexibleSpaceNavigationItem.css: Added.
* UserInterface/FlexibleSpaceNavigationItem.js: Added.
* UserInterface/Main.html: Included new files.
* UserInterface/NavigationBar.css: Moved "item" subclasses to seperate files.
* UserInterface/NavigationBar.js: Moved NavigationItem and its subclasses to seperate files.
* UserInterface/NavigationItem.js: Added.
* UserInterface/RadioButtonNavigationItem.css: Added.
* UserInterface/RadioButtonNavigationItem.js: Added.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Dynamically register the "mousemove" and "mouseup" event listeners in WebInspector.NavigationBar
so they are not allways listening.
Reviewed by Darin Adler.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar): Remove the static "mousemove" and "mouseup" event listeners.
(WebInspector.NavigationBar.prototype._mouseDown): Install the "mousemove" and "mouseup" event listeners
when a WebInspector.RadioButtonNavigationItem is hit.
(WebInspector.NavigationBar.prototype._mouseMoved): Assert the mouse is down now that we register dynamically.
(WebInspector.NavigationBar.prototype._mouseUp): Ditto. Remove the "mousemove" and "mouseup" event listeners.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Change WebInspector.NavigationBar.NavigationItemSelectedEventName to WebInspector.NavigationBar.Event.NavigationItemSelected.
This beings WebInspector.NavigationBar in-line with all the other classes in how the event names are defined.
Reviewed by Darin Adler.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.set selectedNavigationItem): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
(WebInspector.NavigationBar.prototype._mouseUp): Ditto.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar): Use WebInspector.NavigationBar.Event.NavigationItemSelected.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Properly define the SidebarPanelSelected event in WebInspector.Sidebar.
Reviewed by John Sullivan.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.Event): Added.
(WebInspector.Sidebar.Event.SidebarPanelSelected): Added.
(WebInspector.Sidebar.prototype.set selectedSidebarPanel): Use WebInspector.Sidebar.Event.SidebarPanelSelected
instead of the never defined WebInspector.Sidebar.SidebarPanelSelectedEventName.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Break out the SidebarPanel class into a separate file and make it correctly inherit from WebInspector.Object.
Reviewed by John Sullivan.
* UserInterface/Main.html: Included SidebarPanel.js.
* UserInterface/Sidebar.js: Moved WebInspector.SidebarPanel and WebInspector.SidebarPanel.prototype from here...
* UserInterface/SidebarPanel.js: Added. ...to here. Also fixed the prototype chain to make SidebarPanel inherit
from WebInspector.Object like it should have been.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Fix an incorrect use of typeof in the Web Inspector by using instanceof instead.
Reviewed by Adam Roben.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Use instanceof
instead of typeof to check if the input is an array.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Make the CSS used for folder and resource icons generic so it can be used by the quick navigation bar.
Reviewed by Darin Adler.
* UserInterface/FolderIcon.css: Renamed from Safari/Develop/WebInspector/FolderTreeElement.css.
Replaced "folder-tree-element" with "folder-icon".
* UserInterface/FolderTreeElement.js:
(WebInspector.FolderTreeElement): Add the "folder-icon" class.
* UserInterface/Main.html:
* UserInterface/ResourceIcons.css: Renamed from Safari/Develop/WebInspector/ResourceTreeElement.css.
Replaced "resource-tree-element" with "resource-icon".
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement): Add the "resource-icon" class.
2011-12-22 Timothy Hatcher <timothy@apple.com>
Make identifier optional in the base class of WebInspector.NavigationItem but required for WebInspector.ButtonNavigationItem.
Reviewed by Darin Adler.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationItem): Remove assert for identifier and added "|| null" to the assignment.
(WebInspector.NavigationItem.prototype.get _classNames): Null check identifier and add it separately.
(WebInspector.ButtonNavigationItem): Added assert for identifier.
(WebInspector.ButtonNavigationItem.prototype.generateStyleText): Don't pass the identifier to _canvasIdentifier.
(WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier): Don't take the identifier as an argument, use this.identifier.
(WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage): Don't pass the identifier to _canvasIdentifier.
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText): Ditto.
2011-12-20 Timothy Hatcher <timothy@apple.com>
Show a content view for XHR resources in the new Web Inspector.
Reviewed by Adam Roben.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Add a case for WebInspector.Resource.Type.XHR.
2011-12-19 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
When inserting items into the Storage sidebar, insert them in alphabetical order by main title so
it is easier for the user to navigate.
Reviewed by Tim Hatcher.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._compareTreeElementsByMainTitle):
(WebInspector.StorageSidebarPanel.prototype._addChild):
2011-12-18 Timothy Hatcher <timothy@apple.com>
Only fire the WebInspector.SyntaxHighlighter.Event.HighlightsDidChange event for whole lines.
Firing the event for partial lines causes too much DOM churn on large, single-line files.
Reviewed by Joseph Pecoraro.
* UserInterface/SyntaxHighlighter.js:
(WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Update actualStopLine after the
current line has completely finished. Don't fire the event if actualStopLine is still null.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Start and stop syntax highlighting when a TextEditor is shown and hidden. This reduces the chance
of multiple TextEditors highlighting at the same time.
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.shown): Added. Call startHighlighting and updateLayout.
(WebInspector.TextEditor.prototype.hidden): Added. Call stopHighlighting.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.shown): Call TextEditor.shown instead of updateLayout.
(WebInspector.TextResourceContentView.prototype.hidden): Added. Call TextEditor.hidden.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Use a synthetic MIME-type to select the syntax highlighter's tokenizer. Resources are often
transferred with a MIME-type that doesn't match the purpose the resource was loaded for.
Reviewed by Joseph Pecoraro.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get syntheticMIMEType): Added.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.contentAvailable): Use syntheticMIMEType.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Intercept link clicks in the Web Inspector and try to show the appropriate resource,
otherwise fallback to opening the URL in a new tab/window.
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.resourceForURL): Added argument to recursively search child frames.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Add click event listener.
(WebInspector.openURL): Added.
(WebInspector._mouseWasClicked): Added. Catch unhandled link clicks, cancel them and log and error.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Added click event listener.
(WebInspector.ResourceContentView.prototype._mouseWasClicked): Added. Call WebInspector.openURL.
* UserInterface/Utilities.js:
(Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Copied from WebCore/inspector/front-end/utilities.js.
(Node.prototype.enclosingNodeOrSelfWithNodeName): Copied from WebCore/inspector/front-end/utilities.js.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Make links in TextEditor be only absolute URLs. Otherwise relative URLs are resolved
against the Web Inspector as a base URL.
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Set _delegate to null.
(WebInspector.TextEditor.prototype.get delegate): Added.
(WebInspector.TextEditor.prototype.set delegate): Added.
(WebInspector.TextEditor.prototype._reset): Pass this when making a TextEditorTextChunk.
(WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Ditto.
(WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Ditto.
(WebInspector.TextEditorTextChunk): Added textEditor argument.
(WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Ask the TextEditor
delegate for the baseURL and use absoluteURL when assigning the href for links.
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Set the TextEditor delegate to this.
(WebInspector.TextResourceContentView.prototype.textEditorBaseURL): Added. Returns the resource's URL.
* UserInterface/Utilities.js:
(parseURL): Trim whitespace from the URL.
(absoluteURL): Added.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Workaround a weird and random JavaScript bug that causes the wrong 'this' object when filtering
the resource sidebar quickly.
The bug is tracked by: https://webkit.org/b/74811
Reviewed by Dan Bernstein.
* UserInterface/TreeOutline.js:
(TreeElement.prototype.traverseNextTreeElement): Use call to always get the right 'this' object.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Reduce the number of updates when setting the string of a WebInspector.TextEditor.
Invalidating the syntax highlighter causes HighlightsDidChange events to fire and update the text
chunks. We can ignore those events because _reset will completely rebuild the text chunks anyway.
Reviewed by Dan Bernstein.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.set textContent): Set _ignoreHighlightChanges to true.
(WebInspector.TextEditor.prototype.set string): Ditto.
(WebInspector.TextEditor.prototype._reset): Reset _ignoreHighlightChanges back to false.
(WebInspector.TextEditor.prototype._highlightsChanged): Return early if _ignoreHighlightChanges is true.
2011-12-18 Timothy Hatcher <timothy@apple.com>
Improve a workaround and get the clientHeight of the correct element in WebInspector.TextEditor.
The bug this is working around is tracked by: https://webkit.org/b/74812
Reviewed by Dan Bernstein.
* UserInterface/TextEditor.css:
(.text-editor > .content-container): Set height to 100%. It isn't clear why we should need to set
the height here, but without this the element collapses sometimes when it should have a height.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Get clientHeight from _contentContainerElement.
(WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Ditto.
2011-12-17 Timothy Hatcher <timothy@apple.com>
Don't show visited links in the Web Inspector.
Removed the :link pseudo class so visited links are styled the same.
Reviewed by Dan Bernstein.
* UserInterface/TextEditorDefaultTheme.css:
(.text-editor a):
(.text-editor a:hover):
2011-12-17 Timothy Hatcher <timothy@apple.com>
Allow clicking the selected resource again to show the content view if another content view
has been shown since the resource was last selected. This matches Xcode.
Reviewed by Dan Bernstein.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/TreeOutline.js:
(TreeOutline): Set allowsRepeatSelection to false.
(TreeElement.prototype.select): Refactored so that when allowsRepeatSelection is true the
onselect functions are called still.
2011-12-17 Timothy Hatcher <timothy@apple.com>
Don't attempt to create a tokenizer for "text/plain" resources.
Reviewed by Dan Bernstein.
* UserInterface/SourceTokenizer.js:
(WebInspector.SourceTokenizer): Return null for a MIME-type of "text/plain".
2011-12-17 Timothy Hatcher <timothy@apple.com>
Collapse the details sidebar by default. It is empty right now, so there is no reason
to show it until we have some sidebar panels to show.
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Set this.detailsSidebar.collapsed to true.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Set the Web Inspector window title and update it when the main frame navigates.
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added event listeners for changes on the main frame.
(WebInspector.updateWindowTitle): Added. Build a title based on the URL components.
(WebInspector._mainFrameDidChange): Added. Call updateWindowTitle.
(WebInspector._mainResourceDidChange): Added. Call updateWindowTitle if this is the main frame.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Force tabs to be 4 spaces wide in the new Web Inspector instead of the default 8 spaces wide.
This is done via the syntax highlighter, which tokenizes the tabs to be styled as inline-blocks
with a width equal to 4 spaces each.
Reviewed by John Sullivan.
* UserInterface/SyntaxHighlighter.js:
(WebInspector.SyntaxHighlighter.CharacterTokens): Added \t.
* UserInterface/TextEditor.js:
(WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Handle the "tab"
token type by creating a span per tab.
* UserInterface/TextEditorDefaultTheme.css:
(.text-editor .tab): Added. Inline-block with a width equal to 4 spaces.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Implement WebInspector.TextResourceContentView.
Create a TextEditor that fills the view and displays the text content of the resource.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by John Sullivan.
* UserInterface/Main.html: Include TextResourceContentView.css.
* UserInterface/TextResourceContentView.css: Added.
(.content-view.resource.text > .text-editor):
* UserInterface/TextResourceContentView.js:
(WebInspector.TextResourceContentView): Create a TextEditor.
(WebInspector.TextResourceContentView.prototype.get textEditor): Added.
(WebInspector.TextResourceContentView.prototype.contentAvailable): Added. Populate the TextEditor
with content and set the MIME-type.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add the line number gutter to WebInspector.TextEditor.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/TextEditor.css:
(.text-editor > .gutter): Added.
(.text-editor > .gutter > .line-number): Added.
(.text-editor > .gutter > .line-number.maximum): Added.
(.text-editor > .gutter > .line-number.hidden): Added.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Create the _gutterElement.
(WebInspector.TextEditor.prototype._reset): Call _updateLineNumbers.
(WebInspector.TextEditor.prototype._scrollPositionChanged): Ditto.
(WebInspector.TextEditor.prototype._updateLineNumbers): Added.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Syntax highlight the content of WebInspector.TextEditor.
Only single line text chunks are rendered with syntax highlighting, which are the the text chunks
that are near the visible scroll range of the text editor.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/SyntaxHighlighter.js:
(WebInspector.SyntaxHighlighter.prototype.invalidate): Dispatch the HighlightsDidChange event.
(WebInspector.SyntaxHighlighter.prototype._highlightNextChunk): Ditto.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Create a WebInspector.SyntaxHighlighter and listen for the HighlightsDidChange event.
(WebInspector.TextEditor.prototype.set textContent): Set the SyntaxHighlighter textContent.
(WebInspector.TextEditor.prototype.set string): Invalidate the SyntaxHighlighter.
(WebInspector.TextEditor.prototype.get mimeType): Added.
(WebInspector.TextEditor.prototype.set mimeType): Added.
(WebInspector.TextEditor.prototype._reset): Stop highlighting and start again.
(WebInspector.TextEditor.prototype._scrollPositionChanged): Do a sync highlight.
(WebInspector.TextEditor.prototype._scrollingDidStop): Start highlighting.
(WebInspector.TextEditor.prototype._highlightsChanged): Update single line text chunks.
(WebInspector.TextEditor.prototype._textChunkIndexForLine): Added.
(WebInspector.TextEditor.prototype._textChunkForLine): Added.
(WebInspector.TextEditorTextChunk.prototype.updateContent.createTokenElement): Added.
(WebInspector.TextEditorTextChunk.prototype.updateContent.appendText): Added.
(WebInspector.TextEditorTextChunk.prototype.updateContent): Enumerate the syntax highlighting tokens when there is only one line.
* UserInterface/TextEditorDefaultTheme.css: Added.
(.text-editor > .content-container):
(.text-editor .css-comment):
(.text-editor .css-keyword):
(.text-editor .css-number):
(.text-editor .css-at-rule):
(.text-editor .css-selector):
(.text-editor .css-important):
(.text-editor .javascript-comment):
(.text-editor .javascript-keyword):
(.text-editor .javascript-number):
(.text-editor .javascript-regexp):
(.text-editor .javascript-ident):
(.text-editor .html-comment):
(.text-editor .html-tag):
(.text-editor .html-doctype):
(.text-editor .html-attribute-name):
(.text-editor .html-attribute-value):
(.text-editor a:link):
(.text-editor a:link:hover):
2011-12-16 Timothy Hatcher <timothy@apple.com>
Break up text chunks into single lines when they are visible, and consolidate them again
when they are not visible after scrolling.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor): Add scroll event listener.
(WebInspector.TextEditor.prototype._reset): Call _breakVisibleTextChunksIntoSingleLineTextChunks.
(WebInspector.TextEditor.prototype._scrollPositionChanged): Added. Schedule timeout for _scrollingDidStop.
Call _breakVisibleTextChunksIntoSingleLineTextChunks.
(WebInspector.TextEditor.prototype._scrollingDidStop): Added. Call _consolidateHiddenSingleLineTextChunksIfNeeded.
(WebInspector.TextEditor.prototype._breakTextChunkAtIndexIntoSingleLineTextChunks): Added.
(WebInspector.TextEditor.prototype._breakVisibleTextChunksIntoSingleLineTextChunks): Added.
(WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunksIfNeeded): Added.
(WebInspector.TextEditor.prototype._consolidateHiddenSingleLineTextChunks): Added.
(WebInspector.TextEditor.prototype._consolidateSingleLineTextChunks): Added.
(WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex.compareTopOffsets): Added.
(WebInspector.TextEditor.prototype._firstVisibleTextChunkIndex): Added.
(WebInspector.TextEditor.prototype._rangeOfVisibleTextChunks): Added.
(WebInspector.TextEditor.prototype._lastLineNumberOfLastVisibleTextChunk): Added.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.TextEditor which is the view for WebInspector.TextContent.
Right now it only shows plain-text. In the end it will support syntax highlighting and editing.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/TextEditor.css: Added.
(.text-editor):
(.text-editor > .content-container):
(.text-editor > .content-container > .content):
* UserInterface/TextEditor.js: Added.
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.get element):
(WebInspector.TextEditor.prototype.get textContent):
(WebInspector.TextEditor.prototype.set textContent):
(WebInspector.TextEditor.prototype.get string):
(WebInspector.TextEditor.prototype.set string):
(WebInspector.TextEditor.prototype._reset):
(WebInspector.TextEditorTextChunk):
(WebInspector.TextEditorTextChunk.prototype.constructor.WebInspector.TextEditorChunk.get element):
(WebInspector.TextEditorTextChunk.prototype.get firstLineNumber):
(WebInspector.TextEditorTextChunk.prototype.get lastLineNumber):
(WebInspector.TextEditorTextChunk.prototype.get numberOfLines):
(WebInspector.TextEditorTextChunk.prototype.get offsetTop):
(WebInspector.TextEditorTextChunk.prototype.updateContent):
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.SyntaxHighlighter which uses SourceTokenizer, TextContent and AttributedString.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/SyntaxHighlighter.js: Added.
(WebInspector.SyntaxHighlighter):
(WebInspector.SyntaxHighlighter.prototype.get textContent):
(WebInspector.SyntaxHighlighter.prototype.set textContent):
(WebInspector.SyntaxHighlighter.prototype.get mimeType):
(WebInspector.SyntaxHighlighter.prototype.set mimeType):
(WebInspector.SyntaxHighlighter.prototype.invalidate):
(WebInspector.SyntaxHighlighter.prototype.isHighlighting):
(WebInspector.SyntaxHighlighter.prototype.synchronousHighlight):
(WebInspector.SyntaxHighlighter.prototype.startHighlighting):
(WebInspector.SyntaxHighlighter.prototype.stopHighlighting):
(WebInspector.SyntaxHighlighter.prototype._highlightNextChunk):
(WebInspector.SyntaxHighlighter.prototype._highlightNextChunk.copyState):
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.TextContent which will be used for multi-line text, like resources.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/TextContent.js: Added.
(WebInspector.TextContent):
(WebInspector.TextContent.prototype.toString):
(WebInspector.TextContent.prototype.get string):
(WebInspector.TextContent.prototype.set string.createAttributedString):
(WebInspector.TextContent.prototype.set string):
(WebInspector.TextContent.prototype.get length):
(WebInspector.TextContent.prototype.get lineBreakString):
(WebInspector.TextContent.prototype.set lineBreakString):
(WebInspector.TextContent.prototype.get lines):
(WebInspector.TextContent.prototype.get numberOfLines):
(WebInspector.TextContent.prototype.line):
(WebInspector.TextContent.prototype.attributesForLine):
(WebInspector.TextContent.prototype.attributeForLine):
(WebInspector.TextContent.prototype.setAttributeForLine):
(WebInspector.TextContent.prototype.removeAttributeFromLine):
(WebInspector.TextContent.prototype.removeAttributesFromLine):
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.AttributedString which will be used for syntax highlighted text.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/AttributedString.js: Added.
(WebInspector.AttributedString):
(WebInspector.AttributedString.prototype.toString):
(WebInspector.AttributedString.prototype.get string):
(WebInspector.AttributedString.prototype.enumerateAttributes):
(WebInspector.AttributedString.prototype.enumerateAttribute):
(WebInspector.AttributedString.prototype.attributesAtOffset):
(WebInspector.AttributedString.prototype.attributeAtOffset):
(WebInspector.AttributedString.prototype.setAttribute):
(WebInspector.AttributedString.prototype.removeAttribute.processAttributes):
(WebInspector.AttributedString.prototype.removeAttribute):
(WebInspector.AttributedString.prototype.removeAttributes):
* UserInterface/Utilities.js:
(Object.shallowCopy): Added. Helper for making a new object with the same top-level properties.
(Object.shallowEqual): Added. Helper for checking if two objects have the same top-level properties.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add tokenizers and support files needed for syntax highlighting.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Rubber-stamped by Joseph Pecoraro.
* UserInterface/CSSCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
* UserInterface/CSSKeywordCompletions.js: Copied from WebCore/inspector/front-end/CSSCompletions.js.
* UserInterface/CSSSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceCSSTokenizer.js.
* UserInterface/HTMLSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceHTMLTokenizer.js.
* UserInterface/JavaScriptSourceTokenizer.js: Copied from WebCore/inspector/front-end/SourceJavaScriptTokenizer.js.
* UserInterface/Utilities.js:
(Array.keySet): Added.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Add WebInspector.SourceTokenizer abstract base class.
This is the base class for HTMLSourceTokenizer, JavaScriptSourceTokenizer and CSSSourceTokenizer.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Jessie Berlin.
* UserInterface/SourceTokenizer.js: Added.
(WebInspector.SourceTokenizer):
(WebInspector.SourceTokenizer.prototype.initialize):
(WebInspector.SourceTokenizer.prototype.set line):
(WebInspector.SourceTokenizer.prototype.get condition):
(WebInspector.SourceTokenizer.prototype.set condition):
(WebInspector.SourceTokenizer.prototype.createInitialCondition):
(WebInspector.SourceTokenizer.prototype.nextToken):
(WebInspector.SourceTokenizer.prototype._charAt):
2011-12-16 Timothy Hatcher <timothy@apple.com>
Remove the cached ContentView from the represented object when the ContentView is closed.
This allows the ContentView to be garbage collected if the represented object stays around.
Reviewed by Brian Weinstein.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Set _representedObject.
(WebInspector.ContentView.prototype.get representedObject): Added.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject):
(WebInspector.ContentViewContainer.prototype.showContentView): Use _disassociateFromContentView
(WebInspector.ContentViewContainer.prototype.replaceContentView): Ditto.
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Ditto.
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Ditto.
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Added.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Pass resource to ContentView as the representedObject.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Don't support creating a WebInspector.ResourceContentView from a WebInspector.Frame.
Since the main frame stays the same between navigations and ContentViewContainer caches
the ContentView on the Frame, the ContentView is not being recreated for the new page.
Reviewed by Brian Weinstein.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Remove the check for WebInspector.Frame as a representedObject.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the
main resource of the main frame.
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Pass the resource.
2011-12-16 Timothy Hatcher <timothy@apple.com>
Mark the main resource of frames as finished when the resource tree is pulled the first time.
Also delay marking resources as finished until they have a parent frame.
This is needed to show content for a selected frame, otherwise the content view is blank.
Reviewed by Brian Weinstein.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._createFrame): Call markAsFinished on the mainResource.
(WebInspector.FrameResourceManager.prototype._createResource): Move the call to markAsFinished from here...
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): ...to here.
2011-12-15 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add Database tables to the storage sidebar panel. When a database needs to be populated, we ask
for the database's table names asynchronously. In the callback we create DatabaseTableObjects
and DatabaseTableTreeElements for all of the table names that the database has, and add the
the DatabaseTableTreeElements as children of the DatabaseTreeElement.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseObject.js:
(WebInspector.DatabaseObject.prototype.getTableNames): Calls into WebCore to get the database's table names,
and sorts them.
* UserInterface/DatabaseTableObject.js: Added.
(WebInspector.DatabaseTableObject):
(WebInspector.DatabaseTableObject.prototype.constructor.WebInspector.DatabaseTableObject.get name): Returns the name.
(WebInspector.DatabaseTableObject.prototype.get database): Returns the databaseObject.
* UserInterface/DatabaseTableTreeElement.js: Added.
(WebInspector.DatabaseTableTreeElement):
* UserInterface/DatabaseTreeElement.js:
(WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.oncollapse): Set a flag so that we
repopulate the children when the tree element is re-expanded.
(WebInspector.DatabaseTreeElement.prototype.onpopulate.tableNamesCallback): Create DatabaseTableObjects and DatabaseTableTreeElements
for each of the table names.
(WebInspector.DatabaseTreeElement.prototype.onpopulate): Ask the DatabaseObject for its list of table names.
* UserInterface/Main.html: Add new files.
2011-12-14 Brian Weinstein <bweinstein@apple.com>
Some cleanup after r39488.
Don't use FolderTreeElement's style in DatabaseHostTreeElement (because DatabaseHostTreeElement isn't a FolderTreeElement).
Instead, create a new css file and configure DatabaseHostTreeElement to show a folder.
Reviewed by Tim Hatcher.
* UserInterface/DatabaseHostTreeElement.css: Added.
(.database-host-tree-element .icon):
* UserInterface/DatabaseHostTreeElement.js:
(WebInspector.DatabaseHostTreeElement):
* UserInterface/Main.html:
2011-12-13 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add Databases to the storage sidebar panel. This patch adds two new classes of tree elements - a DatabaseHostTreeElement,
which represents a host that has at least one database, and a DatabaseTreeElement, which eventually will have tables.
We use the same collapsing logic for databases that we use for cookies and DOM Storage. With one domain,
it will say:
Database - Domain
Name 1
Name 2
With multiple domains, it will say:
Databases
Domain 1
Name 1
Name 2
Domain 2
Name 3
Name 4
Reviewed by Tim Hatcher.
* UserInterface/DatabaseObject.js: Added.
(WebInspector.DatabaseObject):
(WebInspector.DatabaseObject.prototype.constructor.WebInspector.DatabaseObject.get id): Returns the id.
(WebInspector.DatabaseObject.prototype.get host): Returns the host.
(WebInspector.DatabaseObject.prototype.get name): Returns the name.
(WebInspector.DatabaseObject.prototype.get version): Returns the version.
* UserInterface/DatabaseObserver.js:
(WebInspector.DatabaseObserver.prototype.constructor.WebInspector.DatabaseObserver.addDatabase): Tell the StorageManager
a database was added.
* UserInterface/DatabaseTreeElement.js: Added.
(WebInspector.DatabaseTreeElement):
(WebInspector.DatabaseTreeElement.prototype.constructor.WebInspector.DatabaseTreeElement.get name): Initialize the FolderTreeElement.
* UserInterface/DatabaseHostTreeElement.js: Added.
* UserInterface/Main.html:
* UserInterface/StorageManager.js:
(WebInspector.StorageManager):
(WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize): Initialize a list of databases.
(WebInspector.StorageManager.prototype.databaseWasAdded): Create a DatabaseObject and tell the StorageSidebarPanel we added
a database.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype._databaseWasAdded): Create a DatabaseTreeElement and add it to the sidebar.
(WebInspector.StorageSidebarPanel.prototype._storageCleared): Clear the root database tree element.
2011-12-09 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add Cookies to the Storage sidebar panel. Add a listener for when a cookie storage object is added,
and add it to the sidebar.
Reviewed by Tim Hatcher.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Remove some dead code.
(WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded): Add a child to the storage sidebar.
(WebInspector.StorageSidebarPanel.prototype._addChild): Change the class that we are expecting to a StorageTreeElement, because it can be
either a DOMStorageTreeElement or a CookieStorageTreeElement, but both are StorageTreeElements.
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2011-12-09 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add CookieStorageTreeElement, and refactor DOMStorageTreeElement into StorageTreeElement so the code to handle
flattening of the folders can be shared between CookieStorageTreeElement, DOMStorageTreeElement, and the others
that we will add in the future.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageTreeElement.js: Added.
(WebInspector.CookieStorageTreeElement): Call
(WebInspector.CookieStorageTreeElement.prototype.constructor.WebInspector.CookieStorageTreeElement.name): Return the host of the CookieStorageObject.
(WebInspector.CookieStorageTreeElement.prototype.category): Return "Cookies".
* UserInterface/DOMStorageTreeElement.js:
(WebInspector.DOMStorageTreeElement):
(WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.name): Return the host of the DOMStorageObject.
(WebInspector.DOMStorageTreeElement.prototype.category): Return "Local Storage" or "Session Storage".
* UserInterface/Main.html: Add new files.
(WebInspector.StorageTreeElement):
(WebInspector.StorageTreeElement.prototype.constructor.WebInspector.StorageTreeElement.get flattened): Moved from DOMStorageTreeElement
and refactored to be more general.
(WebInspector.StorageTreeElement.prototype.set flattened): Ditto.
2011-12-09 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Listen for when the main resource of any frame navigates, and add a cookie storage object for every
frame with a unique host. Any of these frames could have cookies, and we want to show them all.
Reviewed by Tim Hatcher.
* UserInterface/CookieStorageObject.js: Added.
(WebInspector.CookieStorageObject):
(WebInspector.CookieStorageObject.prototype.constructor.WebInspector.CookieStorageObject.get host):
* UserInterface/Main.html: Add a new source file.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
(WebInspector.StorageManager.prototype._mainResourceDidChange): If any frame navigates, add create a cookie
storage object for the frame's host.
2011-12-08 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Generate the local storage and session storage folders on demand. We don't show them in the tree until
a local storage or session storage object has been added, and if there is only one object, we flatten the
folder so it says:
Local Storage foo.com
If there is more than one object, we create a folder, and the structure will be:
Local Storage
foo.com
bar.com
Reviewed by Tim Hatcher and Joseph Pecoraro.
* UserInterface/DOMStorageTreeElement.js: Added.
(WebInspector.DOMStorageTreeElement): Create a GeneralTreeElement and set a few properties.
(WebInspector.DOMStorageTreeElement.prototype.constructor.WebInspector.DOMStorageTreeElement.set flattened):
* UserInterface/Main.html: Include a new script.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel): Initialize _localStorageTreeElement and _sessionStorageTreeElement to null.
(WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Call _addChild.
(WebInspector.StorageSidebarPanel.prototype._addChild): This object is responsible for setting up the hierarchy described above.
- If there is no current child, it tells the just added child that it is the only child, and will be displayed flattened.
- If the current child is a DOMStorageTreeElement, we create a folder and add the previous only child and the just added child
to the folder.
- If the current child is a folder, we append the just added child to the folder.
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
2011-12-07 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Clear the Local Storage and Session Storage folders when the main resource of the main frame changes. This means
that we are navigating to a new site, and we want to clear all of the storage folders.
Reviewed by Tim Hatcher and Joseph Pecoraro.
* UserInterface/StorageManager.js:
(WebInspector.StorageManager): Listen for MainResourceDidChange on all frames.
(WebInspector.StorageManager.prototype._mainResourceDidChange): If the main resource changed for the main frame, fire an
event saying storage was cleared.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded):
(WebInspector.StorageSidebarPanel.prototype._storageCleared): Remove the children from the local storage and session storage folders.
2011-12-07 Brian Weinstein <bweinstein@apple.com>
More of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add folders for Local Storage and Session Storage, and add children when DOMStorageObserver.addDOMStorage is called.
These items are never removed yet, we will need to listen for main frame navigation, and clear the folders, but
that will be done in a follow-up patch.
Reviewed by Tim Hatcher and Joseph Pecoraro.
* UserInterface/DOMStorageObject.js: Added.
(WebInspector.DOMStorageObject):
(WebInspector.DOMStorageObject.prototype.get id): Returns the id.
(WebInspector.DOMStorageObject.prototype.get domain): Returns the domain.
(WebInspector.DOMStorageObject.prototype.get isLocalStorage): Returns whether or not the DOM storage is local storage
(vs. session storage).
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.constructor.WebInspector.DOMStorageObserver.addDOMStorage): Create a new DOMStorageObject
and tell the StorageManager about it.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create the StorageManager.
* UserInterface/StorageManager.js: Added.
(WebInspector.StorageManager):
(WebInspector.StorageManager.prototype.constructor.WebInspector.StorageManager.initialize):
(WebInspector.StorageManager.prototype.addDOMStorage): Tell the StorageSidebarPanel we added a DOMStorageObject.
* UserInterface/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.constructor.WebInspector.StorageSidebarPanel._domStorageObjectWasAdded): Add a child to either
local or session storage.
2011-12-05 Brian Weinstein <bweinstein@apple.com>
Part of <rdar://problem/10318744> Implement the Storage sidebar for the new Web Inspector design.
Add StorageSidebarPanel.js, and have it create a new NavigationSidebarPanel.
Reviewed by Tim Hatcher and Joseph Pecoraro.
* UserInterface/Main.html: Add the new js file.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Call WebInspector.StorageSidebarPanel.
* UserInterface/StorageSidebarPanel.js: Added.
(WebInspector.StorageSidebarPanel):
2011-12-06 Timothy Hatcher <timothy@apple.com>
Call WebInspector.Object.addConstructorFunctions on all the Web Inspector constructors that file events.
Reviewed by Joseph Pecoraro.
* UserInterface/FilterBar.js:
* UserInterface/Frame.js:
* UserInterface/FrameResourceManager.js:
* UserInterface/NavigationBar.js:
* UserInterface/Resource.js:
* UserInterface/Sidebar.js:
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add support for listening for events on constructors, which gets notified of events that fire
on any of the instances of that constructor.
This lets you do things like listen for navigation in any frame by doing:
WebInspector.Frame.addEventListener(WebInspector.Frame.Event.MainResourceDidChange, ...)
Reviewed by Joseph Pecoraro.
* UserInterface/Object.js:
(WebInspector.Object.addConstructorFunctions): Added. Copies the relevant functions
the subclass constructor.
(WebInspector.Object.addEventListener): Copied from WebInspector.Object.prototype.
(WebInspector.Object.removeEventListener): Ditto.
(WebInspector.Object.removeAllListeners): Ditto.
(WebInspector.Object.hasEventListeners): Ditto.
(WebInspector.Object.prototype.addEventListener): Set to WebInspector.Object version.
(WebInspector.Object.prototype.removeEventListener): Ditto.
(WebInspector.Object.prototype.removeAllListeners): Ditto.
(WebInspector.Object.prototype.hasEventListeners): Ditto.
(WebInspector.Object.prototype.dispatchEventToListeners): Dispatch to listeners of this specific object,
and to listeners interested in all instances of this object's constructor.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Use Object.defineProperty for our extensions in WebInspector/Utilities.js so they don't show
up when enumerating instances.
This patch has whitespace changes stripped, but the indentation is correct.
Reviewed by Ada Chan.
* UserInterface/Utilities.js:
2011-12-05 Timothy Hatcher <timothy@apple.com>
Provide a direct way to ask if a WebInspector.Frame is the main frame.
This is only needed in one place right now, but in the future it will be needed in more places.
And checking !frame.parentFrame is not an accurate check if the frame is a detached subframe.
Reviewed by Ada Chan.
* UserInterface/Frame.js:
(WebInspector.Frame):
(WebInspector.Frame.prototype.isMainFrame): Added.
(WebInspector.Frame.prototype.markAsMainFrame): Added.
(WebInspector.Frame.prototype.unmarkAsMainFrame): Added.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.initialize): Call the renamed _mainFrameDidChange.
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Ditto.
(WebInspector.FrameResourceManager.prototype.frameDidDetach): Ditto.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Ditto.
(WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload): Pass true for isMainFrame
when calling _addFrameTreeFromFrameResourceTreePayload.
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call markAsMainFrame()
if isMainFrame is true.
(WebInspector.FrameResourceManager.prototype._mainFrameDidChange): Renamed from _dispatchMainFrameDidChangeEvent
and now calls unmarkAsMainFrame and markAsMainFrame.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): Use isMainFrame().
2011-12-04 Timothy Hatcher <timothy@apple.com>
Implement WebInspector.FontResourceContentView.
The font preview includes horizontal lines showing the top, bottom, middle and baseline CSS alignments.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FontResourceContentView.css: Added.
(.content-view.resource.font):
(.content-view.resource.font .preview):
(.content-view.resource.font .preview > .line):
(.content-view.resource.font .preview > .line > .content):
(.content-view.resource.font .preview > .line > .metric):
(.content-view.resource.font .metric.top):
(.content-view.resource.font .metric.baseline):
(.content-view.resource.font .metric.middle):
(.content-view.resource.font .metric.bottom):
* UserInterface/FontResourceContentView.js:
(WebInspector.FontResourceContentView):
(WebInspector.FontResourceContentView.prototype.get previewElement):
(WebInspector.FontResourceContentView.prototype.sizeToFit): Start at the maximum size and try each
font size until minimum is reached. Stop when the preview element is not as wide as the main element.
(WebInspector.FontResourceContentView.prototype.contentAvailable.createMetricElement): Helper function.
(WebInspector.FontResourceContentView.prototype.contentAvailable): Create the elements for the preview.
(WebInspector.FontResourceContentView.prototype.shown): Add the style element since it is removed when hidden.
(WebInspector.FontResourceContentView.prototype.hidden): Remove the style element so it will not stick around
when this content view is destroyed.
* UserInterface/Main.html: Included FontResourceContentView.css.
2011-12-03 Timothy Hatcher <timothy@apple.com>
Implement WebInspector.ImageResourceContentView.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ImageResourceContentView.css: Added.
(.content-view.resource.image): Vertically and horizontally center the image.
(.content-view.resource.image img): Set max width to 100% and allow dragging.
* UserInterface/ImageResourceContentView.js:
(WebInspector.ImageResourceContentView): Initialize _imageElement to null.
(WebInspector.ImageResourceContentView.prototype.get imageElement): Added.
(WebInspector.ImageResourceContentView.prototype.contentAvailable): Added. Create and append the _imageElement.
* UserInterface/Main.html: Included ImageResourceContentView.css.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get contentURL): Added. Create a data URL if possible.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Call requestContent.
(WebInspector.ResourceContentView.prototype.contentAvailable): Added. Implemented by subclasses.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Select the main resource when opening the Web Inspector and when the inspected page navigates.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Select and expand the main
resource so something is selected by default.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Select the main
resource since there are no other resources now.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Close all resource content views when the inspected page navigates in the main frame.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): Added.
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Added.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Remove an event listener from
the old frame and add an event listener for MainResourceDidChange on the new frame.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange): Added. Call
closeAllContentViewsOfPrototype with WebInspector.ResourceContentView on the main content container.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Make selecting a resource in the Resources sidebar show the content view for that resource.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject): Added.
(WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject): Added.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Set onselect to _treeElementSelected.
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Added. Call showContentViewForRepresentedObject
on the main content container.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add support for knowing when a TreeElement is selected/deselected in a TreeOutline.
There is already TreeElement.onselect which has been used in the past,
but having a tree-wide notification of selection changes makes it easier
to implement certain things.
Reviewed by Joseph Pecoraro.
* UserInterface/TreeOutline.js:
(TreeElement.prototype.select): Call onselect on the TreeOutline if it exists.
(TreeElement.prototype.deselect): Call ondeselect on the TreeOutline if it exists.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Support resource type changes by making a new ResourceContentView and replacing the old one.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.replaceContentView): Added. Find all instances of the old one
and replace it with the new one.
* UserInterface/ResourceContentView.js:
(WebInspector.ResourceContentView): Add event listener for TypeDidChange.
(WebInspector.ResourceContentView.prototype._resourceTypeDidChange): Added. Make a new ResourceContentView
which will use the new resource type to make the correct concrete ResourceContentView subclass.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add the "constructor" property to all prototypes in the Web Inspector.
While working on a change that requires the constructor, I found it was always Object.
This is because (thanks Gavin) the "constructor" property is added at runtime during
the first lookup of the "prototype" property slot. But when "prototype" is assigned,
like we do in the Web Inspector, the "constructor" property isn't present.
Reviewed by John Sullivan.
* UserInterface/ApplicationCacheObserver.js:
* UserInterface/ConsoleObserver.js:
* UserInterface/ContentView.js:
* UserInterface/ContentViewContainer.js:
* UserInterface/DOMObserver.js:
* UserInterface/DOMStorageObserver.js:
* UserInterface/DatabaseObserver.js:
* UserInterface/DebuggerObserver.js:
* UserInterface/FilterBar.js:
* UserInterface/FolderTreeElement.js:
* UserInterface/FontResourceContentView.js:
* UserInterface/Frame.js:
* UserInterface/FrameResourceManager.js:
* UserInterface/FrameTreeElement.js:
* UserInterface/GeneralTreeElement.js:
* UserInterface/GenericResourceContentView.js:
* UserInterface/ImageResourceContentView.js:
* UserInterface/InspectorObserver.js:
* UserInterface/NavigationBar.js:
* UserInterface/NavigationSidebarPanel.js:
* UserInterface/NetworkObserver.js:
* UserInterface/Object.js:
* UserInterface/PageObserver.js:
* UserInterface/Resource.js:
* UserInterface/ResourceCollection.js:
* UserInterface/ResourceContentView.js:
* UserInterface/ResourceSidebarPanel.js:
* UserInterface/ResourceTreeElement.js:
* UserInterface/Sidebar.js:
* UserInterface/TextResourceContentView.js:
* UserInterface/TreeOutline.js:
2011-12-05 Timothy Hatcher <timothy@apple.com>
And WebInspector.ResourceContentView and concrete subclasses for Text, Image and Font resources.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/ContentView.js:
(WebInspector.ContentView): Create ResourceContentViews for Resources and Frames.
* UserInterface/FontResourceContentView.js: Added.
(WebInspector.FontResourceContentView):
* UserInterface/GenericResourceContentView.js: Added.
(WebInspector.GenericResourceContentView):
* UserInterface/ImageResourceContentView.js: Added.
(WebInspector.ImageResourceContentView):
* UserInterface/Main.html: Included new files.
* UserInterface/ResourceContentView.js: Added.
(WebInspector.ResourceContentView): When instantiated directly return an instance of a type-based concrete subclass.
(WebInspector.ResourceContentView.prototype.get resource):
* UserInterface/TextResourceContentView.js: Added.
(WebInspector.TextResourceContentView):
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add back/forward support to WebInspector.ContentViewContainer.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentViewContainer.js:
(WebInspector.ContentViewContainer): Initialize _backForwardList and _currentIndex.
(WebInspector.ContentViewContainer.prototype.get currentIndex): Added.
(WebInspector.ContentViewContainer.prototype.get backForwardList): Added.
(WebInspector.ContentViewContainer.prototype.get currentContentView): Use _backForwardList and _currentIndex.
(WebInspector.ContentViewContainer.prototype.showContentView): Insert the content view at the new current index.
This will remove any content views greater than or equal to the index. Call showBackForwardEntry for the index.
(WebInspector.ContentViewContainer.prototype.showBackForwardEntry): Added.
(WebInspector.ContentViewContainer.prototype.canGoBack): Added.
(WebInspector.ContentViewContainer.prototype.canGoForward): Added.
(WebInspector.ContentViewContainer.prototype.goBack): Added.
(WebInspector.ContentViewContainer.prototype.goForward): Added.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ContentView and WebInspector.ContentViewContainer.
These classes will be used to display content for resources and other data.
Reviewed by Joseph Pecoraro.
* UserInterface/ContentView.js: Added.
(WebInspector.ContentView):
(WebInspector.ContentView.prototype.get element):
(WebInspector.ContentView.prototype.get parentContainer):
(WebInspector.ContentView.prototype.get visible):
(WebInspector.ContentView.prototype.set visible):
(WebInspector.ContentView.prototype.shown):
(WebInspector.ContentView.prototype.hidden):
* UserInterface/ContentViewContainer.css: Added.
(.content-view-container): Display relative to allow positioned content.
(.content-view-container > .content-view): Position to fill the container.
(.content-view-container > .content-view:not(.visible)): Display none.
* UserInterface/ContentViewContainer.js: Added.
(WebInspector.ContentViewContainer):
(WebInspector.ContentViewContainer.prototype.get element):
(WebInspector.ContentViewContainer.prototype.get currentContentView):
(WebInspector.ContentViewContainer.prototype.showContentView):
(WebInspector.ContentViewContainer.prototype._addContentViewElement):
(WebInspector.ContentViewContainer.prototype._removeContentViewElement):
(WebInspector.ContentViewContainer.prototype._showContentView):
(WebInspector.ContentViewContainer.prototype._hideContentView):
* UserInterface/Main.css:
(#content-views): Renamed from #content-panels.
* UserInterface/Main.html: Included ContentViewContainer.js and ContentViewContainer.css. Also renamed
content-panels to content-views.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an instance of ContentViewContainer that uses the #content-views div.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add support for getting the content of a resource in preparation for showing that content.
Part of: <rdar://problem/10488422> Implement Resource views for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Resource.js:
(WebInspector.Resource): Initialize _content, _pendingContentRequestCallbacks and _contentIsBase64Encoded.
(WebInspector.Resource.prototype.get content): Added.
(WebInspector.Resource.prototype.get contentIsBase64Encoded): Added.
(WebInspector.Resource.prototype.requestContent): Added. Queues the callback and requests the content if needed.
(WebInspector.Resource.prototype.markAsFinished): Call _requestContentFromBackend if there are pending requests.
(WebInspector.Resource.prototype.markAsFailed): Call _servicePendingContentRequests.
(WebInspector.Resource.prototype._requestContentFromBackend): Added. Use the NetworkPageAgent depending on if
we have a requestIdentifier for this Resource.
(WebInspector.Resource.prototype._processContent): Added. Store the content and call _servicePendingContentRequests.
(WebInspector.Resource.prototype._servicePendingContentRequests): Added. Call all the pending callbacks with the content.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Mark resources loaded from the memory cache as finished in the Web Inspector so their content can be requested.
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Call markAsFinished.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add requestIdentifier to WebInspector.Resource.
The requestIdentifier will be needed for getting the resource content from the backend.
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestIdentifier.
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestIdentifier.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Ditto.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Ditto.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added requestIdentifier parameter.
(WebInspector.FrameResourceManager.prototype._createFrame): Pass null for requestIdentifier.
(WebInspector.FrameResourceManager.prototype._createResource): Ditto.
* UserInterface/Resource.js:
(WebInspector.Resource): Added requestIdentifier parameter.
(WebInspector.Resource.prototype.get requestIdentifier): Added.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Override the cursor to prevent the I-beam over various text UI elements in the Web Inspector.
Reviewed by Dan Bernstein.
* UserInterface/Main.css:
(body): Set cursor to default.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Call preventDefault and stopPropagation in various event listeners in the Web Inspector.
This prevents text selection while dragging the sidebar resizer or scrubbing a navigation bar.
It also prevents text selection when double clicking the sidebar resizer.
Reviewed by Dan Bernstein.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseMoved):
(WebInspector.NavigationBar.prototype._mouseUp):
(WebInspector.NavigationBar.prototype._keyDown):
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype._resizerDoubleClicked):
(WebInspector.Sidebar.prototype._resizerMouseDown):
(WebInspector.Sidebar.prototype._resizerMouseMoved):
(WebInspector.Sidebar.prototype._resizerMouseUp):
2011-12-05 Timothy Hatcher <timothy@apple.com>
Add a build phase copy of InspectorBackend.js from WebCore and rename the
InspectorBackendStub.js copied file to InspectorBackendCommands.js.
The InspectorBackend.js file split out of the generated InspectorBackendStub.js
in r101670, and both files are needed to be useful.
Reviewed by Joseph Pecoraro.
* UserInterface/Main.html: Include InspectorBackendCommands.js.
* WebInspectorUI.xcodeproj/project.pbxproj: Update the WebCore Inspector Resources build pahse.
2011-11-29 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ResourceCollection to simplify parts of WebInspector.Frame.
The ResourceCollection class tracks resources it holds for URL and type changes
and updates internal mappings accordingly.
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame): Create a ResourceCollection instead of multiple arrays/maps.
(WebInspector.Frame.prototype.initialize): Call clearProvisionalLoad before the main
resource did change event.
(WebInspector.Frame.prototype.startProvisionalLoad): Create a provisional ResourceCollection.
(WebInspector.Frame.prototype.commitProvisionalLoad): Commit the provisional ResourceCollection.
Added an early return to prevent exceptions if this is called when there isn't provisional load.
(WebInspector.Frame.prototype.clearProvisionalLoad): Added an early return and clear the ResourceCollection.
(WebInspector.Frame.prototype.get resources): Use ResourceCollection.
(WebInspector.Frame.prototype.resourceForURL): Ditto.
(WebInspector.Frame.prototype.resourcesWithType): Ditto.
(WebInspector.Frame.prototype.addResource): Moved the add code from _associateWithResource and use the
new _isProvisionalResource function to check which ResourceCollection to add the resource to.
(WebInspector.Frame.prototype.removeResource): Use ResourceCollection.
(WebInspector.Frame.prototype.removeAllResources): Ditto.
(WebInspector.Frame.prototype._isProvisionalResource): Added.
(WebInspector.Frame.prototype._associateWithResource): Only set _childFrame.
(WebInspector.Frame.prototype._disassociateWithResource): Only clear _childFrame.
* UserInterface/Main.html: Included ResourceCollection.js.
* UserInterface/ResourceCollection.js: Added. Broken out of Frame.js.
(WebInspector.ResourceCollection):
(WebInspector.ResourceCollection.prototype.get resources):
(WebInspector.ResourceCollection.prototype.resourceForURL):
(WebInspector.ResourceCollection.prototype.resourcesWithType):
(WebInspector.ResourceCollection.prototype.addResource):
(WebInspector.ResourceCollection.prototype.removeResource):
(WebInspector.ResourceCollection.prototype.removeAllResources):
(WebInspector.ResourceCollection.prototype._associateWithResource):
(WebInspector.ResourceCollection.prototype._disassociateWithResource):
(WebInspector.ResourceCollection.prototype._resourceURLDidChange):
(WebInspector.ResourceCollection.prototype._resourceTypeDidChange):
2011-11-28 Timothy Hatcher <timothy@apple.com>
Improve glob filtering in the Resources sidebar of the new Web Inspector.
Match edge boundaries when there is an asterisk to better meet the expectations
of the user. When someone types "*.js" they don't expect "foo.json" to match. They
would only expect that if they type "*.js*". We use \b (instead of ^ and $) to allow
matches inside paths or URLs, so "ba*.js" will match "foo/bar.js" but not "boo/bbar.js".
When there isn't an asterisk the regexString is just a substring search. Also properly
ignore escaped asterisks and collapse consecutive asterisks down to one.
Reviewed by Joseph Pecoraro.
* UserInterface/Utilities.js:
(simpleGlobStringToRegExp):
2011-11-28 Timothy Hatcher <timothy@apple.com>
Show a message in the sidebar when it is empty because there are no filter matches.
Reviewed by Brian Weinstein.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content.hidden): Added.
(.sidebar > .panel.navigation > .empty-content-placeholder): Added.
(.sidebar > .panel.navigation > .empty-content-placeholder > .message): Added.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Create the empty content placeholder elements.
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder): Set the message and add the element.
(WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder): Remove the element.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults): Added. Check for hidden top level elements.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter): Call _checkForEmptyFilterResults.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Ditto.
* UserInterface/Sidebar.css:
(.sidebar > .panel): Make overflow hidden so when the sidebar is collapsed the empty placeholder doesn't stick out.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add text filtering support to WebInspector.NavigationSidebarPanel.
This makes it so you can filter the resource list, matching against the URLs.
Reviewed by Brian Weinstein.
* UserInterface/FilterBar.js:
(WebInspector.FilterBar): Add an search event listener and set incremental to true.
(WebInspector.FilterBar.prototype.get filters): Added.
(WebInspector.FilterBar.prototype.hasActiveFilters): Added.
(WebInspector.FilterBar.prototype._inputFieldChanged): Added. Dispatch the TextFilterDidChange event.
* UserInterface/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set mainTitle): Call didChange.
(WebInspector.GeneralTreeElement.prototype.set subtitle): Ditto.
(WebInspector.GeneralTreeElement.prototype.get filterableData): Added. Returns the URL.
* UserInterface/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline .hidden): Added.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Set onadd and onchange on the TreeOutline. Listen for
the TextFilterDidChange event.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement): Added.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter): Added.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.makeVisible): Added.
(WebInspector.NavigationSidebarPanel.prototype._updateFilter): Added. Call applyFiltersToTreeElement.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Added. Call applyFiltersToTreeElement.
* UserInterface/Utilities.js:
(String.prototype.escapeCharacters): Copied from WebCore/inspector/front-end/utilities.js.
(String.prototype.escapeForRegExp): Copied from WebCore/inspector/front-end/utilities.js.
(simpleGlobStringToRegExp): Added.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FilterBar to be used in navigation sidebar panels.
The filter bar only contains a specially styled search field in this change.
It does not actually filter the sidebar yet.
Reviewed by Brian Weinstein.
* UserInterface/FilterBar.css: Added.
(.filter-bar): Styled like the filter bar in Xcode 4.
(.filter-bar > input[type="search"]): Set the margins and prevent an outline on focus.
(.filter-bar > input[type="search"]::-webkit-search-decoration): Replace the search
magnifying glass with the filter glyph.
* UserInterface/FilterBar.js: Added.
(WebInspector.FilterBar):
(WebInspector.FilterBar.prototype.get element):
(WebInspector.FilterBar.prototype.get inputField):
* UserInterface/Images/FilterFieldGlyph.pdf: Added.
* UserInterface/Main.html: Included FilterBar.js and FilterBar.css.
* UserInterface/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .filter-bar): Position at the bottom.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Create a FilterBar.
(WebInspector.NavigationSidebarPanel.prototype.get filterBar): Added.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Handle getting a resource load responce without getting the request first.
If the Web Inspector is opened while loading a page we can miss the resourceRequestWillBeSent call.
In that case we might get a respose but not know the resource yet, so make a new resource and add it.
Reviewed by Anders Carlsson.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Make a new resource if
one isn't found in the request identifier map.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.responseReceived): Pass the frameId and loaderId along.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Store the request and response headers on WebInspector.Resource.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Anders Carlsson.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Pass null for the requestHeaders in a couple of places.
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Pass the requestHeaders along.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass null for the requestHeaders.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Pass the responseHeaders along to updateForResponse.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added an argument for requestHeaders.
(WebInspector.FrameResourceManager.prototype._createFrame): Pass null for the requestHeaders.
(WebInspector.FrameResourceManager.prototype._createResource): Ditto.
* UserInterface/Resource.js:
(WebInspector.Resource): Added requestHeaders argument.
(WebInspector.Resource.prototype.get requestHeaders): Added.
(WebInspector.Resource.prototype.get responseHeaders): Added.
(WebInspector.Resource.prototype.updateForResponse): Added responseHeaders argument and fire the ResponseHeadersDidChange event.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Keep track of failed, canceled and finished resources in the Web Inspector.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Call markAsFinished.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added canceled argument and call markAsFailed.
(WebInspector.FrameResourceManager.prototype._createResource): Call markAsFinished.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.loadingFailed): Pass along the canceled argument.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get finished): Added.
(WebInspector.Resource.prototype.get failed): Added.
(WebInspector.Resource.prototype.get canceled): Added.
(WebInspector.Resource.prototype.updateForRedirectResponse): Added asserts that loading hasn't failed, finished or canceled.
(WebInspector.Resource.prototype.updateForResponse): Ditto.
(WebInspector.Resource.prototype.markAsFinished): Added.
(WebInspector.Resource.prototype.markAsFailed): Added.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Sort folders by name, resources by type and name in the Web Inspector sidebar.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Remove the check for _groupedIntoFolders
since we sort by type in non-folder mode now. Updated the comment.
(WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementMainTitleDidChange): Added.
(WebInspector.FrameTreeElement.prototype._addTreeElement): Use _insertRootFolderTreeElement and _insertResourceTreeElement.
(WebInspector.FrameTreeElement.prototype._compareTreeElementsByMainTitle): Added.
(WebInspector.FrameTreeElement.prototype._insertFolderTreeElement): Added.
(WebInspector.FrameTreeElement.prototype._compareResourceTreeElements): Added.
(WebInspector.FrameTreeElement.prototype._insertResourceTreeElement): Added.
* UserInterface/Main.html: Included BinarySearch.js.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): Call descendantResourceTreeElementMainTitleDidChange on the first ancestor
if the main title changed.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Queue new resources and frames to add them in bulk every half a second.
This reduces flashing in the Web Inspector sidebar as resources load and change folders as their type becomes known.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement): Initialize _newChildQueue.
(WebInspector.FrameTreeElement.prototype.onpopulate): Call _clearNewChildQueue.
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Ditto.
(WebInspector.FrameTreeElement.prototype._resourceWasAdded): Use _addRepresentedObjectToNewChildQueue.
(WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Ditto.
(WebInspector.FrameTreeElement.prototype._addRepresentedObjectToNewChildQueue): Added. Adds the item to the queue and starts
a timer if one isn't already pending.
(WebInspector.FrameTreeElement.prototype._removeRepresentedObjectFromNewChildQueue): Added. Removes the item from the queue.
(WebInspector.FrameTreeElement.prototype._populateFromNewChildQueue): Added. Call _addChildForRepresentedObject
for each item in the queue.
(WebInspector.FrameTreeElement.prototype._clearNewChildQueue): Added. Clears the queue.
(WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Call _removeRepresentedObjectFromNewChildQueue.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Remember expanded frames when the main resource changes during navigation. Also auto expand the main frame.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Remember if this tree element was expanded.
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Expand if needed.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Expand when the main frame is created.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Group resources into folders once certain resource count thresholds are met.
Resources and Frames are grouped into folders if one of two thresholds are met:
1) Once the number of medium categories passes NumberOfMediumCategoriesThreshold.
2) When there is a category that passes LargeChildCountThreshold and there are
any resources in another category.
Folders are avoided when there is only one category or most categories are small.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.descendantResourceTreeElementTypeDidChange): Added. Called by ResourceTreeElement.
(WebInspector.FrameTreeElement.prototype.onpopulate): Call _shouldGroupIntoFolders and use _addTreeElement.
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Reset _groupedIntoFolders to false.
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Call _shouldGroupIntoFolders and use _addTreeElement.
(WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Remove the parent if it is an empty folder.
(WebInspector.FrameTreeElement.prototype._addTreeElement): Added. Adds the tree element to the right folder.
(WebInspector.FrameTreeElement.prototype._removeTreeElement): Added. Removes the tree element and empty folders.
(WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Added.
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Added. Make the folder tree element if needed.
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders): Added. Calculates if folders are needed.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._typeDidChange): Use _callFirstAncestorFunction to call descendantResourceTreeElementTypeDidChange.
(WebInspector.ResourceTreeElement.prototype._callFirstAncestorFunction): Added. Call the first ancestor that implements a function.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FolderTreeElement to be used in navigation sidebar panels.
Reviewed by Brian Weinstein.
* UserInterface/FolderTreeElement.css: Added.
(.folder-tree-element .icon):
* UserInterface/FolderTreeElement.js: Added.
(WebInspector.FolderTreeElement):
* UserInterface/Images/FolderGeneric.png: Added.
* UserInterface/Images/FolderGeneric@2x.png: Added.
* UserInterface/Main.html: Included FolderTreeElement.css and FolderTreeElement.js.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Remember resources by type for each frame in the Web Inspector.
This will be used to organize the sidebar into folders for each type of resource.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame): Initialize _resourcesTypeMap and _provisionalResourcesTypeMap.
(WebInspector.Frame.prototype.startProvisionalLoad): Initialize _provisionalResourcesURLMap.
(WebInspector.Frame.prototype.commitProvisionalLoad): Commit _provisionalResourcesURLMap over to _resourcesTypeMap.
(WebInspector.Frame.prototype.clearProvisionalLoad): Initialize _provisionalResourcesURLMap.
(WebInspector.Frame.prototype.resourcesWithType): Added. Lookup in _resourcesTypeMap.
(WebInspector.Frame.prototype.removeAllResources): Initialize _resourcesTypeMap.
(WebInspector.Frame.prototype._associateWithResource): Added resource to the type map.
(WebInspector.Frame.prototype._disassociateWithResource): Remove the resource from the type map.
(WebInspector.Frame.prototype._resourceTypeDidChange): Update the resource type map.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add icons for document, image, font, style, script and generic resource types in the Web Inspector.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Images/DocumentCSS.png: Added.
* UserInterface/Images/DocumentCSS@2x.png: Added.
* UserInterface/Images/DocumentFont.png: Added.
* UserInterface/Images/DocumentFont@2x.png: Added.
* UserInterface/Images/DocumentGeneric.png: Added.
* UserInterface/Images/DocumentGeneric@2x.png: Added.
* UserInterface/Images/DocumentImage.png: Added.
* UserInterface/Images/DocumentImage@2x.png: Added.
* UserInterface/Images/DocumentJS.png: Added.
* UserInterface/Images/DocumentJS@2x.png: Added.
* UserInterface/Images/DocumentMarkup.png: Added.
* UserInterface/Images/DocumentMarkup@2x.png: Added.
* UserInterface/Main.html: Included ResourceTreeElement.css.
* UserInterface/ResourceTreeElement.css: Added.
(.resource-tree-element .icon):
(.resource-tree-element.resource-type-document .icon):
(.resource-tree-element.resource-type-image .icon):
(.resource-tree-element.resource-type-stylesheet .icon):
(.resource-tree-element.resource-type-script .icon):
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement): Use the resource type as a class.
(WebInspector.ResourceTreeElement.prototype._updateResource): Added TypeDidChange event listener.
(WebInspector.ResourceTreeElement.prototype._typeDidChange): Added. Update the classNames with the new type.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Display the last path component instead of the full URL in the Web Inspector's Resource sidebar panel.
Show the host as the subtitle if it is different from the main resource or if this is the main frame's main resource.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.get urlComponents): Added. Calls parseURL if needed.
(WebInspector.Resource.prototype.updateForRedirectResponse): Delete the URL components so the URL is re-parsed the
next time it is requested.
(WebInspector.Resource.prototype.updateForResponse): Ditto.
* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle and subtitle based on the urlComponents.
* UserInterface/Utilities.js:
(parseURL): Added. Parses a URL into its components.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Populate the WebInspector's Resource sidebar panel with frame and resource tree elements.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/FrameTreeElement.js: Added.
(WebInspector.FrameTreeElement): Set up event listeners.
(WebInspector.FrameTreeElement.prototype.get frame): Returns _frame.
(WebInspector.FrameTreeElement.prototype.onpopulate): Add child frames and resources.
(WebInspector.FrameTreeElement.prototype._updateParentStatus): Update hasChildren.
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange): Update the resource and remove children.
(WebInspector.FrameTreeElement.prototype._resourceWasAdded): Call _addChildForRepresentedObject.
(WebInspector.FrameTreeElement.prototype._resourceWasRemoved): Call _removeChildForRepresentedObject.
(WebInspector.FrameTreeElement.prototype._childFrameWasAdded): Call _addChildForRepresentedObject.
(WebInspector.FrameTreeElement.prototype._childFrameWasRemoved): Call _removeChildForRepresentedObject.
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Update parent status and append the new tree element.
(WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Update parent status and remove the tree element.
* UserInterface/Main.html: Include FrameTreeElement.js and ResourceTreeElement.js.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Add MainFrameDidChange event listener.
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange): Added.
* UserInterface/ResourceTreeElement.js: Added.
(WebInspector.ResourceTreeElement):
(WebInspector.ResourceTreeElement.prototype.get resource): Returns _resource.
(WebInspector.ResourceTreeElement.prototype._updateResource): Setup event listeners and update titles.
(WebInspector.ResourceTreeElement.prototype._updateTitles): Set the mainTitle to the URL for now.
(WebInspector.ResourceTreeElement.prototype._urlDidChange): Update the titles.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.GeneralTreeElement to be used in navigation sidebar panels.
Reviewed by Joseph Pecoraro.
* UserInterface/GeneralTreeElement.js: Added.
(WebInspector.GeneralTreeElement):
(WebInspector.GeneralTreeElement.prototype.get element):
(WebInspector.GeneralTreeElement.prototype.get disclosureButton):
(WebInspector.GeneralTreeElement.prototype.get iconElement):
(WebInspector.GeneralTreeElement.prototype.get titlesElement):
(WebInspector.GeneralTreeElement.prototype.get mainTitleElement):
(WebInspector.GeneralTreeElement.prototype.get subtitleElement):
(WebInspector.GeneralTreeElement.prototype.get classNames):
(WebInspector.GeneralTreeElement.prototype.set classNames):
(WebInspector.GeneralTreeElement.prototype.get small):
(WebInspector.GeneralTreeElement.prototype.set small):
(WebInspector.GeneralTreeElement.prototype.get mainTitle):
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
(WebInspector.GeneralTreeElement.prototype.get subtitle):
(WebInspector.GeneralTreeElement.prototype.set subtitle):
(WebInspector.GeneralTreeElement.prototype.isEventWithinDisclosureTriangle):
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.onreveal):
(WebInspector.GeneralTreeElement.prototype._createElementsIfNeeded):
(WebInspector.GeneralTreeElement.prototype._createSubtitleElementIfNeeded):
(WebInspector.GeneralTreeElement.prototype._updateTitleElements):
* UserInterface/Main.html: Add GeneralTreeElement.js.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Generate disclosure triangles from PDFs for the Web Inspector's navigation sidebar.
The disclosure triangles are a solid color plus a shadow for a normal and selected state.
Reviewed by Brian Weinstein.
* UserInterface/ImageUtilities.js: Added.
(generateColoredImage): Take an input image and fill the image with a color while preserving the alpha.
* UserInterface/Images/DisclosureTriangleSmallClosed.pdf: Added.
* UserInterface/Images/DisclosureTriangleSmallOpen.pdf: Added.
* UserInterface/Main.html: Added ImageUtilities.js.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Call _generateDisclosureTrianglesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded): Load the open and closed images.
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._disclosureImageLoaded): Call
_generateDisclosureTriangle for the normal and selected state with different colors for each.
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded._generateDisclosureTriangle):
Fill the image with the color and draw it with the desired shadow.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Create a TreeOutline for WebInspector.NavigationSidebarPanel that is styled like Xcode 4's Project Navigator.
The disclosure triangle generation is not part of this change, they will come in a later change.
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/Main.html: Included TreeOutline.js.
* UserInterface/NavigationSidebarPanel.css: Style rules for .navigation-sidebar-panel-content-tree-outline
and decedent elements.
* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Create the TreeOutline and its element. Call _generateStyleRulesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype.get contentElement): Added.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Added.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutline): Added.
(WebInspector.NavigationSidebarPanel.prototype._generateStyleRulesIfNeeded): Added. Make repetitive style rules for
15 levels of indentation.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.NavigationSidebarPanel as a base class for all navigation
sidebar panels so they can share code for the content element and filter bar.
Only the content element is there now, the filter bar is coming later.
Reviewed by Dan Bernstein.
* UserInterface/Main.html: Add NavigationSidebarPanel.js and NavigationSidebarPanel.css.
* UserInterface/NavigationSidebarPanel.css: Added.
(.sidebar > .panel.navigation > .content): Account for 22px at the bottom for the future
filter bar height.
* UserInterface/NavigationSidebarPanel.js: Added.
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.get contentElement):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel): Inherit from NavigationSidebarPanel instead of SidebarPanel.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add events to the Web Inspector for frame and resource changes.
These events will be used to keep the user interface up-to-date.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.initialize):
(WebInspector.Frame.prototype.startProvisionalLoad):
(WebInspector.Frame.prototype.commitProvisionalLoad):
(WebInspector.Frame.prototype.clearProvisionalLoad):
(WebInspector.Frame.prototype.addChildFrame):
(WebInspector.Frame.prototype.removeChildFrame):
(WebInspector.Frame.prototype.removeAllChildFrames):
(WebInspector.Frame.prototype.addResource):
(WebInspector.Frame.prototype.removeResource):
(WebInspector.Frame.prototype.removeAllResources):
(WebInspector.Frame.prototype._resourceURLDidChange):
(WebInspector.Frame.prototype._dispatchMainResourceDidChangeEvent):
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.initialize):
(WebInspector.FrameResourceManager.prototype.frameDidNavigate):
(WebInspector.FrameResourceManager.prototype.frameDidDetach):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
(WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
(WebInspector.FrameResourceManager.prototype._dispatchFrameWasAddedEvent):
(WebInspector.FrameResourceManager.prototype._dispatchMainFrameDidChangeEvent):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.updateForResponse):
2011-11-28 Timothy Hatcher <timothy@apple.com>
Keep WebInspector.FrameResourceManager up-to-date during resource loads.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Frame.js:
(WebInspector.Frame):
(WebInspector.Frame.prototype.initialize): Add an assert. Set the loaderIdentifier and call clearProvisionalLoad.
(WebInspector.Frame.prototype.startProvisionalLoad): Added.
(WebInspector.Frame.prototype.commitProvisionalLoad): Added.
(WebInspector.Frame.prototype.clearProvisionalLoad): Added.
(WebInspector.Frame.prototype.get loaderIdentifier): Added.
(WebInspector.Frame.prototype.get provisionalLoaderIdentifier): Added.
(WebInspector.Frame.prototype.get provisionalMainResource): Added.
(WebInspector.Frame.prototype.addResource): Use _associateWithResource.
(WebInspector.Frame.prototype.removeResource): Use _disassociateWithResource.
(WebInspector.Frame.prototype.removeAllResources): Ditto.
(WebInspector.Frame.prototype._associateWithResource): Added.
(WebInspector.Frame.prototype._disassociateWithResource): Added.
(WebInspector.Frame.prototype._resourceURLDidChange): Added.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager): Enable the NetworkAgent.
(WebInspector.FrameResourceManager.prototype.initialize): Initialize _resourceRequestIdentifierMap.
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Call commitProvisionalLoad if this was the provisionalLoaderIdentifier.
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading): Added.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading): Added.
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame): Added.
(WebInspector.FrameResourceManager.prototype._addResourceToFrame): Added.
(WebInspector.FrameResourceManager.prototype._createFrame): Pass the loaderId.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.requestWillBeSent): Call FrameResourceManager.
(WebInspector.NetworkObserver.prototype.responseReceived): Ditto.
(WebInspector.NetworkObserver.prototype.loadingFinished): Ditto.
(WebInspector.NetworkObserver.prototype.loadingFailed): Ditto.
(WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Ditto.
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.prototype.frameNavigated): Pass the loaderId.
* UserInterface/Resource.js:
(WebInspector.Resource): Added loaderIdentifier.
(WebInspector.Resource.prototype.get loaderIdentifier): Added.
(WebInspector.Resource.prototype.updateForRedirectResponse): Added.
(WebInspector.Resource.prototype.updateForResponse): Added.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.Resource and populate existing resources for page frames.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Sam Weinig.
* UserInterface/Frame.js:
(WebInspector.Frame.prototype.initialize): Remove _url and _mimeType. Add _mainResource, _resources and _resourceURLMap.
(WebInspector.Frame.prototype.get url): Get the URL from the mainResource.
(WebInspector.Frame.prototype.get mainResource): Added.
(WebInspector.Frame.prototype.get resources): Added.
(WebInspector.Frame.prototype.resourceForURL): Added.
(WebInspector.Frame.prototype.addResource): Added.
(WebInspector.Frame.prototype.removeResource): Added.
(WebInspector.Frame.prototype.removeAllResources): Added.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._createResource): Added.
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Call _createResource for each
resource in the payload.
* UserInterface/Main.html:
* UserInterface/Resource.js: Added.
(WebInspector.Resource):
(WebInspector.Resource.Type.fromMIMEType):
(WebInspector.Resource.prototype.get url):
(WebInspector.Resource.prototype.get type):
(WebInspector.Resource.prototype.get mimeType):
(WebInspector.Resource.prototype.get parentFrame):
2011-11-28 Timothy Hatcher <timothy@apple.com>
Keep WebInspector.FrameResourceManager up-to-date during navigation, adding and detaching frames.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Ada Chan.
* UserInterface/Frame.js:
(WebInspector.Frame): Call initialize.
(WebInspector.Frame.prototype.initialize): Added.
(WebInspector.Frame.prototype.get parentFrame): Added.
(WebInspector.Frame.prototype.childFrameForIdentifier): Added.
(WebInspector.Frame.prototype.addChildFrame): Call removeChildFrame on the previous parentFrame. Set parentFrame.
(WebInspector.Frame.prototype.removeChildFrame): Added.
(WebInspector.Frame.prototype.removeAllChildFrames): Added.
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.frameForIdentifier): Added.
(WebInspector.FrameResourceManager.prototype.frameDidNavigate): Added.
(WebInspector.FrameResourceManager.prototype.frameDidDetach): Added.
(WebInspector.FrameResourceManager.prototype._createFrame): Added.
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload): Use _createFrame.
* UserInterface/PageObserver.js:
(WebInspector.PageObserver.prototype.frameNavigated): Call WebInspector.FrameResourceManager.frameDidNavigate.
(WebInspector.PageObserver.prototype.frameDetached): Call WebInspector.FrameResourceManager.frameDidDetach.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FrameResourceManager and have it build up the basic frame tree for the inspected page.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Jessie Berlin.
* UserInterface/Frame.js: Added.
(WebInspector.Frame):
(WebInspector.Frame.prototype.get id):
(WebInspector.Frame.prototype.get name):
(WebInspector.Frame.prototype.get url):
(WebInspector.Frame.prototype.get childFrames):
(WebInspector.Frame.prototype.addChildFrame):
* UserInterface/FrameResourceManager.js: Added.
(WebInspector.FrameResourceManager):
(WebInspector.FrameResourceManager.prototype.initialize):
(WebInspector.FrameResourceManager.prototype.get mainFrame):
(WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
(WebInspector.FrameResourceManager.prototype._addFrameTreeFromFrameResourceTreePayload):
* UserInterface/Main.html: Include Frame.js and FrameResourceManager.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Create an instance of WebInspector.FrameResourceManager.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Reorder the calls in WebInspector.contentLoaded to put InspectorBackend first.
This is needed so that the InspectorBackend is ready to use by the user interface elements.
Reviewed by Dan Bernstein.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add Element.removeChildren, Array.remove and isEnterKey for the Web Inspector,
which are needed by TreeOutline.
Reviewed by Dan Bernstein.
* UserInterface/Utilities.js:
(Element.prototype.removeChildren): Added.
(Array.prototype.remove): Added.
(isEnterKey): Added.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Copy the treeoutline.js file from the OpenSource to use in the new Web Inspector.
Rubber-stamped by Dan Bernstein.
* UserInterface/TreeOutline.js: Copied from WebCore/inspector/front-end/treeoutline.js.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Copy the BinarySearch.js file from the OpenSource to use in the new Web Inspector.
Rubber-stamped by Dan Bernstein.
* UserInterface/BinarySearch.js: Copied from WebCore/inspector/front-end/BinarySearch.js.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Make double clicking a sidebar divider toggle the collapsed state of the sidebar.
Reviewed by Dan Bernstein.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar): Add dblclick event listener on the resizer element.
(WebInspector.Sidebar.prototype._resizerDoubleClicked): Toggle the collapsed state.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Make Element.totalOffsetLeft and Element.totalOffsetTop getters again.
Historically these were getters until a Google engineer changed them.
I didn't realize they weren't anymore and used totalOffsetTop as a
getter when making WebInspector.NavigationBar, which is a bug.
Reviewed by Darin Adler.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype._resizerMouseMoved): Remove the function call
when using totalOffsetLeft.
* UserInterface/Utilities.js:
(Element.prototype.totalOffsetLeft): Made a getter using __defineGetter__.
(Element.prototype.totalOffsetTop): Ditto.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Update Web Inspector event observers to reflect changes in Inspector.json from Open Source as of r101194.
Reviewed by Anders Carlsson.
* UserInterface/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Removed.
(WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Removed.
(WebInspector.DebuggerObserver.prototype.globalObjectCleared): Added.
* UserInterface/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.disconnectFromBackend): Removed.
(WebInspector.InspectorObserver.prototype.disconnectFromWorker): Added.
(WebInspector.InspectorObserver.prototype.bringToFront): Removed.
(WebInspector.InspectorObserver.prototype.reset): Removed.
(WebInspector.InspectorObserver.prototype.showPanel): Removed.
(WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Removed.
* UserInterface/NetworkObserver.js:
(WebInspector.NetworkObserver.prototype.responseReceived): Added frameId and loaderId arguments.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Fix copy and paste error that called InspectorBackend.registerConsoleDispatcher
for all the other dispatchers.
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector.contentLoaded):
2011-11-11 Timothy Hatcher <timothy@apple.com>
Add the ResourceSidebarPanel class in the new Web Inspector.
Part of: <rdar://problem/10318718> Implement the Resource sidebar for the new Web Inspector design
Reviewed by Jessie Berlin.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded): Use ResourceSidebarPanel for the Resource panel.
* UserInterface/ResourceSidebarPanel.js: Added.
(WebInspector.ResourceSidebarPanel):
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ApplicationCacheObserver with stubs for events defined by the "ApplicationCache" domain.
Reviewed by Brian Weinstein.
* UserInterface/ApplicationCacheObserver.js: Added.
(WebInspector.ApplicationCacheObserver):
(WebInspector.ApplicationCacheObserver.prototype.applicationCacheStatusUpdated): Not implemented.
(WebInspector.ApplicationCacheObserver.prototype.networkStateUpdated): Not implemented.
* UserInterface/Main.html: Include ApplicationCacheObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.ApplicationCacheObserver with InspectorBackend.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DOMStorageObserver with stubs for events defined by the "DOMStorage" domain.
Reviewed by Brian Weinstein.
* UserInterface/DOMStorageObserver.js: Added.
(WebInspector.DOMStorageObserver):
(WebInspector.DOMStorageObserver.prototype.addDOMStorage): Not implemented.
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Not implemented.
* UserInterface/Main.html: Include DOMStorageObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.DOMStorageObserver with InspectorBackend.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DatabaseObserver with stubs for events defined by the "Database" domain.
Reviewed by Brian Weinstein.
* UserInterface/DatabaseObserver.js: Added.
(WebInspector.DatabaseObserver):
(WebInspector.DatabaseObserver.prototype.addDatabase): Not implemented.
(WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Not implemented.
(WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Not implemented.
* UserInterface/Main.html: Include DatabaseObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.DatabaseObserver with InspectorBackend.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DebuggerObserver with stubs for events defined by the "Debugger" domain.
Reviewed by Brian Weinstein.
* UserInterface/DebuggerObserver.js: Added.
(WebInspector.DebuggerObserver):
(WebInspector.DebuggerObserver.prototype.debuggerWasEnabled): Not implemented.
(WebInspector.DebuggerObserver.prototype.debuggerWasDisabled): Not implemented.
(WebInspector.DebuggerObserver.prototype.scriptParsed): Not implemented.
(WebInspector.DebuggerObserver.prototype.scriptFailedToParse): Not implemented.
(WebInspector.DebuggerObserver.prototype.breakpointResolved): Not implemented.
(WebInspector.DebuggerObserver.prototype.paused): Not implemented.
(WebInspector.DebuggerObserver.prototype.resumed): Not implemented.
* UserInterface/Main.html: Include DebuggerObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.DebuggerObserver with InspectorBackend.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.DOMObserver with stubs for events defined by the "DOM" domain.
Reviewed by Brian Weinstein.
* UserInterface/DOMObserver.js: Added.
(WebInspector.DOMObserver):
(WebInspector.DOMObserver.prototype.documentUpdated): Not implemented.
(WebInspector.DOMObserver.prototype.setChildNodes): Not implemented.
(WebInspector.DOMObserver.prototype.attributeModified): Not implemented.
(WebInspector.DOMObserver.prototype.attributeRemoved): Not implemented.
(WebInspector.DOMObserver.prototype.inlineStyleInvalidated): Not implemented.
(WebInspector.DOMObserver.prototype.characterDataModified): Not implemented.
(WebInspector.DOMObserver.prototype.childNodeCountUpdated): Not implemented.
(WebInspector.DOMObserver.prototype.childNodeInserted): Not implemented.
(WebInspector.DOMObserver.prototype.childNodeRemoved): Not implemented.
* UserInterface/Main.html: Include DOMObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.DOMObserver with InspectorBackend.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.NetworkObserver with stubs for events defined by the "Network" domain.
Reviewed by Sam Weinig.
* UserInterface/Main.html: Include NetworkObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.NetworkObserver with InspectorBackend.
* UserInterface/NetworkObserver.js: Added.
(WebInspector.NetworkObserver):
(WebInspector.NetworkObserver.prototype.requestWillBeSent): Not implemented.
(WebInspector.NetworkObserver.prototype.requestServedFromCache): Not implemented.
(WebInspector.NetworkObserver.prototype.responseReceived): Not implemented.
(WebInspector.NetworkObserver.prototype.dataReceived): Not implemented.
(WebInspector.NetworkObserver.prototype.loadingFinished): Not implemented.
(WebInspector.NetworkObserver.prototype.loadingFailed): Not implemented.
(WebInspector.NetworkObserver.prototype.requestServedFromMemoryCache): Not implemented.
(WebInspector.NetworkObserver.prototype.webSocketWillSendHandshakeRequest): Not implemented.
(WebInspector.NetworkObserver.prototype.webSocketHandshakeResponseReceived): Not implemented.
(WebInspector.NetworkObserver.prototype.webSocketCreated): Not implemented.
(WebInspector.NetworkObserver.prototype.webSocketClosed): Not implemented.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.ConsoleObserver with stubs for events defined by the "Console" domain.
Reviewed by Sam Weinig.
* UserInterface/Main.html: Include ConsoleObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.ConsoleObserver with InspectorBackend.
* UserInterface/ConsoleObserver.js: Added.
(WebInspector.ConsoleObserver):
(WebInspector.ConsoleObserver.prototype.messageAdded): Not implemented.
(WebInspector.ConsoleObserver.prototype.messageRepeatCountUpdated): Not implemented.
(WebInspector.ConsoleObserver.prototype.messagesCleared): Not implemented.
2011-11-14 Timothy Hatcher <timothy@apple.com>
Add WebInspector.PageObserver with stubs for events defined by the "Page" domain.
Reviewed by Sam Weinig.
* UserInterface/Main.html: Include PageObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Register an instance of WebInspector.PageObserver with InspectorBackend.
* UserInterface/PageObserver.js: Added.
(WebInspector.PageObserver):
(WebInspector.PageObserver.prototype.domContentEventFired): Not implemented.
(WebInspector.PageObserver.prototype.loadEventFired): Not implemented.
(WebInspector.PageObserver.prototype.frameNavigated): Not implemented.
(WebInspector.PageObserver.prototype.frameDetached): Not implemented.
2011-11-13 Timothy Hatcher <timothy@apple.com>
Add WebInspector.InspectorObserver to receive events defined by the "Inspector" domain.
Most of the events are unimplemented stubs at this point.
Reviewed by Sam Weinig.
* UserInterface/InspectorObserver.js: Added.
(WebInspector.InspectorObserver):
(WebInspector.InspectorObserver.prototype.frontendReused): Not implemented.
(WebInspector.InspectorObserver.prototype.bringToFront): Call through to InspectorFrontendHost.
(WebInspector.InspectorObserver.prototype.disconnectFromBackend): Ditto.
(WebInspector.InspectorObserver.prototype.reset): Not implemented.
(WebInspector.InspectorObserver.prototype.showPanel): Not implemented.
(WebInspector.InspectorObserver.prototype.startUserInitiatedDebugging): Not implemented.
(WebInspector.InspectorObserver.prototype.evaluateForTestInFrontend): Not implemented.
(WebInspector.InspectorObserver.prototype.inspect): Not implemented.
(WebInspector.InspectorObserver.prototype.didCreateWorker): Not implemented.
(WebInspector.InspectorObserver.prototype.didDestroyWorker): Not implemented.
* UserInterface/Main.html: Include InspectorObserver.js.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Removed the load event listener and call InspectorFrontendHost.loaded
here. Register an instance of WebInspector.InspectorObserver with InspectorBackend.
2011-11-13 Timothy Hatcher <timothy@apple.com>
Include InspectorBackend.js and start accepting messages from the backend.
Reviewed by Joseph Pecoraro.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.dispatchNextQueuedMessageFromBackend): Added.
(WebInspector.dispatchMessageFromBackend): Added.
2011-11-11 Timothy Hatcher <timothy@apple.com>
Copy InspectorBackendStub.js from WebCore so it can be used by the new Web Inspector.
Reviewed by Joseph Pecoraro.
* WebInspectorUI.xcodeproj/project.pbxproj: Add new Copy WebCore Inspector Resources build phase.
* Configurations/Base.xcconfig: Add WEBCORE_RESOURCES_DIR.
2011-11-10 Timothy Hatcher <timothy@apple.com>
Add WebInspector.FlexibleSpaceNavigationItem and make the navigation bar use flex box layout.
This change will allow for controls that float to the right or left (like a close button when docked.)
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Add flexible spaces on each side.
* UserInterface/NavigationBar.css:
(.navigation-bar): Use -webkit-box.
(.navigation-bar > .item): Added.
(.navigation-bar > .item.flexible-space): Added.
(.navigation-bar > .item.button): Remove styles that aren't needed anymore.
(.navigation-bar > .item.button > .glyph): Use auto margins to center the glyph since text-align no longer works.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype._calculateMinimumWidth): Skip flexible spaces.
(WebInspector.FlexibleSpaceNavigationItem): Added.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar.prototype.get navigationBar): Added.
2011-11-10 Timothy Hatcher <timothy@apple.com>
Rename WebInspector.NavigationItem to WebInspector.ButtonNavigationItem and make new
WebInspector.RadioButtonNavigationItem and WebInspector.NavigationItem classes.
This change allows for future non-radio-button items to be placed in a NavigationBar.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/NavigationBar.css:
(.navigation-bar > .item.button):
(.navigation-bar.collapsed > .item.button):
(.navigation-bar > .item.button > .glyph):
(.navigation-bar > .item.button.selected):
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseMoved):
(WebInspector.NavigationItem):
(WebInspector.NavigationItem.prototype.get _classNames):
(WebInspector.ButtonNavigationItem):
(WebInspector.ButtonNavigationItem.prototype.generateStyleText):
(WebInspector.ButtonNavigationItem.prototype._additionalClassNames.WebInspector.ButtonNavigationItem.StyleClassName._canvasIdentifier):
(WebInspector.ButtonNavigationItem.prototype._generateImages._imageLoaded):
(WebInspector.ButtonNavigationItem.prototype._generateImages._createEmbossedCanvasImage):
(WebInspector.RadioButtonNavigationItem):
(WebInspector.RadioButtonNavigationItem.prototype.get selected):
(WebInspector.RadioButtonNavigationItem.prototype.set selected):
(WebInspector.RadioButtonNavigationItem.prototype.get active):
(WebInspector.RadioButtonNavigationItem.prototype.set active):
(WebInspector.RadioButtonNavigationItem.prototype.generateStyleText):
* UserInterface/Sidebar.js:
(WebInspector.SidebarPanel):
2011-11-10 Timothy Hatcher <timothy@apple.com>
Add support for resizing the sidebars in the new Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by John Sullivan.
* UserInterface/Main.css:
(body): Prevent overflow.
(#navigation-sidebar): Moved border and background properties to Sidebar.css.
(#details-sidebar): Ditto.
* UserInterface/Main.js:
(WebInspector.contentLoaded): Specify the side for the sidebars.
* UserInterface/Sidebar.css:
(.sidebar.collapsed): Added.
(.sidebar > .resizer): Added.
(.sidebar.right > .resizer): Added.
(.sidebar.left > .resizer): Added.
(.sidebar.collapsed.right > .resizer): Added.
(.sidebar.collapsed.left > .resizer): Added.
(.sidebar.left): Added.
(.sidebar.left:not(.collapsed) > .navigation-bar): Added.
(body.window-inactive .sidebar.left > .navigation-bar): Added.
(.sidebar.right): Added.
(.sidebar.right:not(.collapsed) > .navigation-bar): Added.
(body.window-inactive .sidebar.right > .navigation-bar): Added.
* UserInterface/Sidebar.js:
(WebInspector.Sidebar): Added the side argument. Setup the resizer element.
(WebInspector.Sidebar.prototype.get minimumWidth): Added.
(WebInspector.Sidebar.prototype.get maximumWidth): Added.
(WebInspector.Sidebar.prototype.get width): Added.
(WebInspector.Sidebar.prototype.set width): Added.
(WebInspector.Sidebar.prototype.get collapsed): Added.
(WebInspector.Sidebar.prototype.set collapsed): Added.
(WebInspector.Sidebar.prototype.get side): Added.
(WebInspector.Sidebar.prototype._resizerMouseDown): Added.
(WebInspector.Sidebar.prototype._resizerMouseMoved): Added.
(WebInspector.Sidebar.prototype._resizerMouseUp): Added.
2011-11-10 Timothy Hatcher <timothy@apple.com>
Add minimumWidth and support for collapsing of the navigation bar items in the Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by John Sullivan and Joseph Pecoraro.
* UserInterface/NavigationBar.css:
(.navigation-bar): Prevent overflow.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.addNavigationItem): Set _minimumWidthNeedsRecalculated to true.
(WebInspector.NavigationBar.prototype.updateLayout): Added.
(WebInspector.NavigationBar.prototype.get minimumWidth): Added. Call _calculateMinimumWidth if needed.
(WebInspector.NavigationBar.prototype._calculateMinimumWidth): Added.
2011-11-09 Timothy Hatcher <timothy@apple.com>
Use child CSS selectors for the NavigationBar in the new Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Jon Honeycutt.
* UserInterface/NavigationBar.css:
(.navigation-bar > .item):
(.navigation-bar.collapsed > .item):
(.navigation-bar > .item > .glyph):
(.navigation-bar > .item.selected):
* UserInterface/NavigationBar.js:
(WebInspector.NavigationItem.prototype.generateStyleText):
2011-11-09 Timothy Hatcher <timothy@apple.com>
Improve the window inactive appearance for the navigation bars and sidebars in the new Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Jon Honeycutt.
* UserInterface/Main.css:
(body.window-inactive #navigation-sidebar > .navigation-bar): Added. Set a grey background color.
(#details-sidebar > .navigation-bar): Use a grey background color.
(body.window-inactive #details-sidebar > .navigation-bar): Added. Set a grey background color.
* UserInterface/NavigationBar.css:
(body.window-inactive .navigation-bar): Use a grey background color.
* UserInterface/Sidebar.css:
(body.window-inactive .sidebar): Slight tweak to the grey color to match Xcode.
2011-11-09 Timothy Hatcher <timothy@apple.com>
Layout the sidebars and basic structure of the new Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Main.css:
(body): Use flex-box, position to fill the viewport. Disabled user select and drag.
(#navigation-sidebar): Added.
(#navigation-sidebar > .navigation-bar): Added.
(#content): Added.
(#content-panels): Added.
(#quick-navigation-bar): Added.
(#details-sidebar): Added.
(#details-sidebar > .navigation-bar): Added.
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.contentLoaded): Added.
(WebInspector.windowLoaded): Added.
2011-11-08 Timothy Hatcher <timothy@apple.com>
Add basic Sidebar support for the new Web Inspector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Brian Weinstein and Joseph Pecoraro.
* UserInterface/Main.html: Include Sidebar.js and Sidebar.css.
* UserInterface/Main.js:
(windowLoaded): Change test code to use Sidebar classes.
* UserInterface/Sidebar.css: Added.
(.sidebar):
(body.window-inactive .sidebar):
(.sidebar > .navigation-bar):
(.sidebar > .panel):
(.sidebar > .panel.selected):
* UserInterface/Sidebar.js: Added.
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype.addSidebarPanel):
(WebInspector.Sidebar.prototype.get selectedSidebarPanel):
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get sidebarPanels):
(WebInspector.Sidebar.prototype.get element):
(WebInspector.Sidebar.prototype._navigationItemSelected):
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.get identifier):
(WebInspector.SidebarPanel.prototype.get navigationItem):
(WebInspector.SidebarPanel.prototype.get element):
(WebInspector.SidebarPanel.prototype.get selected):
(WebInspector.SidebarPanel.prototype.set selected):
2011-11-08 Timothy Hatcher <timothy@apple.com>
Fire an event when a navigation item is selected in a navigation bar.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Brian Weinstein.
* UserInterface/NavigationBar.js:
(WebInspector.NavigationBar.prototype.addNavigationItem): Remove unused arguments. (Drive by change.)
(WebInspector.NavigationBar.prototype.set selectedNavigationItem): Avoid doing work if the item is already
selected. Fire the event if the mouse isn't down.
(WebInspector.NavigationBar.prototype._mouseDown): Store the previous selected item.
(WebInspector.NavigationBar.prototype._mouseUp): Fire the event if the selected item is different.
2011-10-31 Timothy Hatcher <timothy@apple.com>
Add the navigation bar for the new Web Insector.
Part of: <rdar://problem/10318699> Implement the interface structure for the new Web Inspector design
Reviewed by Joseph Pecoraro.
* UserInterface/Images/NavigationItemBreakpoint.pdf: Added.
* UserInterface/Images/NavigationItemFile.pdf: Added.
* UserInterface/Images/NavigationItemLog.pdf: Added.
* UserInterface/Images/NavigationItemMagnifyingGlass.pdf: Added.
* UserInterface/Images/NavigationItemStopwatch.pdf: Added.
* UserInterface/Images/NavigationItemStorage.pdf: Added.
* UserInterface/Images/NavigationItemThreads.pdf: Added.
* UserInterface/Images/NavigationItemWarning.pdf: Added.
* UserInterface/Main.css: Added.
(*):
(body):
* UserInterface/Main.html:
* UserInterface/Main.js: Added.
(windowLoaded):
* UserInterface/NavigationBar.css: Added.
(.navigation-bar):
(body.window-inactive .navigation-bar):
(.navigation-bar .item):
(.navigation-bar.collapsed .item):
(.navigation-bar .item .glyph):
(.navigation-bar .item.selected):
(.navigation-bar:focus):
* UserInterface/NavigationBar.js: Added.
(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.addNavigationItem):
(WebInspector.NavigationBar.prototype.get selectedNavigationItem):
(WebInspector.NavigationBar.prototype.set selectedNavigationItem):
(WebInspector.NavigationBar.prototype.get navigationItems):
(WebInspector.NavigationBar.prototype.get element):
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseMoved):
(WebInspector.NavigationBar.prototype._mouseUp):
(WebInspector.NavigationBar.prototype._keyDown):
(WebInspector.NavigationBar.prototype._focus):
(WebInspector.NavigationBar.prototype._blur):
(WebInspector.NavigationBar.prototype._updateStyle):
(WebInspector.NavigationItem):
(WebInspector.NavigationItem.prototype.get identifier):
(WebInspector.NavigationItem.prototype.get displayName):
(WebInspector.NavigationItem.prototype.get image):
(WebInspector.NavigationItem.prototype.get element):
(WebInspector.NavigationItem.prototype.get selected):
(WebInspector.NavigationItem.prototype.set selected):
(WebInspector.NavigationItem.prototype.get active):
(WebInspector.NavigationItem.prototype.set active):
(WebInspector.NavigationItem.prototype.generateStyleText):
(WebInspector.NavigationItem.prototype.get _classNames):
(WebInspector.NavigationItem.prototype._canvasIdenitfier):
(WebInspector.NavigationItem.prototype._generateImages._imageLoaded):
(WebInspector.NavigationItem.prototype._generateImages._createEmbossedCanvasImage):
(WebInspector.NavigationItem.prototype._generateImages._drawImageShadow):
(WebInspector.NavigationItem.prototype._generateImages._invertMaskImage):
(WebInspector.NavigationItem.prototype._generateImages._applyImageMask):
(WebInspector.NavigationItem.prototype._generateImages):
* UserInterface/Object.js: Added.
(WebInspector.Object):
(WebInspector.Object.prototype.addEventListener):
(WebInspector.Object.prototype.removeEventListener):
(WebInspector.Object.prototype.removeAllListeners):
(WebInspector.Object.prototype.hasEventListeners):
(WebInspector.Object.prototype.dispatchEventToListeners):
(WebInspector.Event):
(WebInspector.Event.prototype.stopPropagation):
(WebInspector.Event.prototype.preventDefault):
* UserInterface/Utilities.js: Added.
(Node.prototype.enclosingNodeOrSelfWithClass):
(Node.prototype.enclosingNodeWithClass):
(Element.prototype.totalOffsetLeft):
(Element.prototype.totalOffsetTop):
* UserInterface/WebInspector.js: Added.
2011-10-28 Timothy Hatcher <timothy@apple.com>
Add a experiments menu item to enabled the new Web Inspector. There is only a placeholder
for the new inspector right now, so it isn't useful for most people yet.
This chnage depends on: https://webkit.org/b/71089
<rdar://problem/10318665> Make it possible to use a different front-end for the Web Inspector
Reviewed by John Sullivan.
* UserInterface/Main.html: Added.
|