Browse Source

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

Also LayoutText::render_fragment() => render(). This matches the names
in the rest of LibWeb.
Andreas Kling 5 years ago
parent
commit
2762e3d80a

+ 1 - 1
Libraries/LibWeb/Layout/LayoutBlock.cpp

@@ -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);
                 }
             }
         }

+ 1 - 1
Libraries/LibWeb/Layout/LayoutText.cpp

@@ -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());

+ 1 - 1
Libraries/LibWeb/Layout/LayoutText.h

@@ -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;
 

+ 2 - 2
Libraries/LibWeb/Layout/LineBoxFragment.cpp

@@ -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);
     }
 }
 

+ 1 - 1
Libraries/LibWeb/Layout/LineBoxFragment.h

@@ -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;