[LayoutNG] Fix legacy initiated abspos invalidation
Bug:
LayoutBlock::LayoutPositionedObject had a static position check whether
child reflow was necessary:
  if (.... ||
       (!IsLayoutNGBlockFlow() &&
        NeedsLayoutDueToStaticPosition(positioned_object))))
    layout_scope.SetChildNeedsLayout(positioned_object);
This check would skip reflow for all NGBlockFlow children.
This is incorrect. If child abspos layout was initiated by Legacy,
we should check static position.
Fix:
There was no way to tell in current code whether child abspos layout
was initiated by legacy.
Added a flag is_legacy_initiated_out_of_flow_layout_.
Flag was added to LayoutBlock per ikilpatrick recommendation.
Flag is set to true in LayoutNGBlockFlow::UpdateOutOfFlowBlockLayout
Flag is set to false in NGOutOfFlowLayout.
With this fix, checkboxes on code review page are correct.
Bug: 863865
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ifc55ac03b76dd1aa2113181681bca1b5a2832fb2
Reviewed-on: https://chromium-review.googlesource.com/1190723
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: 
Koji Ishii <kojii@chromium.org>
Reviewed-by: 
Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586791}
Showing
Please register or sign in to comment