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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Issue 2692213006: [css-flexbox] Don't add extra space-between space at the end (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/justify-content-space-between.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index e859346c655bc793bf52353ddae4f599a063557c..3d7d93b4e88dddf1a86c2344a1ba5f2d3d531d8a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -1870,8 +1870,11 @@ void LayoutFlexibleBox::layoutAndPlaceChildren(
setFlowAwareLocationForChild(*child, childLocation);
mainAxisOffset += childMainExtent + flowAwareMarginEndForChild(*child);
- mainAxisOffset += justifyContentSpaceBetweenChildren(
- availableFreeSpace, distribution, children.size());
+ if (i != children.size() - 1) {
+ // The last item does not get extra space added.
+ mainAxisOffset += justifyContentSpaceBetweenChildren(
+ availableFreeSpace, distribution, children.size());
+ }
if (isPaginated)
updateFragmentationInfoForChild(*child);
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/justify-content-space-between.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698