Permalink
Browse files

Modified the getSize() and getRawSize()

  • Loading branch information...
1 parent 487fd1b commit 48ccfa3c48fd71d3dfe37dffe495df890bef1213 bharath committed Aug 24, 2012
View
8 extension/content/firebug/cookies/cookie.js
@@ -143,14 +143,14 @@ Cookie.prototype =
return null;
},
- getSize: function(cookie)
+ getSize: function()
{
- return cookie.cookie.name.length + cookie.cookie.value.length;
+ return this.cookie.name.length + this.cookie.value.length;
},
- getRawSize: function(cookie)
+ getRawSize: function()
{
- return cookie.cookie.name.length + cookie.cookie.rawValue.length
+ return this.cookie.name.length + this.cookie.rawValue.length
},
};
View
2 extension/content/firebug/cookies/cookiePanel.js
@@ -491,7 +491,7 @@ CookiePanel.prototype = Obj.extend(Firebug.ActivablePanel,
if (Dom.getAncestorByClass(target, "cookieSizeCol"))
{
var infoTipCookieId = "cookiesize-"+row.repObject.name;
- if (infoTipCookieId == this.infoTipCookieId && row.repObject == this.infoTipFile)
+ if (infoTipCookieId == this.infoTipCookieId && row.repObject == this.infoTipCookie)
return true;
this.infoTipCookieId = infoTipCookieId;
View
11 extension/content/firebug/cookies/cookieReps.js
@@ -970,13 +970,16 @@ CookieReps.SizeInfoTip = domplate(Firebug.Rep,
render: function(cookie, parentNode)
{
- var size = cookie.getSize(cookie);
- var rawSize = cookie.getRawSize(cookie);
+ var size = cookie.getSize();
+ var rawSize = cookie.getRawSize();
var sizeInfo = [];
- if(size==rawSize)
+ 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});
+ {
+ sizeInfo.push({label: Locale.$STR("cookie.sizeinfo.Size"), size: size});
+ sizeinfo.push({label: Locale.$STR("cookie.sizeinfo.RawSize"), size: rawSize});
+ }
this.tag.replace({sizeInfo: sizeInfo}, parentNode);
},
});

0 comments on commit 48ccfa3

Please sign in to comment.