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

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

Issue 2754723004: Replace RELEASE_ASSERT with CHECK in core/layout/ (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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 public: 204 public:
205 NGLayoutInlineItemRange(Vector<NGLayoutInlineItem>*, 205 NGLayoutInlineItemRange(Vector<NGLayoutInlineItem>*,
206 unsigned start_index, 206 unsigned start_index,
207 unsigned end_index); 207 unsigned end_index);
208 208
209 unsigned StartIndex() const { return start_index_; } 209 unsigned StartIndex() const { return start_index_; }
210 unsigned EndIndex() const { return start_index_ + size_; } 210 unsigned EndIndex() const { return start_index_ + size_; }
211 unsigned Size() const { return size_; } 211 unsigned Size() const { return size_; }
212 212
213 NGLayoutInlineItem& operator[](unsigned index) { 213 NGLayoutInlineItem& operator[](unsigned index) {
214 RELEASE_ASSERT(index < size_); 214 CHECK_LT(index, size_);
215 return start_item_[index]; 215 return start_item_[index];
216 } 216 }
217 const NGLayoutInlineItem& operator[](unsigned index) const { 217 const NGLayoutInlineItem& operator[](unsigned index) const {
218 RELEASE_ASSERT(index < size_); 218 CHECK_LT(index, size_);
219 return start_item_[index]; 219 return start_item_[index];
220 } 220 }
221 221
222 using iterator = NGLayoutInlineItem*; 222 using iterator = NGLayoutInlineItem*;
223 using const_iterator = const NGLayoutInlineItem*; 223 using const_iterator = const NGLayoutInlineItem*;
224 iterator begin() { return start_item_; } 224 iterator begin() { return start_item_; }
225 iterator end() { return start_item_ + size_; } 225 iterator end() { return start_item_ + size_; }
226 const_iterator begin() const { return start_item_; } 226 const_iterator begin() const { return start_item_; }
227 const_iterator end() const { return start_item_ + size_; } 227 const_iterator end() const { return start_item_ + size_; }
228 228
229 private: 229 private:
230 NGLayoutInlineItem* start_item_; 230 NGLayoutInlineItem* start_item_;
231 unsigned size_; 231 unsigned size_;
232 unsigned start_index_; 232 unsigned start_index_;
233 }; 233 };
234 234
235 } // namespace blink 235 } // namespace blink
236 236
237 #endif // NGInlineNode_h 237 #endif // NGInlineNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698