fixed bug 1696

git-svn-id: svn://10.0.0.236/trunk@15466 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1998-11-30 18:19:21 +00:00
parent 755d662e57
commit a937455d91
2 changed files with 10 additions and 8 deletions

View File

@@ -303,16 +303,17 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext)
float p2t;
aPresContext->GetScaledPixelsToTwips(p2t);
nsHTMLValue htmlVal;
PRInt32 intVal;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetAttribute(nsHTMLAtoms::border, htmlVal))) {
if (eHTMLUnit_Pixel == htmlVal.GetUnit()) {
nsHTMLUnit unit = htmlVal.GetUnit();
PRInt32 intVal = 0;
if (eHTMLUnit_Pixel == unit) {
intVal = htmlVal.GetPixelValue();
} else {
} else if (eHTMLUnit_Integer == unit) {
intVal = htmlVal.GetIntValue();
}
}
if (intVal < 0) {
intVal = 0;
}

View File

@@ -303,16 +303,17 @@ PRInt32 nsHTMLFramesetFrame::GetBorderWidth(nsIPresContext* aPresContext)
float p2t;
aPresContext->GetScaledPixelsToTwips(p2t);
nsHTMLValue htmlVal;
PRInt32 intVal;
nsIHTMLContent* content = nsnull;
mContent->QueryInterface(kIHTMLContentIID, (void**)&content);
if (nsnull != content) {
if (NS_CONTENT_ATTR_HAS_VALUE == (content->GetAttribute(nsHTMLAtoms::border, htmlVal))) {
if (eHTMLUnit_Pixel == htmlVal.GetUnit()) {
nsHTMLUnit unit = htmlVal.GetUnit();
PRInt32 intVal = 0;
if (eHTMLUnit_Pixel == unit) {
intVal = htmlVal.GetPixelValue();
} else {
} else if (eHTMLUnit_Integer == unit) {
intVal = htmlVal.GetIntValue();
}
}
if (intVal < 0) {
intVal = 0;
}