Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 bidi_level_(UBIDI_LTR), | 59 bidi_level_(UBIDI_LTR), |
| 60 shape_options_(kPreContext | kPostContext), | 60 shape_options_(kPreContext | kPostContext), |
| 61 rotate_sideways_(false), | 61 rotate_sideways_(false), |
| 62 fallback_priority_(FontFallbackPriority::kInvalid) { | 62 fallback_priority_(FontFallbackPriority::kInvalid) { |
| 63 DCHECK_GE(end, start); | 63 DCHECK_GE(end, start); |
| 64 } | 64 } |
| 65 | 65 |
| 66 NGInlineItemType Type() const { return static_cast<NGInlineItemType>(type_); } | 66 NGInlineItemType Type() const { return static_cast<NGInlineItemType>(type_); } |
| 67 const char* NGInlineItemTypeToString(int val) const; | 67 const char* NGInlineItemTypeToString(int val) const; |
| 68 | 68 |
| 69 const ShapeResult* GetShapeResult() const { return shape_result_.Get(); } | |
|
eae
2017/05/10 21:31:38
I've been using the method name TextShapeResult()
kojii
2017/05/11 16:17:36
I like that! ;)
| |
| 69 NGLayoutInlineShapeOptions ShapeOptions() const { | 70 NGLayoutInlineShapeOptions ShapeOptions() const { |
| 70 return static_cast<NGLayoutInlineShapeOptions>(shape_options_); | 71 return static_cast<NGLayoutInlineShapeOptions>(shape_options_); |
| 71 } | 72 } |
| 72 | 73 |
| 73 unsigned StartOffset() const { return start_offset_; } | 74 unsigned StartOffset() const { return start_offset_; } |
| 74 unsigned EndOffset() const { return end_offset_; } | 75 unsigned EndOffset() const { return end_offset_; } |
| 75 unsigned Length() const { return end_offset_ - start_offset_; } | 76 unsigned Length() const { return end_offset_ - start_offset_; } |
| 76 TextDirection Direction() const { | 77 TextDirection Direction() const { |
| 77 return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr; | 78 return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr; |
| 78 } | 79 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 | 166 |
| 166 private: | 167 private: |
| 167 NGInlineItem* start_item_; | 168 NGInlineItem* start_item_; |
| 168 unsigned size_; | 169 unsigned size_; |
| 169 unsigned start_index_; | 170 unsigned start_index_; |
| 170 }; | 171 }; |
| 171 | 172 |
| 172 } // namespace blink | 173 } // namespace blink |
| 173 | 174 |
| 174 #endif // NGInlineItem_h | 175 #endif // NGInlineItem_h |
| OLD | NEW |