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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 const_cast<RenderGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si zingData, availableLogicalSpace); | 369 const_cast<RenderGrid*>(this)->computeUsedBreadthOfGridTracks(ForColumns, si zingData, availableLogicalSpace); |
370 | 370 |
371 for (size_t i = 0; i < sizingData.columnTracks.size(); ++i) { | 371 for (size_t i = 0; i < sizingData.columnTracks.size(); ++i) { |
372 LayoutUnit minTrackBreadth = sizingData.columnTracks[i].m_usedBreadth; | 372 LayoutUnit minTrackBreadth = sizingData.columnTracks[i].m_usedBreadth; |
373 LayoutUnit maxTrackBreadth = sizingData.columnTracks[i].m_maxBreadth; | 373 LayoutUnit maxTrackBreadth = sizingData.columnTracks[i].m_maxBreadth; |
374 maxTrackBreadth = std::max(maxTrackBreadth, minTrackBreadth); | 374 maxTrackBreadth = std::max(maxTrackBreadth, minTrackBreadth); |
375 | 375 |
376 minLogicalWidth += minTrackBreadth; | 376 minLogicalWidth += minTrackBreadth; |
377 maxLogicalWidth += maxTrackBreadth; | 377 maxLogicalWidth += maxTrackBreadth; |
378 | 378 |
379 // FIXME: This should add in the scrollbarWidth (e.g. see RenderFlexible Box). | 379 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); |
Julien - ping for review
2014/09/10 16:06:54
I would still remove it. If we fix the FIXME in co
Sunil Ratnu
2014/09/11 10:59:44
Done.
| |
380 | |
381 LayoutUnit scrollbarWidth = intrinsicScrollbarLogicalWidth(); | |
382 maxLogicalWidth += scrollbarWidth; | |
383 minLogicalWidth += scrollbarWidth; | |
380 } | 384 } |
381 } | 385 } |
382 | 386 |
383 void RenderGrid::computePreferredLogicalWidths() | 387 void RenderGrid::computePreferredLogicalWidths() |
384 { | 388 { |
385 ASSERT(preferredLogicalWidthsDirty()); | 389 ASSERT(preferredLogicalWidthsDirty()); |
386 | 390 |
387 m_minPreferredLogicalWidth = 0; | 391 m_minPreferredLogicalWidth = 0; |
388 m_maxPreferredLogicalWidth = 0; | 392 m_maxPreferredLogicalWidth = 0; |
389 | 393 |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1447 if (isOutOfFlowPositioned()) | 1451 if (isOutOfFlowPositioned()) |
1448 return "RenderGrid (positioned)"; | 1452 return "RenderGrid (positioned)"; |
1449 if (isAnonymous()) | 1453 if (isAnonymous()) |
1450 return "RenderGrid (generated)"; | 1454 return "RenderGrid (generated)"; |
1451 if (isRelPositioned()) | 1455 if (isRelPositioned()) |
1452 return "RenderGrid (relative positioned)"; | 1456 return "RenderGrid (relative positioned)"; |
1453 return "RenderGrid"; | 1457 return "RenderGrid"; |
1454 } | 1458 } |
1455 | 1459 |
1456 } // namespace blink | 1460 } // namespace blink |
OLD | NEW |