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..56256ff489198c2eea435266aac86240c8a7157a 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 |
@@ -52,6 +52,8 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject( |
available_logical_height = |
box.containingBlock()->availableLogicalHeightForPercentageComputation(); |
} |
+ NGLogicalSize percentage_size = {available_logical_width, |
+ available_logical_height}; |
// When we have an override size, the available_logical_{width,height} will be |
// used as the final size of the box, so it has to include border and |
// padding. |
@@ -69,11 +71,12 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject( |
bool is_new_fc = |
box.isLayoutBlock() && toLayoutBlock(box).createsNewFormattingContext(); |
- NGLogicalSize size = {available_logical_width, available_logical_height}; |
+ NGLogicalSize logical_size = {available_logical_width, |
cbiesinger
2017/01/10 22:00:50
available_size is better. But I also meant if you
atotic
2017/01/10 23:24:15
logical_size can't go right under percentage_size,
cbiesinger
2017/01/10 23:26:36
I'll send a followup patch once this lands, I thin
|
+ available_logical_height}; |
auto writing_mode = FromPlatformWritingMode(box.styleRef().getWritingMode()); |
return NGConstraintSpaceBuilder(writing_mode) |
- .SetAvailableSize(size) |
- .SetPercentageResolutionSize(size) |
+ .SetAvailableSize(logical_size) |
+ .SetPercentageResolutionSize(percentage_size) |
.SetIsInlineDirectionTriggersScrollbar( |
box.styleRef().overflowInlineDirection() == EOverflow::Auto) |
.SetIsBlockDirectionTriggersScrollbar( |