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 NGBox_h | 5 #ifndef NGBox_h |
6 #define NGBox_h | 6 #define NGBox_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 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 private: | 51 private: |
52 // This is necessary for interop between old and new trees -- after our parent | 52 // This is necessary for interop between old and new trees -- after our parent |
53 // positions us, it calls this function so we can store the position on the | 53 // positions us, it calls this function so we can store the position on the |
54 // underlying LayoutBox. | 54 // underlying LayoutBox. |
55 void PositionUpdated(); | 55 void PositionUpdated(); |
56 | 56 |
57 bool CanUseNewLayout(); | 57 bool CanUseNewLayout(); |
58 | 58 |
| 59 // After we run the layout algorithm, this function copies back the geometry |
| 60 // data to the layout box. |
| 61 void CopyFragmentDataToLayoutBox(const NGConstraintSpace&); |
| 62 |
| 63 // Runs layout on layout_box_ and creates a fragment for the resulting |
| 64 // geometry. |
| 65 NGPhysicalFragment* RunOldLayout(const NGConstraintSpace&); |
| 66 |
59 // We can either wrap a layout_box_ or a style_/next_sibling_/first_child_ | 67 // We can either wrap a layout_box_ or a style_/next_sibling_/first_child_ |
60 // combination. | 68 // combination. |
61 LayoutBox* layout_box_; | 69 LayoutBox* layout_box_; |
62 RefPtr<ComputedStyle> style_; | 70 RefPtr<ComputedStyle> style_; |
63 Member<NGBox> next_sibling_; | 71 Member<NGBox> next_sibling_; |
64 Member<NGBox> first_child_; | 72 Member<NGBox> first_child_; |
65 Member<NGBlockLayoutAlgorithm> algorithm_; | 73 Member<NGBlockLayoutAlgorithm> algorithm_; |
66 Member<NGPhysicalFragment> fragment_; | 74 Member<NGPhysicalFragment> fragment_; |
67 }; | 75 }; |
68 | 76 |
69 } // namespace blink | 77 } // namespace blink |
70 | 78 |
71 #endif // NGBox_h | 79 #endif // NGBox_h |
OLD | NEW |