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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user