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

[LayoutNG] Clean up style within ng_box_fragment_painter.cc

There should be no behaviour change.

Change-Id: I9de23687e6cf24c76de57f341e4fecd780c66fdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1860682Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705672}
parent 40eaa174
......@@ -288,9 +288,8 @@ void NGBoxFragmentPainter::RecordScrollHitTestData(
// Only create scroll hit test data for objects that scroll.
const auto* layer = PhysicalFragment().Layer();
if (!layer || !layer->GetScrollableArea() ||
!layer->GetScrollableArea()->ScrollsOverflow()) {
!layer->GetScrollableArea()->ScrollsOverflow())
return;
}
// TODO(pdr): Break dependency on LayoutObject functionality.
const LayoutObject& layout_object = *box_fragment_.GetLayoutObject();
......@@ -343,8 +342,10 @@ void NGBoxFragmentPainter::PaintObject(
return;
}
if (paint_phase == PaintPhase::kMask && is_visible)
return PaintMask(paint_info, paint_offset);
if (paint_phase == PaintPhase::kMask && is_visible) {
PaintMask(paint_info, paint_offset);
return;
}
if (paint_phase == PaintPhase::kForeground &&
paint_info.ShouldAddUrlMetadata()) {
......@@ -379,15 +380,13 @@ void NGBoxFragmentPainter::PaintObject(
PaintFloats(paint_info);
}
} else {
if (paint_phase != PaintPhase::kFloat) {
if (paint_phase != PaintPhase::kFloat)
PaintBlockChildren(paint_info);
}
if (paint_phase == PaintPhase::kFloat ||
paint_phase == PaintPhase::kSelection ||
paint_phase == PaintPhase::kTextClip) {
paint_phase == PaintPhase::kTextClip)
PaintFloats(paint_info);
}
}
}
......@@ -525,9 +524,8 @@ void NGBoxFragmentPainter::PaintBlockFloatingChildren(
continue;
}
if (const auto* child_container =
DynamicTo<NGPhysicalContainerFragment>(&child_fragment)) {
DynamicTo<NGPhysicalContainerFragment>(&child_fragment))
PaintBlockFloatingChildren(*child_container, paint_info);
}
}
}
......
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