| 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 // We clear the dirty bit here as the grid sizes have been updated, this mea
ns | 897 // We clear the dirty bit here as the grid sizes have been updated, this mea
ns |
| 898 // that we can safely call gridRowCount() / gridColumnCount(). | 898 // that we can safely call gridRowCount() / gridColumnCount(). |
| 899 m_gridIsDirty = false; | 899 m_gridIsDirty = false; |
| 900 | 900 |
| 901 Vector<RenderBox*> autoMajorAxisAutoGridItems; | 901 Vector<RenderBox*> autoMajorAxisAutoGridItems; |
| 902 Vector<RenderBox*> specifiedMajorAxisAutoGridItems; | 902 Vector<RenderBox*> specifiedMajorAxisAutoGridItems; |
| 903 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { | 903 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera
tor.next()) { |
| 904 if (child->isOutOfFlowPositioned()) | 904 if (child->isOutOfFlowPositioned()) |
| 905 continue; | 905 continue; |
| 906 | 906 |
| 907 // FIXME: We never re-resolve positions if the grid is grown during auto
-placement which may lead auto / <integer> | |
| 908 // positions to not match the author's intent. The specification is uncl
ear on what should be done in this case. | |
| 909 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio
nsFromStyle(*style(), *child, ForRows); | 907 OwnPtr<GridSpan> rowPositions = GridResolvedPosition::resolveGridPositio
nsFromStyle(*style(), *child, ForRows); |
| 910 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi
tionsFromStyle(*style(), *child, ForColumns); | 908 OwnPtr<GridSpan> columnPositions = GridResolvedPosition::resolveGridPosi
tionsFromStyle(*style(), *child, ForColumns); |
| 911 if (!rowPositions || !columnPositions) { | 909 if (!rowPositions || !columnPositions) { |
| 912 GridSpan* majorAxisPositions = (autoPlacementMajorAxisDirection() ==
ForColumns) ? columnPositions.get() : rowPositions.get(); | 910 GridSpan* majorAxisPositions = (autoPlacementMajorAxisDirection() ==
ForColumns) ? columnPositions.get() : rowPositions.get(); |
| 913 if (!majorAxisPositions) | 911 if (!majorAxisPositions) |
| 914 autoMajorAxisAutoGridItems.append(child); | 912 autoMajorAxisAutoGridItems.append(child); |
| 915 else | 913 else |
| 916 specifiedMajorAxisAutoGridItems.append(child); | 914 specifiedMajorAxisAutoGridItems.append(child); |
| 917 continue; | 915 continue; |
| 918 } | 916 } |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 if (isOutOfFlowPositioned()) | 1733 if (isOutOfFlowPositioned()) |
| 1736 return "RenderGrid (positioned)"; | 1734 return "RenderGrid (positioned)"; |
| 1737 if (isAnonymous()) | 1735 if (isAnonymous()) |
| 1738 return "RenderGrid (generated)"; | 1736 return "RenderGrid (generated)"; |
| 1739 if (isRelPositioned()) | 1737 if (isRelPositioned()) |
| 1740 return "RenderGrid (relative positioned)"; | 1738 return "RenderGrid (relative positioned)"; |
| 1741 return "RenderGrid"; | 1739 return "RenderGrid"; |
| 1742 } | 1740 } |
| 1743 | 1741 |
| 1744 } // namespace blink | 1742 } // namespace blink |
| OLD | NEW |