Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: Source/platform/fonts/Font.h

Issue 207573002: Remove FontDescription::mutableFontDescription (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/style/RenderStyle.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Holger Hans Peter Freyther 6 * Copyright (C) 2008 Holger Hans Peter Freyther
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Font(const FontDescription&); 81 Font(const FontDescription&);
82 ~Font(); 82 ~Font();
83 83
84 Font(const Font&); 84 Font(const Font&);
85 Font& operator=(const Font&); 85 Font& operator=(const Font&);
86 86
87 bool operator==(const Font& other) const; 87 bool operator==(const Font& other) const;
88 bool operator!=(const Font& other) const { return !(*this == other); } 88 bool operator!=(const Font& other) const { return !(*this == other); }
89 89
90 const FontDescription& fontDescription() const { return m_fontDescription; } 90 const FontDescription& fontDescription() const { return m_fontDescription; }
91 // FIXME: This is currently used by RenderStyle::setWordSpacing and RenderSt yle::setLetterSpacing.
92 // They are being removed. Do NOT add new uses of this function. Use FontBui lder instead.
93 FontDescription& mutableFontDescription() { return m_fontDescription; }
94 91
95 void update(PassRefPtr<FontSelector>) const; 92 void update(PassRefPtr<FontSelector>) const;
96 93
97 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN otReady }; 94 enum CustomFontNotReadyAction { DoNotPaintIfFontNotReady, UseFallbackIfFontN otReady };
98 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const; 95 void drawText(GraphicsContext*, const TextRunPaintInfo&, const FloatPoint&, CustomFontNotReadyAction = DoNotPaintIfFontNotReady) const;
99 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom icString& mark, const FloatPoint&) const; 96 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Atom icString& mark, const FloatPoint&) const;
100 97
101 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; 98 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
102 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const; 99 float width(const TextRun&, int& charsConsumed, Glyph& glyphId) const;
103 100
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 { 212 {
216 if (!tabSize) 213 if (!tabSize)
217 return fontDescription().letterSpacing(); 214 return fontDescription().letterSpacing();
218 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing(); 215 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS pacing();
219 return tabWidth - fmodf(position, tabWidth); 216 return tabWidth - fmodf(position, tabWidth);
220 } 217 }
221 218
222 } 219 }
223 220
224 #endif 221 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/style/RenderStyle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698