| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef OrderIterator_h | 31 #ifndef OrderIterator_h |
| 32 #define OrderIterator_h | 32 #define OrderIterator_h |
| 33 | 33 |
| 34 #include "wtf/Noncopyable.h" | 34 #include "wtf/Noncopyable.h" |
| 35 | 35 |
| 36 #include <set> | 36 #include <set> |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class RenderBox; | 40 class LayoutBox; |
| 41 | 41 |
| 42 class OrderIterator { | 42 class OrderIterator { |
| 43 WTF_MAKE_NONCOPYABLE(OrderIterator); | 43 WTF_MAKE_NONCOPYABLE(OrderIterator); |
| 44 public: | 44 public: |
| 45 friend class OrderIteratorPopulator; | 45 friend class OrderIteratorPopulator; |
| 46 | 46 |
| 47 OrderIterator(const RenderBox*); | 47 OrderIterator(const LayoutBox*); |
| 48 | 48 |
| 49 RenderBox* currentChild() const { return m_currentChild; } | 49 LayoutBox* currentChild() const { return m_currentChild; } |
| 50 RenderBox* first(); | 50 LayoutBox* first(); |
| 51 RenderBox* next(); | 51 LayoutBox* next(); |
| 52 void reset(); | 52 void reset(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 const RenderBox* m_containerBox; | 55 const LayoutBox* m_containerBox; |
| 56 | 56 |
| 57 RenderBox* m_currentChild; | 57 LayoutBox* m_currentChild; |
| 58 | 58 |
| 59 typedef std::set<int> OrderValues; | 59 typedef std::set<int> OrderValues; |
| 60 OrderValues m_orderValues; | 60 OrderValues m_orderValues; |
| 61 OrderValues::const_iterator m_orderValuesIterator; | 61 OrderValues::const_iterator m_orderValuesIterator; |
| 62 bool m_isReset; | 62 bool m_isReset; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 class OrderIteratorPopulator { | 65 class OrderIteratorPopulator { |
| 66 public: | 66 public: |
| 67 explicit OrderIteratorPopulator(OrderIterator& iterator) | 67 explicit OrderIteratorPopulator(OrderIterator& iterator) |
| 68 : m_iterator(iterator) | 68 : m_iterator(iterator) |
| 69 { | 69 { |
| 70 m_iterator.m_orderValues.clear(); | 70 m_iterator.m_orderValues.clear(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 ~OrderIteratorPopulator(); | 73 ~OrderIteratorPopulator(); |
| 74 | 74 |
| 75 void collectChild(const RenderBox*); | 75 void collectChild(const LayoutBox*); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 OrderIterator& m_iterator; | 78 OrderIterator& m_iterator; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| 82 | 82 |
| 83 #endif // OrderIterator_h | 83 #endif // OrderIterator_h |
| OLD | NEW |