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( ...@@ -288,9 +288,8 @@ void NGBoxFragmentPainter::RecordScrollHitTestData(
// Only create scroll hit test data for objects that scroll. // Only create scroll hit test data for objects that scroll.
const auto* layer = PhysicalFragment().Layer(); const auto* layer = PhysicalFragment().Layer();
if (!layer || !layer->GetScrollableArea() || if (!layer || !layer->GetScrollableArea() ||
!layer->GetScrollableArea()->ScrollsOverflow()) { !layer->GetScrollableArea()->ScrollsOverflow())
return; return;
}
// TODO(pdr): Break dependency on LayoutObject functionality. // TODO(pdr): Break dependency on LayoutObject functionality.
const LayoutObject& layout_object = *box_fragment_.GetLayoutObject(); const LayoutObject& layout_object = *box_fragment_.GetLayoutObject();
...@@ -343,8 +342,10 @@ void NGBoxFragmentPainter::PaintObject( ...@@ -343,8 +342,10 @@ void NGBoxFragmentPainter::PaintObject(
return; return;
} }
if (paint_phase == PaintPhase::kMask && is_visible) if (paint_phase == PaintPhase::kMask && is_visible) {
return PaintMask(paint_info, paint_offset); PaintMask(paint_info, paint_offset);
return;
}
if (paint_phase == PaintPhase::kForeground && if (paint_phase == PaintPhase::kForeground &&
paint_info.ShouldAddUrlMetadata()) { paint_info.ShouldAddUrlMetadata()) {
...@@ -379,15 +380,13 @@ void NGBoxFragmentPainter::PaintObject( ...@@ -379,15 +380,13 @@ void NGBoxFragmentPainter::PaintObject(
PaintFloats(paint_info); PaintFloats(paint_info);
} }
} else { } else {
if (paint_phase != PaintPhase::kFloat) { if (paint_phase != PaintPhase::kFloat)
PaintBlockChildren(paint_info); PaintBlockChildren(paint_info);
}
if (paint_phase == PaintPhase::kFloat || if (paint_phase == PaintPhase::kFloat ||
paint_phase == PaintPhase::kSelection || paint_phase == PaintPhase::kSelection ||
paint_phase == PaintPhase::kTextClip) { paint_phase == PaintPhase::kTextClip)
PaintFloats(paint_info); PaintFloats(paint_info);
}
} }
} }
...@@ -525,9 +524,8 @@ void NGBoxFragmentPainter::PaintBlockFloatingChildren( ...@@ -525,9 +524,8 @@ void NGBoxFragmentPainter::PaintBlockFloatingChildren(
continue; continue;
} }
if (const auto* child_container = if (const auto* child_container =
DynamicTo<NGPhysicalContainerFragment>(&child_fragment)) { DynamicTo<NGPhysicalContainerFragment>(&child_fragment))
PaintBlockFloatingChildren(*child_container, paint_info); 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