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

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

Issue 2636353002: [LayoutNG] Remove the state machine from ng_out_of_flow_layout_part. (Closed)
Patch Set: rebase. 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
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 NGBlockNode_h 5 #ifndef NGBlockNode_h
6 #define NGBlockNode_h 6 #define NGBlockNode_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 "core/layout/ng/ng_physical_box_fragment.h" 10 #include "core/layout/ng/ng_physical_box_fragment.h"
(...skipping 17 matching lines...) Expand all
28 28
29 public: 29 public:
30 explicit NGBlockNode(LayoutObject*); 30 explicit NGBlockNode(LayoutObject*);
31 31
32 // TODO(layout-ng): make it private and declare a friend class to use in tests 32 // TODO(layout-ng): make it private and declare a friend class to use in tests
33 explicit NGBlockNode(ComputedStyle*); 33 explicit NGBlockNode(ComputedStyle*);
34 34
35 ~NGBlockNode() override; 35 ~NGBlockNode() override;
36 36
37 bool Layout(NGConstraintSpace*, NGFragment**) override; 37 bool Layout(NGConstraintSpace*, NGFragment**) override;
38 void LayoutSync(NGConstraintSpace*, NGFragment**);
39
38 NGBlockNode* NextSibling() override; 40 NGBlockNode* NextSibling() override;
39 41
40 // Computes the value of min-content and max-content for this box. 42 // Computes the value of min-content and max-content for this box.
41 // The return value has the same meaning as for Layout. 43 // The return value has the same meaning as for Layout.
42 // If the underlying layout algorithm returns NotImplemented from 44 // If the underlying layout algorithm returns NotImplemented from
43 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes 45 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes
44 // using Layout with special constraint spaces. 46 // using Layout with special constraint spaces.
45 // It is not legal to interleave a pending Layout() with a pending 47 // It is not legal to interleave a pending Layout() with a pending
46 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout 48 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout
47 // often enough that it returns true before calling 49 // often enough that it returns true before calling
48 // ComputeOrSynthesizeMinAndMaxContentSizes) 50 // ComputeOrSynthesizeMinAndMaxContentSizes)
49 bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*); 51 bool ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*);
52 MinAndMaxContentSizes ComputeMinAndMaxContentSizesSync();
50 53
51 const ComputedStyle* Style() const; 54 const ComputedStyle* Style() const;
52 ComputedStyle* MutableStyle(); 55 ComputedStyle* MutableStyle();
53 56
54 NGLayoutInputNode* FirstChild(); 57 NGLayoutInputNode* FirstChild();
55 58
56 void SetNextSibling(NGBlockNode*); 59 void SetNextSibling(NGBlockNode*);
57 void SetFirstChild(NGLayoutInputNode*); 60 void SetFirstChild(NGLayoutInputNode*);
58 61
59 void SetFragment(NGPhysicalBoxFragment* fragment) { fragment_ = fragment; } 62 void SetFragment(NGPhysicalBoxFragment* fragment) { fragment_ = fragment; }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 107
105 DEFINE_TYPE_CASTS(NGBlockNode, 108 DEFINE_TYPE_CASTS(NGBlockNode,
106 NGLayoutInputNode, 109 NGLayoutInputNode,
107 node, 110 node,
108 node->Type() == NGLayoutInputNode::kLegacyBlock, 111 node->Type() == NGLayoutInputNode::kLegacyBlock,
109 node.Type() == NGLayoutInputNode::kLegacyBlock); 112 node.Type() == NGLayoutInputNode::kLegacyBlock);
110 113
111 } // namespace blink 114 } // namespace blink
112 115
113 #endif // NGBlockNode 116 #endif // NGBlockNode
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698