Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: Source/core/rendering/RenderGrid.cpp

Issue 535913002: Add scrollbar logical width while computing intrinsic logical width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use width: fit-content in test case Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 if (isOutOfFlowPositioned()) 1519 if (isOutOfFlowPositioned())
1518 return "RenderGrid (positioned)"; 1520 return "RenderGrid (positioned)";
1519 if (isAnonymous()) 1521 if (isAnonymous())
1520 return "RenderGrid (generated)"; 1522 return "RenderGrid (generated)";
1521 if (isRelPositioned()) 1523 if (isRelPositioned())
1522 return "RenderGrid (relative positioned)"; 1524 return "RenderGrid (relative positioned)";
1523 return "RenderGrid"; 1525 return "RenderGrid";
1524 } 1526 }
1525 1527
1526 } // namespace blink 1528 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698