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

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

Issue 2616613003: Fix calculation of abspos style properties: left/padding/width/height... (Closed)
Patch Set: Rebase for merge conflicts 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 | « third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h ('k') | 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_out_of_flow_layout_part.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
index 241640e4b468d238cae4d2669e9f34385b38923f..5c875fac97cf9b41945f2ffc7570b79d32529dc2 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
@@ -8,6 +8,7 @@
#include "core/layout/ng/ng_block_node.h"
#include "core/layout/ng/ng_constraint_space_builder.h"
#include "core/layout/ng/ng_length_utils.h"
+#include "core/layout/ng/ng_physical_fragment.h"
#include "core/style/ComputedStyle.h"
#include "core/layout/ng/ng_fragment.h"
@@ -34,6 +35,7 @@ NGOutOfFlowLayoutPart::NGOutOfFlowLayoutPart(
NGConstraintSpaceBuilder space_builder(
FromPlatformWritingMode(container_style->getWritingMode()));
space_builder.SetAvailableSize(space_size);
+ space_builder.SetPercentageResolutionSize(space_size);
space_builder.SetIsNewFormattingContext(true);
space_builder.SetTextDirection(container_style->direction());
parent_space_ = space_builder.ToConstraintSpace();
@@ -107,8 +109,7 @@ bool NGOutOfFlowLayoutPart::ComputeInlineSizeEstimate() {
if (AbsoluteNeedsChildInlineSize(*node_->Style())) {
MinAndMaxContentSizes size;
if (node_->ComputeMinAndMaxContentSizes(&size)) {
- inline_estimate_ =
- size.ShrinkToFit(parent_space_->AvailableSize().inline_size);
+ inline_estimate_ = size;
return true;
}
return false;
@@ -145,7 +146,7 @@ bool NGOutOfFlowLayoutPart::ComputeNodeFragment() {
if (block_estimate_)
available_size.block_size = *block_estimate_;
builder.SetAvailableSize(available_size);
- builder.SetPercentageResolutionSize(available_size);
+ builder.SetPercentageResolutionSize(parent_space_->AvailableSize());
if (block_estimate_)
builder.SetIsFixedSizeBlock(true);
builder.SetIsFixedSizeInline(true);
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698