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

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

Issue 2632523002: [LayoutNG] Initial support for multicol, introducing NGBlockBreakToken. (Closed)
Patch Set: Add TODO. Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_block_break_token.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.h b/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.h
new file mode 100644
index 0000000000000000000000000000000000000000..14e50e420e69bd8f0962acad138585c2f6bfdef5
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.h
@@ -0,0 +1,43 @@
+// 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 NGBlockBreakToken_h
+#define NGBlockBreakToken_h
+
+#include "core/layout/ng/ng_break_token.h"
+#include "platform/LayoutUnit.h"
+
+namespace blink {
+
+class NGBlockNode;
+
+class NGBlockBreakToken : public NGBreakToken {
+ public:
+ NGBlockBreakToken(NGBlockNode* node, LayoutUnit break_offset)
+ : NGBreakToken(kBlockBreakToken),
+ node_(node),
+ break_offset_(break_offset) {}
+
+ NGBlockNode& InputNode() const { return *node_.get(); }
+ LayoutUnit BreakOffset() const { return break_offset_; }
+
+ DEFINE_INLINE_VIRTUAL_TRACE() {
+ NGBreakToken::trace(visitor);
+ visitor->trace(node_);
+ }
+
+ private:
+ Member<NGBlockNode> node_;
+ LayoutUnit break_offset_;
+};
+
+DEFINE_TYPE_CASTS(NGBlockBreakToken,
+ NGBreakToken,
+ token,
+ token->Type() == NGBreakToken::kBlockBreakToken,
+ token.Type() == NGBreakToken::kBlockBreakToken);
+
+} // namespace blink
+
+#endif // NGBlockBreakToken_h
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698