| 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 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 // We may have already forced relayout for orthogonal flowing children i
n computeInnerFlexBaseSizeForChild. | 1675 // We may have already forced relayout for orthogonal flowing children i
n computeInnerFlexBaseSizeForChild. |
| 1676 bool forceChildRelayout = relayoutChildren && !m_relaidOutChildren.conta
ins(child); | 1676 bool forceChildRelayout = relayoutChildren && !m_relaidOutChildren.conta
ins(child); |
| 1677 if (child->isLayoutBlock() && toLayoutBlock(*child).hasPercentHeightDesc
endants()) { | 1677 if (child->isLayoutBlock() && toLayoutBlock(*child).hasPercentHeightDesc
endants()) { |
| 1678 // Have to force another relayout even though the child is sized cor
rectly, because | 1678 // Have to force another relayout even though the child is sized cor
rectly, because |
| 1679 // its descendants are not sized correctly yet. Our previous layout
of the child was | 1679 // its descendants are not sized correctly yet. Our previous layout
of the child was |
| 1680 // done without an override height set. So, redo it here. | 1680 // done without an override height set. So, redo it here. |
| 1681 forceChildRelayout = true; | 1681 forceChildRelayout = true; |
| 1682 } | 1682 } |
| 1683 updateBlockChildDirtyBitsBeforeLayout(forceChildRelayout, *child); | 1683 updateBlockChildDirtyBitsBeforeLayout(forceChildRelayout, *child); |
| 1684 if (!child->needsLayout()) | 1684 if (!child->needsLayout()) |
| 1685 child->markForPaginationRelayoutIfNeeded(layoutScope); | 1685 markChildForPaginationRelayoutIfNeeded(*child, layoutScope); |
| 1686 if (child->needsLayout()) | 1686 if (child->needsLayout()) |
| 1687 m_relaidOutChildren.add(child); | 1687 m_relaidOutChildren.add(child); |
| 1688 child->layoutIfNeeded(); | 1688 child->layoutIfNeeded(); |
| 1689 | 1689 |
| 1690 updateAutoMarginsInMainAxis(*child, autoMarginOffset); | 1690 updateAutoMarginsInMainAxis(*child, autoMarginOffset); |
| 1691 | 1691 |
| 1692 LayoutUnit childCrossAxisMarginBoxExtent; | 1692 LayoutUnit childCrossAxisMarginBoxExtent; |
| 1693 if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMargins
InCrossAxis(*child)) { | 1693 if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMargins
InCrossAxis(*child)) { |
| 1694 LayoutUnit ascent = marginBoxAscentForChild(*child); | 1694 LayoutUnit ascent = marginBoxAscentForChild(*child); |
| 1695 LayoutUnit descent = (crossAxisMarginExtentForChild(*child) + crossA
xisExtentForChild(*child)) - ascent; | 1695 LayoutUnit descent = (crossAxisMarginExtentForChild(*child) + crossA
xisExtentForChild(*child)) - ascent; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1957 DCHECK(child); | 1957 DCHECK(child); |
| 1958 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; | 1958 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE
xtent; |
| 1959 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; | 1959 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset
- crossAxisStartEdge; |
| 1960 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; | 1960 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi
sExtent; |
| 1961 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1961 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1962 } | 1962 } |
| 1963 } | 1963 } |
| 1964 } | 1964 } |
| 1965 | 1965 |
| 1966 } // namespace blink | 1966 } // namespace blink |
| OLD | NEW |