| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/layout/ng/ng_min_max_content_size.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 LayoutUnit MinMaxContentSize::ShrinkToFit(LayoutUnit available_size) const { | |
| 10 DCHECK_GE(max_content, min_content); | |
| 11 return std::min(max_content, std::max(min_content, available_size)); | |
| 12 } | |
| 13 | |
| 14 bool MinMaxContentSize::operator==(const MinMaxContentSize& other) const { | |
| 15 return min_content == other.min_content && max_content == other.max_content; | |
| 16 } | |
| 17 | |
| 18 std::ostream& operator<<(std::ostream& stream, const MinMaxContentSize& value) { | |
| 19 return stream << "(" << value.min_content << ", " << value.max_content << ")"; | |
| 20 } | |
| 21 | |
| 22 } // namespace blink | |
| OLD | NEW |