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

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

Issue 2298613004: [css-align] Check runtime flags for align-items 'auto' value resolution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using Default-Alignment initial value instead of a harcode default value. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 440
441 return CSSReflectValue::create(direction, offset, valueForNinePieceImage(ref lection->mask(), style)); 441 return CSSReflectValue::create(direction, offset, valueForNinePieceImage(ref lection->mask(), style));
442 } 442 }
443 443
444 static CSSValueList* valueForItemPositionWithOverflowAlignment(const StyleSelfAl ignmentData& data) 444 static CSSValueList* valueForItemPositionWithOverflowAlignment(const StyleSelfAl ignmentData& data)
445 { 445 {
446 CSSValueList* result = CSSValueList::createSpaceSeparated(); 446 CSSValueList* result = CSSValueList::createSpaceSeparated();
447 if (data.positionType() == LegacyPosition) 447 if (data.positionType() == LegacyPosition)
448 result->append(*CSSPrimitiveValue::createIdentifier(CSSValueLegacy)); 448 result->append(*CSSPrimitiveValue::createIdentifier(CSSValueLegacy));
449 // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto ' flag to not just mean 'auto' prior to running the StyleAdjuster but also mean 'normal' after running it. 449 // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto ' flag to not just mean 'auto' prior to running the StyleAdjuster but also mean 'normal' after running it.
450 result->append(*CSSPrimitiveValue::create(data.position() == ItemPositionAut o ? ItemPositionNormal : data.position())); 450 result->append(*CSSPrimitiveValue::create(data.position() == ItemPositionAut o ? ComputedStyle::initialDefaultAlignment().position() : data.position()));
451 if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlig nmentDefault) 451 if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlig nmentDefault)
452 result->append(*CSSPrimitiveValue::create(data.overflow())); 452 result->append(*CSSPrimitiveValue::create(data.overflow()));
453 ASSERT(result->length() <= 2); 453 ASSERT(result->length() <= 2);
454 return result; 454 return result;
455 } 455 }
456 456
457 static CSSValueList* valuesForGridShorthand(const StylePropertyShorthand& shorth and, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledN ode, bool allowVisitedStyle) 457 static CSSValueList* valuesForGridShorthand(const StylePropertyShorthand& shorth and, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledN ode, bool allowVisitedStyle)
458 { 458 {
459 CSSValueList* list = CSSValueList::createSlashSeparated(); 459 CSSValueList* list = CSSValueList::createSlashSeparated();
460 for (size_t i = 0; i < shorthand.length(); ++i) { 460 for (size_t i = 0; i < shorthand.length(); ++i) {
(...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 case CSSPropertyAll: 3002 case CSSPropertyAll:
3003 return nullptr; 3003 return nullptr;
3004 default: 3004 default:
3005 break; 3005 break;
3006 } 3006 }
3007 ASSERT_NOT_REACHED(); 3007 ASSERT_NOT_REACHED();
3008 return nullptr; 3008 return nullptr;
3009 } 3009 }
3010 3010
3011 } // namespace blink 3011 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698