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

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

Issue 870013003: Div having contentEditable and display:grid cannot be edited if it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ResolveConflict Created 5 years, 9 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 | « Source/core/layout/LayoutGrid.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 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 ASSERT(inflexibleItems.size() > 0); 654 ASSERT(inflexibleItems.size() > 0);
655 } 655 }
656 656
657 layoutAndPlaceChildren(crossAxisOffset, orderedChildren, childSizes, ava ilableFreeSpace, relayoutChildren, lineContexts, hasInfiniteLineLength); 657 layoutAndPlaceChildren(crossAxisOffset, orderedChildren, childSizes, ava ilableFreeSpace, relayoutChildren, lineContexts, hasInfiniteLineLength);
658 } 658 }
659 if (hasLineIfEmpty()) { 659 if (hasLineIfEmpty()) {
660 // Even if computeNextFlexLine returns true, the flexbox might not have 660 // Even if computeNextFlexLine returns true, the flexbox might not have
661 // a line because all our children might be out of flow positioned. 661 // a line because all our children might be out of flow positioned.
662 // Instead of just checking if we have a line, make sure the flexbox 662 // Instead of just checking if we have a line, make sure the flexbox
663 // has at least a line's worth of height to cover this case. 663 // has at least a line's worth of height to cover this case.
664 LayoutUnit minHeight = borderAndPaddingLogicalHeight() 664 LayoutUnit minHeight = minimumLogicalHeightForEmptyLine();
665 + lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : Vert icalLine, PositionOfInteriorLineBoxes)
666 + scrollbarLogicalHeight();
667 if (size().height() < minHeight) 665 if (size().height() < minHeight)
668 setLogicalHeight(minHeight); 666 setLogicalHeight(minHeight);
669 } 667 }
670 668
671 updateLogicalHeight(); 669 updateLogicalHeight();
672 repositionLogicalHeightDependentFlexItems(lineContexts); 670 repositionLogicalHeightDependentFlexItems(lineContexts);
673 } 671 }
674 672
675 LayoutUnit RenderFlexibleBox::autoMarginOffsetInMainAxis(const OrderedFlexItemLi st& children, LayoutUnit& availableFreeSpace) 673 LayoutUnit RenderFlexibleBox::autoMarginOffsetInMainAxis(const OrderedFlexItemLi st& children, LayoutUnit& availableFreeSpace)
676 { 674 {
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 ASSERT(child); 1399 ASSERT(child);
1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1400 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1401 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1402 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1405 adjustAlignmentForChild(*child, newOffset - originalOffset); 1403 adjustAlignmentForChild(*child, newOffset - originalOffset);
1406 } 1404 }
1407 } 1405 }
1408 } 1406 }
1409 1407
1410 } 1408 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutGrid.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698