| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 var cookies = []; | 118 var cookies = []; |
| 119 var resourceURLsForDocumentURL = []; | 119 var resourceURLsForDocumentURL = []; |
| 120 this._totalSize = 0; | 120 this._totalSize = 0; |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * @this {WebInspector.CookieItemsView} | 123 * @this {WebInspector.CookieItemsView} |
| 124 */ | 124 */ |
| 125 function populateResourcesForDocuments(resource) | 125 function populateResourcesForDocuments(resource) |
| 126 { | 126 { |
| 127 var url = resource.documentURL.asParsedURL(); | 127 var url = resource.documentURL.asParsedURL(); |
| 128 if (url && url.host == this._cookieDomain) | 128 if (url && url.securityOrigin() == this._cookieDomain) |
| 129 resourceURLsForDocumentURL.push(resource.url); | 129 resourceURLsForDocumentURL.push(resource.url); |
| 130 } | 130 } |
| 131 WebInspector.forAllResources(populateResourcesForDocuments.bind(this)); | 131 WebInspector.forAllResources(populateResourcesForDocuments.bind(this)); |
| 132 | 132 |
| 133 for (var i = 0; i < allCookies.length; ++i) { | 133 for (var i = 0; i < allCookies.length; ++i) { |
| 134 var pushed = false; | 134 var pushed = false; |
| 135 var size = allCookies[i].size(); | 135 var size = allCookies[i].size(); |
| 136 for (var j = 0; j < resourceURLsForDocumentURL.length; ++j) { | 136 for (var j = 0; j < resourceURLsForDocumentURL.length; ++j) { |
| 137 var resourceURL = resourceURLsForDocumentURL[j]; | 137 var resourceURL = resourceURLsForDocumentURL[j]; |
| 138 if (WebInspector.Cookies.cookieMatchesResourceURL(allCookies[i],
resourceURL)) { | 138 if (WebInspector.Cookies.cookieMatchesResourceURL(allCookies[i],
resourceURL)) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 { | 181 { |
| 182 if (!this._cookies.length) { | 182 if (!this._cookies.length) { |
| 183 var contextMenu = new WebInspector.ContextMenu(event); | 183 var contextMenu = new WebInspector.ContextMenu(event); |
| 184 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat
e.bind(this)); | 184 contextMenu.appendItem(WebInspector.UIString("Refresh"), this._updat
e.bind(this)); |
| 185 contextMenu.show(); | 185 contextMenu.show(); |
| 186 } | 186 } |
| 187 }, | 187 }, |
| 188 | 188 |
| 189 __proto__: WebInspector.VBox.prototype | 189 __proto__: WebInspector.VBox.prototype |
| 190 } | 190 } |
| OLD | NEW |