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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 613273002: [CSS Grid Layout] Stretch value for align and justify properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some layout tests. Created 6 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
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | 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) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return diffPseudoStyles(oldStyle, newStyle); 190 return diffPseudoStyles(oldStyle, newStyle);
191 191
192 if (oldStyle->inheritedNotEqual(newStyle) 192 if (oldStyle->inheritedNotEqual(newStyle)
193 || oldStyle->hasExplicitlyInheritedProperties() 193 || oldStyle->hasExplicitlyInheritedProperties()
194 || newStyle->hasExplicitlyInheritedProperties()) 194 || newStyle->hasExplicitlyInheritedProperties())
195 return Inherit; 195 return Inherit;
196 196
197 return NoInherit; 197 return NoInherit;
198 } 198 }
199 199
200 ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle) 200 ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle, ItemPosition resolvedAutoPositionForRenderer)
201 { 201 {
202 ItemPosition align = childStyle->alignSelf();
203 // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". 202 // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto".
204 if (align == ItemPositionAuto) 203 if (childStyle->alignSelf() == ItemPositionAuto)
205 align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionSt retch : parentStyle->alignItems(); 204 return (parentStyle->alignItems() == ItemPositionAuto) ? resolvedAutoPos itionForRenderer : parentStyle->alignItems();
206 return align; 205 return childStyle->alignSelf();
206 }
207
208 ItemPosition RenderStyle::resolveJustification(const RenderStyle* parentStyle, c onst RenderStyle* childStyle, ItemPosition resolvedAutoPositionForRenderer)
209 {
210 if (childStyle->justifySelf() == ItemPositionAuto)
211 return (parentStyle->justifyItems() == ItemPositionAuto) ? resolvedAutoP ositionForRenderer : parentStyle->justifyItems();
212 return childStyle->justifySelf();
207 } 213 }
208 214
209 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBounda ry isAtShadowBoundary) 215 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBounda ry isAtShadowBoundary)
210 { 216 {
211 if (isAtShadowBoundary == AtShadowBoundary) { 217 if (isAtShadowBoundary == AtShadowBoundary) {
212 // Even if surrounding content is user-editable, shadow DOM should act a s a single unit, and not necessarily be editable 218 // Even if surrounding content is user-editable, shadow DOM should act a s a single unit, and not necessarily be editable
213 EUserModify currentUserModify = userModify(); 219 EUserModify currentUserModify = userModify();
214 rareInheritedData = inheritParent->rareInheritedData; 220 rareInheritedData = inheritParent->rareInheritedData;
215 setUserModify(currentUserModify); 221 setUserModify(currentUserModify);
216 } else 222 } else
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 horizontal || includeLogicalRightEdge); 1760 horizontal || includeLogicalRightEdge);
1755 1761
1756 edges[BSLeft] = BorderEdge(borderLeftWidth(), 1762 edges[BSLeft] = BorderEdge(borderLeftWidth(),
1757 visitedDependentColor(CSSPropertyBorderLeftColor), 1763 visitedDependentColor(CSSPropertyBorderLeftColor),
1758 borderLeftStyle(), 1764 borderLeftStyle(),
1759 borderLeftIsTransparent(), 1765 borderLeftIsTransparent(),
1760 !horizontal || includeLogicalLeftEdge); 1766 !horizontal || includeLogicalLeftEdge);
1761 } 1767 }
1762 1768
1763 } // namespace blink 1769 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698