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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Issue 2343413004: [css-flexbox] Have to call updateBlockChildDirtyBitsBeforeLayout before layoutIfNeeded (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/css3/flexbox/bug527039.html ('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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 return std::max(LayoutUnit(), computeMainAxisExtentForChild(child, MainO rPreferredSize, flexBasis)); 873 return std::max(LayoutUnit(), computeMainAxisExtentForChild(child, MainO rPreferredSize, flexBasis));
874 874
875 if (child.styleRef().containsSize()) 875 if (child.styleRef().containsSize())
876 return LayoutUnit(); 876 return LayoutUnit();
877 877
878 LayoutUnit mainAxisExtent; 878 LayoutUnit mainAxisExtent;
879 if (childFlexBaseSizeRequiresLayout(child)) { 879 if (childFlexBaseSizeRequiresLayout(child)) {
880 if (childLayoutType == NeverLayout) 880 if (childLayoutType == NeverLayout)
881 return LayoutUnit(); 881 return LayoutUnit();
882 882
883 updateBlockChildDirtyBitsBeforeLayout(childLayoutType == ForceLayout, ch ild);
883 if (child.needsLayout() || childLayoutType == ForceLayout || !m_intrinsi cSizeAlongMainAxis.contains(&child)) { 884 if (child.needsLayout() || childLayoutType == ForceLayout || !m_intrinsi cSizeAlongMainAxis.contains(&child)) {
884 child.forceChildLayout(); 885 child.forceChildLayout();
885 cacheChildMainSize(child); 886 cacheChildMainSize(child);
886 } 887 }
887 mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child); 888 mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child);
888 } else { 889 } else {
889 // We don't need to add scrollbarLogicalWidth here. For overflow: scroll , the preferred width 890 // We don't need to add scrollbarLogicalWidth here. For overflow: scroll , the preferred width
890 // already includes the scrollbar size (via scrollbarLogicalWidth()). Fo r overflow: auto, 891 // already includes the scrollbar size (via scrollbarLogicalWidth()). Fo r overflow: auto,
891 // childFlexBaseSizeRequiresLayout returns true and we handle that via t he other branch 892 // childFlexBaseSizeRequiresLayout returns true and we handle that via t he other branch
892 // of this if. 893 // of this if.
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 DCHECK(child); 1957 DCHECK(child);
1957 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1958 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1958 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1959 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1959 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1960 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1960 adjustAlignmentForChild(*child, newOffset - originalOffset); 1961 adjustAlignmentForChild(*child, newOffset - originalOffset);
1961 } 1962 }
1962 } 1963 }
1963 } 1964 }
1964 1965
1965 } // namespace blink 1966 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/bug527039.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698