Chromium Code Reviews| Index: Source/platform/fonts/shaping/HarfBuzzShaper.h |
| diff --git a/Source/platform/fonts/shaping/HarfBuzzShaper.h b/Source/platform/fonts/shaping/HarfBuzzShaper.h |
| index 405c5951d082dfcbacc90a342a390a7c7fac9f7a..1ded6875b93e8714dc49b962d10aab0593579a3c 100644 |
| --- a/Source/platform/fonts/shaping/HarfBuzzShaper.h |
| +++ b/Source/platform/fonts/shaping/HarfBuzzShaper.h |
| @@ -50,7 +50,7 @@ class Font; |
| class GlyphBuffer; |
| class SimpleFontData; |
| -class HarfBuzzShaper final : public Shaper { |
| +class PLATFORM_EXPORT HarfBuzzShaper final : public Shaper { |
| public: |
| HarfBuzzShaper(const Font*, const TextRun&, const GlyphData* emphasisData = nullptr, |
| HashSet<const SimpleFontData*>* fallbackFonts = nullptr, FloatRect* = nullptr); |
| @@ -61,6 +61,23 @@ public: |
| int offsetForPosition(float targetX); |
| FloatRect selectionRect(const FloatPoint&, int height, int from, int to); |
| + unsigned numberOfRunsForTesting() const |
| + { |
| + return m_harfBuzzRuns.size(); |
| + } |
| + |
| + bool runInfoForTesting(unsigned runIndex, unsigned& startIndex, |
|
Dominik Röttsches
2015/04/22 14:17:51
You preferred reference parameters here - I was wo
|
| + unsigned& numGlyphs, hb_script_t& script) |
| + { |
| + if (runIndex < m_harfBuzzRuns.size()) { |
| + startIndex = m_harfBuzzRuns[runIndex]->startIndex(); |
| + numGlyphs = m_harfBuzzRuns[runIndex]->numGlyphs(); |
| + script = m_harfBuzzRuns[runIndex]->script(); |
| + return true; |
| + } |
| + return false; |
| + } |
| + |
| private: |
| class HarfBuzzRun { |
| public: |