mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 03:58:12 +00:00
LibWeb: Hoist an early return in Layout::BlockBox::paint()
This commit is contained in:
parent
194d7d3471
commit
17e9a5e0c5
1 changed files with 18 additions and 19 deletions
|
@ -54,9 +54,11 @@ void BlockBox::paint(PaintContext& context, PaintPhase phase)
|
|||
|
||||
Box::paint(context, phase);
|
||||
|
||||
if (!children_are_inline())
|
||||
return;
|
||||
|
||||
// FIXME: Inline backgrounds etc.
|
||||
if (phase == PaintPhase::Foreground) {
|
||||
if (children_are_inline()) {
|
||||
for (auto& line_box : m_line_boxes) {
|
||||
for (auto& fragment : line_box.fragments()) {
|
||||
if (context.should_show_line_box_borders())
|
||||
|
@ -65,10 +67,8 @@ void BlockBox::paint(PaintContext& context, PaintPhase phase)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (phase == PaintPhase::FocusOutline) {
|
||||
if (children_are_inline()) {
|
||||
for (auto& line_box : m_line_boxes) {
|
||||
for (auto& fragment : line_box.fragments()) {
|
||||
auto* node = fragment.layout_node().dom_node();
|
||||
|
@ -83,7 +83,6 @@ void BlockBox::paint(PaintContext& context, PaintPhase phase)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HitTestResult BlockBox::hit_test(const Gfx::IntPoint& position, HitTestType type) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue