| 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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 } | 577 } |
| 578 | 578 |
| 579 LayoutPoint LayoutFlexibleBox::flowAwareLocationForChild(LayoutBox& child) const | 579 LayoutPoint LayoutFlexibleBox::flowAwareLocationForChild(LayoutBox& child) const |
| 580 { | 580 { |
| 581 return isHorizontalFlow() ? child.location() : child.location().transposedPo
int(); | 581 return isHorizontalFlow() ? child.location() : child.location().transposedPo
int(); |
| 582 } | 582 } |
| 583 | 583 |
| 584 void LayoutFlexibleBox::setFlowAwareLocationForChild(LayoutBox& child, const Lay
outPoint& location) | 584 void LayoutFlexibleBox::setFlowAwareLocationForChild(LayoutBox& child, const Lay
outPoint& location) |
| 585 { | 585 { |
| 586 if (isHorizontalFlow()) | 586 if (isHorizontalFlow()) |
| 587 child.setLocation(location); | 587 child.setLocationAndUpdateOverflowControlsIfNeeded(location); |
| 588 else | 588 else |
| 589 child.setLocation(location.transposedPoint()); | 589 child.setLocationAndUpdateOverflowControlsIfNeeded(location.transposedPo
int()); |
| 590 } | 590 } |
| 591 | 591 |
| 592 LayoutUnit LayoutFlexibleBox::mainAxisBorderAndPaddingExtentForChild(LayoutBox&
child) const | 592 LayoutUnit LayoutFlexibleBox::mainAxisBorderAndPaddingExtentForChild(LayoutBox&
child) const |
| 593 { | 593 { |
| 594 return isHorizontalFlow() ? child.borderAndPaddingWidth() : child.borderAndP
addingHeight(); | 594 return isHorizontalFlow() ? child.borderAndPaddingWidth() : child.borderAndP
addingHeight(); |
| 595 } | 595 } |
| 596 | 596 |
| 597 static inline bool preferredMainAxisExtentDependsOnLayout(const Length& flexBasi
s, bool hasInfiniteLineLength) | 597 static inline bool preferredMainAxisExtentDependsOnLayout(const Length& flexBasi
s, bool hasInfiniteLineLength) |
| 598 { | 598 { |
| 599 return flexBasis.isAuto() || (flexBasis.isPercent() && hasInfiniteLineLength
); | 599 return flexBasis.isAuto() || (flexBasis.isPercent() && hasInfiniteLineLength
); |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 ASSERT(child); | 1400 ASSERT(child); |
| 1401 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1401 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1402 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1402 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1403 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1403 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1404 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1404 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1405 } | 1405 } |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 } | 1409 } |
| OLD | NEW |