Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h

Issue 2940153002: [LayoutNG] Implement more text-align values and BiDi base direction (Closed)
Patch Set: eae review Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const ShapeResult* TextShapeResult() const { return shape_result_.Get(); }
71 NGLayoutInlineShapeOptions ShapeOptions() const { 71 NGLayoutInlineShapeOptions ShapeOptions() const {
72 return static_cast<NGLayoutInlineShapeOptions>(shape_options_); 72 return static_cast<NGLayoutInlineShapeOptions>(shape_options_);
73 } 73 }
74 74
75 unsigned StartOffset() const { return start_offset_; } 75 unsigned StartOffset() const { return start_offset_; }
76 unsigned EndOffset() const { return end_offset_; } 76 unsigned EndOffset() const { return end_offset_; }
77 unsigned Length() const { return end_offset_ - start_offset_; } 77 unsigned Length() const { return end_offset_ - start_offset_; }
78 TextDirection Direction() const { 78 TextDirection Direction() const { return DirectionFromLevel(BidiLevel()); }
79 return BidiLevel() & 1 ? TextDirection::kRtl : TextDirection::kLtr;
80 }
81 UBiDiLevel BidiLevel() const { return static_cast<UBiDiLevel>(bidi_level_); } 79 UBiDiLevel BidiLevel() const { return static_cast<UBiDiLevel>(bidi_level_); }
82 UScriptCode GetScript() const { return script_; } 80 UScriptCode GetScript() const { return script_; }
83 const ComputedStyle* Style() const { return style_.Get(); } 81 const ComputedStyle* Style() const { return style_.Get(); }
84 LayoutObject* GetLayoutObject() const { return layout_object_; } 82 LayoutObject* GetLayoutObject() const { return layout_object_; }
85 83
86 void SetOffset(unsigned start, unsigned end); 84 void SetOffset(unsigned start, unsigned end);
87 void SetEndOffset(unsigned); 85 void SetEndOffset(unsigned);
88 86
89 LayoutUnit InlineSize() const; 87 LayoutUnit InlineSize() const;
90 LayoutUnit InlineSize(unsigned start, unsigned end) const; 88 LayoutUnit InlineSize(unsigned start, unsigned end) const;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 168
171 private: 169 private:
172 NGInlineItem* start_item_; 170 NGInlineItem* start_item_;
173 unsigned size_; 171 unsigned size_;
174 unsigned start_index_; 172 unsigned start_index_;
175 }; 173 };
176 174
177 } // namespace blink 175 } // namespace blink
178 176
179 #endif // NGInlineItem_h 177 #endif // NGInlineItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698