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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1222 offset = LayoutUnit(0); | 1222 offset = LayoutUnit(0); |
1223 breadth = (direction == ForColumns) ? clientLogicalWidth() : clientLogic alHeight(); | 1223 breadth = (direction == ForColumns) ? clientLogicalWidth() : clientLogic alHeight(); |
1224 return; | 1224 return; |
1225 } | 1225 } |
1226 | 1226 |
1227 GridResolvedPosition firstPosition = GridResolvedPosition(0); | 1227 GridResolvedPosition firstPosition = GridResolvedPosition(0); |
1228 GridResolvedPosition initialPosition = startIsAuto ? firstPosition : positio ns->resolvedInitialPosition; | 1228 GridResolvedPosition initialPosition = startIsAuto ? firstPosition : positio ns->resolvedInitialPosition; |
1229 GridResolvedPosition lastPosition = GridResolvedPosition((direction == ForCo lumns ? gridColumnCount() : gridRowCount()) - 1); | 1229 GridResolvedPosition lastPosition = GridResolvedPosition((direction == ForCo lumns ? gridColumnCount() : gridRowCount()) - 1); |
1230 GridResolvedPosition finalPosition = endIsAuto ? lastPosition : positions->r esolvedFinalPosition; | 1230 GridResolvedPosition finalPosition = endIsAuto ? lastPosition : positions->r esolvedFinalPosition; |
1231 | 1231 |
1232 initialPosition = std::min<GridResolvedPosition>(initialPosition, lastPositi on); | |
1233 finalPosition = std::min<GridResolvedPosition>(finalPosition, lastPosition); | |
Julien - ping for review
2014/12/09 18:49:53
I think we need to put a comment as to why we do t
Manuel Rego
2014/12/10 08:41:57
Done.
| |
1234 | |
1232 LayoutUnit start = startIsAuto ? LayoutUnit(0) : (direction == ForColumns) ? m_columnPositions[initialPosition.toInt()] : m_rowPositions[initialPosition.to Int()]; | 1235 LayoutUnit start = startIsAuto ? LayoutUnit(0) : (direction == ForColumns) ? m_columnPositions[initialPosition.toInt()] : m_rowPositions[initialPosition.to Int()]; |
1233 LayoutUnit end = endIsAuto ? (direction == ForColumns) ? logicalWidth() : lo gicalHeight() : (direction == ForColumns) ? m_columnPositions[finalPosition.nex t().toInt()] : m_rowPositions[finalPosition.next().toInt()]; | 1236 LayoutUnit end = endIsAuto ? (direction == ForColumns) ? logicalWidth() : lo gicalHeight() : (direction == ForColumns) ? m_columnPositions[finalPosition.nex t().toInt()] : m_rowPositions[finalPosition.next().toInt()]; |
1234 | 1237 |
1235 breadth = end - start; | 1238 breadth = end - start; |
1236 | 1239 |
1237 if (startIsAuto) | 1240 if (startIsAuto) |
1238 breadth -= (direction == ForColumns) ? borderStart() : borderBefore(); | 1241 breadth -= (direction == ForColumns) ? borderStart() : borderBefore(); |
1239 else | 1242 else |
1240 start -= ((direction == ForColumns) ? borderStart() : borderBefore()); | 1243 start -= ((direction == ForColumns) ? borderStart() : borderBefore()); |
1241 | 1244 |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1693 if (isOutOfFlowPositioned()) | 1696 if (isOutOfFlowPositioned()) |
1694 return "RenderGrid (positioned)"; | 1697 return "RenderGrid (positioned)"; |
1695 if (isAnonymous()) | 1698 if (isAnonymous()) |
1696 return "RenderGrid (generated)"; | 1699 return "RenderGrid (generated)"; |
1697 if (isRelPositioned()) | 1700 if (isRelPositioned()) |
1698 return "RenderGrid (relative positioned)"; | 1701 return "RenderGrid (relative positioned)"; |
1699 return "RenderGrid"; | 1702 return "RenderGrid"; |
1700 } | 1703 } |
1701 | 1704 |
1702 } // namespace blink | 1705 } // namespace blink |
OLD | NEW |