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

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

Issue 2561553002: [LayoutNG] Remove unnecessary #includes (Closed)
Patch Set: Let's see if Windows is more happy now. Created 4 years 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 #include "core/layout/ng/ng_units.h" 5 #include "core/layout/ng/ng_units.h"
6 6
7 #include "core/layout/ng/ng_writing_mode.h"
8
9 namespace blink { 7 namespace blink {
10 8
11 LayoutUnit MinAndMaxContentSizes::ShrinkToFit(LayoutUnit available_size) const { 9 LayoutUnit MinAndMaxContentSizes::ShrinkToFit(LayoutUnit available_size) const {
12 DCHECK_GE(max_content, min_content); 10 DCHECK_GE(max_content, min_content);
13 return std::min(max_content, std::max(min_content, available_size)); 11 return std::min(max_content, std::max(min_content, available_size));
14 } 12 }
15 13
16 NGPhysicalSize NGLogicalSize::ConvertToPhysical(NGWritingMode mode) const { 14 NGPhysicalSize NGLogicalSize::ConvertToPhysical(NGWritingMode mode) const {
17 return mode == kHorizontalTopBottom ? NGPhysicalSize(inline_size, block_size) 15 return mode == kHorizontalTopBottom ? NGPhysicalSize(inline_size, block_size)
18 : NGPhysicalSize(block_size, inline_size); 16 : NGPhysicalSize(block_size, inline_size);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 position.type = (direction == LTR) ? kTopLeft : kBottomLeft; 277 position.type = (direction == LTR) ? kTopLeft : kBottomLeft;
280 break; 278 break;
281 case kSidewaysLeftRight: 279 case kSidewaysLeftRight:
282 position.type = (direction == LTR) ? kBottomLeft : kTopLeft; 280 position.type = (direction == LTR) ? kBottomLeft : kTopLeft;
283 break; 281 break;
284 } 282 }
285 return position; 283 return position;
286 } 284 }
287 285
288 } // namespace blink 286 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698