OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1724 positionOffset = 0; | 1724 positionOffset = 0; |
1725 return false; | 1725 return false; |
1726 } | 1726 } |
1727 | 1727 |
1728 ASSERT_NOT_REACHED(); | 1728 ASSERT_NOT_REACHED(); |
1729 return false; | 1729 return false; |
1730 } | 1730 } |
1731 | 1731 |
1732 void LayoutGrid::computeContentPositionAndDistributionColumnOffset(LayoutUnit av
ailableFreeSpace, GridSizingData& sizingData) const | 1732 void LayoutGrid::computeContentPositionAndDistributionColumnOffset(LayoutUnit av
ailableFreeSpace, GridSizingData& sizingData) const |
1733 { | 1733 { |
1734 ContentPosition position = styleRef().justifyContent(); | 1734 ContentPosition position = styleRef().justifyContentPosition(); |
1735 ContentDistributionType distribution = styleRef().justifyContentDistribution
(); | 1735 ContentDistributionType distribution = styleRef().justifyContentDistribution
(); |
1736 // If <content-distribution> value can't be applied, 'position' will become
the associated | 1736 // If <content-distribution> value can't be applied, 'position' will become
the associated |
1737 // <content-position> fallback value. | 1737 // <content-position> fallback value. |
1738 if (contentDistributionOffset(availableFreeSpace, position, distribution, si
zingData.columnTracks.size(), sizingData.columnsPositionOffset, sizingData.colum
nsDistributionOffset)) | 1738 if (contentDistributionOffset(availableFreeSpace, position, distribution, si
zingData.columnTracks.size(), sizingData.columnsPositionOffset, sizingData.colum
nsDistributionOffset)) |
1739 return; | 1739 return; |
1740 | 1740 |
1741 OverflowAlignment overflow = styleRef().justifyContentOverflowAlignment(); | 1741 OverflowAlignment overflow = styleRef().justifyContentOverflowAlignment(); |
1742 if (overflow == OverflowAlignmentSafe && availableFreeSpace <= 0) | 1742 if (overflow == OverflowAlignmentSafe && availableFreeSpace <= 0) |
1743 return; | 1743 return; |
1744 | 1744 |
(...skipping 25 matching lines...) Expand all Loading... |
1770 return; | 1770 return; |
1771 case ContentPositionAuto: | 1771 case ContentPositionAuto: |
1772 break; | 1772 break; |
1773 } | 1773 } |
1774 | 1774 |
1775 ASSERT_NOT_REACHED(); | 1775 ASSERT_NOT_REACHED(); |
1776 } | 1776 } |
1777 | 1777 |
1778 void LayoutGrid::computeContentPositionAndDistributionRowOffset(LayoutUnit avail
ableFreeSpace, GridSizingData& sizingData) const | 1778 void LayoutGrid::computeContentPositionAndDistributionRowOffset(LayoutUnit avail
ableFreeSpace, GridSizingData& sizingData) const |
1779 { | 1779 { |
1780 ContentPosition position = styleRef().alignContent(); | 1780 ContentPosition position = styleRef().alignContentPosition(); |
1781 ContentDistributionType distribution = styleRef().alignContentDistribution()
; | 1781 ContentDistributionType distribution = styleRef().alignContentDistribution()
; |
1782 // If <content-distribution> value can't be applied, 'position' will become
the associated | 1782 // If <content-distribution> value can't be applied, 'position' will become
the associated |
1783 // <content-position> fallback value. | 1783 // <content-position> fallback value. |
1784 if (contentDistributionOffset(availableFreeSpace, position, distribution, si
zingData.rowTracks.size(), sizingData.rowsPositionOffset, sizingData.rowsDistrib
utionOffset)) | 1784 if (contentDistributionOffset(availableFreeSpace, position, distribution, si
zingData.rowTracks.size(), sizingData.rowsPositionOffset, sizingData.rowsDistrib
utionOffset)) |
1785 return; | 1785 return; |
1786 | 1786 |
1787 OverflowAlignment overflow = styleRef().alignContentOverflowAlignment(); | 1787 OverflowAlignment overflow = styleRef().alignContentOverflowAlignment(); |
1788 if (overflow == OverflowAlignmentSafe && availableFreeSpace <= 0) | 1788 if (overflow == OverflowAlignmentSafe && availableFreeSpace <= 0) |
1789 return; | 1789 return; |
1790 | 1790 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 } | 1840 } |
1841 | 1841 |
1842 const char* LayoutGrid::name() const | 1842 const char* LayoutGrid::name() const |
1843 { | 1843 { |
1844 if (isAnonymous()) | 1844 if (isAnonymous()) |
1845 return "LayoutGrid (anonymous)"; | 1845 return "LayoutGrid (anonymous)"; |
1846 return "LayoutGrid"; | 1846 return "LayoutGrid"; |
1847 } | 1847 } |
1848 | 1848 |
1849 } // namespace blink | 1849 } // namespace blink |
OLD | NEW |