Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 772 true : | 772 true : |
| 773 child.computePercentageLogicalHeight(length) != -1; | 773 child.computePercentageLogicalHeight(length) != -1; |
| 774 } | 774 } |
| 775 // TODO(cbiesinger): Eventually we should support other types of sizes here. Requires updating | 775 // TODO(cbiesinger): Eventually we should support other types of sizes here. Requires updating |
| 776 // computeMainSizeFromAspectRatioUsing. | 776 // computeMainSizeFromAspectRatioUsing. |
| 777 return length.isFixed(); | 777 return length.isFixed(); |
| 778 } | 778 } |
| 779 | 779 |
| 780 bool LayoutFlexibleBox::childFlexBaseSizeRequiresLayout(const LayoutBox& child) const | 780 bool LayoutFlexibleBox::childFlexBaseSizeRequiresLayout(const LayoutBox& child) const |
| 781 { | 781 { |
| 782 return !mainAxisLengthIsDefinite(child, flexBasisForChild(child)) && ( | 782 return (!mainAxisLengthIsDefinite(child, flexBasisForChild(child)) |
| 783 hasOrthogonalFlow(child) || crossAxisOverflowForChild(child) == Overflow Auto); | 783 && (hasOrthogonalFlow(child) |
| 784 || (crossAxisOverflowForChild(child) == OverflowAuto | |
| 785 && !PaintLayerScrollableArea::FreezeScrollbarsScope::scrollbarsA reFrozen()))); | |
|
cbiesinger
2016/06/06 23:23:42
We might want to split this up into separate state
| |
| 784 } | 786 } |
| 785 | 787 |
| 786 void LayoutFlexibleBox::cacheChildMainSize(const LayoutBox& child) | 788 void LayoutFlexibleBox::cacheChildMainSize(const LayoutBox& child) |
| 787 { | 789 { |
| 788 ASSERT(!child.needsLayout()); | 790 ASSERT(!child.needsLayout()); |
| 789 LayoutUnit mainSize; | 791 LayoutUnit mainSize; |
| 790 if (hasOrthogonalFlow(child)) { | 792 if (hasOrthogonalFlow(child)) { |
| 791 mainSize = child.logicalHeight(); | 793 mainSize = child.logicalHeight(); |
| 792 } else { | 794 } else { |
| 793 // The max preferred logical width includes the intrinsic scrollbar logi cal width, which is only set for | 795 // The max preferred logical width includes the intrinsic scrollbar logi cal width, which is only set for |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1861 ASSERT(child); | 1863 ASSERT(child); |
| 1862 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; | 1864 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; |
| 1863 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 1865 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
| 1864 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; | 1866 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; |
| 1865 adjustAlignmentForChild(*child, newOffset - originalOffset); | 1867 adjustAlignmentForChild(*child, newOffset - originalOffset); |
| 1866 } | 1868 } |
| 1867 } | 1869 } |
| 1868 } | 1870 } |
| 1869 | 1871 |
| 1870 } // namespace blink | 1872 } // namespace blink |
| OLD | NEW |