mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1087982, part 2 - Get rid of the pass-char-by-value variant of nsRenderingContext::GetWidth. r=jfkthame
This commit is contained in:
parent
fc52fab94a
commit
de3b204a75
@ -93,16 +93,6 @@ nsRenderingContext::GetMaxChunkLength()
|
||||
return std::min(mFontMetrics->GetMaxStringLength(), MAX_GFX_TEXT_BUF_SIZE);
|
||||
}
|
||||
|
||||
nscoord
|
||||
nsRenderingContext::GetWidth(char aC)
|
||||
{
|
||||
if (aC == ' ') {
|
||||
return mFontMetrics->SpaceWidth();
|
||||
}
|
||||
|
||||
return GetWidth(&aC, 1);
|
||||
}
|
||||
|
||||
nscoord
|
||||
nsRenderingContext::GetWidth(char16_t aC)
|
||||
{
|
||||
|
@ -47,7 +47,6 @@ public:
|
||||
|
||||
void SetTextRunRTL(bool aIsRTL);
|
||||
|
||||
nscoord GetWidth(char aC);
|
||||
nscoord GetWidth(char16_t aC);
|
||||
nscoord GetWidth(const nsString& aString);
|
||||
nscoord GetWidth(const char* aString);
|
||||
|
@ -1015,8 +1015,8 @@ nsImageFrame::MeasureString(const char16_t* aString,
|
||||
nsRenderingContext& aContext)
|
||||
{
|
||||
nscoord totalWidth = 0;
|
||||
aContext.SetTextRunRTL(false);
|
||||
nscoord spaceWidth = aContext.GetWidth(' ');
|
||||
aContext.FontMetrics()->SetTextRunRTL(false);
|
||||
nscoord spaceWidth = aContext.FontMetrics()->SpaceWidth();
|
||||
|
||||
aMaxFit = 0;
|
||||
while (aLength > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user