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

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

Issue 2646853006: [LayoutNG] Pull out of flow candidate loop into 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 fa30ecb68ef53883b001b2d030313d9891707a95..fcf647537e5fd03b41b74ec3e7c21ef66150b5d0 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
@@ -19,29 +19,36 @@ namespace blink {
class ComputedStyle;
class NGBlockNode;
class NGFragment;
+class NGFragmentBuilder;
class NGConstraintSpace;
// Helper class for positioning of out-of-flow blocks.
// It should be used together with NGFragmentBuilder.
// See NGFragmentBuilder::AddOutOfFlowChildCandidate documentation
// for example of using these classes together.
-class CORE_EXPORT NGOutOfFlowLayoutPart
- : public GarbageCollectedFinalized<NGOutOfFlowLayoutPart> {
- public:
- NGOutOfFlowLayoutPart(PassRefPtr<const ComputedStyle>, NGLogicalSize);
-
- void Layout(NGBlockNode&, NGStaticPosition, NGFragment**, NGLogicalOffset*);
+class CORE_EXPORT NGOutOfFlowLayoutPart {
+ STACK_ALLOCATED();
- DECLARE_TRACE();
+ public:
+ NGOutOfFlowLayoutPart(const ComputedStyle& container_style,
+ NGFragmentBuilder* container_builder);
+ void Run();
private:
+ NGFragment* LayoutDescendant(NGBlockNode& descendant,
+ NGStaticPosition static_position,
+ NGLogicalOffset* offset);
+
NGFragment* GenerateFragment(NGBlockNode& node,
const Optional<LayoutUnit>& block_estimate,
const NGAbsolutePhysicalPosition node_position);
- NGLogicalOffset parent_border_offset_;
- NGPhysicalOffset parent_border_physical_offset_;
- Member<NGConstraintSpace> parent_space_;
+ const ComputedStyle& container_style_;
+ Member<NGFragmentBuilder> container_builder_;
+
+ NGLogicalOffset container_border_offset_;
+ NGPhysicalOffset container_border_physical_offset_;
+ Member<NGConstraintSpace> container_space_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698