| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const Font*, | 61 const Font*, |
| 62 const TextRun&, | 62 const TextRun&, |
| 63 float position_offset, | 63 float position_offset, |
| 64 unsigned count); | 64 unsigned count); |
| 65 ~ShapeResult(); | 65 ~ShapeResult(); |
| 66 | 66 |
| 67 float Width() const { return width_; } | 67 float Width() const { return width_; } |
| 68 LayoutUnit SnappedWidth() const { return LayoutUnit::FromFloatCeil(width_); } | 68 LayoutUnit SnappedWidth() const { return LayoutUnit::FromFloatCeil(width_); } |
| 69 const FloatRect& Bounds() const { return glyph_bounding_box_; } | 69 const FloatRect& Bounds() const { return glyph_bounding_box_; } |
| 70 unsigned NumCharacters() const { return num_characters_; } | 70 unsigned NumCharacters() const { return num_characters_; } |
| 71 // The character start/end index of a range shape result. |
| 72 unsigned StartIndexForResult() const; |
| 73 unsigned EndIndexForResult() const; |
| 71 void FallbackFonts(HashSet<const SimpleFontData*>*) const; | 74 void FallbackFonts(HashSet<const SimpleFontData*>*) const; |
| 72 TextDirection Direction() const { | 75 TextDirection Direction() const { |
| 73 return static_cast<TextDirection>(direction_); | 76 return static_cast<TextDirection>(direction_); |
| 74 } | 77 } |
| 75 bool Rtl() const { return Direction() == TextDirection::kRtl; } | 78 bool Rtl() const { return Direction() == TextDirection::kRtl; } |
| 76 bool HasVerticalOffsets() const { return has_vertical_offsets_; } | 79 bool HasVerticalOffsets() const { return has_vertical_offsets_; } |
| 77 | 80 |
| 78 // For memory reporting. | 81 // For memory reporting. |
| 79 size_t ByteSize() const; | 82 size_t ByteSize() const; |
| 80 | 83 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 unsigned has_vertical_offsets_ : 1; | 128 unsigned has_vertical_offsets_ : 1; |
| 126 | 129 |
| 127 friend class HarfBuzzShaper; | 130 friend class HarfBuzzShaper; |
| 128 friend class ShapeResultBuffer; | 131 friend class ShapeResultBuffer; |
| 129 friend class ShapeResultBloberizer; | 132 friend class ShapeResultBloberizer; |
| 130 }; | 133 }; |
| 131 | 134 |
| 132 } // namespace blink | 135 } // namespace blink |
| 133 | 136 |
| 134 #endif // ShapeResult_h | 137 #endif // ShapeResult_h |
| OLD | NEW |