Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 NGSpaceUtils_h | 5 #ifndef NGSpaceUtils_h |
| 6 #define NGSpaceUtils_h | 6 #define NGSpaceUtils_h |
| 7 | 7 |
| 8 #include "core/layout/ng/ng_constraint_space.h" | 8 #include "core/layout/ng/ng_constraint_space.h" |
| 9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
| 10 #include "wtf/Optional.h" | 10 #include "wtf/Optional.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 // Whether an in-flow block-level child creates a new formatting context. | 14 // Whether an in-flow block-level child creates a new formatting context. |
| 15 // | 15 // |
| 16 // This will *NOT* check the following cases: | 16 // This will *NOT* check the following cases: |
| 17 // - The child is out-of-flow, e.g. floating or abs-pos. | |
| 18 // - The child is a inline-level, e.g. "display: inline-block". | 17 // - The child is a inline-level, e.g. "display: inline-block". |
| 19 // - The child establishes a new formatting context, but should be a child of | 18 // - The child establishes a new formatting context, but should be a child of |
| 20 // another layout algorithm, e.g. "display: table-caption" or flex-item. | 19 // another layout algorithm, e.g. "display: table-caption" or flex-item. |
| 21 CORE_EXPORT bool IsNewFormattingContextForInFlowBlockLevelChild( | 20 CORE_EXPORT bool IsNewFormattingContextForInFlowBlockLevelChild( |
|
ikilpatrick
2017/03/23 16:39:59
rename now to:
IsNewFormattingContextForBlockLeve
Gleb Lanbin
2017/03/24 20:10:05
Done.
| |
| 22 const NGConstraintSpace& space, | 21 const NGConstraintSpace& space, |
| 23 const ComputedStyle& style); | 22 const ComputedStyle& style); |
| 24 | 23 |
| 25 // Gets the clearance offset based on the provided {@code style} and list of | 24 // Gets the clearance offset based on the provided {@code style} and list of |
| 26 // exclusions that represent left/right float. | 25 // exclusions that represent left/right float. |
| 27 CORE_EXPORT WTF::Optional<LayoutUnit> GetClearanceOffset( | 26 CORE_EXPORT WTF::Optional<LayoutUnit> GetClearanceOffset( |
| 28 const std::shared_ptr<NGExclusions>& exclusions, | 27 const std::shared_ptr<NGExclusions>& exclusions, |
| 29 const ComputedStyle& style); | 28 const ComputedStyle& style); |
| 30 | 29 |
| 31 } // namespace blink | 30 } // namespace blink |
| 32 | 31 |
| 33 #endif // NGSpaceUtils_h | 32 #endif // NGSpaceUtils_h |
| OLD | NEW |