Changeset 84607 in webkit
- Timestamp:
- Apr 22, 2011 12:09:30 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84604 r84607 1 2011-04-21 Andrey Kosyakov <caseq@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: exception in front-end when user selects resource info for resource that does not have response headers yet 6 https://bugs.webkit.org/show_bug.cgi?id=59123 7 8 * inspector/front-end/ResourceCookiesView.js: 9 (WebInspector.ResourceCookiesView): 10 (WebInspector.ResourceCookiesView.prototype.show): 11 (WebInspector.ResourceCookiesView.prototype.get _gotCookies): 12 (WebInspector.ResourceCookiesView.prototype._buildCookiesTable): 13 1 14 2011-04-21 Beth Dakin <bdakin@apple.com> 2 15 -
trunk/Source/WebCore/inspector/front-end/ResourceCookiesView.js
r75629 r84607 36 36 this._resource = resource; 37 37 38 resource.addEventListener("requestHeaders changed", this. show, this);39 resource.addEventListener("responseHeaders changed", this. show, this);38 resource.addEventListener("requestHeaders changed", this._refreshCookies, this); 39 resource.addEventListener("responseHeaders changed", this._refreshCookies, this); 40 40 } 41 41 … … 43 43 show: function(parentElement) 44 44 { 45 if (!this._ resource.requestCookies && !this._resource.responseCookies) {45 if (!this._gotCookies) { 46 46 if (!this._emptyMsgElement) { 47 47 this._emptyMsgElement = document.createElement("div"); … … 54 54 } 55 55 56 if (this._emptyMsgElement) 57 this._emptyMsgElement.parentElement.removeChild(this._emptyMsgElement); 56 if (!this._cookiesTable) 57 this._buildCookiesTable(); 58 WebInspector.View.prototype.show.call(this, parentElement); 59 this._cookiesTable.updateWidths(); 60 }, 58 61 59 if (!this._cookiesTable) { 60 this._cookiesTable = new WebInspector.CookiesTable(null, true, true); 61 this._cookiesTable.addCookiesFolder(WebInspector.UIString("Request Cookies"), this._resource.requestCookies); 62 this._cookiesTable.addCookiesFolder(WebInspector.UIString("Response Cookies"), this._resource.responseCookies); 63 this.element.appendChild(this._cookiesTable.element); 64 } 62 get _gotCookies() 63 { 64 return !!(this._resource.requestCookies || this._resource.responseCookies); 65 }, 65 66 66 WebInspector.View.prototype.show.call(this, parentElement); 67 _buildCookiesTable: function() 68 { 69 this.element.removeChildren(); 70 71 this._cookiesTable = new WebInspector.CookiesTable(null, true, true); 72 this._cookiesTable.addCookiesFolder(WebInspector.UIString("Request Cookies"), this._resource.requestCookies); 73 this._cookiesTable.addCookiesFolder(WebInspector.UIString("Response Cookies"), this._resource.responseCookies); 74 this.element.appendChild(this._cookiesTable.element); 75 }, 76 77 _refreshCookies: function() 78 { 79 delete this._cookiesTable; 80 if (!this._gotCookies || !this.visible) 81 return; 82 this._buildCookiesTable(); 67 83 this._cookiesTable.updateWidths(); 68 84 }
Note: See TracChangeset
for help on using the changeset viewer.