| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // returning the max preferred height (=logical width) | 469 // returning the max preferred height (=logical width) |
| 470 if (!child.isHorizontalWritingMode() && child.styleRef().height().isAuto()) | 470 if (!child.isHorizontalWritingMode() && child.styleRef().height().isAuto()) |
| 471 return child.maxPreferredLogicalWidth(); | 471 return child.maxPreferredLogicalWidth(); |
| 472 return child.size().height(); | 472 return child.size().height(); |
| 473 } | 473 } |
| 474 | 474 |
| 475 LayoutUnit LayoutFlexibleBox::childIntrinsicWidth(const LayoutBox& child) const | 475 LayoutUnit LayoutFlexibleBox::childIntrinsicWidth(const LayoutBox& child) const |
| 476 { | 476 { |
| 477 if (!child.isHorizontalWritingMode() && needToStretchChildLogicalHeight(chil
d)) | 477 if (!child.isHorizontalWritingMode() && needToStretchChildLogicalHeight(chil
d)) |
| 478 return constrainedChildIntrinsicContentLogicalHeight(child); | 478 return constrainedChildIntrinsicContentLogicalHeight(child); |
| 479 // TOOO(cbiesinger): should this return the maxPreferredLogicalWidth? | 479 if (child.isHorizontalWritingMode() && child.styleRef().width().isAuto()) { |
| 480 // This value is already clamped by min/max-width |
| 481 return child.maxPreferredLogicalWidth(); |
| 482 } |
| 480 return child.size().width(); | 483 return child.size().width(); |
| 481 } | 484 } |
| 482 | 485 |
| 483 LayoutUnit LayoutFlexibleBox::crossAxisIntrinsicExtentForChild(const LayoutBox&
child) const | 486 LayoutUnit LayoutFlexibleBox::crossAxisIntrinsicExtentForChild(const LayoutBox&
child) const |
| 484 { | 487 { |
| 485 return isHorizontalFlow() ? childIntrinsicHeight(child) : childIntrinsicWidt
h(child); | 488 return isHorizontalFlow() ? childIntrinsicHeight(child) : childIntrinsicWidt
h(child); |
| 486 } | 489 } |
| 487 | 490 |
| 488 LayoutUnit LayoutFlexibleBox::mainAxisExtentForChild(const LayoutBox& child) con
st | 491 LayoutUnit LayoutFlexibleBox::mainAxisExtentForChild(const LayoutBox& child) con
st |
| 489 { | 492 { |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 ASSERT(child); | 1885 ASSERT(child); |
| 1883 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1886 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1884 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1887 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1885 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1888 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1886 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1889 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1887 } | 1890 } |
| 1888 } | 1891 } |
| 1889 } | 1892 } |
| 1890 | 1893 |
| 1891 } // namespace blink | 1894 } // namespace blink |
| OLD | NEW |