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

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

Issue 439063002: flexbox: incorrect flexbox height with overflow:auto on flex item (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « LayoutTests/css3/flexbox/flexbox-height-with-overflow-auto-expected.txt ('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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 updateAutoMarginsInMainAxis(child, autoMarginOffset); 1104 updateAutoMarginsInMainAxis(child, autoMarginOffset);
1105 1105
1106 LayoutUnit childCrossAxisMarginBoxExtent; 1106 LayoutUnit childCrossAxisMarginBoxExtent;
1107 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI nCrossAxis(child)) { 1107 if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsI nCrossAxis(child)) {
1108 LayoutUnit ascent = marginBoxAscentForChild(child); 1108 LayoutUnit ascent = marginBoxAscentForChild(child);
1109 LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAx isExtentForChild(child)) - ascent; 1109 LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAx isExtentForChild(child)) - ascent;
1110 1110
1111 maxAscent = std::max(maxAscent, ascent); 1111 maxAscent = std::max(maxAscent, ascent);
1112 maxDescent = std::max(maxDescent, descent); 1112 maxDescent = std::max(maxDescent, descent);
1113 1113
1114 childCrossAxisMarginBoxExtent = maxAscent + maxDescent; 1114 childCrossAxisMarginBoxExtent = maxAscent + maxDescent + child->scro llbarLogicalHeight();
cbiesinger 2014/08/06 02:52:49 Doesn't this have to be scrollbarLogicalWidth for
harpreet.sk 2014/08/06 13:20:23 @Chris: Thanks for the comment. Yes it has to be s
1115 } else { 1115 } else {
1116 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child); 1116 childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(chi ld) + crossAxisMarginExtentForChild(child) + child->scrollbarLogicalHeight();
1117 } 1117 }
1118 if (!isColumnFlow()) 1118 if (!isColumnFlow())
1119 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent())); 1119 setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwa reBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + cros sAxisScrollbarExtent()));
1120 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent); 1120 maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAx isMarginBoxExtent);
1121 1121
1122 mainAxisOffset += flowAwareMarginStartForChild(child); 1122 mainAxisOffset += flowAwareMarginStartForChild(child);
1123 1123
1124 LayoutUnit childMainExtent = mainAxisExtentForChild(child); 1124 LayoutUnit childMainExtent = mainAxisExtentForChild(child);
1125 // In an RTL column situation, this will apply the margin-right/margin-e nd on the left. 1125 // In an RTL column situation, this will apply the margin-right/margin-e nd on the left.
1126 // This will be fixed later in flipForRightToLeftColumn. 1126 // This will be fixed later in flipForRightToLeftColumn.
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 ASSERT(child); 1397 ASSERT(child);
1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1398 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1399 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1400 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1401 adjustAlignmentForChild(child, newOffset - originalOffset); 1401 adjustAlignmentForChild(child, newOffset - originalOffset);
1402 } 1402 }
1403 } 1403 }
1404 } 1404 }
1405 1405
1406 } 1406 }
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/flexbox-height-with-overflow-auto-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698