mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 03:00:30 +00:00
Bail out of nsTextFrame::MeasureText() early when contentLength is 0. Bug 129847, r=sfraser, sr=rbs.
This commit is contained in:
parent
6327857377
commit
5b7a71b0ea
@ -4720,6 +4720,13 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext,
|
||||
PRBool justDidFirstLetter = PR_FALSE;
|
||||
nsTextDimensions dimensions, lastWordDimensions;
|
||||
PRBool measureTextRuns = PR_FALSE;
|
||||
|
||||
if (contentLength == 0) {
|
||||
aTextData.mX = 0;
|
||||
aTextData.mAscent = 0;
|
||||
aTextData.mDescent = 0;
|
||||
return NS_FRAME_COMPLETE;
|
||||
}
|
||||
#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11)
|
||||
// see if we have implementation for GetTextDimensions()
|
||||
PRUint32 hints = 0;
|
||||
|
@ -4720,6 +4720,13 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext,
|
||||
PRBool justDidFirstLetter = PR_FALSE;
|
||||
nsTextDimensions dimensions, lastWordDimensions;
|
||||
PRBool measureTextRuns = PR_FALSE;
|
||||
|
||||
if (contentLength == 0) {
|
||||
aTextData.mX = 0;
|
||||
aTextData.mAscent = 0;
|
||||
aTextData.mDescent = 0;
|
||||
return NS_FRAME_COMPLETE;
|
||||
}
|
||||
#if defined(_WIN32) || defined(XP_OS2) || defined(MOZ_X11)
|
||||
// see if we have implementation for GetTextDimensions()
|
||||
PRUint32 hints = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user