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

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

Issue 324073003: Flex box word-wrap is not adhering to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 { 307 {
308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) 308 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next())
309 paintChildAsInlineBlock(child, paintInfo, paintOffset); 309 paintChildAsInlineBlock(child, paintInfo, paintOffset);
310 } 310 }
311 311
312 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts) 312 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts)
313 { 313 {
314 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line Contexts[0].crossAxisOffset; 314 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line Contexts[0].crossAxisOffset;
315 alignFlexLines(lineContexts); 315 alignFlexLines(lineContexts);
316 316
317 // If we have a single line flexbox, the line height is all the available sp ace. 317 // If we have a single line flexbox, the line height is all the available sp ace.
tony 2014/06/10 16:30:21 Please update this comment.
harpreet.sk 2014/06/11 08:13:16 Done.
318 // For flex-direction: row, this means we need to use the height, so we do t his after calling updateLogicalHeight. 318 // For flex-direction: row, this means we need to use the height, so we do t his after calling updateLogicalHeight.
319 if (!isMultiline() && lineContexts.size() == 1) 319 if (lineContexts.size() == 1)
320 lineContexts[0].crossAxisExtent = crossAxisContentExtent(); 320 lineContexts[0].crossAxisExtent = crossAxisContentExtent();
321 alignChildren(lineContexts); 321 alignChildren(lineContexts);
322 322
323 if (style()->flexWrap() == FlexWrapReverse) 323 if (style()->flexWrap() == FlexWrapReverse)
324 flipForWrapReverse(lineContexts, crossAxisStartEdge); 324 flipForWrapReverse(lineContexts, crossAxisStartEdge);
325 325
326 // direction:rtl + flex-direction:column means the cross-axis direction is f lipped. 326 // direction:rtl + flex-direction:column means the cross-axis direction is f lipped.
327 flipForRightToLeftColumn(); 327 flipForRightToLeftColumn();
328 } 328 }
329 329
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 ASSERT(child); 1413 ASSERT(child);
1414 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1414 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1415 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1415 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1416 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1416 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1417 adjustAlignmentForChild(child, newOffset - originalOffset); 1417 adjustAlignmentForChild(child, newOffset - originalOffset);
1418 } 1418 }
1419 } 1419 }
1420 } 1420 }
1421 1421
1422 } 1422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698