mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb: Rename LineBoxFragment::render() => paint()
Also LayoutText::render_fragment() => render(). This matches the names in the rest of LibWeb.
This commit is contained in:
parent
b2a7943b4e
commit
2762e3d80a
Notes:
sideshowbarker
2024-07-19 05:20:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2762e3d80a9
5 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue