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

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

Issue 2281153002: [layoutng] async layout part 1: Change the API to support async (Closed)
Patch Set: Created 4 years, 3 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 NGBlockLayoutAlgorithm_h 5 #ifndef NGBlockLayoutAlgorithm_h
6 #define NGBlockLayoutAlgorithm_h 6 #define NGBlockLayoutAlgorithm_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_box.h" 9 #include "core/layout/ng/ng_box.h"
10 #include "core/layout/ng/ng_box_iterator.h" 10 #include "core/layout/ng/ng_box_iterator.h"
(...skipping 13 matching lines...) Expand all
24 // Default constructor. 24 // Default constructor.
25 // @param style Style reference of the block that is being laid out. 25 // @param style Style reference of the block that is being laid out.
26 // @param boxIterator Iterator for the block's children. 26 // @param boxIterator Iterator for the block's children.
27 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBoxIterator); 27 NGBlockLayoutAlgorithm(PassRefPtr<const ComputedStyle>, NGBoxIterator);
28 28
29 // Actual layout implementation. Lays out the children in sequence within the 29 // Actual layout implementation. Lays out the children in sequence within the
30 // constraints given by the NGConstraintSpace. Returns a fragment with the 30 // constraints given by the NGConstraintSpace. Returns a fragment with the
31 // resulting layout information. 31 // resulting layout information.
32 // This function can not be const because for interruptible layout, we have 32 // This function can not be const because for interruptible layout, we have
33 // to be able to store state information. 33 // to be able to store state information.
34 NGFragment* layout(const NGConstraintSpace*) override; 34 // Returns true when done; when this function returns false, it has to be
35 // called again. The out parameter will only be set when this function
36 // returns true. The same constraint space has to be passed each time.
37 bool Layout(const NGConstraintSpace*, NGFragment**) override;
35 38
36 private: 39 private:
37 RefPtr<const ComputedStyle> m_style; 40 RefPtr<const ComputedStyle> style_;
38 NGBoxIterator m_boxIterator; 41 NGBoxIterator box_iterator_;
39 }; 42 };
40 43
41 } // namespace blink 44 } // namespace blink
42 45
43 #endif // NGBlockLayoutAlgorithm_h 46 #endif // NGBlockLayoutAlgorithm_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698