| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 PaintLayerStackingNode* next(); | 64 PaintLayerStackingNode* next(); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 const PaintLayerStackingNode& m_root; | 67 const PaintLayerStackingNode& m_root; |
| 68 unsigned m_remainingChildren; | 68 unsigned m_remainingChildren; |
| 69 unsigned m_index; | 69 unsigned m_index; |
| 70 PaintLayer* m_currentNormalFlowChild; | 70 PaintLayer* m_currentNormalFlowChild; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // This iterator is similar to PaintLayerStackingNodeIterator but it walks the l
ists in reverse order | 73 // This iterator is similar to PaintLayerStackingNodeIterator but it walks the |
| 74 // (from the last item to the first one). | 74 // lists in reverse order (from the last item to the first one). |
| 75 class PaintLayerStackingNodeReverseIterator { | 75 class PaintLayerStackingNodeReverseIterator { |
| 76 STACK_ALLOCATED(); | 76 STACK_ALLOCATED(); |
| 77 WTF_MAKE_NONCOPYABLE(PaintLayerStackingNodeReverseIterator); | 77 WTF_MAKE_NONCOPYABLE(PaintLayerStackingNodeReverseIterator); |
| 78 | 78 |
| 79 public: | 79 public: |
| 80 PaintLayerStackingNodeReverseIterator(const PaintLayerStackingNode& root, | 80 PaintLayerStackingNodeReverseIterator(const PaintLayerStackingNode& root, |
| 81 unsigned whichChildren) | 81 unsigned whichChildren) |
| 82 : m_root(root), m_remainingChildren(whichChildren) { | 82 : m_root(root), m_remainingChildren(whichChildren) { |
| 83 setIndexToLastItem(); | 83 setIndexToLastItem(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 PaintLayerStackingNode* next(); | 86 PaintLayerStackingNode* next(); |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 void setIndexToLastItem(); | 89 void setIndexToLastItem(); |
| 90 | 90 |
| 91 const PaintLayerStackingNode& m_root; | 91 const PaintLayerStackingNode& m_root; |
| 92 unsigned m_remainingChildren; | 92 unsigned m_remainingChildren; |
| 93 int m_index; | 93 int m_index; |
| 94 PaintLayer* m_currentNormalFlowChild; | 94 PaintLayer* m_currentNormalFlowChild; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| 98 | 98 |
| 99 #endif // PaintLayerStackingNodeIterator_h | 99 #endif // PaintLayerStackingNodeIterator_h |
| OLD | NEW |