WIP for collapsing borders.

This commit is contained in:
buster%netscape.com 1998-12-21 19:20:37 +00:00
parent b7503c538b
commit 735e53976a
4 changed files with 38 additions and 2 deletions

View File

@ -4338,6 +4338,23 @@ NS_METHOD nsTableFrame::GetCellMarginData(nsTableCellFrame* aKidFrame, nsMargin&
return result;
}
//XXX: ok, this looks dumb now. but in a very short time this will get filled in
void nsTableFrame::GetTableBorder(nsMargin &aBorder)
{
if (NS_STYLE_BORDER_COLLAPSE==GetBorderCollapseStyle())
{
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
spacing->GetBorder(aBorder);
}
else
{
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
spacing->GetBorder(aBorder);
}
}
PRUint8 nsTableFrame::GetBorderCollapseStyle()
{
const nsStyleTable* tableStyle;

View File

@ -188,7 +188,8 @@ public:
//virtual void ListColumnLayoutData(FILE* out = stdout, PRInt32 aIndent = 0) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
void GetTableBorder(nsMargin &aBorder);
/** return the width of the column at aColIndex */
virtual PRInt32 GetColumnWidth(PRInt32 aColIndex);

View File

@ -4338,6 +4338,23 @@ NS_METHOD nsTableFrame::GetCellMarginData(nsTableCellFrame* aKidFrame, nsMargin&
return result;
}
//XXX: ok, this looks dumb now. but in a very short time this will get filled in
void nsTableFrame::GetTableBorder(nsMargin &aBorder)
{
if (NS_STYLE_BORDER_COLLAPSE==GetBorderCollapseStyle())
{
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
spacing->GetBorder(aBorder);
}
else
{
const nsStyleSpacing* spacing =
(const nsStyleSpacing*)mStyleContext->GetStyleData(eStyleStruct_Spacing);
spacing->GetBorder(aBorder);
}
}
PRUint8 nsTableFrame::GetBorderCollapseStyle()
{
const nsStyleTable* tableStyle;

View File

@ -188,7 +188,8 @@ public:
//virtual void ListColumnLayoutData(FILE* out = stdout, PRInt32 aIndent = 0) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
void GetTableBorder(nsMargin &aBorder);
/** return the width of the column at aColIndex */
virtual PRInt32 GetColumnWidth(PRInt32 aColIndex);