| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 HarfBuzzShaper(const Font*, const TextRun&, ForTextEmphasisOrNot = NotForTex
tEmphasis); | 55 HarfBuzzShaper(const Font*, const TextRun&, ForTextEmphasisOrNot = NotForTex
tEmphasis); |
| 56 | 56 |
| 57 void setDrawRange(int from, int to); | 57 void setDrawRange(int from, int to); |
| 58 bool shape(GlyphBuffer* = 0); | 58 bool shape(GlyphBuffer* = 0); |
| 59 FloatPoint adjustStartPoint(const FloatPoint&); | 59 FloatPoint adjustStartPoint(const FloatPoint&); |
| 60 float totalWidth() { return m_totalWidth; } | 60 float totalWidth() { return m_totalWidth; } |
| 61 int offsetForPosition(float targetX); | 61 int offsetForPosition(float targetX); |
| 62 FloatRect selectionRect(const FloatPoint&, int height, int from, int to); | 62 FloatRect selectionRect(const FloatPoint&, int height, int from, int to); |
| 63 | 63 |
| 64 float minGlyphBoundingBoxX() const { return m_minGlyphBoundingBoxX; } |
| 65 float maxGlyphBoundingBoxX() const { return m_maxGlyphBoundingBoxX; } |
| 66 float minGlyphBoundingBoxY() const { return m_minGlyphBoundingBoxY; } |
| 67 float maxGlyphBoundingBoxY() const { return m_maxGlyphBoundingBoxY; } |
| 68 |
| 64 private: | 69 private: |
| 65 class HarfBuzzRun { | 70 class HarfBuzzRun { |
| 66 public: | 71 public: |
| 67 HarfBuzzRun(const HarfBuzzRun&); | 72 HarfBuzzRun(const HarfBuzzRun&); |
| 68 ~HarfBuzzRun(); | 73 ~HarfBuzzRun(); |
| 69 | 74 |
| 70 static PassOwnPtr<HarfBuzzRun> create(const SimpleFontData* fontData, un
signed startIndex, unsigned numCharacters, TextDirection direction, hb_script_t
script) | 75 static PassOwnPtr<HarfBuzzRun> create(const SimpleFontData* fontData, un
signed startIndex, unsigned numCharacters, TextDirection direction, hb_script_t
script) |
| 71 { | 76 { |
| 72 return adoptPtr(new HarfBuzzRun(fontData, startIndex, numCharacters,
direction, script)); | 77 return adoptPtr(new HarfBuzzRun(fontData, startIndex, numCharacters,
direction, script)); |
| 73 } | 78 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 Vector<OwnPtr<HarfBuzzRun>, 16> m_harfBuzzRuns; | 156 Vector<OwnPtr<HarfBuzzRun>, 16> m_harfBuzzRuns; |
| 152 | 157 |
| 153 FloatPoint m_startOffset; | 158 FloatPoint m_startOffset; |
| 154 | 159 |
| 155 int m_fromIndex; | 160 int m_fromIndex; |
| 156 int m_toIndex; | 161 int m_toIndex; |
| 157 | 162 |
| 158 ForTextEmphasisOrNot m_forTextEmphasis; | 163 ForTextEmphasisOrNot m_forTextEmphasis; |
| 159 | 164 |
| 160 float m_totalWidth; | 165 float m_totalWidth; |
| 166 float m_minGlyphBoundingBoxX; |
| 167 float m_maxGlyphBoundingBoxX; |
| 168 float m_minGlyphBoundingBoxY; |
| 169 float m_maxGlyphBoundingBoxY; |
| 161 | 170 |
| 162 friend struct CachedShapingResults; | 171 friend struct CachedShapingResults; |
| 163 }; | 172 }; |
| 164 | 173 |
| 165 } // namespace WebCore | 174 } // namespace WebCore |
| 166 | 175 |
| 167 #endif // HarfBuzzShaper_h | 176 #endif // HarfBuzzShaper_h |
| OLD | NEW |