From 0d12b6c03db452df12dcbcfcb35deaeb1fc6c3d0 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 28 Apr 2011 06:06:53 +0100 Subject: [PATCH] bug 608940 - remove unused function gfxTextRun::Clone. r=jdaggett --- gfx/thebes/gfxFont.cpp | 16 ---------------- gfx/thebes/gfxFont.h | 9 --------- 2 files changed, 25 deletions(-) diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index 457d5df2244..d941ccda8e8 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -3084,22 +3084,6 @@ gfxTextRun::~gfxTextRun() MOZ_COUNT_DTOR(gfxTextRun); } -gfxTextRun * -gfxTextRun::Clone(const gfxTextRunFactory::Parameters *aParams, const void *aText, - PRUint32 aLength, gfxFontGroup *aFontGroup, PRUint32 aFlags) -{ - if (!mCharacterGlyphs) - return nsnull; - - nsAutoPtr textRun; - textRun = gfxTextRun::Create(aParams, aText, aLength, aFontGroup, aFlags); - if (!textRun) - return nsnull; - - textRun->CopyGlyphDataFrom(this, 0, mCharacterCount, 0); - return textRun.forget(); -} - PRBool gfxTextRun::SetPotentialLineBreaks(PRUint32 aStart, PRUint32 aLength, PRPackedBool *aBreakBefore, diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index 962dccf7ade..cecdcc5c35d 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -1702,15 +1702,6 @@ public: static gfxTextRun *Create(const gfxTextRunFactory::Parameters *aParams, const void *aText, PRUint32 aLength, gfxFontGroup *aFontGroup, PRUint32 aFlags); - // Clone this textrun, according to the given parameters. This textrun's - // glyph data is copied, so the text and length must be the same as this - // textrun's. If there's a problem, return null. Actual linebreaks will - // be set as per aParams; there will be no potential linebreaks. - // If aText is not persistent (aFlags & TEXT_IS_PERSISTENT), the - // textrun will copy it. - virtual gfxTextRun *Clone(const gfxTextRunFactory::Parameters *aParams, const void *aText, - PRUint32 aLength, gfxFontGroup *aFontGroup, PRUint32 aFlags); - /** * This class records the information associated with a character in the * input string. It's optimized for the case where there is one glyph