Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc |
| index 5af006f4649233d7cc55059be4c0fa0b5c8e8fce..43842676ee03d70f65598f4aebe27c97f5b77ff2 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc |
| @@ -70,10 +70,13 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject( |
| box.isLayoutBlock() && toLayoutBlock(box).createsNewFormattingContext(); |
| NGLogicalSize size = {available_logical_width, available_logical_height}; |
| + NGLogicalSize percentage_size = { |
| + box.containingBlockLogicalWidthForContent(), |
| + box.containingBlockLogicalHeightForContent(IncludeMarginBorderPadding)}; |
|
cbiesinger
2017/01/09 18:17:10
OK, a few questions:
- Here you explicitly choose
atotic
2017/01/09 23:22:13
You are right. The real problem was that available
|
| auto writing_mode = FromPlatformWritingMode(box.styleRef().getWritingMode()); |
| return NGConstraintSpaceBuilder(writing_mode) |
| .SetAvailableSize(size) |
| - .SetPercentageResolutionSize(size) |
| + .SetPercentageResolutionSize(percentage_size) |
| .SetIsInlineDirectionTriggersScrollbar( |
| box.styleRef().overflowInlineDirection() == EOverflow::Auto) |
| .SetIsBlockDirectionTriggersScrollbar( |