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/NGConstraintSpace.h" | 5 #include "core/layout/ng/NGConstraintSpace.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 NGConstraintSpace::NGConstraintSpace(LayoutUnit inlineSize, | 9 NGConstraintSpace::NGConstraintSpace(LayoutUnit inlineContainerSize, |
10 LayoutUnit blockSize) | 10 LayoutUnit blockContainerSize) |
11 { | 11 { |
12 m_inlineSize = inlineSize; | 12 m_inlineContainerSize = inlineContainerSize; |
13 m_blockSize = blockSize; | 13 m_blockContainerSize = blockContainerSize; |
14 m_inlineOverflowSize = LayoutUnit(-1); | 14 m_inlineTriggersScrollbar = 0; |
15 m_blockOverflowSize = LayoutUnit(-1); | 15 m_blockTriggersScrollbar = 0; |
16 m_fixedInlineSize = 0; | 16 m_fixedInlineSize = 0; |
17 m_fixedBlockSize = 0; | 17 m_fixedBlockSize = 0; |
18 m_blockFragmentationType = FragmentNone; | 18 m_blockFragmentationType = FragmentNone; |
19 } | 19 } |
20 | 20 |
21 void NGConstraintSpace::addExclusion(const NGExclusion exclusion, | 21 void NGConstraintSpace::addExclusion(const NGExclusion exclusion, |
22 unsigned options) | 22 unsigned options) |
23 { | 23 { |
24 | 24 |
25 } | 25 } |
26 | 26 |
27 void NGConstraintSpace::setOverflowSize(LayoutUnit inlineSize, | 27 void NGConstraintSpace::setOverflowTriggersScrollbar(bool inlineTriggers, |
28 LayoutUnit blockSize) | 28 bool blockTriggers) |
29 { | 29 { |
30 m_inlineOverflowSize = inlineSize; | 30 m_inlineTriggersScrollbar = inlineTriggers; |
31 m_blockOverflowSize = blockSize; | 31 m_blockTriggersScrollbar = blockTriggers; |
32 } | 32 } |
33 | 33 |
34 void NGConstraintSpace::setFixedSize(bool inlineFixed, bool blockFixed) | 34 void NGConstraintSpace::setFixedSize(bool inlineFixed, bool blockFixed) |
35 { | 35 { |
36 m_fixedInlineSize = inlineFixed; | 36 m_fixedInlineSize = inlineFixed; |
37 m_fixedBlockSize = blockFixed; | 37 m_fixedBlockSize = blockFixed; |
38 } | 38 } |
39 | 39 |
40 void NGConstraintSpace::setFragmentationType(NGFragmentationType type) | 40 void NGConstraintSpace::setFragmentationType(NGFragmentationType type) |
41 { | 41 { |
(...skipping 10 matching lines...) Expand all Loading... |
52 | 52 |
53 NGLayoutOpportunityIterator NGConstraintSpace::layoutOpportunities( | 53 NGLayoutOpportunityIterator NGConstraintSpace::layoutOpportunities( |
54 unsigned clear, NGExclusionFlowType avoid) const | 54 unsigned clear, NGExclusionFlowType avoid) const |
55 { | 55 { |
56 // TODO(eae): Implement. | 56 // TODO(eae): Implement. |
57 NGLayoutOpportunityIterator iterator(this, clear, avoid); | 57 NGLayoutOpportunityIterator iterator(this, clear, avoid); |
58 return iterator; | 58 return iterator; |
59 } | 59 } |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
OLD | NEW |