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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index c9c4a70c2e97db625bc267c1c139466480fe944b..775a394cb431fde3b0c076334800fab691aac34a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -19,6 +19,7 @@ class NGConstraintSpace;
class NGConstraintSpaceBuilder;
class NGFragment;
class NGFragmentBuilder;
+class NGOutOfFlowLayoutPart;
class NGPhysicalFragmentBase;
// A class for general block layout (e.g. a <div> with no special style).
@@ -46,6 +47,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
// Creates a new constraint space for the current child.
NGConstraintSpace* CreateConstraintSpaceForCurrentChild() const;
void FinishCurrentChildLayout(NGFragmentBase* fragment);
+ bool LayoutOutOfFlowChild();
// Computes collapsed margins for 2 adjoining blocks and updates the resultant
// fragment's MarginStrut if needed.
@@ -102,6 +104,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
kStateInit,
kStatePrepareForChildLayout,
kStateChildLayout,
+ kStateOutOfFlowLayout,
kStateFinalize
};
State state_;
@@ -116,6 +119,11 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
Member<NGConstraintSpace> space_for_current_child_;
Member<NGBlockNode> current_child_;
+ Member<NGOutOfFlowLayoutPart> out_of_flow_layout_;
+ HeapLinkedHashSet<WeakMember<NGBlockNode>> out_of_flow_candidates_;
+ Vector<NGStaticPosition> out_of_flow_candidate_positions_;
+ size_t out_of_flow_candidate_positions_index_;
+
NGBoxStrut border_and_padding_;
LayoutUnit content_size_;
LayoutUnit max_inline_size_;

Powered by Google App Engine
This is Rietveld 408576698