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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 return std::max(LayoutUnit(0), computedValues.m_extent - borderPaddingAn
dScrollbar); | 529 return std::max(LayoutUnit(0), computedValues.m_extent - borderPaddingAn
dScrollbar); |
530 } | 530 } |
531 return contentLogicalWidth(); | 531 return contentLogicalWidth(); |
532 } | 532 } |
533 | 533 |
534 LayoutUnit RenderFlexibleBox::computeMainAxisExtentForChild(RenderBox* child, Si
zeType sizeType, const Length& size) | 534 LayoutUnit RenderFlexibleBox::computeMainAxisExtentForChild(RenderBox* child, Si
zeType sizeType, const Length& size) |
535 { | 535 { |
536 // FIXME: This is wrong for orthogonal flows. It should use the flexbox's wr
iting-mode, not the child's in order | 536 // FIXME: This is wrong for orthogonal flows. It should use the flexbox's wr
iting-mode, not the child's in order |
537 // to figure out the logical height/width. | 537 // to figure out the logical height/width. |
538 if (isColumnFlow()) { | 538 if (isColumnFlow()) { |
539 if (child->style()->logicalHeight().isIntrinsic() || child->style()->log
icalMinHeight().isIntrinsic() || | 539 // We don't have to check for "auto" here - computeContentLogicalHeight
will just return -1 for that case anyway. |
540 child->style()->logicalMaxHeight().isIntrinsic()) { | 540 if (size.isIntrinsic()) |
541 if (child->needsLayout()) | 541 child->layoutIfNeeded(); |
542 child->layout(); | |
543 } | |
544 return child->computeContentLogicalHeight(size, child->logicalHeight() -
child->borderAndPaddingLogicalHeight()); | 542 return child->computeContentLogicalHeight(size, child->logicalHeight() -
child->borderAndPaddingLogicalHeight()); |
545 } | 543 } |
546 // FIXME: Figure out how this should work for regions and pass in the approp
riate values. | 544 // FIXME: Figure out how this should work for regions and pass in the approp
riate values. |
547 LayoutUnit offsetFromLogicalTopOfFirstPage = 0; | 545 LayoutUnit offsetFromLogicalTopOfFirstPage = 0; |
548 RenderRegion* region = 0; | 546 RenderRegion* region = 0; |
549 return child->computeLogicalWidthInRegionUsing(sizeType, size, contentLogica
lWidth(), this, region, offsetFromLogicalTopOfFirstPage) - child->borderAndPaddi
ngLogicalWidth(); | 547 return child->computeLogicalWidthInRegionUsing(sizeType, size, contentLogica
lWidth(), this, region, offsetFromLogicalTopOfFirstPage) - child->borderAndPaddi
ngLogicalWidth(); |
550 } | 548 } |
551 | 549 |
552 WritingMode RenderFlexibleBox::transformedWritingMode() const | 550 WritingMode RenderFlexibleBox::transformedWritingMode() const |
553 { | 551 { |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 ASSERT(child); | 1441 ASSERT(child); |
1444 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1442 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
1445 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1443 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
1446 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1444 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
1447 adjustAlignmentForChild(child, newOffset - originalOffset); | 1445 adjustAlignmentForChild(child, newOffset - originalOffset); |
1448 } | 1446 } |
1449 } | 1447 } |
1450 } | 1448 } |
1451 | 1449 |
1452 } | 1450 } |
OLD | NEW |