| 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 98ecc61f2ff93e7a3f385b83e735a3d4efcc8128..4c8143b0da7fa63c5812017555a174c167f47114 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
|
| @@ -79,4 +79,17 @@ WTF::Optional<LayoutUnit> GetClearanceOffset(
|
| return WTF::nullopt;
|
| }
|
|
|
| +bool ShouldShrinkToFit(const NGConstraintSpace& parent_space,
|
| + const ComputedStyle& style) {
|
| + NGWritingMode child_writing_mode =
|
| + FromPlatformWritingMode(style.getWritingMode());
|
| + // Whether the child and the containing block are parallel to each other.
|
| + // Example: vertical-rl and vertical-lr
|
| + bool is_in_parallel_flow =
|
| + IsParallelWritingMode(parent_space.WritingMode(), child_writing_mode);
|
| +
|
| + return style.display() == EDisplay::kInlineBlock || style.isFloating() ||
|
| + !is_in_parallel_flow;
|
| +}
|
| +
|
| } // namespace blink
|
|
|