| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ng/ng_constraint_space.h" | 5 #include "core/layout/ng/ng_constraint_space.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBox.h" | 7 #include "core/layout/LayoutBox.h" |
| 8 #include "core/style/ComputedStyle.h" | 8 #include "core/style/ComputedStyle.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 child.containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding); | 34 child.containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding); |
| 35 if (child.hasOverrideLogicalContentWidth()) { | 35 if (child.hasOverrideLogicalContentWidth()) { |
| 36 container_logical_width = child.overrideLogicalContentWidth(); | 36 container_logical_width = child.overrideLogicalContentWidth(); |
| 37 fixedInline = true; | 37 fixedInline = true; |
| 38 } | 38 } |
| 39 if (child.hasOverrideLogicalContentHeight()) { | 39 if (child.hasOverrideLogicalContentHeight()) { |
| 40 container_logical_width = child.overrideLogicalContentHeight(); | 40 container_logical_width = child.overrideLogicalContentHeight(); |
| 41 fixedBlock = true; | 41 fixedBlock = true; |
| 42 } | 42 } |
| 43 NGLogicalSize size; | 43 NGLogicalSize size; |
| 44 size.inlineSize = container_logical_width; | 44 size.inline_size = container_logical_width; |
| 45 size.blockSize = container_logical_height; | 45 size.block_size = container_logical_height; |
| 46 NGConstraintSpace space(size); | 46 NGConstraintSpace space(size); |
| 47 space.setOverflowTriggersScrollbar( | 47 space.setOverflowTriggersScrollbar( |
| 48 child.styleRef().overflowInlineDirection() == OverflowAuto, | 48 child.styleRef().overflowInlineDirection() == OverflowAuto, |
| 49 child.styleRef().overflowBlockDirection() == OverflowAuto); | 49 child.styleRef().overflowBlockDirection() == OverflowAuto); |
| 50 space.setFixedSize(fixedInline, fixedBlock); | 50 space.setFixedSize(fixedInline, fixedBlock); |
| 51 return space; | 51 return space; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void NGConstraintSpace::addExclusion(const NGExclusion exclusion, | 54 void NGConstraintSpace::addExclusion(const NGExclusion exclusion, |
| 55 unsigned options) {} | 55 unsigned options) {} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 NGLayoutOpportunityIterator NGConstraintSpace::layoutOpportunities( | 79 NGLayoutOpportunityIterator NGConstraintSpace::layoutOpportunities( |
| 80 unsigned clear, | 80 unsigned clear, |
| 81 bool for_inline_or_bfc) const { | 81 bool for_inline_or_bfc) const { |
| 82 // TODO(eae): Implement. | 82 // TODO(eae): Implement. |
| 83 NGLayoutOpportunityIterator iterator(this, clear, for_inline_or_bfc); | 83 NGLayoutOpportunityIterator iterator(this, clear, for_inline_or_bfc); |
| 84 return iterator; | 84 return iterator; |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |