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

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

Issue 2714803002: [LayoutNG] Allow block-flow layout to be fragmented using new approach. (Closed)
Patch Set: rebase. 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 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 NGLayoutInputNode_h 5 #ifndef NGLayoutInputNode_h
6 #define NGLayoutInputNode_h 6 #define NGLayoutInputNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutObject; 13 class LayoutObject;
14 class NGBreakToken;
14 class NGConstraintSpace; 15 class NGConstraintSpace;
15 class NGLayoutResult; 16 class NGLayoutResult;
16 17
17 // Represents the input to a layout algorithm for a given node. The layout 18 // Represents the input to a layout algorithm for a given node. The layout
18 // engine should use the style, node type to determine which type of layout 19 // engine should use the style, node type to determine which type of layout
19 // algorithm to use to produce fragments for this node. 20 // algorithm to use to produce fragments for this node.
20 class CORE_EXPORT NGLayoutInputNode 21 class CORE_EXPORT NGLayoutInputNode
21 : public GarbageCollectedFinalized<NGLayoutInputNode> { 22 : public GarbageCollectedFinalized<NGLayoutInputNode> {
22 public: 23 public:
23 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 }; 24 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 };
24 25
25 virtual ~NGLayoutInputNode(){}; 26 virtual ~NGLayoutInputNode(){};
26 27
27 // Performs layout on this input node, will return the layout result. 28 // Performs layout on this input node, will return the layout result.
28 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*) = 0; 29 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*, NGBreakToken*) = 0;
29 30
30 // Returns the next sibling. 31 // Returns the next sibling.
31 virtual NGLayoutInputNode* NextSibling() = 0; 32 virtual NGLayoutInputNode* NextSibling() = 0;
32 33
33 // Returns the LayoutObject which is associated with this node. 34 // Returns the LayoutObject which is associated with this node.
34 virtual LayoutObject* GetLayoutObject() = 0; 35 virtual LayoutObject* GetLayoutObject() = 0;
35 36
36 NGLayoutInputNodeType Type() const { 37 NGLayoutInputNodeType Type() const {
37 return static_cast<NGLayoutInputNodeType>(type_); 38 return static_cast<NGLayoutInputNodeType>(type_);
38 } 39 }
39 40
40 DEFINE_INLINE_VIRTUAL_TRACE() {} 41 DEFINE_INLINE_VIRTUAL_TRACE() {}
41 42
42 protected: 43 protected:
43 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {} 44 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {}
44 45
45 private: 46 private:
46 unsigned type_ : 1; 47 unsigned type_ : 1;
47 }; 48 };
48 49
49 } // namespace blink 50 } // namespace blink
50 51
51 #endif // NGLayoutInputNode_h 52 #endif // NGLayoutInputNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_length_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698