Bug 237085. Move string subdivision code to gfx so we can efficiently make it metrics-dependent. r=smontagu,sr=rbs

git-svn-id: svn://10.0.0.236/trunk@200963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2006-06-26 22:18:23 +00:00
parent 7f23c7b8b9
commit bd9175c940
49 changed files with 1369 additions and 1215 deletions

View File

@@ -1033,7 +1033,7 @@ nsImageFrame::MeasureString(const PRUnichar* aString,
// Measure this chunk of text, and see if it fits
nscoord width;
nsLayoutUtils::SafeGetWidth(&aContext, aString, len, width);
aContext.GetWidth(aString, len, width);
PRBool fits = (totalWidth + width) <= aMaxWidth;
// If it fits on the line, or it's the first word we've processed then
@@ -1101,7 +1101,7 @@ nsImageFrame::DisplayAltText(nsPresContext* aPresContext,
MeasureString(str, strLen, aRect.width, maxFit, aRenderingContext);
// Display the text
nsLayoutUtils::SafeDrawString(&aRenderingContext, str, maxFit, aRect.x, y + maxAscent);
aRenderingContext.DrawString(str, maxFit, aRect.x, y + maxAscent);
// Move to the next line
str += maxFit;