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

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

Issue 2636353002: [LayoutNG] Remove the state machine from ng_out_of_flow_layout_part. (Closed)
Patch Set: rebase. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
index 90b814d89108fd8c02e014927c877b0a134cb463..fa30ecb68ef53883b001b2d030313d9891707a95 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
@@ -30,41 +30,18 @@ class CORE_EXPORT NGOutOfFlowLayoutPart
public:
NGOutOfFlowLayoutPart(PassRefPtr<const ComputedStyle>, NGLogicalSize);
- // If false, this fragment should be passed up the tree for layout by
- // an ancestor.
- bool StartLayout(NGBlockNode*, const NGStaticPosition&);
- NGLayoutStatus Layout(NGFragment**, NGLogicalOffset*);
+ void Layout(NGBlockNode&, NGStaticPosition, NGFragment**, NGLogicalOffset*);
DECLARE_TRACE();
private:
- bool ComputeInlineSizeEstimate();
- bool ComputeBlockSizeEstimate();
- bool ComputeNodeFragment();
+ NGFragment* GenerateFragment(NGBlockNode& node,
+ const Optional<LayoutUnit>& block_estimate,
+ const NGAbsolutePhysicalPosition node_position);
- bool contains_fixed_;
- bool contains_absolute_;
-
- enum State {
- kComputeInlineEstimate,
- kPartialPosition,
- kComputeBlockEstimate,
- kFullPosition,
- kGenerateFragment,
- kDone
- };
- State state_;
-
- NGStaticPosition static_position_;
- NGLogicalOffset parent_offset_;
- NGPhysicalOffset parent_physical_offset_;
+ NGLogicalOffset parent_border_offset_;
+ NGPhysicalOffset parent_border_physical_offset_;
Member<NGConstraintSpace> parent_space_;
- Member<NGBlockNode> node_;
- Member<NGConstraintSpace> node_space_;
- Member<NGFragment> node_fragment_;
- NGAbsolutePhysicalPosition node_position_;
- Optional<MinAndMaxContentSizes> inline_estimate_;
- Optional<LayoutUnit> block_estimate_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698