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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_length_utils.h

Issue 2643043003: Constrain width/height to minmax values (Closed)
Patch Set: Fix copypaste error: ResolveWidth->ResolveHeight Created 3 years, 11 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
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 #ifndef NGLengthUtils_h 5 #ifndef NGLengthUtils_h
6 #define NGLengthUtils_h 6 #define NGLengthUtils_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_units.h" 9 #include "core/layout/ng/ng_units.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Resolves margin: auto in the inline direction after a box has been laid out. 115 // Resolves margin: auto in the inline direction after a box has been laid out.
116 // This uses the available size from the constraint space and the box size from 116 // This uses the available size from the constraint space and the box size from
117 // the fragment to compute the margins that are auto, if any, and adjusts 117 // the fragment to compute the margins that are auto, if any, and adjusts
118 // the given NGBoxStrut accordingly. 118 // the given NGBoxStrut accordingly.
119 CORE_EXPORT void ApplyAutoMargins(const NGConstraintSpace&, 119 CORE_EXPORT void ApplyAutoMargins(const NGConstraintSpace&,
120 const ComputedStyle&, 120 const ComputedStyle&,
121 const NGFragment&, 121 const NGFragment&,
122 NGBoxStrut* margins); 122 NGBoxStrut* margins);
123 123
124 CORE_EXPORT LayoutUnit ConstrainByMinMax(LayoutUnit length,
cbiesinger 2017/01/19 22:49:13 Now that you added this helper, can you make use o
atotic 2017/01/19 23:47:44 done. Found a couple. I still dislike lots of te
125 Optional<LayoutUnit> min,
126 Optional<LayoutUnit> max);
127
124 } // namespace blink 128 } // namespace blink
125 129
126 #endif // NGLengthUtils_h 130 #endif // NGLengthUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698