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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2287113004: [css-grid] Implement fit-content track size (Closed)
Patch Set: Patch for landing Created 4 years, 4 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/css/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index ef1ab3cf7ccbbe200a8d81e6721fd1ec322a133f..bb03aff4a4b11e38d13b7b0e296b821ca1bd7f7b 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -720,11 +720,16 @@ static CSSValue* specifiedValueForGridTrackSize(const GridTrackSize& trackSize,
switch (trackSize.type()) {
case LengthTrackSizing:
return specifiedValueForGridTrackBreadth(trackSize.length(), style);
- case MinMaxTrackSizing:
- CSSFunctionValue* minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax);
+ case MinMaxTrackSizing: {
+ auto* minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax);
minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
return minMaxTrackBreadths;
+ } case FitContentTrackSizing: {
+ auto* fitContentTrackBreadth = CSSFunctionValue::create(CSSValueFitContent);
+ fitContentTrackBreadth->append(*specifiedValueForGridTrackBreadth(trackSize.length(), style));
+ return fitContentTrackBreadth;
+ }
}
ASSERT_NOT_REACHED();
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698