| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void LayoutFlexibleBox::removeChild(LayoutObject* child) | 203 void LayoutFlexibleBox::removeChild(LayoutObject* child) |
| 204 { | 204 { |
| 205 LayoutBlock::removeChild(child); | 205 LayoutBlock::removeChild(child); |
| 206 m_intrinsicSizeAlongMainAxis.remove(child); | 206 m_intrinsicSizeAlongMainAxis.remove(child); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void LayoutFlexibleBox::styleDidChange(StyleDifference diff, const ComputedStyle
* oldStyle) | 209 void LayoutFlexibleBox::styleDidChange(StyleDifference diff, const ComputedStyle
* oldStyle) |
| 210 { | 210 { |
| 211 LayoutBlock::styleDidChange(diff, oldStyle); | 211 LayoutBlock::styleDidChange(diff, oldStyle); |
| 212 | 212 |
| 213 if (oldStyle && oldStyle->alignItemsPosition() == ItemPositionStretch && dif
f.needsFullLayout()) { | 213 if (oldStyle && (oldStyle->alignItemsPosition() == ItemPositionStretch || ol
dStyle->alignItemsPosition() == ItemPositionAuto) && diff.needsFullLayout()) { |
| 214 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. | 214 // Flex items that were previously stretching need to be relayed out so
we can compute new available cross axis space. |
| 215 // This is only necessary for stretching since other alignment values do
n't change the size of the box. | 215 // This is only necessary for stretching since other alignment values do
n't change the size of the box. |
| 216 for (LayoutBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { | 216 for (LayoutBox* child = firstChildBox(); child; child = child->nextSibli
ngBox()) { |
| 217 ItemPosition previousAlignment = ComputedStyle::resolveAlignment(*ol
dStyle, child->styleRef(), ItemPositionStretch); | 217 ItemPosition previousAlignment = oldStyle->alignSelfPosition() == It
emPositionAuto ? ItemPositionStretch : oldStyle->alignSelfPosition(); |
| 218 if (previousAlignment == ItemPositionStretch && previousAlignment !=
ComputedStyle::resolveAlignment(styleRef(), child->styleRef(), ItemPositionStre
tch)) | 218 if (previousAlignment == ItemPositionStretch && previousAlignment !=
ComputedStyle::resolvedAlignSelfPosition(styleRef(), child->styleRef(), ItemPos
itionStretch)) |
| 219 child->setChildNeedsLayout(MarkOnlyThis); | 219 child->setChildNeedsLayout(MarkOnlyThis); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 void LayoutFlexibleBox::layoutBlock(bool relayoutChildren) | 224 void LayoutFlexibleBox::layoutBlock(bool relayoutChildren) |
| 225 { | 225 { |
| 226 ASSERT(needsLayout()); | 226 ASSERT(needsLayout()); |
| 227 | 227 |
| 228 if (!relayoutChildren && simplifiedLayout()) | 228 if (!relayoutChildren && simplifiedLayout()) |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 LayoutUnit staticBlockPosition = isColumnFlow() ? mainAxisOffset : crossAxis
Offset; | 1043 LayoutUnit staticBlockPosition = isColumnFlow() ? mainAxisOffset : crossAxis
Offset; |
| 1044 if (childLayer->staticBlockPosition() != staticBlockPosition) { | 1044 if (childLayer->staticBlockPosition() != staticBlockPosition) { |
| 1045 childLayer->setStaticBlockPosition(staticBlockPosition); | 1045 childLayer->setStaticBlockPosition(staticBlockPosition); |
| 1046 if (child.style()->hasStaticBlockPosition(style()->isHorizontalWritingMo
de())) | 1046 if (child.style()->hasStaticBlockPosition(style()->isHorizontalWritingMo
de())) |
| 1047 child.setChildNeedsLayout(MarkOnlyThis); | 1047 child.setChildNeedsLayout(MarkOnlyThis); |
| 1048 } | 1048 } |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 ItemPosition LayoutFlexibleBox::alignmentForChild(LayoutBox& child) const | 1051 ItemPosition LayoutFlexibleBox::alignmentForChild(LayoutBox& child) const |
| 1052 { | 1052 { |
| 1053 ItemPosition align = ComputedStyle::resolveAlignment(styleRef(), child.style
Ref(), ItemPositionStretch); | 1053 ItemPosition align = ComputedStyle::resolvedAlignSelfPosition(styleRef(), ch
ild.styleRef(), ItemPositionStretch); |
| 1054 | 1054 |
| 1055 if (align == ItemPositionBaseline && hasOrthogonalFlow(child)) | 1055 if (align == ItemPositionBaseline && hasOrthogonalFlow(child)) |
| 1056 align = ItemPositionFlexStart; | 1056 align = ItemPositionFlexStart; |
| 1057 | 1057 |
| 1058 if (style()->flexWrap() == FlexWrapReverse) { | 1058 if (style()->flexWrap() == FlexWrapReverse) { |
| 1059 if (align == ItemPositionFlexStart) | 1059 if (align == ItemPositionFlexStart) |
| 1060 align = ItemPositionFlexEnd; | 1060 align = ItemPositionFlexEnd; |
| 1061 else if (align == ItemPositionFlexEnd) | 1061 else if (align == ItemPositionFlexEnd) |
| 1062 align = ItemPositionFlexStart; | 1062 align = ItemPositionFlexStart; |
| 1063 } | 1063 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 { | 1111 { |
| 1112 if (isHorizontalFlow()) | 1112 if (isHorizontalFlow()) |
| 1113 return child.styleRef().overflowX(); | 1113 return child.styleRef().overflowX(); |
| 1114 return child.styleRef().overflowY(); | 1114 return child.styleRef().overflowY(); |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 void LayoutFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, cons
t OrderedFlexItemList& children, const Vector<LayoutUnit, 16>& childSizes, Layou
tUnit availableFreeSpace, bool relayoutChildren, Vector<LineContext>& lineContex
ts) | 1117 void LayoutFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, cons
t OrderedFlexItemList& children, const Vector<LayoutUnit, 16>& childSizes, Layou
tUnit availableFreeSpace, bool relayoutChildren, Vector<LineContext>& lineContex
ts) |
| 1118 { | 1118 { |
| 1119 ASSERT(childSizes.size() == children.size()); | 1119 ASSERT(childSizes.size() == children.size()); |
| 1120 | 1120 |
| 1121 ContentPosition position = style()->resolvedJustifyContentPosition(); |
| 1122 ContentDistributionType distribution = style()->resolvedJustifyContentDistri
bution(); |
| 1123 |
| 1121 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(
children); | 1124 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(
children); |
| 1122 LayoutUnit autoMarginOffset = autoMarginOffsetInMainAxis(children, available
FreeSpace); | 1125 LayoutUnit autoMarginOffset = autoMarginOffsetInMainAxis(children, available
FreeSpace); |
| 1123 LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart()
; | 1126 LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart()
; |
| 1124 mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, style()->j
ustifyContentPosition(), style()->justifyContentDistribution(), numberOfChildren
ForJustifyContent); | 1127 mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, position,
distribution, numberOfChildrenForJustifyContent); |
| 1125 if (style()->flexDirection() == FlowRowReverse) | 1128 if (style()->flexDirection() == FlowRowReverse) |
| 1126 mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizo
ntalScrollbarHeight(); | 1129 mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizo
ntalScrollbarHeight(); |
| 1127 | 1130 |
| 1128 LayoutUnit totalMainExtent = mainAxisExtent(); | 1131 LayoutUnit totalMainExtent = mainAxisExtent(); |
| 1129 LayoutUnit maxAscent = 0, maxDescent = 0; // Used when align-items: baseline
. | 1132 LayoutUnit maxAscent = 0, maxDescent = 0; // Used when align-items: baseline
. |
| 1130 LayoutUnit maxChildCrossAxisExtent = 0; | 1133 LayoutUnit maxChildCrossAxisExtent = 0; |
| 1131 size_t seenInFlowPositionedChildren = 0; | 1134 size_t seenInFlowPositionedChildren = 0; |
| 1132 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow(); | 1135 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow(); |
| 1133 for (size_t i = 0; i < children.size(); ++i) { | 1136 for (size_t i = 0; i < children.size(); ++i) { |
| 1134 LayoutBox* child = children[i]; | 1137 LayoutBox* child = children[i]; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 // This will be fixed later in flipForRightToLeftColumn. | 1182 // This will be fixed later in flipForRightToLeftColumn. |
| 1180 LayoutPoint childLocation(shouldFlipMainAxis ? totalMainExtent - mainAxi
sOffset - childMainExtent : mainAxisOffset, | 1183 LayoutPoint childLocation(shouldFlipMainAxis ? totalMainExtent - mainAxi
sOffset - childMainExtent : mainAxisOffset, |
| 1181 crossAxisOffset + flowAwareMarginBeforeForChild(*child)); | 1184 crossAxisOffset + flowAwareMarginBeforeForChild(*child)); |
| 1182 | 1185 |
| 1183 // FIXME: Supporting layout deltas. | 1186 // FIXME: Supporting layout deltas. |
| 1184 setFlowAwareLocationForChild(*child, childLocation); | 1187 setFlowAwareLocationForChild(*child, childLocation); |
| 1185 mainAxisOffset += childMainExtent + flowAwareMarginEndForChild(*child); | 1188 mainAxisOffset += childMainExtent + flowAwareMarginEndForChild(*child); |
| 1186 | 1189 |
| 1187 ++seenInFlowPositionedChildren; | 1190 ++seenInFlowPositionedChildren; |
| 1188 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) | 1191 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) |
| 1189 mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSp
ace, style()->justifyContentDistribution(), numberOfChildrenForJustifyContent); | 1192 mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSp
ace, distribution, numberOfChildrenForJustifyContent); |
| 1190 } | 1193 } |
| 1191 | 1194 |
| 1192 if (isColumnFlow()) | 1195 if (isColumnFlow()) |
| 1193 setLogicalHeight(mainAxisOffset + flowAwareBorderEnd() + flowAwarePaddin
gEnd() + scrollbarLogicalHeight()); | 1196 setLogicalHeight(mainAxisOffset + flowAwareBorderEnd() + flowAwarePaddin
gEnd() + scrollbarLogicalHeight()); |
| 1194 | 1197 |
| 1195 if (style()->flexDirection() == FlowColumnReverse) { | 1198 if (style()->flexDirection() == FlowColumnReverse) { |
| 1196 // We have to do an extra pass for column-reverse to reposition the flex
items since the start depends | 1199 // We have to do an extra pass for column-reverse to reposition the flex
items since the start depends |
| 1197 // on the height of the flexbox, which we only know after we've position
ed all the flex items. | 1200 // on the height of the flexbox, which we only know after we've position
ed all the flex items. |
| 1198 updateLogicalHeight(); | 1201 updateLogicalHeight(); |
| 1199 layoutColumnReverse(children, crossAxisOffset, availableFreeSpace); | 1202 layoutColumnReverse(children, crossAxisOffset, availableFreeSpace); |
| 1200 } | 1203 } |
| 1201 | 1204 |
| 1202 if (m_numberOfInFlowChildrenOnFirstLine == -1) | 1205 if (m_numberOfInFlowChildrenOnFirstLine == -1) |
| 1203 m_numberOfInFlowChildrenOnFirstLine = seenInFlowPositionedChildren; | 1206 m_numberOfInFlowChildrenOnFirstLine = seenInFlowPositionedChildren; |
| 1204 lineContexts.append(LineContext(crossAxisOffset, maxChildCrossAxisExtent, ch
ildren.size(), maxAscent)); | 1207 lineContexts.append(LineContext(crossAxisOffset, maxChildCrossAxisExtent, ch
ildren.size(), maxAscent)); |
| 1205 crossAxisOffset += maxChildCrossAxisExtent; | 1208 crossAxisOffset += maxChildCrossAxisExtent; |
| 1206 } | 1209 } |
| 1207 | 1210 |
| 1208 void LayoutFlexibleBox::layoutColumnReverse(const OrderedFlexItemList& children,
LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace) | 1211 void LayoutFlexibleBox::layoutColumnReverse(const OrderedFlexItemList& children,
LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace) |
| 1209 { | 1212 { |
| 1213 ContentPosition position = style()->resolvedJustifyContentPosition(); |
| 1214 ContentDistributionType distribution = style()->resolvedJustifyContentDistri
bution(); |
| 1215 |
| 1210 // This is similar to the logic in layoutAndPlaceChildren, except we place t
he children | 1216 // This is similar to the logic in layoutAndPlaceChildren, except we place t
he children |
| 1211 // starting from the end of the flexbox. We also don't need to layout anythi
ng since we're | 1217 // starting from the end of the flexbox. We also don't need to layout anythi
ng since we're |
| 1212 // just moving the children to a new position. | 1218 // just moving the children to a new position. |
| 1213 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(
children); | 1219 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(
children); |
| 1214 LayoutUnit mainAxisOffset = logicalHeight() - flowAwareBorderEnd() - flowAwa
rePaddingEnd(); | 1220 LayoutUnit mainAxisOffset = logicalHeight() - flowAwareBorderEnd() - flowAwa
rePaddingEnd(); |
| 1215 mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, style()->j
ustifyContentPosition(), style()->justifyContentDistribution(), numberOfChildren
ForJustifyContent); | 1221 mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, position,
distribution, numberOfChildrenForJustifyContent); |
| 1216 mainAxisOffset -= isHorizontalFlow() ? verticalScrollbarWidth() : horizontal
ScrollbarHeight(); | 1222 mainAxisOffset -= isHorizontalFlow() ? verticalScrollbarWidth() : horizontal
ScrollbarHeight(); |
| 1217 | 1223 |
| 1218 size_t seenInFlowPositionedChildren = 0; | 1224 size_t seenInFlowPositionedChildren = 0; |
| 1219 for (size_t i = 0; i < children.size(); ++i) { | 1225 for (size_t i = 0; i < children.size(); ++i) { |
| 1220 LayoutBox* child = children[i]; | 1226 LayoutBox* child = children[i]; |
| 1221 | 1227 |
| 1222 if (child->isOutOfFlowPositioned()) { | 1228 if (child->isOutOfFlowPositioned()) { |
| 1223 child->layer()->setStaticBlockPosition(mainAxisOffset); | 1229 child->layer()->setStaticBlockPosition(mainAxisOffset); |
| 1224 continue; | 1230 continue; |
| 1225 } | 1231 } |
| 1226 mainAxisOffset -= mainAxisExtentForChild(*child) + flowAwareMarginEndFor
Child(*child); | 1232 mainAxisOffset -= mainAxisExtentForChild(*child) + flowAwareMarginEndFor
Child(*child); |
| 1227 | 1233 |
| 1228 setFlowAwareLocationForChild(*child, LayoutPoint(mainAxisOffset, crossAx
isOffset + flowAwareMarginBeforeForChild(*child))); | 1234 setFlowAwareLocationForChild(*child, LayoutPoint(mainAxisOffset, crossAx
isOffset + flowAwareMarginBeforeForChild(*child))); |
| 1229 | 1235 |
| 1230 mainAxisOffset -= flowAwareMarginStartForChild(*child); | 1236 mainAxisOffset -= flowAwareMarginStartForChild(*child); |
| 1231 | 1237 |
| 1232 ++seenInFlowPositionedChildren; | 1238 ++seenInFlowPositionedChildren; |
| 1233 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) | 1239 if (seenInFlowPositionedChildren < numberOfChildrenForJustifyContent) |
| 1234 mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSp
ace, style()->justifyContentDistribution(), numberOfChildrenForJustifyContent); | 1240 mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSp
ace, distribution, numberOfChildrenForJustifyContent); |
| 1235 } | 1241 } |
| 1236 } | 1242 } |
| 1237 | 1243 |
| 1238 static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, Conte
ntPosition alignContent, ContentDistributionType alignContentDistribution, unsig
ned numberOfLines) | 1244 static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, Conte
ntPosition alignContent, ContentDistributionType alignContentDistribution, unsig
ned numberOfLines) |
| 1239 { | 1245 { |
| 1240 if (numberOfLines <= 1) | 1246 if (numberOfLines <= 1) |
| 1241 return 0; | 1247 return 0; |
| 1242 if (alignContent == ContentPositionFlexEnd) | 1248 if (alignContent == ContentPositionFlexEnd) |
| 1243 return availableFreeSpace; | 1249 return availableFreeSpace; |
| 1244 if (alignContent == ContentPositionCenter) | 1250 if (alignContent == ContentPositionCenter) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1266 void LayoutFlexibleBox::alignFlexLines(Vector<LineContext>& lineContexts) | 1272 void LayoutFlexibleBox::alignFlexLines(Vector<LineContext>& lineContexts) |
| 1267 { | 1273 { |
| 1268 // If we have a single line flexbox or a multiline line flexbox with only on
e flex line, | 1274 // If we have a single line flexbox or a multiline line flexbox with only on
e flex line, |
| 1269 // the line height is all the available space. | 1275 // the line height is all the available space. |
| 1270 // For flex-direction: row, this means we need to use the height, so we do t
his after calling updateLogicalHeight. | 1276 // For flex-direction: row, this means we need to use the height, so we do t
his after calling updateLogicalHeight. |
| 1271 if (lineContexts.size() == 1) { | 1277 if (lineContexts.size() == 1) { |
| 1272 lineContexts[0].crossAxisExtent = crossAxisContentExtent(); | 1278 lineContexts[0].crossAxisExtent = crossAxisContentExtent(); |
| 1273 return; | 1279 return; |
| 1274 } | 1280 } |
| 1275 | 1281 |
| 1276 if (style()->alignContentPosition() == ContentPositionFlexStart) | 1282 ContentPosition position = style()->resolvedAlignContentPosition(); |
| 1283 ContentDistributionType distribution = style()->resolvedAlignContentDistribu
tion(); |
| 1284 |
| 1285 if (position == ContentPositionFlexStart) |
| 1277 return; | 1286 return; |
| 1278 | 1287 |
| 1279 LayoutUnit availableCrossAxisSpace = crossAxisContentExtent(); | 1288 LayoutUnit availableCrossAxisSpace = crossAxisContentExtent(); |
| 1280 for (size_t i = 0; i < lineContexts.size(); ++i) | 1289 for (size_t i = 0; i < lineContexts.size(); ++i) |
| 1281 availableCrossAxisSpace -= lineContexts[i].crossAxisExtent; | 1290 availableCrossAxisSpace -= lineContexts[i].crossAxisExtent; |
| 1282 | 1291 |
| 1283 LayoutBox* child = m_orderIterator.first(); | 1292 LayoutBox* child = m_orderIterator.first(); |
| 1284 LayoutUnit lineOffset = initialAlignContentOffset(availableCrossAxisSpace, s
tyle()->alignContentPosition(), style()->alignContentDistribution(), lineContext
s.size()); | 1293 LayoutUnit lineOffset = initialAlignContentOffset(availableCrossAxisSpace, p
osition, distribution, lineContexts.size()); |
| 1285 for (unsigned lineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber
) { | 1294 for (unsigned lineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber
) { |
| 1286 lineContexts[lineNumber].crossAxisOffset += lineOffset; | 1295 lineContexts[lineNumber].crossAxisOffset += lineOffset; |
| 1287 for (size_t childNumber = 0; childNumber < lineContexts[lineNumber].numb
erOfChildren; ++childNumber, child = m_orderIterator.next()) | 1296 for (size_t childNumber = 0; childNumber < lineContexts[lineNumber].numb
erOfChildren; ++childNumber, child = m_orderIterator.next()) |
| 1288 adjustAlignmentForChild(*child, lineOffset); | 1297 adjustAlignmentForChild(*child, lineOffset); |
| 1289 | 1298 |
| 1290 if (style()->alignContentDistribution() == ContentDistributionStretch &&
availableCrossAxisSpace > 0) | 1299 if (distribution == ContentDistributionStretch && availableCrossAxisSpac
e > 0) |
| 1291 lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace
/ static_cast<unsigned>(lineContexts.size()); | 1300 lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace
/ static_cast<unsigned>(lineContexts.size()); |
| 1292 | 1301 |
| 1293 lineOffset += alignContentSpaceBetweenChildren(availableCrossAxisSpace,
style()->alignContentDistribution(), lineContexts.size()); | 1302 lineOffset += alignContentSpaceBetweenChildren(availableCrossAxisSpace,
distribution, lineContexts.size()); |
| 1294 } | 1303 } |
| 1295 } | 1304 } |
| 1296 | 1305 |
| 1297 void LayoutFlexibleBox::adjustAlignmentForChild(LayoutBox& child, LayoutUnit del
ta) | 1306 void LayoutFlexibleBox::adjustAlignmentForChild(LayoutBox& child, LayoutUnit del
ta) |
| 1298 { | 1307 { |
| 1299 if (child.isOutOfFlowPositioned()) { | 1308 if (child.isOutOfFlowPositioned()) { |
| 1300 LayoutUnit staticInlinePosition = child.layer()->staticInlinePosition(); | 1309 LayoutUnit staticInlinePosition = child.layer()->staticInlinePosition(); |
| 1301 LayoutUnit staticBlockPosition = child.layer()->staticBlockPosition(); | 1310 LayoutUnit staticBlockPosition = child.layer()->staticBlockPosition(); |
| 1302 LayoutUnit mainAxis = isColumnFlow() ? staticBlockPosition : staticInlin
ePosition; | 1311 LayoutUnit mainAxis = isColumnFlow() ? staticBlockPosition : staticInlin
ePosition; |
| 1303 LayoutUnit crossAxis = isColumnFlow() ? staticInlinePosition : staticBlo
ckPosition; | 1312 LayoutUnit crossAxis = isColumnFlow() ? staticInlinePosition : staticBlo
ckPosition; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 ASSERT(child); | 1466 ASSERT(child); |
| 1458 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1467 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1459 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1468 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1460 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1469 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1461 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1470 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1462 } | 1471 } |
| 1463 } | 1472 } |
| 1464 } | 1473 } |
| 1465 | 1474 |
| 1466 } | 1475 } |
| OLD | NEW |