Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc

Issue 2706353004: [LayoutNG] Introduce block child iterator. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b9044a51c7db333729b6b5c973b8794ea38a7758
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "core/layout/ng/ng_block_break_token.h"
+
+#include "core/layout/ng/ng_block_node.h"
+
+namespace blink {
+
+NGBlockBreakToken::NGBlockBreakToken(
+ NGBlockNode* node,
+ LayoutUnit used_block_size,
+ HeapVector<Member<NGBreakToken>>& child_break_tokens)
+ : NGBreakToken(kBlockBreakToken, /* is_finished */ false, node),
Gleb Lanbin 2017/02/22 19:24:56 may be use enum instead of boolean NGBlockBreakTok
ikilpatrick 2017/02/22 20:25:27 Done.
+ used_block_size_(used_block_size) {
+ child_break_tokens_.swap(child_break_tokens);
+}
+
+NGBlockBreakToken::NGBlockBreakToken(NGBlockNode* node)
+ : NGBreakToken(kBlockBreakToken, /* is_finished */ true, node) {}
+
+NGBlockBreakToken::NGBlockBreakToken(NGBlockNode* node, LayoutUnit break_offset)
+ : NGBreakToken(kBlockBreakToken, false, node),
+ break_offset_(break_offset) {}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698