Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc

Issue 2616093004: [ng_layout] Fix wrong percent_resolution_size (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698