Commit 172c40cf authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

Eliminate |CurrentFragment| in |LayoutNGBlockFlowMixin<Base>::AddOutlineRects|

Currently |LayoutNGBlockFlowMixin<Base>::AddOutlineRects|
falls back to legacy when NG block fragmented. This should be
implemented in NG.

This patch replces with |GetPhysicalFragment| without changing
the behavior for now.

Investigation:
https://docs.google.com/document/d/1Yx7iGeHA2bTZory9kpA2NJNd-nMplGlUIEJl7gglqVo/edit?usp=sharing

This patch has no behavior changes.

Bug: 1061423, 1145048
Change-Id: I22d0e6b3f000060c01e3314e835cb693f2fdd87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2514940Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823599}
parent b38caf4d
...@@ -115,7 +115,10 @@ void LayoutNGBlockFlowMixin<Base>::AddOutlineRects( ...@@ -115,7 +115,10 @@ void LayoutNGBlockFlowMixin<Base>::AddOutlineRects(
return; return;
} }
if (const NGPhysicalBoxFragment* fragment = CurrentFragment()) { // TODO(crbug.com/1145048): Currently |NGBoxPhysicalFragment| does not support
// NG block fragmentation. Fallback to the legacy code path.
if (Base::PhysicalFragmentCount() == 1) {
const NGPhysicalBoxFragment* fragment = Base::GetPhysicalFragment(0);
if (fragment->HasItems()) { if (fragment->HasItems()) {
fragment->AddSelfOutlineRects(additional_offset, include_block_overflows, fragment->AddSelfOutlineRects(additional_offset, include_block_overflows,
&rects); &rects);
......
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