OLD | NEW |
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 NGOutOfFlowLayoutPart_h | 5 #ifndef NGOutOfFlowLayoutPart_h |
6 #define NGOutOfFlowLayoutPart_h | 6 #define NGOutOfFlowLayoutPart_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 | 9 |
10 #include "core/layout/ng/ng_absolute_utils.h" | 10 #include "core/layout/ng/ng_absolute_utils.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class NGLayoutResult; | 23 class NGLayoutResult; |
24 | 24 |
25 // Helper class for positioning of out-of-flow blocks. | 25 // Helper class for positioning of out-of-flow blocks. |
26 // It should be used together with NGFragmentBuilder. | 26 // It should be used together with NGFragmentBuilder. |
27 // See NGFragmentBuilder::AddOutOfFlowChildCandidate documentation | 27 // See NGFragmentBuilder::AddOutOfFlowChildCandidate documentation |
28 // for example of using these classes together. | 28 // for example of using these classes together. |
29 class CORE_EXPORT NGOutOfFlowLayoutPart { | 29 class CORE_EXPORT NGOutOfFlowLayoutPart { |
30 STACK_ALLOCATED(); | 30 STACK_ALLOCATED(); |
31 | 31 |
32 public: | 32 public: |
33 NGOutOfFlowLayoutPart(const ComputedStyle& container_style, | 33 NGOutOfFlowLayoutPart(const NGConstraintSpace& contianer_space, |
| 34 const ComputedStyle& container_style, |
34 NGFragmentBuilder* container_builder); | 35 NGFragmentBuilder* container_builder); |
35 void Run(); | 36 void Run(); |
36 | 37 |
37 private: | 38 private: |
38 RefPtr<NGLayoutResult> LayoutDescendant(NGBlockNode& descendant, | 39 RefPtr<NGLayoutResult> LayoutDescendant(NGBlockNode& descendant, |
39 NGStaticPosition static_position, | 40 NGStaticPosition static_position, |
40 NGLogicalOffset* offset); | 41 NGLogicalOffset* offset); |
41 | 42 |
42 RefPtr<NGLayoutResult> GenerateFragment( | 43 RefPtr<NGLayoutResult> GenerateFragment( |
43 NGBlockNode& node, | 44 NGBlockNode& node, |
44 const Optional<LayoutUnit>& block_estimate, | 45 const Optional<LayoutUnit>& block_estimate, |
45 const NGAbsolutePhysicalPosition node_position); | 46 const NGAbsolutePhysicalPosition node_position); |
46 | 47 |
47 const ComputedStyle& container_style_; | 48 const ComputedStyle& container_style_; |
48 NGFragmentBuilder* container_builder_; | 49 NGFragmentBuilder* container_builder_; |
49 | 50 |
50 NGLogicalOffset container_border_offset_; | 51 NGLogicalOffset container_border_offset_; |
51 NGPhysicalOffset container_border_physical_offset_; | 52 NGPhysicalOffset container_border_physical_offset_; |
52 Member<NGConstraintSpace> container_space_; | 53 Member<NGConstraintSpace> container_space_; |
53 }; | 54 }; |
54 | 55 |
55 } // namespace blink | 56 } // namespace blink |
56 | 57 |
57 #endif | 58 #endif |
OLD | NEW |