| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 return baseline; | 189 return baseline; |
| 190 | 190 |
| 191 int marginAscent = direction == HorizontalLine ? marginTop() : marginRight()
; | 191 int marginAscent = direction == HorizontalLine ? marginTop() : marginRight()
; |
| 192 return synthesizedBaselineFromContentBox(this, direction) + marginAscent; | 192 return synthesizedBaselineFromContentBox(this, direction) + marginAscent; |
| 193 } | 193 } |
| 194 | 194 |
| 195 static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const Rende
rStyle* childStyle) | 195 static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const Rende
rStyle* childStyle) |
| 196 { | 196 { |
| 197 ItemPosition align = childStyle->alignSelf(); | 197 ItemPosition align = childStyle->alignSelf(); |
| 198 if (align == ItemPositionAuto) | 198 if (align == ItemPositionAuto) |
| 199 align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionSt
retch : parentStyle->alignItems(); | 199 align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionSt
retch: parentStyle->alignItems(); |
| 200 return align; | 200 return align; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void RenderFlexibleBox::removeChild(RenderObject* child) | 203 void RenderFlexibleBox::removeChild(RenderObject* child) |
| 204 { | 204 { |
| 205 RenderBlock::removeChild(child); | 205 RenderBlock::removeChild(child); |
| 206 m_intrinsicSizeAlongMainAxis.remove(child); | 206 m_intrinsicSizeAlongMainAxis.remove(child); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) | 209 void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle*
oldStyle) |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 break; | 1313 break; |
| 1314 } | 1314 } |
| 1315 case ItemPositionLastBaseline: | 1315 case ItemPositionLastBaseline: |
| 1316 case ItemPositionSelfStart: | 1316 case ItemPositionSelfStart: |
| 1317 case ItemPositionSelfEnd: | 1317 case ItemPositionSelfEnd: |
| 1318 case ItemPositionStart: | 1318 case ItemPositionStart: |
| 1319 case ItemPositionEnd: | 1319 case ItemPositionEnd: |
| 1320 case ItemPositionLeft: | 1320 case ItemPositionLeft: |
| 1321 case ItemPositionRight: | 1321 case ItemPositionRight: |
| 1322 // FIXME: File a bug about implementing that. The extended gramm
ar | 1322 // FIXME: File a bug about implementing that. The extended gramm
ar |
| 1323 // is not enabled by default so we shouldn't hit this codepath. | 1323 // is not implemented yet so we default to "stretch" for now. |
| 1324 break; |
| 1325 default: |
| 1324 ASSERT_NOT_REACHED(); | 1326 ASSERT_NOT_REACHED(); |
| 1325 break; | 1327 break; |
| 1326 } | 1328 } |
| 1327 } | 1329 } |
| 1328 minMarginAfterBaselines.append(minMarginAfterBaseline); | 1330 minMarginAfterBaselines.append(minMarginAfterBaseline); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| 1331 if (style()->flexWrap() != FlexWrapReverse) | 1333 if (style()->flexWrap() != FlexWrapReverse) |
| 1332 return; | 1334 return; |
| 1333 | 1335 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 ASSERT(child); | 1403 ASSERT(child); |
| 1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1404 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1405 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1406 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1405 adjustAlignmentForChild(child, newOffset - originalOffset); | 1407 adjustAlignmentForChild(child, newOffset - originalOffset); |
| 1406 } | 1408 } |
| 1407 } | 1409 } |
| 1408 } | 1410 } |
| 1409 | 1411 |
| 1410 } | 1412 } |
| OLD | NEW |