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

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: Remove opera prefix from test Created 6 years 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
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698