| OLD | NEW |
| 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_length_utils.h" | 5 #include "core/layout/ng/ng_length_utils.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/ng_constraint_space.h" | 7 #include "core/layout/ng/ng_constraint_space.h" |
| 8 #include "core/layout/ng/ng_fragment.h" | 8 #include "core/layout/ng/ng_fragment_base.h" |
| 9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| 11 #include "platform/Length.h" | 11 #include "platform/Length.h" |
| 12 #include "wtf/Optional.h" | 12 #include "wtf/Optional.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 // TODO(layout-ng): | 15 // TODO(layout-ng): |
| 16 // - positioned and/or replaced calculations | 16 // - positioned and/or replaced calculations |
| 17 // - Take scrollbars into account | 17 // - Take scrollbars into account |
| 18 | 18 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 margins->inline_start = available_space / 2; | 346 margins->inline_start = available_space / 2; |
| 347 margins->inline_end = available_space - margins->inline_start; | 347 margins->inline_end = available_space - margins->inline_start; |
| 348 } else if (style.marginStart().isAuto()) { | 348 } else if (style.marginStart().isAuto()) { |
| 349 margins->inline_start = available_space; | 349 margins->inline_start = available_space; |
| 350 } else if (style.marginEnd().isAuto()) { | 350 } else if (style.marginEnd().isAuto()) { |
| 351 margins->inline_end = available_space; | 351 margins->inline_end = available_space; |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 } // namespace blink | 355 } // namespace blink |
| OLD | NEW |