Fix bug 204398, fixing alignment of about:cache.

patch=abecevello@sympatico.ca, r=gordon, sr=darin, a=asa
This commit is contained in:
gordon%netscape.com 2003-05-13 23:15:20 +00:00
Родитель 59b6a2fe5b
Коммит 41248bff35
3 изменённых файлов: 6 добавлений и 13 удалений

7
netwerk/cache/src/nsDiskCacheDevice.cpp поставляемый
Просмотреть файл

@ -199,9 +199,7 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetUsageReport(char ** usageReport)
NS_ENSURE_ARG_POINTER(usageReport);
nsCString buffer;
buffer.Assign("<table>\n");
buffer.Append("<tr><td><b>Cache Directory:</b></td><td><tt> ");
buffer.Append("\n<tr>\n<td><b>Cache Directory:</b></td>\n<td><tt> ");
nsCOMPtr<nsILocalFile> cacheDir;
nsAutoString path;
mDevice->getCacheDirectory(getter_AddRefs(cacheDir));
@ -211,9 +209,8 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetUsageReport(char ** usageReport)
} else {
buffer.Append("directory unavailable");
}
buffer.Append("</tt></td></tr>");
buffer.Append("</tt></td>\n</tr>\n");
// buffer.Append("<tr><td><b>Files:</b></td><td><tt> XXX</tt></td></tr>");
buffer.Append("</table>");
*usageReport = ToNewCString(buffer);
if (!*usageReport) return NS_ERROR_OUT_OF_MEMORY;

8
netwerk/cache/src/nsMemoryCacheDevice.cpp поставляемый
Просмотреть файл

@ -522,12 +522,10 @@ nsMemoryCacheDeviceInfo::GetUsageReport(char ** result)
NS_ENSURE_ARG_POINTER(result);
nsCString buffer;
buffer.Assign("<table>\n");
buffer.Append("<tr><td><b>Inactive Storage:</b></td><td><tt> ");
buffer.Append("\n<tr>\n<td><b>Inactive Storage:</b></td>\n<td><tt> ");
buffer.AppendInt(mDevice->mInactiveSize / 1024);
buffer.Append(" k</tt></td></tr>\n");
buffer.Append("</table>\n");
buffer.Append(" k</tt></td>\n</tr>\n");
*result = ToNewCString(buffer);
if (!*result) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;

Просмотреть файл

@ -198,11 +198,9 @@ nsAboutCache::VisitDevice(const char *deviceID,
mBuffer.AppendInt(value/1024);
mBuffer.Append(" k</tt></td>\n</tr>\n");
mBuffer.Append("</table>\n");
deviceInfo->GetUsageReport(getter_Copies(str));
mBuffer.Append(str);
mBuffer.Append("\n<br />");
mBuffer.Append("</table>\n\n<br />");
if (mDeviceID.IsEmpty()) {
mBuffer.Append("\n<a href=\"about:cache?device=");