Commit e710e863 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[LayoutNG] Disable NGBoxFragmentPainter for multi-columns.

We only hit this section of code when LayoutNGBlockFragmentation is
enabled. Currently the NGBoxFragmentPainter doesn't support painting
column rules correctly.

This will have to be added before LayoutNGBlockFragmentation is enabled.

Bug: 988015
Change-Id: I40f2f873814f861e370428972fb52b12f3e4907b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869445Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712243}
parent 1a8e7c4a
...@@ -283,17 +283,25 @@ void LayoutNGBlockFlowMixin<Base>::Paint(const PaintInfo& paint_info) const { ...@@ -283,17 +283,25 @@ void LayoutNGBlockFlowMixin<Base>::Paint(const PaintInfo& paint_info) const {
} }
} }
// |NGBoxFragmentPainter| currently doesn't support column rules.
if (UNLIKELY(Base::MultiColumnFlowThread())) {
Base::Paint(paint_info);
return;
}
if (const NGPaintFragment* paint_fragment = PaintFragment()) {
NGBoxFragmentPainter(*paint_fragment).Paint(paint_info);
return;
}
if (UNLIKELY(RuntimeEnabledFeatures::LayoutNGFragmentPaintEnabled())) { if (UNLIKELY(RuntimeEnabledFeatures::LayoutNGFragmentPaintEnabled())) {
if (const NGPhysicalBoxFragment* fragment = CurrentFragment()) { if (const NGPhysicalBoxFragment* fragment = CurrentFragment()) {
NGBoxFragmentPainter(*fragment, PaintFragment()).Paint(paint_info); NGBoxFragmentPainter(*fragment).Paint(paint_info);
return; return;
} }
} }
if (const NGPaintFragment* paint_fragment = PaintFragment()) Base::Paint(paint_info);
NGBoxFragmentPainter(*paint_fragment).Paint(paint_info);
else
LayoutBlockFlow::Paint(paint_info);
} }
template <typename Base> template <typename Base>
......
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