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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NGBlockBreakToken_h
6 #define NGBlockBreakToken_h
7
8 #include "core/layout/ng/ng_break_token.h"
9 #include "platform/LayoutUnit.h"
10
11 namespace blink {
12
13 class NGBlockNode;
14
15 class NGBlockBreakToken : public NGBreakToken {
16 public:
17 NGBlockBreakToken(NGBlockNode* node, LayoutUnit break_offset)
18 : NGBreakToken(kBlockBreakToken),
19 node_(node),
20 break_offset_(break_offset) {}
21
22 NGBlockNode& InputNode() const { return *node_.get(); }
23 LayoutUnit BreakOffset() const { return break_offset_; }
24
25 DEFINE_INLINE_VIRTUAL_TRACE() {
26 NGBreakToken::trace(visitor);
27 visitor->trace(node_);
28 }
29
30 private:
31 Member<NGBlockNode> node_;
32 LayoutUnit break_offset_;
33 };
34
35 DEFINE_TYPE_CASTS(NGBlockBreakToken,
36 NGBreakToken,
37 token,
38 token->Type() == NGBreakToken::kBlockBreakToken,
39 token.Type() == NGBreakToken::kBlockBreakToken);
40
41 } // namespace blink
42
43 #endif // NGBlockBreakToken_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698