mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 20:55:08 +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
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()) {
|
for (auto& fragment : line_box.fragments()) {
|
||||||
if (context.should_show_line_box_borders())
|
if (context.should_show_line_box_borders())
|
||||||
context.painter().draw_rect(enclosing_int_rect(fragment.absolute_rect()), Color::Green);
|
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();
|
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();
|
auto& painter = context.painter();
|
||||||
painter.set_font(specified_style().font());
|
painter.set_font(specified_style().font());
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual const char* class_name() const override { return "LayoutText"; }
|
virtual const char* class_name() const override { return "LayoutText"; }
|
||||||
virtual bool is_text() const final { return true; }
|
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;
|
virtual void split_into_lines(LayoutBlock& container, LayoutMode) override;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
|
||||||
void LineBoxFragment::render(PaintContext& context)
|
void LineBoxFragment::paint(PaintContext& context)
|
||||||
{
|
{
|
||||||
for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) {
|
for (auto* ancestor = layout_node().parent(); ancestor; ancestor = ancestor->parent()) {
|
||||||
if (!ancestor->is_visible())
|
if (!ancestor->is_visible())
|
||||||
|
@ -42,7 +42,7 @@ void LineBoxFragment::render(PaintContext& context)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is<LayoutText>(layout_node())) {
|
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(); }
|
float absolute_x() const { return absolute_rect().x(); }
|
||||||
|
|
||||||
void render(PaintContext&);
|
void paint(PaintContext&);
|
||||||
|
|
||||||
bool ends_in_whitespace() const;
|
bool ends_in_whitespace() const;
|
||||||
bool is_justifiable_whitespace() const;
|
bool is_justifiable_whitespace() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue