| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 this._resetSuggestionBuilder(); | 89 this._resetSuggestionBuilder(); |
| 90 this._initializeView(); | 90 this._initializeView(); |
| 91 | 91 |
| 92 WebInspector.moduleSetting("networkColorCodeResourceTypes").addChangeListene
r(this._invalidateAllItems, this); | 92 WebInspector.moduleSetting("networkColorCodeResourceTypes").addChangeListene
r(this._invalidateAllItems, this); |
| 93 this._networkLogLargeRowsSetting.addChangeListener(this._updateRowsSize, thi
s); | 93 this._networkLogLargeRowsSetting.addChangeListener(this._updateRowsSize, thi
s); |
| 94 | 94 |
| 95 WebInspector.targetManager.observeTargets(this); | 95 WebInspector.targetManager.observeTargets(this); |
| 96 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestStarted, this._onRequestStarted, this); | 96 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestStarted, this._onRequestStarted, this); |
| 97 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestUpdated, this._onRequestUpdated, this); | 97 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestUpdated, this._onRequestUpdated, this); |
| 98 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestFinished, this._onRequestUpdated, this); | 98 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.Events.RequestFinished, this._onRequestUpdated, this); |
| 99 } | 99 }; |
| 100 | 100 |
| 101 WebInspector.NetworkLogView._isFilteredOutSymbol = Symbol("isFilteredOut"); | 101 WebInspector.NetworkLogView._isFilteredOutSymbol = Symbol("isFilteredOut"); |
| 102 WebInspector.NetworkLogView._isMatchingSearchQuerySymbol = Symbol("isMatchingSea
rchQuery"); | 102 WebInspector.NetworkLogView._isMatchingSearchQuerySymbol = Symbol("isMatchingSea
rchQuery"); |
| 103 | 103 |
| 104 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr
ue, "wss": true}; | 104 WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": tr
ue, "wss": true}; |
| 105 | 105 |
| 106 WebInspector.NetworkLogView._waterfallMinOvertime = 1; | 106 WebInspector.NetworkLogView._waterfallMinOvertime = 1; |
| 107 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; | 107 WebInspector.NetworkLogView._waterfallMaxOvertime = 3; |
| 108 | 108 |
| 109 /** @enum {symbol} */ | 109 /** @enum {symbol} */ |
| 110 WebInspector.NetworkLogView.Events = { | 110 WebInspector.NetworkLogView.Events = { |
| 111 RequestSelected: Symbol("RequestSelected"), | 111 RequestSelected: Symbol("RequestSelected"), |
| 112 SearchCountUpdated: Symbol("SearchCountUpdated"), | 112 SearchCountUpdated: Symbol("SearchCountUpdated"), |
| 113 SearchIndexUpdated: Symbol("SearchIndexUpdated"), | 113 SearchIndexUpdated: Symbol("SearchIndexUpdated"), |
| 114 UpdateRequest: Symbol("UpdateRequest") | 114 UpdateRequest: Symbol("UpdateRequest") |
| 115 } | 115 }; |
| 116 | 116 |
| 117 /** @enum {string} */ | 117 /** @enum {string} */ |
| 118 WebInspector.NetworkLogView.FilterType = { | 118 WebInspector.NetworkLogView.FilterType = { |
| 119 Domain: "domain", | 119 Domain: "domain", |
| 120 HasResponseHeader: "has-response-header", | 120 HasResponseHeader: "has-response-header", |
| 121 Is: "is", | 121 Is: "is", |
| 122 LargerThan: "larger-than", | 122 LargerThan: "larger-than", |
| 123 Method: "method", | 123 Method: "method", |
| 124 MimeType: "mime-type", | 124 MimeType: "mime-type", |
| 125 MixedContent: "mixed-content", | 125 MixedContent: "mixed-content", |
| 126 Scheme: "scheme", | 126 Scheme: "scheme", |
| 127 SetCookieDomain: "set-cookie-domain", | 127 SetCookieDomain: "set-cookie-domain", |
| 128 SetCookieName: "set-cookie-name", | 128 SetCookieName: "set-cookie-name", |
| 129 SetCookieValue: "set-cookie-value", | 129 SetCookieValue: "set-cookie-value", |
| 130 StatusCode: "status-code" | 130 StatusCode: "status-code" |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 /** @enum {string} */ | 133 /** @enum {string} */ |
| 134 WebInspector.NetworkLogView.MixedContentFilterValues = { | 134 WebInspector.NetworkLogView.MixedContentFilterValues = { |
| 135 All: "all", | 135 All: "all", |
| 136 Displayed: "displayed", | 136 Displayed: "displayed", |
| 137 Blocked: "blocked", | 137 Blocked: "blocked", |
| 138 BlockOverridden: "block-overridden" | 138 BlockOverridden: "block-overridden" |
| 139 } | 139 }; |
| 140 | 140 |
| 141 /** @enum {string} */ | 141 /** @enum {string} */ |
| 142 WebInspector.NetworkLogView.IsFilterType = { | 142 WebInspector.NetworkLogView.IsFilterType = { |
| 143 Running: "running" | 143 Running: "running" |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 /** @type {!Array<string>} */ | 146 /** @type {!Array<string>} */ |
| 147 WebInspector.NetworkLogView._searchKeys = Object.keys(WebInspector.NetworkLogVie
w.FilterType).map(key => WebInspector.NetworkLogView.FilterType[key]); | 147 WebInspector.NetworkLogView._searchKeys = Object.keys(WebInspector.NetworkLogVie
w.FilterType).map(key => WebInspector.NetworkLogView.FilterType[key]); |
| 148 | 148 |
| 149 WebInspector.NetworkLogView.prototype = { | 149 WebInspector.NetworkLogView.prototype = { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 this._timelineWidget = new WebInspector.VBox(); | 292 this._timelineWidget = new WebInspector.VBox(); |
| 293 this._createTimelineHeader(); | 293 this._createTimelineHeader(); |
| 294 this._timelineWidget.element.classList.add("network-timeline-view"); | 294 this._timelineWidget.element.classList.add("network-timeline-view"); |
| 295 this._splitWidget.setMainWidget(this._timelineWidget); | 295 this._splitWidget.setMainWidget(this._timelineWidget); |
| 296 | 296 |
| 297 this._timelineColumn = new WebInspector.NetworkTimelineColumn(this._
rowHeight, this._headerHeight, this._calculator, this._dataGrid.scrollContainer)
; | 297 this._timelineColumn = new WebInspector.NetworkTimelineColumn(this._
rowHeight, this._headerHeight, this._calculator, this._dataGrid.scrollContainer)
; |
| 298 | 298 |
| 299 var dataGridScroller = this._dataGrid.scrollContainer; | 299 var dataGridScroller = this._dataGrid.scrollContainer; |
| 300 this._dataGrid.setScrollContainer(this._timelineColumn.getScrollCont
ainer()); | 300 this._dataGrid.setScrollContainer(this._timelineColumn.getScrollCont
ainer()); |
| 301 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.Padding
Changed, () => { | 301 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.Padding
Changed, () => { |
| 302 this._timelineColumn.setScrollHeight(dataGridScroller.scrollHeig
ht) | 302 this._timelineColumn.setScrollHeight(dataGridScroller.scrollHeig
ht); |
| 303 }); | 303 }); |
| 304 this._dataGrid.addEventListener(WebInspector.ViewportDataGrid.Events
.ViewportCalculated, this._redrawTimelineColumn.bind(this)); | 304 this._dataGrid.addEventListener(WebInspector.ViewportDataGrid.Events
.ViewportCalculated, this._redrawTimelineColumn.bind(this)); |
| 305 | 305 |
| 306 this._timelineColumn.addEventListener(WebInspector.NetworkTimelineCo
lumn.Events.RequestHovered, requestHovered.bind(this)); | 306 this._timelineColumn.addEventListener(WebInspector.NetworkTimelineCo
lumn.Events.RequestHovered, requestHovered.bind(this)); |
| 307 this._timelineColumn.show(this._timelineWidget.element); | 307 this._timelineColumn.show(this._timelineWidget.element); |
| 308 this.switchViewMode(false); | 308 this.switchViewMode(false); |
| 309 } else { | 309 } else { |
| 310 this._createTable(); | 310 this._createTable(); |
| 311 this._dataGrid.asWidget().show(this.element); | 311 this._dataGrid.asWidget().show(this.element); |
| 312 this._summaryBarElement = this.element.createChild("div", "network-s
ummary-bar"); | 312 this._summaryBarElement = this.element.createChild("div", "network-s
ummary-bar"); |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 } | 1659 } |
| 1660 command = command.concat(data); | 1660 command = command.concat(data); |
| 1661 command.push("--compressed"); | 1661 command.push("--compressed"); |
| 1662 | 1662 |
| 1663 if (request.securityState() === SecurityAgent.SecurityState.Insecure) | 1663 if (request.securityState() === SecurityAgent.SecurityState.Insecure) |
| 1664 command.push("--insecure"); | 1664 command.push("--insecure"); |
| 1665 return command.join(" "); | 1665 return command.join(" "); |
| 1666 }, | 1666 }, |
| 1667 | 1667 |
| 1668 __proto__: WebInspector.VBox.prototype | 1668 __proto__: WebInspector.VBox.prototype |
| 1669 } | 1669 }; |
| 1670 | 1670 |
| 1671 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */ | 1671 /** @typedef {function(!WebInspector.NetworkRequest): boolean} */ |
| 1672 WebInspector.NetworkLogView.Filter; | 1672 WebInspector.NetworkLogView.Filter; |
| 1673 | 1673 |
| 1674 /** | 1674 /** |
| 1675 * @param {!WebInspector.NetworkLogView.Filter} filter | 1675 * @param {!WebInspector.NetworkLogView.Filter} filter |
| 1676 * @param {!WebInspector.NetworkRequest} request | 1676 * @param {!WebInspector.NetworkRequest} request |
| 1677 * @return {boolean} | 1677 * @return {boolean} |
| 1678 */ | 1678 */ |
| 1679 WebInspector.NetworkLogView._negativeFilter = function(filter, request) | 1679 WebInspector.NetworkLogView._negativeFilter = function(filter, request) |
| 1680 { | 1680 { |
| 1681 return !filter(request); | 1681 return !filter(request); |
| 1682 } | 1682 }; |
| 1683 | 1683 |
| 1684 /** | 1684 /** |
| 1685 * @param {?RegExp} regex | 1685 * @param {?RegExp} regex |
| 1686 * @param {!WebInspector.NetworkRequest} request | 1686 * @param {!WebInspector.NetworkRequest} request |
| 1687 * @return {boolean} | 1687 * @return {boolean} |
| 1688 */ | 1688 */ |
| 1689 WebInspector.NetworkLogView._requestPathFilter = function(regex, request) | 1689 WebInspector.NetworkLogView._requestPathFilter = function(regex, request) |
| 1690 { | 1690 { |
| 1691 if (!regex) | 1691 if (!regex) |
| 1692 return false; | 1692 return false; |
| 1693 | 1693 |
| 1694 return regex.test(request.path() + "/" + request.name()); | 1694 return regex.test(request.path() + "/" + request.name()); |
| 1695 } | 1695 }; |
| 1696 | 1696 |
| 1697 /** | 1697 /** |
| 1698 * @param {string} domain | 1698 * @param {string} domain |
| 1699 * @return {!Array.<string>} | 1699 * @return {!Array.<string>} |
| 1700 */ | 1700 */ |
| 1701 WebInspector.NetworkLogView._subdomains = function(domain) | 1701 WebInspector.NetworkLogView._subdomains = function(domain) |
| 1702 { | 1702 { |
| 1703 var result = [domain]; | 1703 var result = [domain]; |
| 1704 var indexOfPeriod = domain.indexOf("."); | 1704 var indexOfPeriod = domain.indexOf("."); |
| 1705 while (indexOfPeriod !== -1) { | 1705 while (indexOfPeriod !== -1) { |
| 1706 result.push("*" + domain.substring(indexOfPeriod)); | 1706 result.push("*" + domain.substring(indexOfPeriod)); |
| 1707 indexOfPeriod = domain.indexOf(".", indexOfPeriod + 1); | 1707 indexOfPeriod = domain.indexOf(".", indexOfPeriod + 1); |
| 1708 } | 1708 } |
| 1709 return result; | 1709 return result; |
| 1710 } | 1710 }; |
| 1711 | 1711 |
| 1712 /** | 1712 /** |
| 1713 * @param {string} value | 1713 * @param {string} value |
| 1714 * @return {!WebInspector.NetworkLogView.Filter} | 1714 * @return {!WebInspector.NetworkLogView.Filter} |
| 1715 */ | 1715 */ |
| 1716 WebInspector.NetworkLogView._createRequestDomainFilter = function(value) | 1716 WebInspector.NetworkLogView._createRequestDomainFilter = function(value) |
| 1717 { | 1717 { |
| 1718 /** | 1718 /** |
| 1719 * @param {string} string | 1719 * @param {string} string |
| 1720 * @return {string} | 1720 * @return {string} |
| 1721 */ | 1721 */ |
| 1722 function escapeForRegExp(string) | 1722 function escapeForRegExp(string) |
| 1723 { | 1723 { |
| 1724 return string.escapeForRegExp(); | 1724 return string.escapeForRegExp(); |
| 1725 } | 1725 } |
| 1726 var escapedPattern = value.split("*").map(escapeForRegExp).join(".*"); | 1726 var escapedPattern = value.split("*").map(escapeForRegExp).join(".*"); |
| 1727 return WebInspector.NetworkLogView._requestDomainFilter.bind(null, new RegEx
p("^" + escapedPattern + "$", "i")); | 1727 return WebInspector.NetworkLogView._requestDomainFilter.bind(null, new RegEx
p("^" + escapedPattern + "$", "i")); |
| 1728 } | 1728 }; |
| 1729 | 1729 |
| 1730 /** | 1730 /** |
| 1731 * @param {!RegExp} regex | 1731 * @param {!RegExp} regex |
| 1732 * @param {!WebInspector.NetworkRequest} request | 1732 * @param {!WebInspector.NetworkRequest} request |
| 1733 * @return {boolean} | 1733 * @return {boolean} |
| 1734 */ | 1734 */ |
| 1735 WebInspector.NetworkLogView._requestDomainFilter = function(regex, request) | 1735 WebInspector.NetworkLogView._requestDomainFilter = function(regex, request) |
| 1736 { | 1736 { |
| 1737 return regex.test(request.domain); | 1737 return regex.test(request.domain); |
| 1738 } | 1738 }; |
| 1739 | 1739 |
| 1740 /** | 1740 /** |
| 1741 * @param {!WebInspector.NetworkRequest} request | 1741 * @param {!WebInspector.NetworkRequest} request |
| 1742 * @return {boolean} | 1742 * @return {boolean} |
| 1743 */ | 1743 */ |
| 1744 WebInspector.NetworkLogView._runningRequestFilter = function(request) | 1744 WebInspector.NetworkLogView._runningRequestFilter = function(request) |
| 1745 { | 1745 { |
| 1746 return !request.finished; | 1746 return !request.finished; |
| 1747 } | 1747 }; |
| 1748 | 1748 |
| 1749 /** | 1749 /** |
| 1750 * @param {string} value | 1750 * @param {string} value |
| 1751 * @param {!WebInspector.NetworkRequest} request | 1751 * @param {!WebInspector.NetworkRequest} request |
| 1752 * @return {boolean} | 1752 * @return {boolean} |
| 1753 */ | 1753 */ |
| 1754 WebInspector.NetworkLogView._requestResponseHeaderFilter = function(value, reque
st) | 1754 WebInspector.NetworkLogView._requestResponseHeaderFilter = function(value, reque
st) |
| 1755 { | 1755 { |
| 1756 return request.responseHeaderValue(value) !== undefined; | 1756 return request.responseHeaderValue(value) !== undefined; |
| 1757 } | 1757 }; |
| 1758 | 1758 |
| 1759 /** | 1759 /** |
| 1760 * @param {string} value | 1760 * @param {string} value |
| 1761 * @param {!WebInspector.NetworkRequest} request | 1761 * @param {!WebInspector.NetworkRequest} request |
| 1762 * @return {boolean} | 1762 * @return {boolean} |
| 1763 */ | 1763 */ |
| 1764 WebInspector.NetworkLogView._requestMethodFilter = function(value, request) | 1764 WebInspector.NetworkLogView._requestMethodFilter = function(value, request) |
| 1765 { | 1765 { |
| 1766 return request.requestMethod === value; | 1766 return request.requestMethod === value; |
| 1767 } | 1767 }; |
| 1768 | 1768 |
| 1769 /** | 1769 /** |
| 1770 * @param {string} value | 1770 * @param {string} value |
| 1771 * @param {!WebInspector.NetworkRequest} request | 1771 * @param {!WebInspector.NetworkRequest} request |
| 1772 * @return {boolean} | 1772 * @return {boolean} |
| 1773 */ | 1773 */ |
| 1774 WebInspector.NetworkLogView._requestMimeTypeFilter = function(value, request) | 1774 WebInspector.NetworkLogView._requestMimeTypeFilter = function(value, request) |
| 1775 { | 1775 { |
| 1776 return request.mimeType === value; | 1776 return request.mimeType === value; |
| 1777 } | 1777 }; |
| 1778 | 1778 |
| 1779 /** | 1779 /** |
| 1780 * @param {!WebInspector.NetworkLogView.MixedContentFilterValues} value | 1780 * @param {!WebInspector.NetworkLogView.MixedContentFilterValues} value |
| 1781 * @param {!WebInspector.NetworkRequest} request | 1781 * @param {!WebInspector.NetworkRequest} request |
| 1782 * @return {boolean} | 1782 * @return {boolean} |
| 1783 */ | 1783 */ |
| 1784 WebInspector.NetworkLogView._requestMixedContentFilter = function(value, request
) | 1784 WebInspector.NetworkLogView._requestMixedContentFilter = function(value, request
) |
| 1785 { | 1785 { |
| 1786 if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Displayed
) { | 1786 if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Displayed
) { |
| 1787 return request.mixedContentType === "optionally-blockable"; | 1787 return request.mixedContentType === "optionally-blockable"; |
| 1788 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ocked) { | 1788 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ocked) { |
| 1789 return request.mixedContentType === "blockable" && request.wasBlocked(); | 1789 return request.mixedContentType === "blockable" && request.wasBlocked(); |
| 1790 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ockOverridden) { | 1790 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ockOverridden) { |
| 1791 return request.mixedContentType === "blockable" && !request.wasBlocked()
; | 1791 return request.mixedContentType === "blockable" && !request.wasBlocked()
; |
| 1792 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Al
l) { | 1792 } else if (value === WebInspector.NetworkLogView.MixedContentFilterValues.Al
l) { |
| 1793 return request.mixedContentType !== "none"; | 1793 return request.mixedContentType !== "none"; |
| 1794 } | 1794 } |
| 1795 return false; | 1795 return false; |
| 1796 } | 1796 }; |
| 1797 | 1797 |
| 1798 /** | 1798 /** |
| 1799 * @param {string} value | 1799 * @param {string} value |
| 1800 * @param {!WebInspector.NetworkRequest} request | 1800 * @param {!WebInspector.NetworkRequest} request |
| 1801 * @return {boolean} | 1801 * @return {boolean} |
| 1802 */ | 1802 */ |
| 1803 WebInspector.NetworkLogView._requestSchemeFilter = function(value, request) | 1803 WebInspector.NetworkLogView._requestSchemeFilter = function(value, request) |
| 1804 { | 1804 { |
| 1805 return request.scheme === value; | 1805 return request.scheme === value; |
| 1806 } | 1806 }; |
| 1807 | 1807 |
| 1808 /** | 1808 /** |
| 1809 * @param {string} value | 1809 * @param {string} value |
| 1810 * @param {!WebInspector.NetworkRequest} request | 1810 * @param {!WebInspector.NetworkRequest} request |
| 1811 * @return {boolean} | 1811 * @return {boolean} |
| 1812 */ | 1812 */ |
| 1813 WebInspector.NetworkLogView._requestSetCookieDomainFilter = function(value, requ
est) | 1813 WebInspector.NetworkLogView._requestSetCookieDomainFilter = function(value, requ
est) |
| 1814 { | 1814 { |
| 1815 var cookies = request.responseCookies; | 1815 var cookies = request.responseCookies; |
| 1816 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { | 1816 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { |
| 1817 if (cookies[i].domain() === value) | 1817 if (cookies[i].domain() === value) |
| 1818 return true; | 1818 return true; |
| 1819 } | 1819 } |
| 1820 return false; | 1820 return false; |
| 1821 } | 1821 }; |
| 1822 | 1822 |
| 1823 /** | 1823 /** |
| 1824 * @param {string} value | 1824 * @param {string} value |
| 1825 * @param {!WebInspector.NetworkRequest} request | 1825 * @param {!WebInspector.NetworkRequest} request |
| 1826 * @return {boolean} | 1826 * @return {boolean} |
| 1827 */ | 1827 */ |
| 1828 WebInspector.NetworkLogView._requestSetCookieNameFilter = function(value, reques
t) | 1828 WebInspector.NetworkLogView._requestSetCookieNameFilter = function(value, reques
t) |
| 1829 { | 1829 { |
| 1830 var cookies = request.responseCookies; | 1830 var cookies = request.responseCookies; |
| 1831 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { | 1831 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { |
| 1832 if (cookies[i].name() === value) | 1832 if (cookies[i].name() === value) |
| 1833 return true; | 1833 return true; |
| 1834 } | 1834 } |
| 1835 return false; | 1835 return false; |
| 1836 } | 1836 }; |
| 1837 | 1837 |
| 1838 /** | 1838 /** |
| 1839 * @param {string} value | 1839 * @param {string} value |
| 1840 * @param {!WebInspector.NetworkRequest} request | 1840 * @param {!WebInspector.NetworkRequest} request |
| 1841 * @return {boolean} | 1841 * @return {boolean} |
| 1842 */ | 1842 */ |
| 1843 WebInspector.NetworkLogView._requestSetCookieValueFilter = function(value, reque
st) | 1843 WebInspector.NetworkLogView._requestSetCookieValueFilter = function(value, reque
st) |
| 1844 { | 1844 { |
| 1845 var cookies = request.responseCookies; | 1845 var cookies = request.responseCookies; |
| 1846 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { | 1846 for (var i = 0, l = cookies ? cookies.length : 0; i < l; ++i) { |
| 1847 if (cookies[i].value() === value) | 1847 if (cookies[i].value() === value) |
| 1848 return true; | 1848 return true; |
| 1849 } | 1849 } |
| 1850 return false; | 1850 return false; |
| 1851 } | 1851 }; |
| 1852 | 1852 |
| 1853 /** | 1853 /** |
| 1854 * @param {number} value | 1854 * @param {number} value |
| 1855 * @param {!WebInspector.NetworkRequest} request | 1855 * @param {!WebInspector.NetworkRequest} request |
| 1856 * @return {boolean} | 1856 * @return {boolean} |
| 1857 */ | 1857 */ |
| 1858 WebInspector.NetworkLogView._requestSizeLargerThanFilter = function(value, reque
st) | 1858 WebInspector.NetworkLogView._requestSizeLargerThanFilter = function(value, reque
st) |
| 1859 { | 1859 { |
| 1860 return request.transferSize >= value; | 1860 return request.transferSize >= value; |
| 1861 } | 1861 }; |
| 1862 | 1862 |
| 1863 /** | 1863 /** |
| 1864 * @param {string} value | 1864 * @param {string} value |
| 1865 * @param {!WebInspector.NetworkRequest} request | 1865 * @param {!WebInspector.NetworkRequest} request |
| 1866 * @return {boolean} | 1866 * @return {boolean} |
| 1867 */ | 1867 */ |
| 1868 WebInspector.NetworkLogView._statusCodeFilter = function(value, request) | 1868 WebInspector.NetworkLogView._statusCodeFilter = function(value, request) |
| 1869 { | 1869 { |
| 1870 return ("" + request.statusCode) === value; | 1870 return ("" + request.statusCode) === value; |
| 1871 } | 1871 }; |
| 1872 | 1872 |
| 1873 /** | 1873 /** |
| 1874 * @param {!WebInspector.NetworkRequest} request | 1874 * @param {!WebInspector.NetworkRequest} request |
| 1875 * @return {boolean} | 1875 * @return {boolean} |
| 1876 */ | 1876 */ |
| 1877 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) | 1877 WebInspector.NetworkLogView.HTTPRequestsFilter = function(request) |
| 1878 { | 1878 { |
| 1879 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL
ogView.HTTPSchemas); | 1879 return request.parsedURL.isValid && (request.scheme in WebInspector.NetworkL
ogView.HTTPSchemas); |
| 1880 } | 1880 }; |
| 1881 | 1881 |
| 1882 /** | 1882 /** |
| 1883 * @param {!WebInspector.NetworkRequest} request | 1883 * @param {!WebInspector.NetworkRequest} request |
| 1884 * @return {boolean} | 1884 * @return {boolean} |
| 1885 */ | 1885 */ |
| 1886 WebInspector.NetworkLogView.FinishedRequestsFilter = function(request) | 1886 WebInspector.NetworkLogView.FinishedRequestsFilter = function(request) |
| 1887 { | 1887 { |
| 1888 return request.finished; | 1888 return request.finished; |
| 1889 } | 1889 }; |
| 1890 | 1890 |
| 1891 /** | 1891 /** |
| 1892 * @param {number} windowStart | 1892 * @param {number} windowStart |
| 1893 * @param {number} windowEnd | 1893 * @param {number} windowEnd |
| 1894 * @param {!WebInspector.NetworkRequest} request | 1894 * @param {!WebInspector.NetworkRequest} request |
| 1895 * @return {boolean} | 1895 * @return {boolean} |
| 1896 */ | 1896 */ |
| 1897 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd
, request) | 1897 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd
, request) |
| 1898 { | 1898 { |
| 1899 if (request.issueTime() > windowEnd) | 1899 if (request.issueTime() > windowEnd) |
| 1900 return false; | 1900 return false; |
| 1901 if (request.endTime !== -1 && request.endTime < windowStart) | 1901 if (request.endTime !== -1 && request.endTime < windowStart) |
| 1902 return false; | 1902 return false; |
| 1903 return true; | 1903 return true; |
| 1904 } | 1904 }; |
| OLD | NEW |