[LayoutNG] Fix float double-painting crash
The crash trigger was Legacy and NG painting the same float. This is how it happens: NGBlockNode::CopyChildFragmentPosition adds float to ContainingBlock() float list. Float might propagate to ContainingBlock()'s ancestor and set the ShouldPaint() flag. How this happens is still mysterious to me, the obvious suspect UpdateAncestorShouldPaintFloatingObject does not get called. NG will paint the float if ContainingBlock has PaintFragment(). My fix is a bit of a hack: in Legacy, if we know that float will get painted by NG, do not paint it. This fixes the crash. Test still fails, but that is block layout algorithm problem. Bug: 864398 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I7ebe82a2188baaa076476e4f5cbd78bab7127875 Reviewed-on: https://chromium-review.googlesource.com/1244246 Commit-Queue: Aleks Totic <atotic@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Reviewed-by:
Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#594428}
Showing
Please register or sign in to comment