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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 const_cast<RenderGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, availableLogicalSpace); | 381 const_cast<RenderGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si
zingData, availableLogicalSpace); |
382 | 382 |
383 for (size_t i = 0; i < sizingData.columnTracks.size(); ++i) { | 383 for (size_t i = 0; i < sizingData.columnTracks.size(); ++i) { |
384 LayoutUnit minTrackBreadth = sizingData.columnTracks[i].m_usedBreadth; | 384 LayoutUnit minTrackBreadth = sizingData.columnTracks[i].m_usedBreadth; |
385 LayoutUnit maxTrackBreadth = sizingData.columnTracks[i].m_maxBreadth; | 385 LayoutUnit maxTrackBreadth = sizingData.columnTracks[i].m_maxBreadth; |
386 maxTrackBreadth = std::max(maxTrackBreadth, minTrackBreadth); | 386 maxTrackBreadth = std::max(maxTrackBreadth, minTrackBreadth); |
387 | 387 |
388 minLogicalWidth += minTrackBreadth; | 388 minLogicalWidth += minTrackBreadth; |
389 maxLogicalWidth += maxTrackBreadth; | 389 maxLogicalWidth += maxTrackBreadth; |
390 | 390 |
391 // FIXME: This should add in the scrollbarWidth (e.g. see RenderFlexible
Box). | 391 LayoutUnit scrollbarWidth = intrinsicScrollbarLogicalWidth(); |
| 392 maxLogicalWidth += scrollbarWidth; |
| 393 minLogicalWidth += scrollbarWidth; |
392 } | 394 } |
393 } | 395 } |
394 | 396 |
395 void RenderGrid::computePreferredLogicalWidths() | 397 void RenderGrid::computePreferredLogicalWidths() |
396 { | 398 { |
397 ASSERT(preferredLogicalWidthsDirty()); | 399 ASSERT(preferredLogicalWidthsDirty()); |
398 | 400 |
399 m_minPreferredLogicalWidth = 0; | 401 m_minPreferredLogicalWidth = 0; |
400 m_maxPreferredLogicalWidth = 0; | 402 m_maxPreferredLogicalWidth = 0; |
401 | 403 |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 if (isOutOfFlowPositioned()) | 1602 if (isOutOfFlowPositioned()) |
1601 return "RenderGrid (positioned)"; | 1603 return "RenderGrid (positioned)"; |
1602 if (isAnonymous()) | 1604 if (isAnonymous()) |
1603 return "RenderGrid (generated)"; | 1605 return "RenderGrid (generated)"; |
1604 if (isRelPositioned()) | 1606 if (isRelPositioned()) |
1605 return "RenderGrid (relative positioned)"; | 1607 return "RenderGrid (relative positioned)"; |
1606 return "RenderGrid"; | 1608 return "RenderGrid"; |
1607 } | 1609 } |
1608 | 1610 |
1609 } // namespace blink | 1611 } // namespace blink |
OLD | NEW |