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

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

Issue 134603002: Fix bottom padding on flex boxes with overflow. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix layout test Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/css3/flexbox/overflow-and-padding-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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 LayoutUnit RenderFlexibleBox::clientLogicalBottomAfterRepositioning() 335 LayoutUnit RenderFlexibleBox::clientLogicalBottomAfterRepositioning()
336 { 336 {
337 LayoutUnit maxChildLogicalBottom = 0; 337 LayoutUnit maxChildLogicalBottom = 0;
338 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) { 338 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo x()) {
339 if (child->isOutOfFlowPositioned()) 339 if (child->isOutOfFlowPositioned())
340 continue; 340 continue;
341 LayoutUnit childLogicalBottom = logicalTopForChild(child) + logicalHeigh tForChild(child) + marginAfterForChild(child); 341 LayoutUnit childLogicalBottom = logicalTopForChild(child) + logicalHeigh tForChild(child) + marginAfterForChild(child);
342 maxChildLogicalBottom = std::max(maxChildLogicalBottom, childLogicalBott om); 342 maxChildLogicalBottom = std::max(maxChildLogicalBottom, childLogicalBott om);
343 } 343 }
344 return std::max(clientLogicalBottom(), maxChildLogicalBottom); 344 return std::max(clientLogicalBottom(), maxChildLogicalBottom + paddingAfter( ));
345 } 345 }
346 346
347 bool RenderFlexibleBox::hasOrthogonalFlow(RenderBox* child) const 347 bool RenderFlexibleBox::hasOrthogonalFlow(RenderBox* child) const
348 { 348 {
349 // FIXME: If the child is a flexbox, then we need to check isHorizontalFlow. 349 // FIXME: If the child is a flexbox, then we need to check isHorizontalFlow.
350 return isHorizontalFlow() != child->isHorizontalWritingMode(); 350 return isHorizontalFlow() != child->isHorizontalWritingMode();
351 } 351 }
352 352
353 bool RenderFlexibleBox::isColumnFlow() const 353 bool RenderFlexibleBox::isColumnFlow() const
354 { 354 {
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 ASSERT(child); 1356 ASSERT(child);
1357 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1357 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1358 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1358 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1359 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1359 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1360 adjustAlignmentForChild(child, newOffset - originalOffset); 1360 adjustAlignmentForChild(child, newOffset - originalOffset);
1361 } 1361 }
1362 } 1362 }
1363 } 1363 }
1364 1364
1365 } 1365 }
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/overflow-and-padding-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698