зеркало из https://github.com/mozilla/gecko-dev.git
Change to SizeOf() code (diagnostic code only). Changed table frame
code to split the column cache size out into a separate listing
This commit is contained in:
Родитель
e6fa7cbcf2
Коммит
f8ffb47533
|
@ -105,6 +105,7 @@ LAYOUT_ATOM(imageMap, "ImageMap")
|
|||
LAYOUT_ATOM(lineBox, "LineBox")
|
||||
LAYOUT_ATOM(lineBoxFloaters, "LineBoxFloaters")
|
||||
LAYOUT_ATOM(spaceManager, "SpaceManager")
|
||||
LAYOUT_ATOM(tableColCache, "TableColumnCache")
|
||||
LAYOUT_ATOM(tableStrategy, "TableLayoutStrategy")
|
||||
LAYOUT_ATOM(textRun, "TextRun")
|
||||
LAYOUT_ATOM(xml_document_entities, "XMLDocumentEntities")
|
||||
|
|
|
@ -105,6 +105,7 @@ LAYOUT_ATOM(imageMap, "ImageMap")
|
|||
LAYOUT_ATOM(lineBox, "LineBox")
|
||||
LAYOUT_ATOM(lineBoxFloaters, "LineBoxFloaters")
|
||||
LAYOUT_ATOM(spaceManager, "SpaceManager")
|
||||
LAYOUT_ATOM(tableColCache, "TableColumnCache")
|
||||
LAYOUT_ATOM(tableStrategy, "TableLayoutStrategy")
|
||||
LAYOUT_ATOM(textRun, "TextRun")
|
||||
LAYOUT_ATOM(xml_document_entities, "XMLDocumentEntities")
|
||||
|
|
|
@ -105,6 +105,7 @@ LAYOUT_ATOM(imageMap, "ImageMap")
|
|||
LAYOUT_ATOM(lineBox, "LineBox")
|
||||
LAYOUT_ATOM(lineBoxFloaters, "LineBoxFloaters")
|
||||
LAYOUT_ATOM(spaceManager, "SpaceManager")
|
||||
LAYOUT_ATOM(tableColCache, "TableColumnCache")
|
||||
LAYOUT_ATOM(tableStrategy, "TableLayoutStrategy")
|
||||
LAYOUT_ATOM(textRun, "TextRun")
|
||||
LAYOUT_ATOM(xml_document_entities, "XMLDocumentEntities")
|
||||
|
|
|
@ -149,6 +149,10 @@ public:
|
|||
eColWidthType_Proportional = 3 // (int) value has proportional meaning
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
PRInt32 mColCounts [4];
|
||||
PRInt32 *mColIndexes[4];
|
||||
|
@ -252,6 +256,23 @@ void ColumnInfoCache::GetColumnsByType(const nsStyleUnit aType,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void ColumnInfoCache::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
NS_PRECONDITION(aResult, "null OUT parameter pointer");
|
||||
PRUint32 sum = sizeof(*this);
|
||||
|
||||
// Now add in the space talen up by the arrays
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (mColIndexes[i]) {
|
||||
sum += mNumColumns * sizeof(PRInt32);
|
||||
}
|
||||
}
|
||||
|
||||
*aResult = sum;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTableFrame::GetFrameType(nsIAtom** aType) const
|
||||
{
|
||||
|
@ -5509,9 +5530,11 @@ nsTableFrame::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
|||
// Add in the amount of space for the column width array
|
||||
sum += mColumnWidthsLength * sizeof(PRInt32);
|
||||
|
||||
// And the column info cache
|
||||
// And in size of column info cache
|
||||
if (mColCache) {
|
||||
sum += sizeof(*mColCache);
|
||||
PRUint32 colCacheSize;
|
||||
mColCache->SizeOf(aHandler, &colCacheSize);
|
||||
aHandler->AddSize(nsLayoutAtoms::tableColCache, colCacheSize);
|
||||
}
|
||||
|
||||
// Add in size of cell map
|
||||
|
|
|
@ -149,6 +149,10 @@ public:
|
|||
eColWidthType_Proportional = 3 // (int) value has proportional meaning
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
void SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
PRInt32 mColCounts [4];
|
||||
PRInt32 *mColIndexes[4];
|
||||
|
@ -252,6 +256,23 @@ void ColumnInfoCache::GetColumnsByType(const nsStyleUnit aType,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
void ColumnInfoCache::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
||||
{
|
||||
NS_PRECONDITION(aResult, "null OUT parameter pointer");
|
||||
PRUint32 sum = sizeof(*this);
|
||||
|
||||
// Now add in the space talen up by the arrays
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (mColIndexes[i]) {
|
||||
sum += mNumColumns * sizeof(PRInt32);
|
||||
}
|
||||
}
|
||||
|
||||
*aResult = sum;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTableFrame::GetFrameType(nsIAtom** aType) const
|
||||
{
|
||||
|
@ -5509,9 +5530,11 @@ nsTableFrame::SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const
|
|||
// Add in the amount of space for the column width array
|
||||
sum += mColumnWidthsLength * sizeof(PRInt32);
|
||||
|
||||
// And the column info cache
|
||||
// And in size of column info cache
|
||||
if (mColCache) {
|
||||
sum += sizeof(*mColCache);
|
||||
PRUint32 colCacheSize;
|
||||
mColCache->SizeOf(aHandler, &colCacheSize);
|
||||
aHandler->AddSize(nsLayoutAtoms::tableColCache, colCacheSize);
|
||||
}
|
||||
|
||||
// Add in size of cell map
|
||||
|
|
Загрузка…
Ссылка в новой задаче