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 MinAndMaxContentSizes::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 MinAndMaxContentSizes::operator==( |
| 15 const MinAndMaxContentSizes& other) const { |
| 16 return min_content == other.min_content && max_content == other.max_content; |
| 17 } |
| 18 |
| 19 } // namespace blink |
OLD | NEW |