Files
firefox/testing/web-platform/tests/css/CSS2/abspos/static-inside-table-cell.html
T
Aleks Totic e052bbfcf3 Bug 1486688 [wpt PR 12714] - [LayoutNG] Fix legacy initiated abspos invalidation, a=testonly
Automatic update from web-platform-tests[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 <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Morten Stenshorne <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586791}

--

wpt-commits: cab4439e4ed25884ba7c6bb0165b56521c7ef029
wpt-pr: 12714
2018-09-05 13:08:34 +00:00

18 lines
851 B
HTML

<!DOCTYPE html>
<title>Static position inside table cell</title>
<link rel="author" title="Aleks Totic" href="[email protected]">
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="container" style="position:relative;">
<div id="changeMe" style="height:100px;"></div>
<div style="display:table-cell;">
<div style="position:absolute; width:100px; height:100px; background:green;"></div>
<div style="width:100px; height:100px; background:red;"></div>
</div>
</div>
<script>
document.body.offsetTop;
document.querySelector('#changeMe').style.height = "auto";
</script>