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

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

Issue 2797053002: Remove redundant casts, use NGLayoutInputNode base functions everywhere (Closed)
Patch Set: Created 3 years, 8 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 inline void NGInlineNode::AssertEndOffset(unsigned index, 202 inline void NGInlineNode::AssertEndOffset(unsigned index,
203 unsigned offset) const { 203 unsigned offset) const {
204 items_[index].AssertEndOffset(offset); 204 items_[index].AssertEndOffset(offset);
205 } 205 }
206 206
207 DEFINE_TYPE_CASTS(NGInlineNode, 207 DEFINE_TYPE_CASTS(NGInlineNode,
208 NGLayoutInputNode, 208 NGLayoutInputNode,
209 node, 209 node,
210 node->Type() == NGLayoutInputNode::kLegacyInline, 210 node->IsInline(),
211 node.Type() == NGLayoutInputNode::kLegacyInline); 211 node.IsInline());
212 212
213 // A vector-like object that points to a subset of an array of 213 // A vector-like object that points to a subset of an array of
214 // |NGLayoutInlineItem|. 214 // |NGLayoutInlineItem|.
215 // The source vector must keep alive and must not resize while this object 215 // The source vector must keep alive and must not resize while this object
216 // is alive. 216 // is alive.
217 class NGLayoutInlineItemRange { 217 class NGLayoutInlineItemRange {
218 STACK_ALLOCATED(); 218 STACK_ALLOCATED();
219 219
220 public: 220 public:
221 NGLayoutInlineItemRange(Vector<NGLayoutInlineItem>*, 221 NGLayoutInlineItemRange(Vector<NGLayoutInlineItem>*,
(...skipping 22 matching lines...) Expand all
244 244
245 private: 245 private:
246 NGLayoutInlineItem* start_item_; 246 NGLayoutInlineItem* start_item_;
247 unsigned size_; 247 unsigned size_;
248 unsigned start_index_; 248 unsigned start_index_;
249 }; 249 };
250 250
251 } // namespace blink 251 } // namespace blink
252 252
253 #endif // NGInlineNode_h 253 #endif // NGInlineNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698