| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 this._labelRightElement.classList.add("after"); | 2831 this._labelRightElement.classList.add("after"); |
| 2832 } else { | 2832 } else { |
| 2833 this._labelRightElement.style.setProperty("left", this._percentages.
middle + "%"); | 2833 this._labelRightElement.style.setProperty("left", this._percentages.
middle + "%"); |
| 2834 this._labelRightElement.style.setProperty("right", (100 - this._perc
entages.end) + "%"); | 2834 this._labelRightElement.style.setProperty("right", (100 - this._perc
entages.end) + "%"); |
| 2835 } | 2835 } |
| 2836 }, | 2836 }, |
| 2837 | 2837 |
| 2838 __proto__: WebInspector.DataGridNode.prototype | 2838 __proto__: WebInspector.DataGridNode.prototype |
| 2839 } | 2839 } |
| 2840 | 2840 |
| 2841 /** |
| 2842 * @param {!WebInspector.NetworkDataGridNode} a |
| 2843 * @param {!WebInspector.NetworkDataGridNode} b |
| 2844 * @return {number} |
| 2845 */ |
| 2841 WebInspector.NetworkDataGridNode.NameComparator = function(a, b) | 2846 WebInspector.NetworkDataGridNode.NameComparator = function(a, b) |
| 2842 { | 2847 { |
| 2843 var aFileName = a._request.name(); | 2848 var aFileName = a._request.name(); |
| 2844 var bFileName = b._request.name(); | 2849 var bFileName = b._request.name(); |
| 2845 if (aFileName > bFileName) | 2850 if (aFileName > bFileName) |
| 2846 return 1; | 2851 return 1; |
| 2847 if (bFileName > aFileName) | 2852 if (bFileName > aFileName) |
| 2848 return -1; | 2853 return -1; |
| 2849 return 0; | 2854 return 0; |
| 2850 } | 2855 } |
| 2851 | 2856 |
| 2857 /** |
| 2858 * @param {!WebInspector.NetworkDataGridNode} a |
| 2859 * @param {!WebInspector.NetworkDataGridNode} b |
| 2860 * @return {number} |
| 2861 */ |
| 2852 WebInspector.NetworkDataGridNode.RemoteAddressComparator = function(a, b) | 2862 WebInspector.NetworkDataGridNode.RemoteAddressComparator = function(a, b) |
| 2853 { | 2863 { |
| 2854 var aRemoteAddress = a._request.remoteAddress(); | 2864 var aRemoteAddress = a._request.remoteAddress(); |
| 2855 var bRemoteAddress = b._request.remoteAddress(); | 2865 var bRemoteAddress = b._request.remoteAddress(); |
| 2856 if (aRemoteAddress > bRemoteAddress) | 2866 if (aRemoteAddress > bRemoteAddress) |
| 2857 return 1; | 2867 return 1; |
| 2858 if (bRemoteAddress > aRemoteAddress) | 2868 if (bRemoteAddress > aRemoteAddress) |
| 2859 return -1; | 2869 return -1; |
| 2860 return 0; | 2870 return 0; |
| 2861 } | 2871 } |
| 2862 | 2872 |
| 2873 /** |
| 2874 * @param {!WebInspector.NetworkDataGridNode} a |
| 2875 * @param {!WebInspector.NetworkDataGridNode} b |
| 2876 * @return {number} |
| 2877 */ |
| 2863 WebInspector.NetworkDataGridNode.SizeComparator = function(a, b) | 2878 WebInspector.NetworkDataGridNode.SizeComparator = function(a, b) |
| 2864 { | 2879 { |
| 2865 if (b._request.cached && !a._request.cached) | 2880 if (b._request.cached && !a._request.cached) |
| 2866 return 1; | 2881 return 1; |
| 2867 if (a._request.cached && !b._request.cached) | 2882 if (a._request.cached && !b._request.cached) |
| 2868 return -1; | 2883 return -1; |
| 2869 | 2884 |
| 2870 return a._request.transferSize - b._request.transferSize; | 2885 return a._request.transferSize - b._request.transferSize; |
| 2871 } | 2886 } |
| 2872 | 2887 |
| 2888 /** |
| 2889 * @param {!WebInspector.NetworkDataGridNode} a |
| 2890 * @param {!WebInspector.NetworkDataGridNode} b |
| 2891 * @return {number} |
| 2892 */ |
| 2873 WebInspector.NetworkDataGridNode.InitiatorComparator = function(a, b) | 2893 WebInspector.NetworkDataGridNode.InitiatorComparator = function(a, b) |
| 2874 { | 2894 { |
| 2875 var aInitiator = a._request.initiatorInfo(); | 2895 var aInitiator = a._request.initiatorInfo(); |
| 2876 var bInitiator = b._request.initiatorInfo(); | 2896 var bInitiator = b._request.initiatorInfo(); |
| 2877 | 2897 |
| 2878 if (aInitiator.type < bInitiator.type) | 2898 if (aInitiator.type < bInitiator.type) |
| 2879 return -1; | 2899 return -1; |
| 2880 if (aInitiator.type > bInitiator.type) | 2900 if (aInitiator.type > bInitiator.type) |
| 2881 return 1; | 2901 return 1; |
| 2882 | 2902 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2896 return 1; | 2916 return 1; |
| 2897 | 2917 |
| 2898 if (aInitiator.columnNumber < bInitiator.columnNumber) | 2918 if (aInitiator.columnNumber < bInitiator.columnNumber) |
| 2899 return -1; | 2919 return -1; |
| 2900 if (aInitiator.columnNumber > bInitiator.columnNumber) | 2920 if (aInitiator.columnNumber > bInitiator.columnNumber) |
| 2901 return 1; | 2921 return 1; |
| 2902 | 2922 |
| 2903 return 0; | 2923 return 0; |
| 2904 } | 2924 } |
| 2905 | 2925 |
| 2926 /** |
| 2927 * @param {!WebInspector.NetworkDataGridNode} a |
| 2928 * @param {!WebInspector.NetworkDataGridNode} b |
| 2929 * @return {number} |
| 2930 */ |
| 2906 WebInspector.NetworkDataGridNode.RequestCookiesCountComparator = function(a, b) | 2931 WebInspector.NetworkDataGridNode.RequestCookiesCountComparator = function(a, b) |
| 2907 { | 2932 { |
| 2908 var aScore = a._request.requestCookies ? a._request.requestCookies.length :
0; | 2933 var aScore = a._request.requestCookies ? a._request.requestCookies.length :
0; |
| 2909 var bScore = b._request.requestCookies ? b._request.requestCookies.length :
0; | 2934 var bScore = b._request.requestCookies ? b._request.requestCookies.length :
0; |
| 2910 return aScore - bScore; | 2935 return aScore - bScore; |
| 2911 } | 2936 } |
| 2912 | 2937 |
| 2938 /** |
| 2939 * @param {!WebInspector.NetworkDataGridNode} a |
| 2940 * @param {!WebInspector.NetworkDataGridNode} b |
| 2941 * @return {number} |
| 2942 */ |
| 2913 WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator = function(a, b) | 2943 WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator = function(a, b) |
| 2914 { | 2944 { |
| 2915 var aScore = a._request.responseCookies ? a._request.responseCookies.length
: 0; | 2945 var aScore = a._request.responseCookies ? a._request.responseCookies.length
: 0; |
| 2916 var bScore = b._request.responseCookies ? b._request.responseCookies.length
: 0; | 2946 var bScore = b._request.responseCookies ? b._request.responseCookies.length
: 0; |
| 2917 return aScore - bScore; | 2947 return aScore - bScore; |
| 2918 } | 2948 } |
| 2919 | 2949 |
| 2950 /** |
| 2951 * @param {string} propertyName |
| 2952 * @param {boolean} revert |
| 2953 * @param {!WebInspector.NetworkDataGridNode} a |
| 2954 * @param {!WebInspector.NetworkDataGridNode} b |
| 2955 * @return {number} |
| 2956 */ |
| 2920 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) | 2957 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa
me, revert, a, b) |
| 2921 { | 2958 { |
| 2922 var aValue = a._request[propertyName]; | 2959 var aValue = a._request[propertyName]; |
| 2923 var bValue = b._request[propertyName]; | 2960 var bValue = b._request[propertyName]; |
| 2924 if (aValue > bValue) | 2961 if (aValue > bValue) |
| 2925 return revert ? -1 : 1; | 2962 return revert ? -1 : 1; |
| 2926 if (bValue > aValue) | 2963 if (bValue > aValue) |
| 2927 return revert ? 1 : -1; | 2964 return revert ? 1 : -1; |
| 2928 return 0; | 2965 return 0; |
| 2929 } | 2966 } |
| OLD | NEW |