Commit 762d8538 authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] UpdateMargins is no longer needed by LayoutNGBlockFlow

After CL 827548, margins are always copied to Legacy.
Additional copy in LayoutNGBlockFlow is no longer needed.
Ian says so.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If1aee4b15a966d58bd62f66190fdf00f035ed0b4
Reviewed-on: https://chromium-review.googlesource.com/830474Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524538}
parent fd965c94
......@@ -38,14 +38,6 @@ void LayoutNGBlockFlow::UpdateBlockLayout(bool relayout_children) {
scoped_refptr<NGLayoutResult> result =
NGBlockNode(this).Layout(*constraint_space);
// We need to update our margins as these are calculated once and stored in
// LayoutBox::margin_box_outsets_. Typically this happens within
// UpdateLogicalWidth and UpdateLogicalHeight.
//
// This primarily fixes cases where we are embedded inside another layout,
// for example LayoutView, LayoutFlexibleBox, etc.
UpdateMargins(*constraint_space);
for (NGOutOfFlowPositionedDescendant descendant :
result->OutOfFlowPositionedDescendants())
descendant.node.UseOldOutOfFlowPositioning();
......
......@@ -157,12 +157,6 @@ void LayoutNGMixin<Base>::Paint(const PaintInfo& paint_info,
LayoutBlockFlow::Paint(paint_info, paint_offset);
}
template <typename Base>
void LayoutNGMixin<Base>::UpdateMargins(
const NGConstraintSpace& constraint_space) {
Base::SetMargin(ComputePhysicalMargins(constraint_space, Base::StyleRef()));
}
template <typename Base>
bool LayoutNGMixin<Base>::NodeAtPoint(
HitTestResult& result,
......
......@@ -75,8 +75,6 @@ class CORE_TEMPLATE_CLASS_EXPORT LayoutNGMixin : public Base {
const NGBaseline* FragmentBaseline(NGBaselineAlgorithmType) const;
void UpdateMargins(const NGConstraintSpace&);
std::unique_ptr<NGInlineNodeData> ng_inline_node_data_;
scoped_refptr<NGLayoutResult> cached_result_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment