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

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

Issue 2462153002: [layoutng] Support computing min-content and max-content (Closed)
Patch Set: more review comments Created 4 years, 1 month 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_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
index f3a0c19cd4b74751c7c9ea321eaa15fd87bb018f..d0772d5eab90ac6a4798cb376a90f3aecf0f797d 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_algorithm.h
@@ -33,6 +33,20 @@ class CORE_EXPORT NGLayoutAlgorithm
// returns true.
virtual bool Layout(NGPhysicalFragment**) = 0;
+ enum MinAndMaxState { Success, Pending, NotImplemented };
+
+ // Computes the min-content and max-content intrinsic sizes for the given box.
+ // The result will not take any min-width. max-width or width properties into
+ // account. Implementations can return NotImpplemented in which case the
+ // caller is expected ot synthesize this value from the overflow rect returned
+ // from Layout called with a container width of 0 and LayoutUnit::max(),
+ // respectively.
+ // A Pending return value has the same meaning as a false return from layout,
+ // i.e. it is a request to call this function again.
+ virtual MinAndMaxState ComputeMinAndMaxContentSizes(MinAndMaxContentSizes*) {
+ return NotImplemented;
+ }
+
DEFINE_INLINE_VIRTUAL_TRACE() {}
};
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_box_test.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_units.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698