Chromium Code Reviews| Index: Source/core/platform/graphics/Font.h |
| diff --git a/Source/core/platform/graphics/Font.h b/Source/core/platform/graphics/Font.h |
| index f41d0a5edd260f4cb22190ce69e36ca48aaa675a..2382014c73309391c8304ee9bb03c94b98317cc9 100644 |
| --- a/Source/core/platform/graphics/Font.h |
| +++ b/Source/core/platform/graphics/Font.h |
| @@ -97,8 +97,8 @@ public: |
| void update(PassRefPtr<FontSelector>) const; |
| enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontNotReady }; |
| - void drawText(GraphicsContext*, const TextRun&, const FloatPoint&, int from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; |
| - void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1) const; |
| + void drawText(GraphicsContext*, const TextRun&, const FloatPoint&, const FloatRect& textRect, int from = 0, int to = -1, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; |
| + void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, const FloatRect& textRect, int from = 0, int to = -1) const; |
| float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; |
| float width(const TextRun&, int& charsConsumed, String& glyphName) const; |
| @@ -173,11 +173,11 @@ private: |
| // Returns the initial in-stream advance. |
| float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const; |
| - void drawSimpleText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const; |
| - void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const; |
| - void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const; |
| - void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, const FloatPoint&) const; |
| - void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const FloatPoint&) const; |
| + void drawSimpleText(GraphicsContext*, const TextRun&, const FloatPoint&, const FloatRect& textRect, int from, int to) const; |
| + void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, const FloatRect& textRect, int from, int to) const; |
| + void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&, const FloatRect& textRect) const; |
| + void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, const FloatPoint&, const FloatRect& textRect) const; |
| + void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const FloatPoint&, const FloatRect& textRect) const; |
|
eseidel
2013/04/18 21:04:38
The rest of these arguments would benifit from cle
alokp
2013/04/18 22:22:37
Will do in a separate patch.
|
| float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; |
| int offsetForPositionForSimpleText(const TextRun&, float position, bool includePartialGlyphs) const; |
| FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to) const; |
| @@ -189,8 +189,8 @@ private: |
| // Returns the initial in-stream advance. |
| float getGlyphsAndAdvancesForComplexText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const; |
| - void drawComplexText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const; |
| - void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const; |
| + void drawComplexText(GraphicsContext*, const TextRun&, const FloatPoint&, const FloatRect& textRect, int from, int to) const; |
| + void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, const FloatRect& textRect, int from, int to) const; |
| float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; |
| int offsetForPositionForComplexText(const TextRun&, float position, bool includePartialGlyphs) const; |
| FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const; |