2011-01-12 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2011 20:07:53 +0000 (20:07 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jan 2011 20:07:53 +0000 (20:07 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: cookie table is multiplied after repeated switching to cookies tab in network item view
        Only create cookiesTable is it hasn't been done yet.
        https://bugs.webkit.org/show_bug.cgi?id=52303

        * inspector/front-end/ResourceCookiesView.js:
        (WebInspector.ResourceCookiesView.prototype.show):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@75629 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ResourceCookiesView.js

index 74ed237..f9a313e 100644 (file)
@@ -1,3 +1,14 @@
+2011-01-12  Andrey Kosyakov  <caseq@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: cookie table is multiplied after repeated switching to cookies tab in network item view
+        Only create cookiesTable is it hasn't been done yet.
+        https://bugs.webkit.org/show_bug.cgi?id=52303
+
+        * inspector/front-end/ResourceCookiesView.js:
+        (WebInspector.ResourceCookiesView.prototype.show):
+
 2011-01-12  Koan-Sin Tan  <koansin.tan@gmail.com>
 
         Reviewed by Martin Robinson.
index e419070..b60b1b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -56,10 +56,12 @@ WebInspector.ResourceCookiesView.prototype = {
         if (this._emptyMsgElement)
             this._emptyMsgElement.parentElement.removeChild(this._emptyMsgElement);
 
-        this._cookiesTable = new WebInspector.CookiesTable(null, true, true);
-        this._cookiesTable.addCookiesFolder(WebInspector.UIString("Request Cookies"), this._resource.requestCookies);
-        this._cookiesTable.addCookiesFolder(WebInspector.UIString("Response Cookies"), this._resource.responseCookies);
-        this.element.appendChild(this._cookiesTable.element);
+        if (!this._cookiesTable) {
+            this._cookiesTable = new WebInspector.CookiesTable(null, true, true);
+            this._cookiesTable.addCookiesFolder(WebInspector.UIString("Request Cookies"), this._resource.requestCookies);
+            this._cookiesTable.addCookiesFolder(WebInspector.UIString("Response Cookies"), this._resource.responseCookies);
+            this.element.appendChild(this._cookiesTable.element);
+        }
 
         WebInspector.View.prototype.show.call(this, parentElement);
         this._cookiesTable.updateWidths();