OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NGBoxIterator_h | |
6 #define NGBoxIterator_h | |
7 | |
8 #include "core/layout/LayoutObject.h" | |
9 #include "core/layout/ng/ng_box.h" | |
10 | |
11 namespace blink { | |
12 | |
13 class NGBox; | |
14 | |
15 // NG Box iterator over siblings of the layout object. | |
16 class CORE_EXPORT NGBoxIterator | |
17 : public std::iterator<std::forward_iterator_tag, NGBox> { | |
18 public: | |
19 class iterator { | |
20 public: | |
21 iterator& operator=(const iterator& otherValue); | |
22 iterator(NGBox box) : box_(box) {} | |
23 iterator& operator++(); | |
24 bool operator!=(const iterator& other); | |
25 NGBox operator*(); | |
26 | |
27 private: | |
28 NGBox box_; | |
29 }; | |
30 explicit NGBoxIterator(NGBox); | |
31 | |
32 iterator begin() const; | |
33 iterator end() const { return iterator(NGBox()); } | |
34 | |
35 private: | |
36 NGBox box_; | |
37 }; | |
38 | |
39 } // namespace blink | |
40 #endif // NGBoxIterator_h | |
OLD | NEW |