Chromium Code Reviews| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 } | 310 } |
| 311 | 311 |
| 312 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent() || trackLeng th.isAuto()); | 312 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent() || trackLeng th.isAuto()); |
| 313 return infinity; | 313 return infinity; |
| 314 } | 314 } |
| 315 | 315 |
| 316 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(TrackSizingDirection direction, const Length& trackLength) const | 316 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(TrackSizingDirection direction, const Length& trackLength) const |
| 317 { | 317 { |
| 318 // FIXME: We still need to support calc() here (https://webkit.org/b/103761) . | 318 // FIXME: We still need to support calc() here (https://webkit.org/b/103761) . |
| 319 ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isVie wportPercentage()); | 319 ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isVie wportPercentage()); |
| 320 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight()), view()); | 320 // FIXME: The -1 is probably wrong here, but this needs someone with grid kn owledge to look at. |
|
ojan
2013/04/11 03:21:46
Would be good to say what the right value is, i.e.
cbiesinger
2013/04/12 01:17:52
Done.
| |
| 321 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight(), -1), view()); | |
| 321 } | 322 } |
| 322 | 323 |
| 323 const GridTrackSize& RenderGrid::gridTrackSize(TrackSizingDirection direction, s ize_t i) const | 324 const GridTrackSize& RenderGrid::gridTrackSize(TrackSizingDirection direction, s ize_t i) const |
| 324 { | 325 { |
| 325 const Vector<GridTrackSize>& trackStyles = (direction == ForColumns) ? style ()->gridColumns() : style()->gridRows(); | 326 const Vector<GridTrackSize>& trackStyles = (direction == ForColumns) ? style ()->gridColumns() : style()->gridRows(); |
| 326 if (i >= trackStyles.size()) | 327 if (i >= trackStyles.size()) |
| 327 return (direction == ForColumns) ? style()->gridAutoColumns() : style()- >gridAutoRows(); | 328 return (direction == ForColumns) ? style()->gridAutoColumns() : style()- >gridAutoRows(); |
| 328 | 329 |
| 329 return trackStyles[i]; | 330 return trackStyles[i]; |
| 330 } | 331 } |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 811 if (isOutOfFlowPositioned()) | 812 if (isOutOfFlowPositioned()) |
| 812 return "RenderGrid (positioned)"; | 813 return "RenderGrid (positioned)"; |
| 813 if (isAnonymous()) | 814 if (isAnonymous()) |
| 814 return "RenderGrid (generated)"; | 815 return "RenderGrid (generated)"; |
| 815 if (isRelPositioned()) | 816 if (isRelPositioned()) |
| 816 return "RenderGrid (relative positioned)"; | 817 return "RenderGrid (relative positioned)"; |
| 817 return "RenderGrid"; | 818 return "RenderGrid"; |
| 818 } | 819 } |
| 819 | 820 |
| 820 } // namespace WebCore | 821 } // namespace WebCore |
| OLD | NEW |