Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Displayed the raw size of the cookie

  • Loading branch information...
commit 487fd1b9372dcf3167b2ada881b49eff1bf87800 1 parent 238f9bd
bharath authored
View
5 extension/content/firebug/cookies/cookie.js
@@ -147,6 +147,11 @@ Cookie.prototype =
{
return cookie.cookie.name.length + cookie.cookie.value.length;
},
+
+ getRawSize: function(cookie)
+ {
+ return cookie.cookie.name.length + cookie.cookie.rawValue.length
+ },
};
// ********************************************************************************************* //
View
4 extension/content/firebug/cookies/cookiePanel.js
@@ -490,12 +490,12 @@ CookiePanel.prototype = Obj.extend(Firebug.ActivablePanel,
{
if (Dom.getAncestorByClass(target, "cookieSizeCol"))
{
- var infoTipCookieId = "cookiesize";
+ var infoTipCookieId = "cookiesize-"+row.repObject.name;
if (infoTipCookieId == this.infoTipCookieId && row.repObject == this.infoTipFile)
return true;
this.infoTipCookieId = infoTipCookieId;
- this.infoTipFile = row.repObject;
+ this.infoTipCookie = row.repObject;
return this.populateSizeInfoTip(infoTip, row.repObject);
}
}
View
9 extension/content/firebug/cookies/cookieReps.js
@@ -949,9 +949,6 @@ CookieReps.SizeInfoTip = domplate(Firebug.Rep,
getRowTag: function(size)
{
- if (size.size == -2)
- return this.descTag;
-
return (size.label == "-") ? this.separatorTag : this.sizeTag;
},
@@ -974,8 +971,12 @@ CookieReps.SizeInfoTip = domplate(Firebug.Rep,
render: function(cookie, parentNode)
{
var size = cookie.getSize(cookie);
+ var rawSize = cookie.getRawSize(cookie);
var sizeInfo = [];
- sizeInfo.push({label: Locale.$STR("cookie.sizeinfo.Size"), size: size});
+ if(size==rawSize)
+ sizeInfo.push({label: Locale.$STR("cookie.sizeinfo.Size"), size: size});
+ else
+ sizeInfo.push({label: Locale.$STR("cookie.sizeinfo.Size"), size: size},{label: Locale.$STR("cookie.sizeinfo.RawSize"), size: rawSize});
this.tag.replace({sizeInfo: sizeInfo}, parentNode);
},
});
View
3  extension/locale/en-US/cookies.properties
@@ -317,4 +317,5 @@ cookies.console.Filter_By_Cookies=Filter By Cookies
# Customize Shortcuts dialog (Firebug menu)
firebug.shortcut.removeAllCookies.label=Remove All Cookies
-cookie.sizeinfo.Size=Cookie Size
+cookie.sizeinfo.Size=Size
+cookie.sizeinfo.RawSize=Raw Size
Please sign in to comment.
Something went wrong with that request. Please try again.