mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug#198890
visible bug in rendering negative spacing in CSS under BeOS r=arougthopher
This commit is contained in:
parent
c88fe5fc78
commit
62032641a1
@ -973,38 +973,20 @@ NS_IMETHODIMP nsRenderingContextBeOS::DrawString(const char *aString, PRUint32 a
|
|||||||
mView->DrawString(aString, aLength, BPoint(xx+1.0, yy));
|
mView->DrawString(aString, aLength, BPoint(xx+1.0, yy));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int32 wlen=0, wpos=aX;
|
|
||||||
char *wpoint =0;
|
char *wpoint =0;
|
||||||
for(int32 i =0, onword=0, unichnum=0, position=aX, ch_len=0;i<=aLength; )
|
int32 unichnum=0, position=aX, ch_len=0;
|
||||||
|
for (PRUint32 i =0; i <= aLength; i += ch_len)
|
||||||
{
|
{
|
||||||
ch_len = utf8_char_len((uchar)aString[i]);
|
ch_len = utf8_char_len((uchar)aString[i]);
|
||||||
wlen += ch_len;
|
wpoint = (char *)(aString + i);
|
||||||
if((aString[i]==' ' && onword==1) || aString[i]=='\0')
|
xx = position;
|
||||||
{
|
yy = y;
|
||||||
onword=0;
|
mTranMatrix->TransformCoord(&xx, &yy);
|
||||||
xx = wpos;
|
// yy++; DrawString quirk!
|
||||||
yy = y;
|
mView->DrawString((char *)(wpoint), ch_len, BPoint(xx, yy));
|
||||||
mTranMatrix->TransformCoord(&xx, &yy);
|
if (doEmulateBold)
|
||||||
// yy++; DrawString quirk!
|
mView->DrawString((char *)(wpoint), ch_len, BPoint(xx+1.0, yy));
|
||||||
if('\0' == aString[i])
|
|
||||||
wlen--;
|
|
||||||
mView->DrawString((char *)(wpoint), wlen, BPoint(xx, yy));
|
|
||||||
if (doEmulateBold)
|
|
||||||
mView->DrawString((char *)(wpoint), wlen, BPoint(xx+1.0, yy));
|
|
||||||
wlen=0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (onword ==0)
|
|
||||||
{
|
|
||||||
onword= 1;
|
|
||||||
wpoint = (char *)&(aString[i]);
|
|
||||||
wpos = position;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
position += aSpacing[unichnum++];
|
position += aSpacing[unichnum++];
|
||||||
i += ch_len;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mView->SetDrawingMode(B_OP_COPY);
|
mView->SetDrawingMode(B_OP_COPY);
|
||||||
|
Loading…
Reference in New Issue
Block a user