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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; | 125 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; |
126 | 126 |
127 /** @enum {string} */ | 127 /** @enum {string} */ |
128 WebInspector.NetworkLogView.FilterType = { | 128 WebInspector.NetworkLogView.FilterType = { |
129 Domain: "domain", | 129 Domain: "domain", |
130 HasResponseHeader: "has-response-header", | 130 HasResponseHeader: "has-response-header", |
131 Is: "is", | 131 Is: "is", |
132 LargerThan: "larger-than", | 132 LargerThan: "larger-than", |
133 Method: "method", | 133 Method: "method", |
134 MimeType: "mime-type", | 134 MimeType: "mime-type", |
| 135 MixedContent: "mixed-content", |
135 Scheme: "scheme", | 136 Scheme: "scheme", |
136 SetCookieDomain: "set-cookie-domain", | 137 SetCookieDomain: "set-cookie-domain", |
137 SetCookieName: "set-cookie-name", | 138 SetCookieName: "set-cookie-name", |
138 SetCookieValue: "set-cookie-value", | 139 SetCookieValue: "set-cookie-value", |
139 StatusCode: "status-code" | 140 StatusCode: "status-code" |
140 }; | 141 }; |
141 | 142 |
142 /** @enum {string} */ | 143 /** @enum {string} */ |
143 WebInspector.NetworkLogView.IsFilterType = { | 144 WebInspector.NetworkLogView.IsFilterType = { |
144 Running: "running" | 145 Running: "running" |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 { | 1078 { |
1078 if (!this._nodesByRequestId.get(request.requestId)) | 1079 if (!this._nodesByRequestId.get(request.requestId)) |
1079 return; | 1080 return; |
1080 | 1081 |
1081 WebInspector.NetworkLogView._subdomains(request.domain).forEach(this._su
ggestionBuilder.addItem.bind(this._suggestionBuilder, WebInspector.NetworkLogVie
w.FilterType.Domain)); | 1082 WebInspector.NetworkLogView._subdomains(request.domain).forEach(this._su
ggestionBuilder.addItem.bind(this._suggestionBuilder, WebInspector.NetworkLogVie
w.FilterType.Domain)); |
1082 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.M
ethod, request.requestMethod); | 1083 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.M
ethod, request.requestMethod); |
1083 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.M
imeType, request.mimeType); | 1084 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.M
imeType, request.mimeType); |
1084 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.S
cheme, "" + request.scheme); | 1085 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.S
cheme, "" + request.scheme); |
1085 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.S
tatusCode, "" + request.statusCode); | 1086 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterType.S
tatusCode, "" + request.statusCode); |
1086 | 1087 |
| 1088 if (request.mixedContentType !== "none") { |
| 1089 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.MixedContent, "all"); |
| 1090 } |
| 1091 |
| 1092 if (request.mixedContentType === "optionally-blockable") { |
| 1093 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.MixedContent, "displayed"); |
| 1094 } |
| 1095 |
| 1096 if (request.mixedContentType === "blockable") { |
| 1097 var suggestion = request.blocked ? "blocked" : "block-overridden"; |
| 1098 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.MixedContent, suggestion); |
| 1099 } |
| 1100 |
1087 var responseHeaders = request.responseHeaders; | 1101 var responseHeaders = request.responseHeaders; |
1088 for (var i = 0, l = responseHeaders.length; i < l; ++i) | 1102 for (var i = 0, l = responseHeaders.length; i < l; ++i) |
1089 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.HasResponseHeader, responseHeaders[i].name); | 1103 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.HasResponseHeader, responseHeaders[i].name); |
1090 var cookies = request.responseCookies; | 1104 var cookies = request.responseCookies; |
1091 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { | 1105 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { |
1092 var cookie = cookies[i]; | 1106 var cookie = cookies[i]; |
1093 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieDomain, cookie.domain()); | 1107 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieDomain, cookie.domain()); |
1094 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieName, cookie.name()); | 1108 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieName, cookie.name()); |
1095 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieValue, cookie.value()); | 1109 this._suggestionBuilder.addItem(WebInspector.NetworkLogView.FilterTy
pe.SetCookieValue, cookie.value()); |
1096 } | 1110 } |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 | 1688 |
1675 case WebInspector.NetworkLogView.FilterType.LargerThan: | 1689 case WebInspector.NetworkLogView.FilterType.LargerThan: |
1676 return this._createSizeFilter(value.toLowerCase()); | 1690 return this._createSizeFilter(value.toLowerCase()); |
1677 | 1691 |
1678 case WebInspector.NetworkLogView.FilterType.Method: | 1692 case WebInspector.NetworkLogView.FilterType.Method: |
1679 return WebInspector.NetworkLogView._requestMethodFilter.bind(null, v
alue); | 1693 return WebInspector.NetworkLogView._requestMethodFilter.bind(null, v
alue); |
1680 | 1694 |
1681 case WebInspector.NetworkLogView.FilterType.MimeType: | 1695 case WebInspector.NetworkLogView.FilterType.MimeType: |
1682 return WebInspector.NetworkLogView._requestMimeTypeFilter.bind(null,
value); | 1696 return WebInspector.NetworkLogView._requestMimeTypeFilter.bind(null,
value); |
1683 | 1697 |
| 1698 case WebInspector.NetworkLogView.FilterType.MixedContent: |
| 1699 return WebInspector.NetworkLogView._requestMixedContentFilter.bind(n
ull, value); |
| 1700 |
1684 case WebInspector.NetworkLogView.FilterType.Scheme: | 1701 case WebInspector.NetworkLogView.FilterType.Scheme: |
1685 return WebInspector.NetworkLogView._requestSchemeFilter.bind(null, v
alue); | 1702 return WebInspector.NetworkLogView._requestSchemeFilter.bind(null, v
alue); |
1686 | 1703 |
1687 case WebInspector.NetworkLogView.FilterType.SetCookieDomain: | 1704 case WebInspector.NetworkLogView.FilterType.SetCookieDomain: |
1688 return WebInspector.NetworkLogView._requestSetCookieDomainFilter.bin
d(null, value); | 1705 return WebInspector.NetworkLogView._requestSetCookieDomainFilter.bin
d(null, value); |
1689 | 1706 |
1690 case WebInspector.NetworkLogView.FilterType.SetCookieName: | 1707 case WebInspector.NetworkLogView.FilterType.SetCookieName: |
1691 return WebInspector.NetworkLogView._requestSetCookieNameFilter.bind(
null, value); | 1708 return WebInspector.NetworkLogView._requestSetCookieNameFilter.bind(
null, value); |
1692 | 1709 |
1693 case WebInspector.NetworkLogView.FilterType.SetCookieValue: | 1710 case WebInspector.NetworkLogView.FilterType.SetCookieValue: |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 WebInspector.NetworkLogView._requestMimeTypeFilter = function(value, request) | 2010 WebInspector.NetworkLogView._requestMimeTypeFilter = function(value, request) |
1994 { | 2011 { |
1995 return request.mimeType === value; | 2012 return request.mimeType === value; |
1996 } | 2013 } |
1997 | 2014 |
1998 /** | 2015 /** |
1999 * @param {string} value | 2016 * @param {string} value |
2000 * @param {!WebInspector.NetworkRequest} request | 2017 * @param {!WebInspector.NetworkRequest} request |
2001 * @return {boolean} | 2018 * @return {boolean} |
2002 */ | 2019 */ |
| 2020 WebInspector.NetworkLogView._requestMixedContentFilter = function(value, request
) |
| 2021 { |
| 2022 if (value === "displayed") { |
| 2023 return request.mixedContentType === "optionally-blockable"; |
| 2024 } else if (value === "blocked") { |
| 2025 return request.mixedContentType === "blockable" && request.blocked; |
| 2026 } else if (value === "block-overridden") { |
| 2027 return request.mixedContentType === "blockable" && !request.blocked; |
| 2028 } else if (value === "all") { |
| 2029 return request.mixedContentType !== "none"; |
| 2030 } |
| 2031 return false; |
| 2032 } |
| 2033 |
| 2034 /** |
| 2035 * @param {string} value |
| 2036 * @param {!WebInspector.NetworkRequest} request |
| 2037 * @return {boolean} |
| 2038 */ |
2003 WebInspector.NetworkLogView._requestSchemeFilter = function(value, request) | 2039 WebInspector.NetworkLogView._requestSchemeFilter = function(value, request) |
2004 { | 2040 { |
2005 return request.scheme === value; | 2041 return request.scheme === value; |
2006 } | 2042 } |
2007 | 2043 |
2008 /** | 2044 /** |
2009 * @param {string} value | 2045 * @param {string} value |
2010 * @param {!WebInspector.NetworkRequest} request | 2046 * @param {!WebInspector.NetworkRequest} request |
2011 * @return {boolean} | 2047 * @return {boolean} |
2012 */ | 2048 */ |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 return false; | 2138 return false; |
2103 return true; | 2139 return true; |
2104 } | 2140 } |
2105 | 2141 |
2106 WebInspector.NetworkLogView.EventTypes = { | 2142 WebInspector.NetworkLogView.EventTypes = { |
2107 RequestSelected: "RequestSelected", | 2143 RequestSelected: "RequestSelected", |
2108 SearchCountUpdated: "SearchCountUpdated", | 2144 SearchCountUpdated: "SearchCountUpdated", |
2109 SearchIndexUpdated: "SearchIndexUpdated", | 2145 SearchIndexUpdated: "SearchIndexUpdated", |
2110 UpdateRequest: "UpdateRequest" | 2146 UpdateRequest: "UpdateRequest" |
2111 }; | 2147 }; |
OLD | NEW |