LibWeb: Rename LineBoxFragment::render() => paint()

Also LayoutText::render_fragment() => render(). This matches the names
in the rest of LibWeb.
This commit is contained in:
Andreas Kling 2020-06-28 23:07:44 +02:00
parent b2a7943b4e
commit 2762e3d80a
Notes: sideshowbarker 2024-07-19 05:20:03 +09:00
5 changed files with 6 additions and 6 deletions

View file

@ -710,7 +710,7 @@ void LayoutBlock::paint(PaintContext& context, PaintPhase phase)
for (auto& fragment : line_box.fragments()) {
if (context.should_show_line_box_borders())
context.painter().draw_rect(enclosing_int_rect(fragment.absolute_rect()), Color::Green);
fragment.render(context);
fragment.paint(context);
}
}
}

View file

@ -65,7 +65,7 @@ const String& LayoutText::text_for_style(const StyleProperties& style) const
return node().data();
}
void LayoutText::render_fragment(PaintContext& context, const LineBoxFragment& fragment) const
void LayoutText::paint_fragment(PaintContext& context, const LineBoxFragment& fragment) const
{
auto& painter = context.painter();
painter.set_font(specified_style().font());

View file

@ -46,7 +46,7 @@ public:
virtual const char* class_name() const override { return "LayoutText"; }
virtual bool is_text() const final { return true; }
void render_fragment(PaintContext&, const LineBoxFragment&) const;
void paint_fragment(PaintContext&, const LineBoxFragment&) const;
virtual void split_into_lines(LayoutBlock& container, LayoutMode) override;

View file

@ -34,7 +34,7 @@
namespace Web {
void LineBoxFragment::render(PaintContext& context)
void LineBoxFragment::paint(PaintContext& context)
{
for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) {
if (!ancestor->is_visible())
@ -42,7 +42,7 @@ void LineBoxFragment::render(PaintContext& context)
}
if (is<LayoutText>(layout_node())) {
to<LayoutText>(layout_node()).render_fragment(context, *this);
to<LayoutText>(layout_node()).paint_fragment(context, *this);
}
}

View file

@ -60,7 +60,7 @@ public:
float absolute_x() const { return absolute_rect().x(); }
void render(PaintContext&);
void paint(PaintContext&);
bool ends_in_whitespace() const;
bool is_justifiable_whitespace() const;