| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 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, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); | 735 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); |
| 736 float width = shaper.width(this, run, fallbackFonts, glyphBounds); | 736 float width = shaper.width(this, run, fallbackFonts, glyphBounds); |
| 737 return width; | 737 return width; |
| 738 } | 738 } |
| 739 | 739 |
| 740 // Return the code point index for the given |x| offset into the text run. | 740 // Return the code point index for the given |x| offset into the text run. |
| 741 int Font::offsetForPositionForComplexText(const TextRun& run, float xFloat, | 741 int Font::offsetForPositionForComplexText(const TextRun& run, float xFloat, |
| 742 bool includePartialGlyphs) const | 742 bool includePartialGlyphs) const |
| 743 { | 743 { |
| 744 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); | 744 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); |
| 745 return shaper.offsetForPosition(this, run, xFloat); | 745 return shaper.offsetForPosition(this, run, xFloat, includePartialGlyphs); |
| 746 } | 746 } |
| 747 | 747 |
| 748 // Return the rectangle for selecting the given range of code-points in the Text
Run. | 748 // Return the rectangle for selecting the given range of code-points in the Text
Run. |
| 749 FloatRect Font::selectionRectForComplexText(const TextRun& run, | 749 FloatRect Font::selectionRectForComplexText(const TextRun& run, |
| 750 const FloatPoint& point, int height, int from, int to) const | 750 const FloatPoint& point, int height, int from, int to) const |
| 751 { | 751 { |
| 752 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); | 752 CachingWordShaper shaper(m_fontFallbackList->shapeCache(m_fontDescription)); |
| 753 CharacterRange range = shaper.getCharacterRange(this, run, from, to); | 753 CharacterRange range = shaper.getCharacterRange(this, run, from, to); |
| 754 return FloatRect(point.x() + range.start, point.y(), range.width(), height); | 754 return FloatRect(point.x() + range.start, point.y(), range.width(), height); |
| 755 } | 755 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 { | 843 { |
| 844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 845 } | 845 } |
| 846 | 846 |
| 847 bool Font::isFallbackValid() const | 847 bool Font::isFallbackValid() const |
| 848 { | 848 { |
| 849 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 849 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 850 } | 850 } |
| 851 | 851 |
| 852 } // namespace blink | 852 } // namespace blink |
| OLD | NEW |