Fix for table cell border styles: standard mode no longer applies the NavQuirks -moz-bg-inset style for HTML border attribute. Patch from VYV03354@nifty.ne.jp for bug 35586, thanks yet again! r=attinasi

This commit is contained in:
attinasi%netscape.com 2000-05-17 06:05:44 +00:00
parent 6211387630
commit a68760ce70
2 changed files with 20 additions and 10 deletions

View File

@ -1134,12 +1134,17 @@ MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
spacingStyle->mBorder.SetBottom(width);
spacingStyle->mBorder.SetRight(width);
spacingStyle->SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_BG_INSET);
nsCompatibility mode;
aPresContext->GetCompatibilityMode(&mode);
PRUint8 borderStyle = (eCompatibility_NavQuirks == mode)
? NS_STYLE_BORDER_STYLE_BG_INSET : NS_STYLE_BORDER_STYLE_INSET;
// BG_INSET results in a border color based on background colors
// used for NavQuirks only...
spacingStyle->SetBorderStyle(NS_SIDE_TOP, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_LEFT, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_BOTTOM, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_RIGHT, borderStyle);
}
}
else { // handle attributes for table

View File

@ -1134,12 +1134,17 @@ MapAttributesInto(const nsIHTMLMappedAttributes* aAttributes,
spacingStyle->mBorder.SetBottom(width);
spacingStyle->mBorder.SetRight(width);
spacingStyle->SetBorderStyle(NS_SIDE_TOP, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_LEFT, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_BOTTOM, NS_STYLE_BORDER_STYLE_BG_INSET);
spacingStyle->SetBorderStyle(NS_SIDE_RIGHT, NS_STYLE_BORDER_STYLE_BG_INSET);
nsCompatibility mode;
aPresContext->GetCompatibilityMode(&mode);
PRUint8 borderStyle = (eCompatibility_NavQuirks == mode)
? NS_STYLE_BORDER_STYLE_BG_INSET : NS_STYLE_BORDER_STYLE_INSET;
// BG_INSET results in a border color based on background colors
// used for NavQuirks only...
spacingStyle->SetBorderStyle(NS_SIDE_TOP, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_LEFT, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_BOTTOM, borderStyle);
spacingStyle->SetBorderStyle(NS_SIDE_RIGHT, borderStyle);
}
}
else { // handle attributes for table