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

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: Adding Test case Created 6 years, 3 months 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/09 14:39:40 Is this max required as we ensure that minTrackBre
Sunil Ratnu 2014/09/09 15:22:55 In this case, its not needed as before calling com
380
381 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth();
Julien - ping for review 2014/09/09 14:39:40 Let's correct the typo in the function name while
Sunil Ratnu 2014/09/09 17:28:30 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698