mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
r=mkaply,a=blizzard Check whether or not text color has been set
This commit is contained in:
parent
812a41bfc5
commit
4addd4832e
@ -223,6 +223,7 @@ nsRenderingContextOS2::nsRenderingContextOS2()
|
||||
mCurrDrawingColor = NS_RGB( 0, 0, 0);
|
||||
mAlreadySetDrawingColor = PR_FALSE;
|
||||
mCurrTextColor = NS_RGB( 0, 0, 0);
|
||||
mAlreadySetTextColor = PR_FALSE;
|
||||
mLineStyle = nsLineStyle_kSolid;
|
||||
mCurrLineStyle = nsLineStyle_kSolid;
|
||||
|
||||
@ -957,7 +958,7 @@ void nsRenderingContextOS2::SetupFontAndColor( BOOL bForce)
|
||||
mSurface->SelectFont( mCurrFontMetrics);
|
||||
}
|
||||
|
||||
if( bForce || mColor != mCurrTextColor)
|
||||
if( bForce || mColor != mCurrTextColor || !mAlreadySetTextColor)
|
||||
{
|
||||
|
||||
CHARBUNDLE cBundle;
|
||||
@ -983,6 +984,7 @@ void nsRenderingContextOS2::SetupFontAndColor( BOOL bForce)
|
||||
FALSE);
|
||||
|
||||
mCurrTextColor = mColor;
|
||||
mAlreadySetTextColor = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,6 +256,7 @@ protected:
|
||||
nsIFontMetrics *mCurrFontMetrics; // currently selected font
|
||||
nscolor mCurrDrawingColor;// currently selected drawing color
|
||||
PRBool mAlreadySetDrawingColor;
|
||||
PRBool mAlreadySetTextColor;
|
||||
PRUint8 *mGammaTable;
|
||||
nscolor mCurrTextColor; // currently selected text color
|
||||
nsLineStyle mCurrLineStyle; // currently selected line style
|
||||
|
Loading…
x
Reference in New Issue
Block a user