mjudge checkin in from ftangs machine. fixing japanese lockup. this will not fix the strange loss of the commit event to the ESM however. that was making thisproblem obvious.
This commit is contained in:
@@ -852,6 +852,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
|
|||||||
}
|
}
|
||||||
details= details->mNext;
|
details= details->mNext;
|
||||||
}
|
}
|
||||||
|
if (!mInit && mTypes) //we have details but none that we care about.
|
||||||
|
{
|
||||||
|
delete mTypes;
|
||||||
|
mTypes = nsnull;
|
||||||
|
mDone = PR_TRUE;//we are finished
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (details->mStart == details->mEnd)//no collapsed selections here!
|
else if (details->mStart == details->mEnd)//no collapsed selections here!
|
||||||
{
|
{
|
||||||
@@ -897,7 +903,10 @@ DrawSelectionIterator::FillCurrentData()
|
|||||||
{
|
{
|
||||||
mCurrentIdx+=mCurrentLength;//advance to this chunk
|
mCurrentIdx+=mCurrentLength;//advance to this chunk
|
||||||
if (mCurrentIdx >= mLength)
|
if (mCurrentIdx >= mLength)
|
||||||
|
{
|
||||||
|
mDone = PR_TRUE;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
uint8 typevalue = mTypes[mCurrentIdx];
|
uint8 typevalue = mTypes[mCurrentIdx];
|
||||||
while (typevalue == mTypes[mCurrentIdx+mCurrentLength] && (mCurrentIdx+mCurrentLength) <mLength)
|
while (typevalue == mTypes[mCurrentIdx+mCurrentLength] && (mCurrentIdx+mCurrentLength) <mLength)
|
||||||
{
|
{
|
||||||
@@ -1740,10 +1749,9 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
//while we have substrings...
|
//while we have substrings...
|
||||||
if (details)
|
PRBool drawn = PR_FALSE;
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -1781,12 +1789,6 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
|
||||||
}
|
|
||||||
PaintTextDecorations(aRenderingContext, aStyleContext,
|
PaintTextDecorations(aRenderingContext, aStyleContext,
|
||||||
aTextStyle, dx, dy, width, text, details,0,(PRUint32)textLength);
|
aTextStyle, dx, dy, width, text, details,0,(PRUint32)textLength);
|
||||||
sdptr = details;
|
sdptr = details;
|
||||||
@@ -1801,7 +1803,6 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//measure Spaced Textvoid
|
//measure Spaced Textvoid
|
||||||
nsresult
|
nsresult
|
||||||
nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
||||||
@@ -2202,10 +2203,9 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
|
|||||||
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
if (details)
|
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -2244,13 +2244,6 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
|
|||||||
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
||||||
PRUint32(textLength), dx, dy, width, details);
|
PRUint32(textLength), dx, dy, width, details);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
|
||||||
PRUint32(textLength), dx, dy, width, details);
|
|
||||||
}
|
|
||||||
sdptr = details;
|
sdptr = details;
|
||||||
if (details){
|
if (details){
|
||||||
while ((sdptr = details->mNext) != nsnull) {
|
while ((sdptr = details->mNext) != nsnull) {
|
||||||
@@ -2354,10 +2347,8 @@ nsTextFrame::PaintAsciiText(nsIPresContext* aPresContext,
|
|||||||
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
if (details)
|
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,(PRUnichar *)text,(PRUint32)textLength,aTextStyle);//ITS OK TO CAST HERE THE RESULT WE USE WILLNOT DO BAD CONVERSION
|
DrawSelectionIterator iter(details,(PRUnichar *)text,(PRUint32)textLength,aTextStyle);//ITS OK TO CAST HERE THE RESULT WE USE WILLNOT DO BAD CONVERSION
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -2394,12 +2385,6 @@ nsTextFrame::PaintAsciiText(nsIPresContext* aPresContext,
|
|||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
|
||||||
}
|
|
||||||
PaintTextDecorations(aRenderingContext, aStyleContext,
|
PaintTextDecorations(aRenderingContext, aStyleContext,
|
||||||
aTextStyle, dx, dy, width,
|
aTextStyle, dx, dy, width,
|
||||||
unicodePaintBuffer.mBuffer,
|
unicodePaintBuffer.mBuffer,
|
||||||
|
|||||||
@@ -852,6 +852,12 @@ DrawSelectionIterator::DrawSelectionIterator(const SelectionDetails *aSelDetails
|
|||||||
}
|
}
|
||||||
details= details->mNext;
|
details= details->mNext;
|
||||||
}
|
}
|
||||||
|
if (!mInit && mTypes) //we have details but none that we care about.
|
||||||
|
{
|
||||||
|
delete mTypes;
|
||||||
|
mTypes = nsnull;
|
||||||
|
mDone = PR_TRUE;//we are finished
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (details->mStart == details->mEnd)//no collapsed selections here!
|
else if (details->mStart == details->mEnd)//no collapsed selections here!
|
||||||
{
|
{
|
||||||
@@ -897,7 +903,10 @@ DrawSelectionIterator::FillCurrentData()
|
|||||||
{
|
{
|
||||||
mCurrentIdx+=mCurrentLength;//advance to this chunk
|
mCurrentIdx+=mCurrentLength;//advance to this chunk
|
||||||
if (mCurrentIdx >= mLength)
|
if (mCurrentIdx >= mLength)
|
||||||
|
{
|
||||||
|
mDone = PR_TRUE;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
uint8 typevalue = mTypes[mCurrentIdx];
|
uint8 typevalue = mTypes[mCurrentIdx];
|
||||||
while (typevalue == mTypes[mCurrentIdx+mCurrentLength] && (mCurrentIdx+mCurrentLength) <mLength)
|
while (typevalue == mTypes[mCurrentIdx+mCurrentLength] && (mCurrentIdx+mCurrentLength) <mLength)
|
||||||
{
|
{
|
||||||
@@ -1740,10 +1749,9 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
//while we have substrings...
|
//while we have substrings...
|
||||||
if (details)
|
PRBool drawn = PR_FALSE;
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -1781,12 +1789,6 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
|
||||||
}
|
|
||||||
PaintTextDecorations(aRenderingContext, aStyleContext,
|
PaintTextDecorations(aRenderingContext, aStyleContext,
|
||||||
aTextStyle, dx, dy, width, text, details,0,(PRUint32)textLength);
|
aTextStyle, dx, dy, width, text, details,0,(PRUint32)textLength);
|
||||||
sdptr = details;
|
sdptr = details;
|
||||||
@@ -1801,7 +1803,6 @@ nsTextFrame::PaintUnicodeText(nsIPresContext* aPresContext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//measure Spaced Textvoid
|
//measure Spaced Textvoid
|
||||||
nsresult
|
nsresult
|
||||||
nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
nsTextFrame::GetPositionSlowly(nsIPresContext* aPresContext,
|
||||||
@@ -2202,10 +2203,9 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
|
|||||||
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
if (details)
|
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
DrawSelectionIterator iter(details,text,(PRUint32)textLength,aTextStyle);
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -2244,13 +2244,6 @@ nsTextFrame::PaintTextSlowly(nsIPresContext* aPresContext,
|
|||||||
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
||||||
PRUint32(textLength), dx, dy, width, details);
|
PRUint32(textLength), dx, dy, width, details);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
RenderString(aRenderingContext,aStyleContext, aTextStyle, text,
|
|
||||||
PRUint32(textLength), dx, dy, width, details);
|
|
||||||
}
|
|
||||||
sdptr = details;
|
sdptr = details;
|
||||||
if (details){
|
if (details){
|
||||||
while ((sdptr = details->mNext) != nsnull) {
|
while ((sdptr = details->mNext) != nsnull) {
|
||||||
@@ -2354,10 +2347,8 @@ nsTextFrame::PaintAsciiText(nsIPresContext* aPresContext,
|
|||||||
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
sdptr->mEnd = ip[sdptr->mEnd] - mContentOffset;
|
||||||
sdptr = sdptr->mNext;
|
sdptr = sdptr->mNext;
|
||||||
}
|
}
|
||||||
if (details)
|
|
||||||
{
|
|
||||||
DrawSelectionIterator iter(details,(PRUnichar *)text,(PRUint32)textLength,aTextStyle);//ITS OK TO CAST HERE THE RESULT WE USE WILLNOT DO BAD CONVERSION
|
DrawSelectionIterator iter(details,(PRUnichar *)text,(PRUint32)textLength,aTextStyle);//ITS OK TO CAST HERE THE RESULT WE USE WILLNOT DO BAD CONVERSION
|
||||||
if (iter.First())
|
if (!iter.IsDone() && iter.First())
|
||||||
{
|
{
|
||||||
nscoord currentX = dx;
|
nscoord currentX = dx;
|
||||||
nscoord newWidth;//temp
|
nscoord newWidth;//temp
|
||||||
@@ -2394,12 +2385,6 @@ nsTextFrame::PaintAsciiText(nsIPresContext* aPresContext,
|
|||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aRenderingContext.SetColor(aTextStyle.mColor->mColor);
|
|
||||||
aRenderingContext.DrawString(text, PRUint32(textLength), dx, dy);
|
|
||||||
}
|
|
||||||
PaintTextDecorations(aRenderingContext, aStyleContext,
|
PaintTextDecorations(aRenderingContext, aStyleContext,
|
||||||
aTextStyle, dx, dy, width,
|
aTextStyle, dx, dy, width,
|
||||||
unicodePaintBuffer.mBuffer,
|
unicodePaintBuffer.mBuffer,
|
||||||
|
|||||||
Reference in New Issue
Block a user