зеркало из https://github.com/mozilla/gecko-dev.git
Fixes for latest raptor updates
This commit is contained in:
Родитель
d0975ba5ae
Коммит
f87dd273fe
|
@ -133,7 +133,13 @@ nsresult nsCalCommandCanvas :: Init()
|
|||
|
||||
nscoord width ;
|
||||
|
||||
fm->GetWidth(text,width);
|
||||
nsIRenderingContext * aRC;
|
||||
|
||||
ctx->CreateRenderingContext(mStaticTextField, aRC);
|
||||
|
||||
aRC->GetWidth(text,width);
|
||||
|
||||
NS_RELEASE(aRC);
|
||||
|
||||
rect.width = width ;
|
||||
|
||||
|
@ -231,9 +237,14 @@ nsresult nsCalCommandCanvas :: SetBounds(const nsRect &aBounds)
|
|||
|
||||
ctx->GetMetricsFor(font,fm);
|
||||
|
||||
NS_RELEASE(ctx);
|
||||
nsIRenderingContext * aRC;
|
||||
|
||||
fm->GetWidth(text,width);
|
||||
ctx->CreateRenderingContext(mStaticTextField, aRC);
|
||||
|
||||
aRC->GetWidth(text,width);
|
||||
|
||||
NS_RELEASE(aRC);
|
||||
NS_RELEASE(ctx);
|
||||
|
||||
rect.width = width ;
|
||||
|
||||
|
|
|
@ -432,7 +432,7 @@ nsEventStatus nsCalMonthViewCanvas :: PaintCellBackground( PRUint32& aCellRow, P
|
|||
nscoord text_width ;
|
||||
|
||||
aRenderingContext.GetFontMetrics()->GetHeight(text_height);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(strDate, text_width);
|
||||
aRenderingContext.GetWidth(strDate, text_width);
|
||||
|
||||
x = x + w - text_width;
|
||||
y = y + h - text_height;
|
||||
|
|
|
@ -196,7 +196,7 @@ nsresult nsCalTimebarScale :: DrawTime(nsIRenderingContext& aContext,
|
|||
*/
|
||||
|
||||
aContext.GetFontMetrics()->GetHeight(height);
|
||||
aContext.GetFontMetrics()->GetWidth(text,width);
|
||||
aContext.GetWidth(text,width);
|
||||
|
||||
/*
|
||||
* center the text in our rect and draw it
|
||||
|
|
|
@ -94,7 +94,7 @@ nsEventStatus nsCalTimebarTimeHeading :: PaintForeground(nsIRenderingContext& aR
|
|||
*/
|
||||
|
||||
aRenderingContext.GetFontMetrics()->GetHeight(height);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(*string,width);
|
||||
aRenderingContext.GetWidth(*string,width);
|
||||
|
||||
/*
|
||||
* XXX: If we are too big, remove the Day of the week. Need a better algorithm
|
||||
|
@ -105,7 +105,7 @@ nsEventStatus nsCalTimebarTimeHeading :: PaintForeground(nsIRenderingContext& aR
|
|||
{
|
||||
pattern = "MMM dd\n";
|
||||
GetTimeContext()->GetDTFirstVisible()->strftime(pattern, &string);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(*string,width);
|
||||
aRenderingContext.GetWidth(*string,width);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -89,7 +89,7 @@ nsEventStatus nsCalTimebarUserHeading :: PaintForeground(nsIRenderingContext& aR
|
|||
*/
|
||||
|
||||
aRenderingContext.GetFontMetrics()->GetHeight(height);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(mUserName,width);
|
||||
aRenderingContext.GetWidth(mUserName,width);
|
||||
|
||||
/*
|
||||
* center the text in our rect and draw it
|
||||
|
|
|
@ -1675,7 +1675,7 @@ void nsCalMonthContextController::GetTextExtent(char *p, int iChars, int& iWidth
|
|||
|
||||
fm = mRenderingContext->GetFontMetrics();
|
||||
|
||||
fm->GetWidth(p,(nscoord)iWidth);
|
||||
mRenderingContext->GetWidth(p,(nscoord)iWidth);
|
||||
fm->GetHeight((nscoord)iHeight);
|
||||
|
||||
}
|
||||
|
@ -1731,7 +1731,7 @@ void nsCalMonthContextController::GetFontInfo(
|
|||
|
||||
nsIFontMetrics * fm = ctx->GetFontMetrics();
|
||||
|
||||
fm->GetWidth("0",m_iDigitWidth);
|
||||
ctx->GetWidth("0",m_iDigitWidth);
|
||||
fm->GetHeight(m_iDigitHeight);
|
||||
|
||||
/*
|
||||
|
@ -1742,7 +1742,7 @@ void nsCalMonthContextController::GetFontInfo(
|
|||
strcpy(sBuf,"Wednesday");
|
||||
sBuf[GetDOWColHdrChars() ] = 0;
|
||||
|
||||
fm->GetWidth(sBuf,m_iMaxDOWColHdrWidth);
|
||||
ctx->GetWidth(sBuf,m_iMaxDOWColHdrWidth);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ nsresult nsXPFCCanvas :: CreateImageGroup()
|
|||
|
||||
gXPFCToolkit->GetViewManager()->GetDeviceContext(deviceCtx);
|
||||
|
||||
mImageGroup->Init(deviceCtx);
|
||||
mImageGroup->Init(deviceCtx,nsnull);
|
||||
|
||||
NS_IF_RELEASE(deviceCtx);
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ nsEventStatus nsXPButton :: PaintForeground(nsIRenderingContext& aRenderingConte
|
|||
*/
|
||||
|
||||
aRenderingContext.GetFontMetrics()->GetHeight(string_height);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(string,string_width);
|
||||
aRenderingContext.GetWidth(string,string_width);
|
||||
|
||||
switch(mVerticalJustification)
|
||||
{
|
||||
|
|
|
@ -253,7 +253,7 @@ nsEventStatus nsXPItem :: PaintForeground(nsIRenderingContext& aRenderingContext
|
|||
*/
|
||||
|
||||
aRenderingContext.GetFontMetrics()->GetHeight(string_height);
|
||||
aRenderingContext.GetFontMetrics()->GetWidth(string,string_width);
|
||||
aRenderingContext.GetWidth(string,string_width);
|
||||
|
||||
switch(mVerticalJustification)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче