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 |
| 10 namespace blink { |
| 11 |
| 12 class NGBox; |
| 13 |
| 14 // NG Box iterator over siblings of the layout object. |
| 15 class CORE_EXPORT NGBoxIterator |
| 16 : public std::iterator<std::forward_iterator_tag, NGBox> { |
| 17 public: |
| 18 class iterator { |
| 19 public: |
| 20 iterator& operator=(const iterator& otherValue); |
| 21 iterator(LayoutObject* layoutObject) : m_layoutObject(layoutObject) {} |
| 22 iterator& operator++(); |
| 23 bool operator!=(const iterator& other); |
| 24 NGBox operator*(); |
| 25 |
| 26 private: |
| 27 LayoutObject* m_layoutObject; |
| 28 }; |
| 29 explicit NGBoxIterator(LayoutObject*); |
| 30 |
| 31 iterator begin() const; |
| 32 iterator end() const { return iterator(nullptr); } |
| 33 |
| 34 private: |
| 35 LayoutObject* m_layoutObject; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 #endif // NGBoxIterator_h |
OLD | NEW |