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

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

Issue 2583033004: [layoutng] Implement support for width: {min,max,fit}-content (Closed)
Patch Set: test 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9ea2ca1617bdcb4cac5f24e0da420b59904a1a4e 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
@@ -36,6 +36,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
NGConstraintSpace* space,
NGBreakToken* break_token = nullptr);
+ MinAndMaxState ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) override;
NGLayoutStatus Layout(NGPhysicalFragmentBase*,
NGPhysicalFragmentBase**,
NGLayoutAlgorithm**) override;
@@ -98,13 +99,14 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
const ComputedStyle& Style() const { return *style_; }
- enum State {
+ enum LayoutState {
kStateInit,
kStatePrepareForChildLayout,
kStateChildLayout,
kStateFinalize
};
- State state_;
+ LayoutState layout_state_;
+ LayoutState compute_minmax_state_;
RefPtr<const ComputedStyle> style_;
@@ -115,6 +117,8 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
Member<NGConstraintSpaceBuilder> space_builder_;
Member<NGConstraintSpace> space_for_current_child_;
Member<NGBlockNode> current_child_;
+ Member<NGBlockNode> current_minmax_child_;
+ MinAndMaxContentSizes pending_minmax_sizes_;
NGBoxStrut border_and_padding_;
LayoutUnit content_size_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698