| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NGInlineItem_h | 5 #ifndef NGInlineItem_h |
| 6 #define NGInlineItem_h | 6 #define NGInlineItem_h |
| 7 | 7 |
| 8 #include "platform/LayoutUnit.h" | 8 #include "platform/LayoutUnit.h" |
| 9 #include "platform/fonts/FontFallbackPriority.h" | 9 #include "platform/fonts/FontFallbackPriority.h" |
| 10 #include "platform/fonts/SimpleFontData.h" | 10 #include "platform/fonts/SimpleFontData.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bidi_level_(UBIDI_LTR), | 60 bidi_level_(UBIDI_LTR), |
| 61 shape_options_(kPreContext | kPostContext), | 61 shape_options_(kPreContext | kPostContext), |
| 62 rotate_sideways_(false), | 62 rotate_sideways_(false), |
| 63 fallback_priority_(FontFallbackPriority::kInvalid) { | 63 fallback_priority_(FontFallbackPriority::kInvalid) { |
| 64 DCHECK_GE(end, start); | 64 DCHECK_GE(end, start); |
| 65 } | 65 } |
| 66 | 66 |
| 67 NGInlineItemType Type() const { return static_cast<NGInlineItemType>(type_); } | 67 NGInlineItemType Type() const { return static_cast<NGInlineItemType>(type_); } |
| 68 const char* NGInlineItemTypeToString(int val) const; | 68 const char* NGInlineItemTypeToString(int val) const; |
| 69 | 69 |
| 70 const ShapeResult* TextShapeResult() const { return shape_result_.Get(); } |
| 70 NGLayoutInlineShapeOptions ShapeOptions() const { | 71 NGLayoutInlineShapeOptions ShapeOptions() const { |
| 71 return static_cast<NGLayoutInlineShapeOptions>(shape_options_); | 72 return static_cast<NGLayoutInlineShapeOptions>(shape_options_); |
| 72 } | 73 } |
| 73 | 74 |
| 74 unsigned StartOffset() const { return start_offset_; } | 75 unsigned StartOffset() const { return start_offset_; } |
| 75 unsigned EndOffset() const { return end_offset_; } | 76 unsigned EndOffset() const { return end_offset_; } |
| 76 unsigned Length() const { return end_offset_ - start_offset_; } | 77 unsigned Length() const { return end_offset_ - start_offset_; } |
| 77 TextDirection Direction() const { | 78 TextDirection Direction() const { |
| 78 return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr; | 79 return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr; |
| 79 } | 80 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 167 |
| 167 private: | 168 private: |
| 168 NGInlineItem* start_item_; | 169 NGInlineItem* start_item_; |
| 169 unsigned size_; | 170 unsigned size_; |
| 170 unsigned start_index_; | 171 unsigned start_index_; |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 } // namespace blink | 174 } // namespace blink |
| 174 | 175 |
| 175 #endif // NGInlineItem_h | 176 #endif // NGInlineItem_h |
| OLD | NEW |