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

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

Issue 2714803002: [LayoutNG] Allow block-flow layout to be fragmented using new approach. (Closed)
Patch Set: spelling. Created 3 years, 9 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NGBlockBreakToken_h 5 #ifndef NGBlockBreakToken_h
6 #define NGBlockBreakToken_h 6 #define NGBlockBreakToken_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_break_token.h" 9 #include "core/layout/ng/ng_break_token.h"
10 #include "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class NGBlockNode; 14 class NGBlockNode;
15 15
16 // Represents a break token for a block node. 16 // Represents a break token for a block node.
17 class CORE_EXPORT NGBlockBreakToken : public NGBreakToken { 17 class CORE_EXPORT NGBlockBreakToken : public NGBreakToken {
18 public: 18 public:
19 // Creates a break token for a node which did fragment, and can potentially 19 // Creates a break token for a node which did fragment, and can potentially
20 // produce more fragments. 20 // produce more fragments.
21 // 21 //
22 // The NGBlockBreakToken takes ownership of child_break_tokens, leaving it 22 // The NGBlockBreakToken takes ownership of child_break_tokens, leaving it
23 // empty for the caller. 23 // empty for the caller.
24 NGBlockBreakToken(NGBlockNode* node, 24 NGBlockBreakToken(NGBlockNode* node,
25 LayoutUnit used_block_size, 25 LayoutUnit used_block_size,
26 HeapVector<Member<NGBreakToken>>& child_break_tokens); 26 HeapVector<Member<NGBreakToken>>& child_break_tokens);
27 27
28 // Creates a break token for a node which cannot produce any more fragments. 28 // Creates a break token for a node which cannot produce any more fragments.
29 explicit NGBlockBreakToken(NGBlockNode* node); 29 explicit NGBlockBreakToken(NGLayoutInputNode* node);
30 30
31 // TODO(ikilpatrick): Remove this constructor and break_offset once we've 31 // TODO(ikilpatrick): Remove this constructor and break_offset once we've
mstensho (USE GERRIT) 2017/02/27 20:28:20 Now is the time, I guess?
ikilpatrick 2017/02/27 20:44:55 Done!
32 // switched to new multi-col approach. 32 // switched to new multi-col approach.
33 NGBlockBreakToken(NGBlockNode* node, LayoutUnit break_offset); 33 NGBlockBreakToken(NGBlockNode* node, LayoutUnit break_offset);
34 34
35 // Represents the amount of block size used in previous fragments. 35 // Represents the amount of block size used in previous fragments.
36 // 36 //
37 // E.g. if the layout block specifies a block size of 200px, and the previous 37 // E.g. if the layout block specifies a block size of 200px, and the previous
38 // fragments of this block used 150px (used block size), the next fragment 38 // fragments of this block used 150px (used block size), the next fragment
39 // should have a size of 50px (assuming no additional fragmentation). 39 // should have a size of 50px (assuming no additional fragmentation).
40 LayoutUnit UsedBlockSize() const { return used_block_size_; } 40 LayoutUnit UsedBlockSize() const { return used_block_size_; }
41 41
(...skipping 25 matching lines...) Expand all
67 67
68 DEFINE_TYPE_CASTS(NGBlockBreakToken, 68 DEFINE_TYPE_CASTS(NGBlockBreakToken,
69 NGBreakToken, 69 NGBreakToken,
70 token, 70 token,
71 token->Type() == NGBreakToken::kBlockBreakToken, 71 token->Type() == NGBreakToken::kBlockBreakToken,
72 token.Type() == NGBreakToken::kBlockBreakToken); 72 token.Type() == NGBreakToken::kBlockBreakToken);
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 #endif // NGBlockBreakToken_h 76 #endif // NGBlockBreakToken_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698