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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 child.setMarginRight(availableAlignmentSpace / 2); | 756 child.setMarginRight(availableAlignmentSpace / 2); |
757 } | 757 } |
758 return true; | 758 return true; |
759 } | 759 } |
760 bool shouldAdjustTopOrLeft = true; | 760 bool shouldAdjustTopOrLeft = true; |
761 if (isColumnFlow() && !child.style()->isLeftToRightDirection()) { | 761 if (isColumnFlow() && !child.style()->isLeftToRightDirection()) { |
762 // For column flows, only make this adjustment if topOrLeft corresponds
to the "before" margin, | 762 // For column flows, only make this adjustment if topOrLeft corresponds
to the "before" margin, |
763 // so that flipForRightToLeftColumn will do the right thing. | 763 // so that flipForRightToLeftColumn will do the right thing. |
764 shouldAdjustTopOrLeft = false; | 764 shouldAdjustTopOrLeft = false; |
765 } | 765 } |
766 if (!isColumnFlow() && child.style()->isFlippedBlocksWritingMode()) { | 766 if (!isColumnFlow() && child.style()->slowIsFlippedBlocksWritingMode()) { |
767 // If we are a flipped writing mode, we need to adjust the opposite side
. This is only needed | 767 // If we are a flipped writing mode, we need to adjust the opposite side
. This is only needed |
768 // for row flows because this only affects the block-direction axis. | 768 // for row flows because this only affects the block-direction axis. |
769 shouldAdjustTopOrLeft = false; | 769 shouldAdjustTopOrLeft = false; |
770 } | 770 } |
771 | 771 |
772 if (topOrLeft.isAuto()) { | 772 if (topOrLeft.isAuto()) { |
773 if (shouldAdjustTopOrLeft) | 773 if (shouldAdjustTopOrLeft) |
774 adjustAlignmentForChild(child, availableAlignmentSpace); | 774 adjustAlignmentForChild(child, availableAlignmentSpace); |
775 | 775 |
776 if (isHorizontal) | 776 if (isHorizontal) |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 ASSERT(child); | 1393 ASSERT(child); |
1394 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1394 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1395 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1395 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1396 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1396 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1397 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1397 adjustAlignmentForChild(*child, newOffset - originalOffset); |
1398 } | 1398 } |
1399 } | 1399 } |
1400 } | 1400 } |
1401 | 1401 |
1402 } | 1402 } |
OLD | NEW |