Changeset 183805 in webkit
- Timestamp:
- May 5, 2015 8:15:38 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r183803 r183805 1 2015-05-05 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec 4 https://bugs.webkit.org/show_bug.cgi?id=144443 5 6 Reviewed by Darin Adler. 7 8 Tests to verify the align-content parsing logic. The new Box Alignment spec 9 requires some changes in the flexbox tests. 10 11 * css3/flexbox/css-properties-expected.txt: 12 * css3/flexbox/css-properties.html: 13 * css3/parse-align-content-expected.txt: Added. 14 * css3/parse-align-content.html: Added. 15 1 16 2015-05-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr> 2 17 -
trunk/LayoutTests/css3/flexbox/css-properties-expected.txt
r182147 r183805 17 17 PASS flexitem.style.webkitOrder is "" 18 18 PASS flexbox.style.webkitJustifyContent is "" 19 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is " flex-start"19 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "stretch" 20 20 PASS flexbox.style.webkitJustifyContent is "" 21 21 PASS flexbox.style.webkitJustifyContent is "flex-start" … … 28 28 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "space-between" 29 29 PASS flexbox.style.webkitJustifyContent is "" 30 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is " flex-start"30 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "stretch" 31 31 PASS flexbox.style.webkitAlignSelf is "" 32 32 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start" -
trunk/LayoutTests/css3/flexbox/css-properties.html
r183748 r183805 55 55 56 56 shouldBeEqualToString('flexbox.style.webkitJustifyContent', ''); 57 // The initial value is ' flex-start'.58 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', ' flex-start');57 // The initial value is 'auto' which, will be resolve to 'stretch' for flexbox containes (behaving like 'flex-start' for the justify-content property). 58 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', 'stretch'); 59 59 60 60 flexbox.style.webkitJustifyContent = 'foo'; … … 79 79 flexbox.style.webkitJustifyContent = ''; 80 80 shouldBeEqualToString('flexbox.style.webkitJustifyContent', ''); 81 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', ' flex-start');81 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', 'stretch'); 82 82 83 83 shouldBeEqualToString('flexbox.style.webkitAlignSelf', ''); … … 278 278 shouldBeFalse('foundFlexFlow'); 279 279 280 flexbox.style.display = '-webkit-flex'; 281 280 282 // The initial value is 'stretch'. 281 283 shouldBeEqualToString('flexbox.style.webkitAlignContent', ''); -
trunk/LayoutTests/css3/parse-justify-content-expected.txt
r183748 r183805 56 56 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is "start" 57 57 PASS element.style.justifyContent is "auto" 58 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is " flex-start"58 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is "stretch" 59 59 PASS element.style.justifyContent is "auto" 60 60 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is "start" … … 122 122 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is "right true" 123 123 PASS element.style.justifyContent is "initial" 124 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is " flex-start"124 PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is "stretch" 125 125 126 126 Test the value 'inherit' -
trunk/LayoutTests/css3/parse-justify-content.html
r183748 r183805 295 295 element.style.display = "-webkit-flex"; 296 296 element.style.justifyContent = "auto"; 297 checkValues(element, "justifyContent", "justify-content", "auto", " flex-start");297 checkValues(element, "justifyContent", "justify-content", "auto", "stretch"); 298 298 299 299 element.style.display = "-webkit-grid"; … … 344 344 debug("Test the value 'initial' for flex containers"); 345 345 element.style.display = "-webkit-flex"; 346 checkInitialValues(element, "justifyContent", "justify-content", "right true", " flex-start");346 checkInitialValues(element, "justifyContent", "justify-content", "right true", "stretch"); 347 347 348 348 debug(""); -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r183748 r183805 147 147 column-span: none; 148 148 column-width: auto; 149 align-content: st retch;149 align-content: start; 150 150 align-items: start; 151 151 align-self: start; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r183748 r183805 146 146 column-span: none 147 147 column-width: auto 148 align-content: stretch148 align-content: auto 149 149 align-items: auto 150 150 align-self: auto -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r183748 r183805 291 291 rect: style.getPropertyValue(column-width) : auto 292 292 rect: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue] 293 rect: style.getPropertyValue(align-content) : st retch294 rect: style.getPropertyCSSValue(align-content) : [object CSS PrimitiveValue]293 rect: style.getPropertyValue(align-content) : start 294 rect: style.getPropertyCSSValue(align-content) : [object CSSValueList] 295 295 rect: style.getPropertyValue(align-items) : start 296 296 rect: style.getPropertyCSSValue(align-items) : [object CSSValueList] … … 809 809 g: style.getPropertyValue(column-width) : auto 810 810 g: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue] 811 g: style.getPropertyValue(align-content) : st retch812 g: style.getPropertyCSSValue(align-content) : [object CSS PrimitiveValue]811 g: style.getPropertyValue(align-content) : start 812 g: style.getPropertyCSSValue(align-content) : [object CSSValueList] 813 813 g: style.getPropertyValue(align-items) : start 814 814 g: style.getPropertyCSSValue(align-items) : [object CSSValueList] -
trunk/Source/WebCore/ChangeLog
r183803 r183805 1 2015-05-05 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec 4 https://bugs.webkit.org/show_bug.cgi?id=144443 5 6 Reviewed by Darin Adler. 7 8 Upgrade the align-content property to the last CSS3 Box 9 Alignment specification. As it uses a different enumeration for 10 Positional and Distribution alignment, it implies some changes in 11 the FlexibleBox implementation. 12 13 Test: css3/parse-align-content.html 14 15 * css/CSSComputedStyleDeclaration.cpp: 16 (WebCore::resolveContentAlignmentAuto): 17 (WebCore::ComputedStyleExtractor::propertyValue): 18 * css/CSSParser.cpp: 19 (WebCore::isValidKeywordPropertyAndValue): 20 (WebCore::isKeywordPropertyID): 21 (WebCore::CSSParser::parseValue): 22 * css/CSSPropertyNames.in: 23 * rendering/RenderFlexibleBox.cpp: 24 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): 25 (WebCore::RenderFlexibleBox::layoutColumnReverse): 26 (WebCore::initialAlignContentOffset): 27 (WebCore::alignContentSpaceBetweenChildren): 28 (WebCore::RenderFlexibleBox::alignFlexLines): 29 * rendering/style/RenderStyle.cpp: 30 (WebCore::RenderStyle::resolveContentAlignment): 31 (WebCore::RenderStyle::resolveContentJustification): 32 * rendering/style/RenderStyle.h: 33 * rendering/style/StyleRareNonInheritedData.cpp: 34 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 35 (WebCore::StyleRareNonInheritedData::operator==): 36 * rendering/style/StyleRareNonInheritedData.h: 37 1 38 2015-05-05 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr> 2 39 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r183748 r183805 1734 1734 } 1735 1735 1736 static ContentPosition resolveContentAlignmentAuto(ContentPosition position, ContentDistributionTypedistribution, RenderObject* element)1736 static void resolveContentAlignmentAuto(ContentPosition& position, ContentDistributionType& distribution, RenderObject* element) 1737 1737 { 1738 1738 if (position != ContentPositionAuto || distribution != ContentDistributionDefault || !element) 1739 return position; 1740 1741 return element->style().isDisplayFlexibleBox() ? ContentPositionFlexStart : ContentPositionStart; 1739 return; 1740 1741 // Even that both align-content and justify-content 'auto' values are resolved to 'stretch' 1742 // in case of flexbox containers, 'stretch' value in justify-content will behave like 'flex-start'. 1743 if (element->style().isDisplayFlexibleBox()) 1744 distribution = ContentDistributionStretch; 1745 else 1746 position = ContentPositionStart; 1742 1747 } 1743 1748 … … 2208 2213 case CSSPropertyEmptyCells: 2209 2214 return cssValuePool().createValue(style->emptyCells()); 2210 case CSSPropertyAlignContent: 2211 return cssValuePool().createValue(style->alignContent()); 2215 case CSSPropertyAlignContent: { 2216 ContentPosition position = style->alignContentPosition(); 2217 ContentDistributionType distribution = style->alignContentDistribution(); 2218 resolveContentAlignmentAuto(position, distribution, renderer); 2219 return valueForContentPositionAndDistributionWithOverflowAlignment(position, distribution, style->alignContentOverflowAlignment()); 2220 } 2212 2221 case CSSPropertyAlignItems: 2213 2222 return valueForItemPositionWithOverflowAlignment(resolveContainerAlignmentAuto(style->alignItemsPosition(), renderer), style->alignItemsOverflowAlignment(), NonLegacyPosition); … … 2231 2240 case CSSPropertyFlexWrap: 2232 2241 return cssValuePool().createValue(style->flexWrap()); 2233 case CSSPropertyJustifyContent: 2234 return valueForContentPositionAndDistributionWithOverflowAlignment(resolveContentAlignmentAuto(style->justifyContentPosition(), style->justifyContentDistribution(), renderer), style->justifyContentDistribution(), style->justifyContentOverflowAlignment()); 2242 case CSSPropertyJustifyContent: { 2243 ContentPosition position = style->justifyContentPosition(); 2244 ContentDistributionType distribution = style->justifyContentDistribution(); 2245 resolveContentAlignmentAuto(position, distribution, renderer); 2246 return valueForContentPositionAndDistributionWithOverflowAlignment(position, distribution, style->justifyContentOverflowAlignment()); 2247 } 2235 2248 case CSSPropertyJustifyItems: 2236 2249 return valueForItemPositionWithOverflowAlignment(resolveContainerAlignmentAuto(style->justifyItemsPosition(), renderer), style->justifyItemsOverflowAlignment(), style->justifyItemsPositionType()); -
trunk/Source/WebCore/css/CSSParser.cpp
r183765 r183805 881 881 return true; 882 882 break; 883 case CSSPropertyAlignContent:884 // FIXME: Per CSS alignment, this property should accept an optional <overflow-position>. We should share this parsing code with 'justify-self'.885 if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround || valueID == CSSValueStretch)886 return true;887 break;888 883 case CSSPropertyFlexDirection: 889 884 if (valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse) … … 1122 1117 case CSSPropertyColumnFill: 1123 1118 case CSSPropertyColumnRuleStyle: 1124 case CSSPropertyAlignContent:1125 1119 case CSSPropertyFlexDirection: 1126 1120 case CSSPropertyFlexWrap: … … 3044 3038 break; 3045 3039 #endif 3040 case CSSPropertyAlignContent: 3041 parsedValue = parseContentDistributionOverflowPosition(); 3042 break; 3046 3043 case CSSPropertyAlignSelf: 3047 3044 return parseItemPositionOverflowPosition(propId, important); … … 3109 3106 case CSSPropertyColumnFill: 3110 3107 case CSSPropertyColumnRuleStyle: 3111 case CSSPropertyAlignContent:3112 3108 case CSSPropertyFlexDirection: 3113 3109 case CSSPropertyFlexWrap: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r183748 r183805 454 454 #endif 455 455 -webkit-filter [ConditionalConverter=FilterOperations] 456 align-content 456 align-content [Initial=initialContentAlignment, Converter=ContentAlignmentData] 457 457 -webkit-align-content = align-content 458 458 align-items [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData] -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r183748 r183805 1058 1058 ASSERT(childSizes.size() == children.size()); 1059 1059 1060 ContentPosition position = style().justifyContentPosition(); 1061 ContentDistributionType distribution = style().justifyContentDistribution(); 1062 RenderStyle::resolveContentJustification(style(), position); 1063 1060 1064 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(children); 1061 1065 LayoutUnit autoMarginOffset = autoMarginOffsetInMainAxis(children, availableFreeSpace); 1062 1066 LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart(); 1063 mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, style().justifyContentPosition(), style().justifyContentDistribution(), numberOfChildrenForJustifyContent);1067 mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, position, distribution, numberOfChildrenForJustifyContent); 1064 1068 if (style().flexDirection() == FlowRowReverse) 1065 1069 mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); … … 1118 1122 ++seenInFlowPositionedChildren; 1119 1123 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) 1120 mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContentDistribution(), numberOfChildrenForJustifyContent);1124 mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSpace, distribution, numberOfChildrenForJustifyContent); 1121 1125 } 1122 1126 … … 1139 1143 void RenderFlexibleBox::layoutColumnReverse(const OrderedFlexItemList& children, LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace) 1140 1144 { 1145 ContentPosition position = style().justifyContentPosition(); 1146 ContentDistributionType distribution = style().justifyContentDistribution(); 1147 RenderStyle::resolveContentJustification(style(), position); 1148 1141 1149 // This is similar to the logic in layoutAndPlaceChildren, except we place the children 1142 1150 // starting from the end of the flexbox. We also don't need to layout anything since we're … … 1144 1152 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(children); 1145 1153 LayoutUnit mainAxisOffset = logicalHeight() - flowAwareBorderEnd() - flowAwarePaddingEnd(); 1146 mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, style().justifyContentPosition(), style().justifyContentDistribution(), numberOfChildrenForJustifyContent);1154 mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, position, distribution, numberOfChildrenForJustifyContent); 1147 1155 mainAxisOffset -= isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); 1148 1156 … … 1162 1170 ++seenInFlowPositionedChildren; 1163 1171 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) 1164 mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContentDistribution(), numberOfChildrenForJustifyContent);1165 } 1166 } 1167 1168 static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, EAlignContent alignContent, unsigned numberOfLines)1169 { 1170 if (alignContent == AlignContentFlexEnd)1172 mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSpace, distribution, numberOfChildrenForJustifyContent); 1173 } 1174 } 1175 1176 static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, ContentPosition alignContent, ContentDistributionType alignContentDistribution, unsigned numberOfLines) 1177 { 1178 if (alignContent == ContentPositionFlexEnd) 1171 1179 return availableFreeSpace; 1172 if (alignContent == AlignContentCenter)1180 if (alignContent == ContentPositionCenter) 1173 1181 return availableFreeSpace / 2; 1174 if (alignContent == AlignContentSpaceAround) {1182 if (alignContentDistribution == ContentDistributionSpaceAround) { 1175 1183 if (availableFreeSpace > 0 && numberOfLines) 1176 1184 return availableFreeSpace / (2 * numberOfLines); … … 1181 1189 } 1182 1190 1183 static LayoutUnit alignContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, EAlignContent alignContent, unsigned numberOfLines)1191 static LayoutUnit alignContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistributionType alignContentDistribution, unsigned numberOfLines) 1184 1192 { 1185 1193 if (availableFreeSpace > 0 && numberOfLines > 1) { 1186 if (alignContent == AlignContentSpaceBetween)1194 if (alignContentDistribution == ContentDistributionSpaceBetween) 1187 1195 return availableFreeSpace / (numberOfLines - 1); 1188 if (alignContent == AlignContentSpaceAround || alignContent == AlignContentStretch)1196 if (alignContentDistribution == ContentDistributionSpaceAround || alignContentDistribution == ContentDistributionStretch) 1189 1197 return availableFreeSpace / numberOfLines; 1190 1198 } … … 1194 1202 void RenderFlexibleBox::alignFlexLines(Vector<LineContext>& lineContexts) 1195 1203 { 1196 if (!isMultiline() || style().alignContent() == AlignContentFlexStart) 1204 ContentPosition position = style().alignContentPosition(); 1205 ContentDistributionType distribution = style().alignContentDistribution(); 1206 RenderStyle::resolveContentAlignment(style(), position, distribution); 1207 1208 if (!isMultiline() || position == ContentPositionFlexStart) 1197 1209 return; 1198 1210 … … 1202 1214 1203 1215 RenderBox* child = m_orderIterator.first(); 1204 LayoutUnit lineOffset = initialAlignContentOffset(availableCrossAxisSpace, style().alignContent(), lineContexts.size());1216 LayoutUnit lineOffset = initialAlignContentOffset(availableCrossAxisSpace, position, distribution, lineContexts.size()); 1205 1217 for (unsigned lineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber) { 1206 1218 lineContexts[lineNumber].crossAxisOffset += lineOffset; … … 1208 1220 adjustAlignmentForChild(*child, lineOffset); 1209 1221 1210 if ( style().alignContent() == AlignContentStretch && availableCrossAxisSpace > 0)1222 if (distribution == ContentDistributionStretch && availableCrossAxisSpace > 0) 1211 1223 lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace / static_cast<unsigned>(lineContexts.size()); 1212 1224 1213 lineOffset += alignContentSpaceBetweenChildren(availableCrossAxisSpace, style().alignContent(), lineContexts.size());1225 lineOffset += alignContentSpaceBetweenChildren(availableCrossAxisSpace, distribution, lineContexts.size()); 1214 1226 } 1215 1227 } -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r183660 r183805 209 209 } 210 210 211 void RenderStyle::resolveContentAlignment(const RenderStyle& style, ContentPosition& position, ContentDistributionType& distribution) 212 { 213 if (position != ContentPositionAuto || distribution != ContentDistributionDefault) 214 return; 215 216 if (style.isDisplayFlexibleBox()) 217 distribution = ContentDistributionStretch; 218 else 219 position = ContentPositionStart; 220 } 221 222 void RenderStyle::resolveContentJustification(const RenderStyle& style, ContentPosition& position) 223 { 224 if (position != ContentPositionAuto || style.justifyContentDistribution() != ContentDistributionDefault) 225 return; 226 227 if (style.isDisplayFlexibleBox()) 228 position = ContentPositionFlexStart; 229 else 230 position = ContentPositionStart; 231 } 232 211 233 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary isAtShadowBoundary) 212 234 { -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r183748 r183805 492 492 static Ref<RenderStyle> createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle); 493 493 494 static void resolveContentAlignment(const RenderStyle&, ContentPosition&, ContentDistributionType&); 495 static void resolveContentJustification(const RenderStyle&, ContentPosition&); 494 496 static ItemPosition resolveAlignment(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer); 495 497 static OverflowAlignment resolveAlignmentOverflow(const RenderStyle& parentStyle, const RenderStyle& childStyle); … … 912 914 float flexShrink() const { return rareNonInheritedData->m_flexibleBox->m_flexShrink; } 913 915 const Length& flexBasis() const { return rareNonInheritedData->m_flexibleBox->m_flexBasis; } 914 EAlignContent alignContent() const { return static_cast<EAlignContent>(rareNonInheritedData->m_alignContent); } 916 const StyleContentAlignmentData& alignContent() const { return rareNonInheritedData->m_alignContent; } 917 ContentPosition alignContentPosition() const { return rareNonInheritedData->m_alignContent.position(); } 918 ContentDistributionType alignContentDistribution() const { return rareNonInheritedData->m_alignContent.distribution(); } 919 OverflowAlignment alignContentOverflowAlignment() const { return rareNonInheritedData->m_alignContent.overflow(); } 915 920 const StyleSelfAlignmentData& alignItems() const { return rareNonInheritedData->m_alignItems; } 916 921 ItemPosition alignItemsPosition() const { return rareNonInheritedData->m_alignItems.position(); } … … 1505 1510 void setFlexBasis(Length length) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexBasis, WTF::move(length)); } 1506 1511 void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, o); } 1507 void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alignContent, p); } 1512 void setAlignContent(const StyleContentAlignmentData& data) { SET_VAR(rareNonInheritedData, m_alignContent, data); } 1513 void setAlignContentPosition(ContentPosition position) { rareNonInheritedData.access()->m_alignContent.setPosition(position); } 1514 void setAlignContentOverflow(OverflowAlignment overflow) { rareNonInheritedData.access()->m_alignContent.setOverflow(overflow); } 1515 void setAlignContentDistribution(ContentDistributionType distribution) { rareNonInheritedData.access()->m_alignContent.setDistribution(distribution); } 1508 1516 void setAlignItems(const StyleSelfAlignmentData& data) { SET_VAR(rareNonInheritedData, m_alignItems, data); } 1509 1517 void setAlignItemsPosition(ItemPosition position) { rareNonInheritedData.access()->m_alignItems.setPosition(position); } … … 1934 1942 static Length initialFlexBasis() { return Length(Auto); } 1935 1943 static int initialOrder() { return 0; } 1936 static EAlignContent initialAlignContent() { return AlignContentStretch; }1937 1944 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); } 1938 1945 static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPositionAuto, ContentDistributionDefault, OverflowAlignmentDefault); } -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r183748 r183805 72 72 , m_flowThread(RenderStyle::initialFlowThread()) 73 73 , m_regionThread(RenderStyle::initialRegionThread()) 74 , m_alignContent(RenderStyle::initialContentAlignment()) 74 75 , m_alignItems(RenderStyle::initialSelfAlignment()) 75 76 , m_alignSelf(RenderStyle::initialSelfAlignment()) … … 87 88 , m_transformStyle3D(RenderStyle::initialTransformStyle3D()) 88 89 , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility()) 89 , m_alignContent(RenderStyle::initialAlignContent())90 90 , userDrag(RenderStyle::initialUserDrag()) 91 91 , textOverflow(RenderStyle::initialTextOverflow()) … … 160 160 , m_flowThread(o.m_flowThread) 161 161 , m_regionThread(o.m_regionThread) 162 , m_alignContent(o.m_alignContent) 162 163 , m_alignItems(o.m_alignItems) 163 164 , m_alignSelf(o.m_alignSelf) … … 175 176 , m_transformStyle3D(o.m_transformStyle3D) 176 177 , m_backfaceVisibility(o.m_backfaceVisibility) 177 , m_alignContent(o.m_alignContent)178 178 , userDrag(o.userDrag) 179 179 , textOverflow(o.textOverflow) … … 257 257 && m_order == o.m_order 258 258 && m_flowThread == o.m_flowThread 259 && m_alignContent == o.m_alignContent 259 260 && m_alignItems == o.m_alignItems 260 261 && m_alignSelf == o.m_alignSelf … … 270 271 && m_transformStyle3D == o.m_transformStyle3D 271 272 && m_backfaceVisibility == o.m_backfaceVisibility 272 && m_alignContent == o.m_alignContent273 273 && userDrag == o.userDrag 274 274 && textOverflow == o.textOverflow -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r183748 r183805 178 178 AtomicString m_regionThread; 179 179 180 StyleContentAlignmentData m_alignContent; 180 181 StyleSelfAlignmentData m_alignItems; 181 182 StyleSelfAlignmentData m_alignSelf; … … 198 199 unsigned m_backfaceVisibility : 1; // EBackfaceVisibility 199 200 200 unsigned m_alignContent : 3; // EAlignContent201 201 202 202 unsigned userDrag : 2; // EUserDrag
Note: See TracChangeset
for help on using the changeset viewer.