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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2473493003: [css-grid] mimax(auto, <flex>) should be serialized as <flex> (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 return zoomAdjustedPixelValueForLength(trackBreadthLength, style); 858 return zoomAdjustedPixelValueForLength(trackBreadthLength, style);
859 } 859 }
860 860
861 static CSSValue* specifiedValueForGridTrackSize(const GridTrackSize& trackSize, 861 static CSSValue* specifiedValueForGridTrackSize(const GridTrackSize& trackSize,
862 const ComputedStyle& style) { 862 const ComputedStyle& style) {
863 switch (trackSize.type()) { 863 switch (trackSize.type()) {
864 case LengthTrackSizing: 864 case LengthTrackSizing:
865 return specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), 865 return specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(),
866 style); 866 style);
867 case MinMaxTrackSizing: { 867 case MinMaxTrackSizing: {
868 if (trackSize.minTrackBreadth().isAuto() &&
869 trackSize.maxTrackBreadth().isFlex()) {
870 return CSSPrimitiveValue::create(trackSize.maxTrackBreadth().flex(),
871 CSSPrimitiveValue::UnitType::Fraction);
872 }
873
868 auto* minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax); 874 auto* minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax);
869 minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth( 875 minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth(
870 trackSize.minTrackBreadth(), style)); 876 trackSize.minTrackBreadth(), style));
871 minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth( 877 minMaxTrackBreadths->append(*specifiedValueForGridTrackBreadth(
872 trackSize.maxTrackBreadth(), style)); 878 trackSize.maxTrackBreadth(), style));
873 return minMaxTrackBreadths; 879 return minMaxTrackBreadths;
874 } 880 }
875 case FitContentTrackSizing: { 881 case FitContentTrackSizing: {
876 auto* fitContentTrackBreadth = 882 auto* fitContentTrackBreadth =
877 CSSFunctionValue::create(CSSValueFitContent); 883 CSSFunctionValue::create(CSSValueFitContent);
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3613 case CSSPropertyAll: 3619 case CSSPropertyAll:
3614 return nullptr; 3620 return nullptr;
3615 default: 3621 default:
3616 break; 3622 break;
3617 } 3623 }
3618 ASSERT_NOT_REACHED(); 3624 ASSERT_NOT_REACHED();
3619 return nullptr; 3625 return nullptr;
3620 } 3626 }
3621 3627
3622 } // namespace blink 3628 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698