| Index: third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc
|
| index 62271d15cafa1aa10d1a1fecea4088830b363b8a..7d11bc2854f1c25d23c771abd8f8373836e42cf3 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc
|
| @@ -66,7 +66,7 @@ bool IsNewFormattingContextForBlockLevelChild(const ComputedStyle& parent_style,
|
|
|
| WTF::Optional<LayoutUnit> GetClearanceOffset(
|
| const std::shared_ptr<NGExclusions>& exclusions,
|
| - const ComputedStyle& style) {
|
| + EClear clear_type) {
|
| const NGExclusion* right_exclusion = exclusions->last_right_float;
|
| const NGExclusion* left_exclusion = exclusions->last_left_float;
|
|
|
| @@ -79,7 +79,7 @@ WTF::Optional<LayoutUnit> GetClearanceOffset(
|
| right_offset = right_exclusion->rect.BlockEndOffset();
|
| }
|
|
|
| - switch (style.Clear()) {
|
| + switch (clear_type) {
|
| case EClear::kNone:
|
| return WTF::nullopt; // nothing to do here.
|
| case EClear::kLeft:
|
| @@ -106,4 +106,13 @@ bool ShouldShrinkToFit(const ComputedStyle& parent_style,
|
| !is_in_parallel_flow;
|
| }
|
|
|
| +void AdjustToClearance(const WTF::Optional<LayoutUnit>& clearance_offset,
|
| + NGLogicalOffset* offset) {
|
| + DCHECK(offset);
|
| + if (clearance_offset) {
|
| + offset->block_offset =
|
| + std::max(clearance_offset.value(), offset->block_offset);
|
| + }
|
| +}
|
| +
|
| } // namespace blink
|
|
|