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

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

Issue 2400023002: [layoutng] Refactor NGBox::Layout (Closed)
Patch Set: fix compile error Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_box.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698