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

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

Issue 2921463004: [LayoutNG] PODify NGLayoutInputNode and sub-classes. (Closed)
Patch Set: new ng-bot expectations Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 NGBreakToken_h 5 #ifndef NGBreakToken_h
6 #define NGBreakToken_h 6 #define NGBreakToken_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_layout_input_node.h" 9 #include "core/layout/ng/ng_layout_input_node.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 30 matching lines...) Expand all
41 bool IsBlockType() const { return Type() == kBlockBreakToken; } 41 bool IsBlockType() const { return Type() == kBlockBreakToken; }
42 bool IsInlineType() const { return Type() == kInlineBreakToken; } 42 bool IsInlineType() const { return Type() == kInlineBreakToken; }
43 43
44 enum NGBreakTokenStatus { kUnfinished, kFinished }; 44 enum NGBreakTokenStatus { kUnfinished, kFinished };
45 45
46 // Whether the layout node cannot produce any more fragments. 46 // Whether the layout node cannot produce any more fragments.
47 bool IsFinished() const { return status_ == kFinished; } 47 bool IsFinished() const { return status_ == kFinished; }
48 48
49 // Returns the node associated with this break token. A break token cannot be 49 // Returns the node associated with this break token. A break token cannot be
50 // used with any other node. 50 // used with any other node.
51 NGLayoutInputNode* InputNode() const { return node_; } 51 NGLayoutInputNode InputNode() const { return node_; }
52 52
53 protected: 53 protected:
54 NGBreakToken(NGBreakTokenType type, 54 NGBreakToken(NGBreakTokenType type,
55 NGBreakTokenStatus status, 55 NGBreakTokenStatus status,
56 NGLayoutInputNode* node) 56 NGLayoutInputNode node)
57 : type_(type), status_(status), node_(node) {} 57 : type_(type), status_(status), node_(node) {}
58 58
59 private: 59 private:
60 unsigned type_ : 1; 60 unsigned type_ : 1;
61 unsigned status_ : 1; 61 unsigned status_ : 1;
62 62
63 Persistent<NGLayoutInputNode> node_; 63 NGLayoutInputNode node_;
64 }; 64 };
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // NGBreakToken_h 68 #endif // NGBreakToken_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698