Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_min_max_content_size.cc

Issue 2721613003: [LayoutNG] Move remaining ng_units structs to their own files (Closed)
Patch Set: Don't export NGBoxStrut for now Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698