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

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

Issue 2745973002: [LayoutNG] Implement atomic inlines for LayoutNGInline (Closed)
Patch Set: Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 NGInlineNode_h 5 #ifndef NGInlineNode_h
6 #define NGInlineNode_h 6 #define NGInlineNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/LayoutBlockFlow.h" 9 #include "core/layout/LayoutBlockFlow.h"
10 #include "core/layout/ng/ng_layout_input_node.h" 10 #include "core/layout/ng/ng_layout_input_node.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 unsigned StartOffset() const { return start_offset_; } 130 unsigned StartOffset() const { return start_offset_; }
131 unsigned EndOffset() const { return end_offset_; } 131 unsigned EndOffset() const { return end_offset_; }
132 TextDirection Direction() const { 132 TextDirection Direction() const {
133 return bidi_level_ & 1 ? TextDirection::kRtl : TextDirection::kLtr; 133 return bidi_level_ & 1 ? TextDirection::kRtl : TextDirection::kLtr;
134 } 134 }
135 UBiDiLevel BidiLevel() const { return bidi_level_; } 135 UBiDiLevel BidiLevel() const { return bidi_level_; }
136 UScriptCode Script() const { return script_; } 136 UScriptCode Script() const { return script_; }
137 const ComputedStyle* Style() const { return style_; } 137 const ComputedStyle* Style() const { return style_; }
138 LayoutObject* GetLayoutObject() const { return layout_object_; } 138 LayoutObject* GetLayoutObject() const { return layout_object_; }
139 139
140 bool IsAtomicInlineLevel() const {
141 return layout_object_ && layout_object_->isAtomicInlineLevel();
142 }
143
140 void SetEndOffset(unsigned); 144 void SetEndOffset(unsigned);
141 145
142 LayoutUnit InlineSize() const; 146 LayoutUnit InlineSize() const;
143 LayoutUnit InlineSize(unsigned start, unsigned end) const; 147 LayoutUnit InlineSize(unsigned start, unsigned end) const;
144 148
149 // Layout this item. Only valid for IsAtomicInlineLevel() items.
150 RefPtr<NGLayoutResult> Layout(const NGConstraintSpace& parent_space) const;
151
145 void GetFallbackFonts(HashSet<const SimpleFontData*>*, 152 void GetFallbackFonts(HashSet<const SimpleFontData*>*,
146 unsigned start, 153 unsigned start,
147 unsigned end) const; 154 unsigned end) const;
148 155
149 static void Split(Vector<NGLayoutInlineItem>&, 156 static void Split(Vector<NGLayoutInlineItem>&,
150 unsigned index, 157 unsigned index,
151 unsigned offset); 158 unsigned offset);
152 static unsigned SetBidiLevel(Vector<NGLayoutInlineItem>&, 159 static unsigned SetBidiLevel(Vector<NGLayoutInlineItem>&,
153 unsigned index, 160 unsigned index,
154 unsigned end_offset, 161 unsigned end_offset,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 235
229 private: 236 private:
230 NGLayoutInlineItem* start_item_; 237 NGLayoutInlineItem* start_item_;
231 unsigned size_; 238 unsigned size_;
232 unsigned start_index_; 239 unsigned start_index_;
233 }; 240 };
234 241
235 } // namespace blink 242 } // namespace blink
236 243
237 #endif // NGInlineNode_h 244 #endif // NGInlineNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698