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

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

Issue 2568743005: Place the out of flow positioned blocks (Closed)
Patch Set: Out of flow positioning: placing the elements Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NGOutOfFlowLayoutPart_h
6 #define NGOutOfFlowLayoutPart_h
7
8 #include "core/CoreExport.h"
9
10 #include "core/layout/ng/ng_units.h"
11 #include "core/layout/ng/ng_constraint_space.h"
12 #include "core/layout/ng/ng_absolute_utils.h"
13 #include "platform/heap/Handle.h"
14 #include "wtf/Optional.h"
15
16 namespace blink {
17
18 class ComputedStyle;
19 class NGBlockNode;
20 class NGFragmentBase;
21 class NGConstraintSpace;
22
23 class CORE_EXPORT NGOutOfFlowLayoutPart
cbiesinger 2016/12/21 21:38:50 Can you add a comment to this class in general des
atotic 2016/12/28 19:36:46 done. Added comment, and modifed sample code in N
24 : public GarbageCollectedFinalized<NGOutOfFlowLayoutPart> {
25 public:
26 NGOutOfFlowLayoutPart(PassRefPtr<const ComputedStyle>, NGLogicalSize);
27
28 // @return true if layout can be performed.
cbiesinger 2016/12/21 21:38:50 Add something like: "If false, this fragment shoul
atotic 2016/12/28 19:36:46 done
29 bool StartLayout(NGBlockNode*, const NGStaticPosition&);
30 // @return true if layout is complete.
31 bool Layout(NGFragmentBase**, NGLogicalOffset*);
cbiesinger 2016/12/21 21:38:50 Here too consider using NGLayoutStatus
atotic 2016/12/28 19:36:46 done
32
33 DECLARE_TRACE();
34
35 private:
36 bool ComputeInlineSizeEstimate();
37 bool ComputeBlockSizeEstimate();
38 bool ComputeNodeFragment();
39
40 bool contains_fixed_;
41 bool contains_absolute_;
42
43 enum State {
44 kComputeInlineEstimate,
45 kPartialPosition,
46 kComputeBlockEstimate,
47 kFullPosition,
48 kGenerateFragment,
49 kDone
50 };
51 State state_;
52
53 NGStaticPosition static_position_;
54 NGLogicalOffset parent_offset_;
55 NGPhysicalOffset parent_physical_offset_;
56 Member<NGConstraintSpace> parent_space_;
57 Member<NGBlockNode> node_;
58 Member<NGConstraintSpace> node_space_;
59 Member<NGFragmentBase> node_fragment_;
60 NGAbsolutePhysicalPosition node_position_;
61 Optional<LayoutUnit> inline_estimate_;
62 Optional<LayoutUnit> block_estimate_;
63 };
64
65 } // namespace blink
66
67 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698