| OLD | NEW |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 static bool isCJKIdeograph(UChar32); | 156 static bool isCJKIdeograph(UChar32); |
| 157 static bool isCJKIdeographOrSymbol(UChar32); | 157 static bool isCJKIdeographOrSymbol(UChar32); |
| 158 | 158 |
| 159 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD
irection, bool& isAfterExpansion); | 159 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD
irection, bool& isAfterExpansion); |
| 160 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD
irection, bool& isAfterExpansion); | 160 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD
irection, bool& isAfterExpansion); |
| 161 | 161 |
| 162 static void setShouldUseSmoothing(bool); | 162 static void setShouldUseSmoothing(bool); |
| 163 static bool shouldUseSmoothing(); | 163 static bool shouldUseSmoothing(); |
| 164 | 164 |
| 165 enum CodePath { Auto, Simple, Complex, SimpleWithGlyphOverflow }; | |
| 166 CodePath codePath(const TextRun&) const; | 165 CodePath codePath(const TextRun&) const; |
| 167 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp
le; } | 166 static CodePath characterRangeCodePath(const LChar*, unsigned) { return Simp
lePath; } |
| 168 static CodePath characterRangeCodePath(const UChar*, unsigned len); | 167 static CodePath characterRangeCodePath(const UChar*, unsigned len); |
| 169 | 168 |
| 170 private: | 169 private: |
| 171 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; | 170 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; |
| 172 | 171 |
| 173 // Returns the initial in-stream advance. | 172 // Returns the initial in-stream advance. |
| 174 float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, Gl
yphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const; | 173 float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, Gl
yphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const; |
| 175 void drawSimpleText(GraphicsContext*, const TextRunPaintInfo&, const FloatPo
int&) const; | 174 void drawSimpleText(GraphicsContext*, const TextRunPaintInfo&, const FloatPo
int&) const; |
| 176 void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRunPaintInfo
&, const AtomicString& mark, const FloatPoint&) const; | 175 void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRunPaintInfo
&, const AtomicString& mark, const FloatPoint&) const; |
| 177 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; | 176 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 332 |
| 334 namespace WTF { | 333 namespace WTF { |
| 335 | 334 |
| 336 template <> struct PLATFORM_EXPORT OwnedPtrDeleter<WebCore::TextLayout> { | 335 template <> struct PLATFORM_EXPORT OwnedPtrDeleter<WebCore::TextLayout> { |
| 337 static void deletePtr(WebCore::TextLayout*); | 336 static void deletePtr(WebCore::TextLayout*); |
| 338 }; | 337 }; |
| 339 | 338 |
| 340 } | 339 } |
| 341 | 340 |
| 342 #endif | 341 #endif |
| OLD | NEW |