| 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_physical_constraint_space.h" | 5 #include "core/layout/ng/ng_physical_constraint_space.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace( | 9 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace( |
| 10 NGPhysicalSize container_size) | 10 NGPhysicalSize container_size) |
| 11 : container_size_(container_size), | 11 : container_size_(container_size), |
| 12 fixed_width_(0), | 12 fixed_width_(0), |
| 13 fixed_height_(0), | 13 fixed_height_(0), |
| 14 width_direction_triggers_scrollbar_(0), | 14 width_direction_triggers_scrollbar_(0), |
| 15 height_direction_triggers_scrollbar_(0), | 15 height_direction_triggers_scrollbar_(0), |
| 16 width_direction_fragmentation_type_(FragmentNone), | 16 width_direction_fragmentation_type_(FragmentNone), |
| 17 height_direction_fragmentation_type_(FragmentNone) {} | 17 height_direction_fragmentation_type_(FragmentNone) {} |
| 18 | 18 |
| 19 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace() | 19 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace() |
| 20 : fixed_width_(0), | 20 : fixed_width_(0), |
| 21 fixed_height_(0), | 21 fixed_height_(0), |
| 22 width_direction_triggers_scrollbar_(0), | 22 width_direction_triggers_scrollbar_(0), |
| 23 height_direction_triggers_scrollbar_(0), | 23 height_direction_triggers_scrollbar_(0), |
| 24 width_direction_fragmentation_type_(FragmentNone), | 24 width_direction_fragmentation_type_(FragmentNone), |
| 25 height_direction_fragmentation_type_(FragmentNone) {} | 25 height_direction_fragmentation_type_(FragmentNone) {} |
| 26 | 26 |
| 27 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace( | |
| 28 const NGPhysicalConstraintSpace& other) | |
| 29 : fixed_width_(other.fixed_width_), | |
| 30 fixed_height_(other.fixed_height_), | |
| 31 width_direction_triggers_scrollbar_( | |
| 32 other.width_direction_triggers_scrollbar_), | |
| 33 height_direction_triggers_scrollbar_( | |
| 34 other.height_direction_triggers_scrollbar_), | |
| 35 width_direction_fragmentation_type_( | |
| 36 other.width_direction_fragmentation_type_), | |
| 37 height_direction_fragmentation_type_( | |
| 38 other.height_direction_fragmentation_type_) {} | |
| 39 | |
| 40 void NGPhysicalConstraintSpace::AddExclusion(const NGExclusion exclusion, | 27 void NGPhysicalConstraintSpace::AddExclusion(const NGExclusion exclusion, |
| 41 unsigned options) { | 28 unsigned options) { |
| 42 exclusions_.append(exclusion); | 29 exclusions_.append(exclusion); |
| 43 } | 30 } |
| 44 | 31 |
| 45 const Vector<NGExclusion>& NGPhysicalConstraintSpace::Exclusions( | 32 const Vector<NGExclusion>& NGPhysicalConstraintSpace::Exclusions( |
| 46 unsigned options) const { | 33 unsigned options) const { |
| 47 // TODO(layout-ng): Filter based on options? Perhaps layout Opportunities | 34 // TODO(layout-ng): Filter based on options? Perhaps layout Opportunities |
| 48 // should filter instead? | 35 // should filter instead? |
| 49 return exclusions_; | 36 return exclusions_; |
| 50 } | 37 } |
| 51 | 38 |
| 52 } // namespace blink | 39 } // namespace blink |
| OLD | NEW |