Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h b/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3dec05f01552f1a7f6adea9716b5333f45752341 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NGBlockChildIterator_h |
| +#define NGBlockChildIterator_h |
| + |
| +#include "core/CoreExport.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class NGLayoutInputNode; |
| +class NGBreakToken; |
| +class NGBlockBreakToken; |
| + |
| +// A utility class for block-flow layout which given the first child and a |
| +// break token will iterator through unfinished children. |
|
atotic
2017/02/22 05:45:07
s/iterator/iterate ?
As a user of iterator API, I
ikilpatrick
2017/02/22 18:47:19
Done?
|
| +class CORE_EXPORT NGBlockChildIterator { |
| + public: |
| + NGBlockChildIterator(NGLayoutInputNode* first_child, |
| + NGBlockBreakToken* break_token); |
| + |
| + // Returns the next input node which should be laid out, along with its |
| + // respective break token. |
| + std::pair<NGLayoutInputNode*, NGBreakToken*> NextChild(); |
| + |
| + private: |
| + Persistent<NGLayoutInputNode> child_; |
| + Persistent<NGBlockBreakToken> break_token_; |
| + |
| + size_t child_token_idx_; |
|
mstensho (USE GERRIT)
2017/02/22 13:11:31
Please document what this is.
ikilpatrick
2017/02/22 18:47:19
Done.
|
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // NGBlockChildIterator_h |